Universal Individual-Sequence Prediction with a Primitive-Recursive Superpredictor
We study universal prediction of individual binary sequences under conditional expected zero--one loss, using primitive-recursive (PR) forecasters as a computational benchmark. Adapting learning-theoretic exponential weighting and delayed expert activation, we construct a computable PR-superpredictor with explicit sublinear regret against every rational-valued PR forecaster on every individual sequence. No primitive-recursive predictor can achieve this universal property. We prove that the Prediction by Partial Matching (PPM) predictor is primitive recursive, implying that our superpredictor attains the Bayes error on every Martin-Löf random realization of a computable stationary ergodic source. We extend this optimality to nonstationary sources, including primitive-recursive interleavings of independent ergodic processes and finite-state hidden Markov models with primitive-recursive rational time-varying parameters. For the latter, the excess cumulative loss relative to the conditional Bayes benchmark is $O(\sqrt{N\log N})$, including for the error processes of nonstationary Gilbert--Elliott channels. Finally, we construct a computable sequence on which every primitive-recursive predictor has asymptotic error $1/2$ while a PR-superpredictor with a suitable effective expert ordering has vanishing normalized loss, and we derive strict separations at every Grzegorczyk level, including finite-state prediction. Keywords: Universal prediction, individual sequences, prediction with expert advice, primitive recursive functions, Kolmogorov complexity, PPM.