alphaFeedback

WorksComputer Science

Approximate Solomonoff Induction: On the Robustness of Learned Universal Predictors

AI contributions
  • AI tools
View details

Abstract

Why large language models trained via log-loss minimization over massive and diverse datasets exhibit broad capabilities and generalizable skills is not yet fully understood. Grau-Moya et al. (ICML 2024) offer a conceptual explanation through the lens of meta-learning: if sequence-generating environments νν are drawn from a prior wνw_ν, minimizing population log-loss recovers the corresponding Bayesian mixture predictor ξ=∑νwννξ=\sum_νw_νν. In the idealized limit in which ww is a universal prior, the optimal predictor corresponds to Solomonoff universal induction. Practical machine learning algorithms, however, generally produce only approximately optimal predictors. This raises a natural question: Does the prediction performance remain robust under approximation? In this paper, we first provide a tight bound on the worst-case effect of approximation on prediction error. We show any predictor ρρ satisfying DKL(ξ∥ρ)≤ηD_{KL}(ξ\|ρ)\leq η retains bounded cumulative-expected-squared prediction error. However, while the Bayesian mixture predictor ξξ has error O(log⁡(1/wμ))O(\log(1/w_μ)) in an environment μμ, we establish a tight Θ(η/wμ)Θ(η/w_μ) bound on the excess error of ρρ relative to ξξ. Thus, approximation can substantially degrade performance in environments assigned small prior probability. In sharp contrast, when environments are averaged according to prior ww, we prove that the excess prediction error is only O(η)O(η). Furthermore, we establish a distribution-shift theorem for dominated shifts from a training prior ww to a test prior w′w', interpolating our average-case and worst-case guarantees. Finally, we extend our robustness analysis to a finite-sampling setting relevant to learning universal predictors with neural networks and Transformers, where DKL(ξ∥ρ)D_{KL}(ξ\|ρ) could be unbounded. [For the full abstract, see the paper.]

Introduction

Large language models (LLMs) trained for sequential prediction have acquired a remarkable range of capabilities from vast and diverse data. In recent years, scaling model capacity, expanding the volume and breadth of training data, increasing computational resources [KMI+20], and incorporating real-world human interaction [13] have driven substantial progress, transforming LLMs into increasingly general-purpose systems for problem solving and induction. Given the substantial and rapidly growing resources required to train frontier models, understanding the benefits and limitations of further scaling has become more important than ever, raising a range of fundamental research questions.

Classical learning frameworks, such as semi-supervised learning, PAC learning, and reinforcement learning, typically analyze learning relative to a specified task, data distribution, and hypothesis class. In contrast, a single LLM trained on heterogeneous data can perform a wide range of tasks—including translation, writing, coding, and mathematical reasoning—without task-specific retraining, guided only by instructions or a few demonstrations provided in context. Although pretraining is largely driven by minimizing next-token log loss, the resulting models exhibit capabilities involving generation, abstraction, reasoning, and planning, often without explicit supervision for each capability. Moreover, once trained, such a model can be deployed at a comparatively low marginal cost per inference [2]. LLM training thus distills enormous amounts of data and computation into a reusable neural network whose fixed parameters support adaptive behavior across contexts and tasks. This phenomenon suggests that learning to predict sufficiently rich and heterogeneous sequences can give rise to broad knowledge and generalizable computational abilities. Precisely how such capabilities emerge from a seemingly simple prediction objective, however, remains incompletely understood, and is central to characterizing the fundamental power and limitations of the current LLM paradigm.

Motivating Prior Work. Meta-learning, or learning to learn, provides a conceptual framework for understanding this phenomenon [4]. Meta-learning treats the learning procedure itself as an object of optimization, using experience accumulated across tasks to improve the learning of new tasks [HAMS21]. It involves two levels of learning, either explicitly or implicitly: an inner process learns a particular task from a specified dataset and objective, while an outer process optimizes aspects of the inner process—such as the model class, initialization, or optimization rule—with the aim of reducing the data or computation required to solve new tasks.

One approach is memory-based meta-learning (MBML) [SBB+16], in which a memory-augmented model—an LLM whose context serves as memory, for example—is trained on data drawn from a distribution over tasks using a single optimization loop. The two levels of learning are realized through different mechanisms: the outer process updates the model’s parameters across training tasks, whereas the inner process adapts to an individual task through changes in the model’s memory state. At test time, the parameters remain fixed, and adaptation proceeds through memory dynamics without task-specific parameter updates. In-context learning thus emerges as a learned adaptation procedure implemented through the model’s forward computation.

This MBML framework admits a precise Bayesian characterization [OWR+19, XRLM22]. For a fixed horizon nn, suppose that each training sequence is generated by first sampling a task ν\nu from a prior distribution ww, then sampling data x1:nx_{1:n} from ν\nu. Suppose a sufficiently expressive model ρθ∗\rho_{\theta^*} is trained to minimize the population log-loss objective

Ln(ρθ)=Eν∼wEx∼ν[−∑t=1nlog⁡2ρθ(xt∣x<t)]\mathcal{L}_n(\rho_\theta)=\mathbb{E}_{\nu\sim w}\mathbb{E}_{x\sim\nu}\left[-\sum_{t=1}^{n}\log_2\rho_\theta(x_t\mid x_{<t})\right]

Then ρθ∗\rho_{\theta^*} behaves as the Bayesian mixture predictor ξ(x)=∑νwν⋅ν(x)\xi(x)=\sum_\nu w_\nu\cdot\nu(x). In particular,

ρθ∗(xt∣x<t)=ξ(xt∣x<t)=∑νwν(x<t)ν(xt∣x<t),\rho_{\theta^*}(x_t\mid x_{<t})=\xi(x_t\mid x_{<t})=\sum_\nu w_\nu(x_{<t})\nu(x_t\mid x_{<t}),

where wν(x<t)∝wν⋅ν(x<t)w_\nu(x_{<t}) \propto w_\nu\cdot\nu(x_{<t}) is the posterior probability of ν\nu. Thus, conditioned on an observed prefix x<tx_{<t}, the Bayesian predictor combines the predictions of the candidate tasks according to their posterior probabilities, reflecting both their prior weights and their consistency with the observations. The appeal of the Bayesian perspective lies in its strong prediction guarantee [8]: at test time, ρθ∗\rho_{\theta^*} can achieve efficient in-context adaptation to any task μ\mu with positive prior weight wμ>0w_\mu> 0:

Sn(μ,ρθ∗):=∑t=1nEx<t∼μ∑xt(μ(xt∣x<t)−ρθ∗(xt∣x<t))2=O(log⁡1wμ).S_n(\mu, \rho_{\theta^*}) := \sum_{t=1}^{n} \mathbb{E}_{x_{<t}\sim\mu} \sum_{x_t} \left(\mu(x_t \mid x_{<t}) - \rho_{\theta^*}(x_t \mid x_{<t})\right)^2 = O\left(\log\frac{1}{w_\mu}\right).

This provides a principled explanation of in-context learning as amortized Bayesian prediction: training amortizes learning across tasks by encoding an adaptive inference procedure into the forward computation of a neural network. In particular, consider the class of all computable environments1 endowed with the universal prior wν=Θ(2−K(ν))w_\nu= \Theta(2^{-K(\nu)}), where K(ν)K(\nu) denotes the Kolmogorov complexity of ν\nu. The resulting single Bayesian predictor becomes Solomonoff universal induction [Sol78, Sol86], which achieves cumulative expected squared prediction error O(K(μ))O(K(\mu)) simultaneously in every computable environment μ\mu, independently of the prediction horizon. Building on this connection, [3] proposed learning increasingly general predictors by meta-training neural networks on synthetic data generated by computationally bounded environments, represented by universal Turing machines with bounded program lengths and runtimes. Progressively relaxing these bounds while increasing model capacity and training data offers a principled approach toward universal prediction, provided that the corresponding prediction objectives can be optimized sufficiently well. The paper [4] placed this framework within the broader context of algorithmic compression: minimizing sequential log loss can be understood as learning to compress observations by approximating and amortizing Bayesian prediction over their underlying generative mechanisms. Under a universal prior, the resulting predictor favors simpler computational explanations while averaging over all computable hypotheses according to both their simplicity and their consistency with the observations.

Our Main Contributions. The classical theory [Sol78, Sol86, Hut05] focuses on the exact predictor that attains the minimum population log loss. In practice, however, limited model capacity and imperfect optimization—even when training data are abundant—mean that learned models generally only approximate the ideal Bayesian predictor. As emphasized by [4], extending the Bayesian view of meta-learning beyond exact realizability and perfect optimization remains an important open direction. Motivated by this line of work, we take a first step toward understanding the fundamental gap between ideal Bayesian prediction and practical learned predictors by addressing the following central question:

To what extent do the guarantees of the ideal Bayesian predictor continue to hold when practical learning architectures can only approximate it?

In this work, we develop a theory of Bayesian and universal sequential prediction under approximation, characterizing performance and robustness across a broad range of regimes: Environment-Wise Worst-Case Robustness. We show in Theorem 1 that every approximate predictor ρ\rho with excess population log loss at most η\eta, equivalently DKL(ξ∥ρ)≤ηD_{\mathrm{KL}}(\xi\Vert\rho) \leq\eta, retains a finite bound on its cumulative expected squared prediction error. Specifically, for any environment μ\mu, the error of the ideal Bayesian predictor ξ\xi is O(log⁡(1/wμ))O(\log(1/w_\mu)), whereas that of ρ\rho is bounded by O(log⁡1/wμ+η/wμ)O\left(\log1/w_\mu+\eta/w_\mu\right). We further show in Theorem 3 that the approximation-dependent term is tight. In particular, for a universal mixture, an error of order ηK(μ)2\eta^2_{K(\mu)} is attained for infinitely many computable environments μ\mu. We also extend the analysis to two other fundamental measures of prediction error: cumulative KL divergence and cumulative squared Hellinger distance.

Typical Average-Case Robustness: In sharp contrast, we prove in Theorem 4 that, when performance is averaged over environments according to the prior ww—the canonical average-case measure—the excess prediction error due to approximation is only O(η)O(\eta). We show that an analogous average-case bound holds for cumulative KL divergence but not for cumulative squared Hellinger distance.

Distribution-Shift Robustness: Furthermore, we establish a distribution-shift theorem (Theorem 5) for dominated shifts from a training prior ww to a test prior w′w', where wν′≤Cwνw'_\nu\le Cw_\nu for every environment ν\nu and some C≥1C \ge1. The resulting error bound is O(log⁡C+Cη)O(\log C+C\eta), thereby interpolating between our average-case and worst-case guarantees.

Finite-Data Robustness: Finally, in § 5, we study predictors learned from finitely many training sequences. We show exponential upper-tail bounds for population KL error, yet its expectation can remain infinite when unseen events receive zero probability. Nevertheless, by using a weaker alternative measure of approximation, we extend our robustness analysis to this setting. In particular, we bound the expected average excess prediction error by the representation and optimization errors plus a finite-sample term that decays exponentially with the number of training sequences.

Taken together, these results provide a broad characterization of robustness to approximation in sequential prediction. They explain the sharp contrast between strong aggregate benchmark performance and poor worst-case performance on rare environments. This sharp distinction between worst-case and average-case behavior helps explain why approximation may have a much milder effect in practice. It may also shed light on the strong empirical performance of learned universal predictors [3, 4] and, more broadly, of LLMs across a wide range of tasks and benchmarks. Our distribution-shift theorem has several implications beyond basic transfer principle for sequential prediction. It provides a quantitative rationale for targeted sampling and synthetic data generation designed to protect important but underrepresented families of tasks. In particular, it provides a theoretical rationale for expecting that augmenting real-world datasets with Universal-Turing-Machine-generated (UTM-generated) data may improve prediction performance on practically important task families, as suggested by [3].

Notations and Preliminaries

We assume familiarity with the basic notions in probability theory and algorithmic information theory, including conditional probability and Turing machines. See, for example, [12] for background. Throughout this paper, log⁡\log denotes the base-2 logarithm, while ln⁡\ln denotes the natural logarithm. Entropy and KL divergence are measured in bits.

Sequence measures and mixtures. Let X\mathcal{X} be a finite alphabet with ∣X∣≥2\lvert\mathcal{X}\rvert\ge2. Suppose μ\mu is a probability measures on X∞\mathcal{X}^{\infty} (representing a sequence generative model). We use μ(x1:n)\mu(x_{1:n}) to denote the probability that a sequence sampled from μ\mu begins with x1:nx_{1:n}, and μ1:n\mu_{1:n} to denote the induced distribution on Xn\mathcal{X}^n. We denote x<t:=x1:t−1x_{<t} := x_{1:t-1}. Let M={ν1,ν2,…}\mathcal{M} = \{\nu_1, \nu_2, \ldots\} be a countable class of measures. Let {wi>0}\{w_i > 0\} be weights satisfying ∑iwi=1\sum_i w_i = 1. Then, define the mixture ξ:=∑i=1∞wiνi\xi:= \sum_{i=1}^{\infty} w_i \nu_i. When μ=νi\mu= \nu_i is a selected measure from M\mathcal{M}, we write wμ:=wiw_\mu:= w_i. Note that for every finite string xx, ξ(x)≥wμμ(x)\xi(x) \ge w_\mu\mu(x).

The universal mixture. Solomonoff [Sol78, Sol86] introduced a universal prior for sequence prediction. Unless stated otherwise, we fix a universal monotone Turing machine UU throughout the paper. We say a measure ν\nu is estimable if there exists a monotone Turing machine that takes an infinite sequence of independent, uniformly random bits and generates a sequence according to ν\nu. Let K(ν)K(\nu) denote the length of the shortest program for ν\nu on this machine.

Let MU\mathcal{M}_U denote the class consisting of all estimable measures. Set

Z:=∑ν∈MU2−K(ν),wν:=2−K(ν)Z,ξU:=∑ν∈MUwνν.Z := \sum_{\nu\in\mathcal{M}_U} 2^{-K(\nu)}, \qquad w_\nu:= \frac{2^{-K(\nu)}}{Z}, \qquad\xi_U := \sum_{\nu\in\mathcal{M}_U} w_\nu\nu.

The programs are described in a prefix-free fashion, so Kraft’s inequality gives 0<Z≤10 < Z \le1, and wν=Θ(2−K(ν))w_\nu= \Theta(2^{-K(\nu)}). The fair-coin measure belongs to MU\mathcal{M}_U, so ξU(x)>0\xi_U(x) > 0 for every finite string xx. We also use K(x)K(x) for the usual prefix-free Kolmogorov complexity of a finite string or integer xx.

KL divergence. For two measures μ\mu and ρ\rho and n≥1n \ge1, define

DKLn(μ∥ρ):=∑x1:n∈Xnμ(x1:n)log⁡μ(x1:n)ρ(x1:n),DKL(μ∥ρ):=lim⁡n→∞DKLn(μ∥ρ).D_{\mathrm{KL}}^n(\mu\Vert\rho) := \sum_{x_{1:n} \in\mathcal{X}^n} \mu(x_{1:n}) \log\frac{\mu(x_{1:n})}{\rho(x_{1:n})}, \qquad D_{\mathrm{KL}}(\mu\Vert\rho) := \lim_{n \to\infty} D_{\mathrm{KL}}^n(\mu\Vert\rho).

We use the convention that 0log⁡(0/q)=00 \log(0/q) = 0 and plog⁡(p/0)=+∞p \log(p/0) = +\infty for p>0p > 0. The finite-horizon divergences are nondecreasing in nn, so the supremum is also their limit. The chain rule gives that:

DKLn(μ∥ρ)=∑t=1nEx<t∼μ[DKL(μ(⋅∣x<t)∥ρ(⋅∣x<t))].(1)D_{\mathrm{KL}}^n(\mu\Vert\rho) = \sum_{t=1}^{n} \mathbb{E}_{x_{<t} \sim\mu} \left[D_{\mathrm{KL}}\left(\mu(\cdot\mid x_{<t})\Vert\rho(\cdot\mid x_{<t})\right)\right]. \tag*{(1)}

Cumulative prediction error. As in [Sol78], we use cumulative squared prediction error as our primary criterion for evaluating the prediction performance of ρ\rho:

Sn(μ,ρ):=∑t=1nEx<t∼μ∑a∈X(μ(a∣x<t)−ρ(a∣x<t))2,S(μ,ρ):=lim⁡n→∞Sn(μ,ρ).S_n(\mu,\rho) := \sum_{t=1}^{n} \mathbb{E}_{x_{<t} \sim\mu} \sum_{a \in\mathcal{X}} \left(\mu(a \mid x_{<t}) - \rho(a \mid x_{<t})\right)^2, \qquad S(\mu,\rho) := \lim_{n \to\infty} S_n(\mu,\rho).

To examine the scope of our guarantees across different error criteria, we also consider cumulative squared Hellinger error:

Hel⁡n(μ,ρ):=∑t=1nEx<t∼μ∑a∈X(μ(a∣x<t)−ρ(a∣x<t))2,Hel⁡(μ,ρ):=lim⁡n→∞Hel⁡n(μ,ρ).\operatorname{Hel}_n(\mu,\rho) := \sum_{t=1}^{n} \mathbb{E}_{x_{<t} \sim\mu} \sum_{a \in\mathcal{X}} \left(\sqrt{\mu(a \mid x_{<t})} - \sqrt{\rho(a \mid x_{<t})}\right)^2, \qquad\operatorname{Hel}(\mu,\rho) := \lim_{n \to\infty} \operatorname{Hel}_n(\mu,\rho).

and cumulative KL error:

Dn(μ,ρ):=∑t=1nEx<t∼μ[DKL(μ(⋅∣x<t)∥ρ(⋅∣x<t))]=DKLn(μ∥ρ),D(μ,ρ):=lim⁡n→∞Dn(μ,ρ).D_n(\mu,\rho) := \sum_{t=1}^{n} \mathbb{E}_{x_{<t} \sim\mu} \left[D_{\mathrm{KL}}\left(\mu(\cdot\mid x_{<t})\Vert\rho(\cdot\mid x_{<t})\right)\right] = D_{\mathrm{KL}}^n(\mu\Vert\rho), \qquad D(\mu,\rho) := \lim_{n \to\infty} D_n(\mu,\rho).

The following inequalities relate these error criteria.

Lemma 1 (Theorem 3.2.3 in [7]). Let μ\mu and ρ\rho be probability measures on X∞\mathcal{X}^{\infty}. For every n≥1n \ge1,

Sn(μ,ρ)≤(ln⁡2)Dn(μ∥ρ),Hel⁡n(μ,ρ)≤(ln⁡2)Dn(μ∥ρ),Sn(μ,ρ)≤2Hel⁡n(μ,ρ).S_n(\mu,\rho) \le(\ln2)D_n(\mu\Vert\rho), \qquad\operatorname{Hel}_n(\mu,\rho) \le(\ln2)D_n(\mu\Vert\rho), \qquad S_n(\mu,\rho) \le2\operatorname{Hel}_n(\mu,\rho).

The same inequalities hold for the corresponding infinite-horizon errors SS, Hel⁡\operatorname{Hel}, and DD.

Robustness under Approximation: Task-wise Guarantee

In this section, we establish a tight task-wise prediction guarantee for a trained model ρ\rho that approximates the Bayesian predictor ξ\xi with KL gap DKL(ξ∥ρ)≤ηD_{\mathrm{KL}}(\xi\Vert\rho) \le\eta. The KL divergence provides the most natural measure of approximation quality because the population log-loss of ρ\rho at horizon nn admits the following decomposition, where HH denotes the Shannon entropy:

Ln(ρ):=Ex1:n∼ξ[−log⁡ρ(x1:n)]=H(ξ1:n)+DKLn(ξ∥ρ).\mathcal{L}_n(\rho) := \mathbb{E}_{x_{1:n}\sim\xi}\left[-\log\rho(x_{1:n})\right] = H(\xi_{1:n}) + D_{\mathrm{KL}}^n(\xi\Vert\rho).

Moreover, ξ\xi minimizes the population loss over all probability measures on X∞\mathcal{X}^{\infty}, attaining the minimum value H(ξ1:n)H(\xi_{1:n}). Thus, DKL(ξ∥ρ)≤η⇒DKLn(ξ∥ρ)≤η⟺Ln(ρ)≤min⁡πLn(π)+ηD_{\mathrm{KL}}(\xi\Vert\rho) \le\eta\Rightarrow D_{\mathrm{KL}}^n(\xi\Vert\rho) \le\eta\Longleftrightarrow\mathcal{L}_n(\rho) \le\min_{\pi}\mathcal{L}_n(\pi) + \eta.

Environment-Wise Guarantee: Upper Bound

We first extend the classical analysis of [8] by showing that, under a finite KL-divergence, the cumulative squared prediction error remains finite for every environment in M\mathcal{M}.

Theorem 1 (Environment-wise upper bound). If DKL(ξ∥ρ)≤ηD_{\mathrm{KL}}(\xi\Vert\rho) \le\eta, then for every μ∈M\mu\in\mathcal{M},

S(μ,ρ)≤eln⁡2e−1(log⁡1wμ+ηwμ).S(\mu,\rho) \le\frac{e\ln2}{e-1}\left(\log\frac{1}{w_\mu}+\frac{\eta}{w_\mu}\right).

The proof is given in Appendix § 8, which bounds the cumulative KL error for every nn by

Dn(μ∥ρ)≤ee−1(log⁡1wμ+ηwμ).D_n(\mu\Vert\rho) \le\frac{e}{e-1}\left(\log\frac{1}{w_\mu}+\frac{\eta}{w_\mu}\right).

Theorem 1 then follows from Lemma 1 that Sn(μ,ρ)≤(ln⁡2)Dn(μ∥ρ)S_n(\mu,\rho) \le(\ln2)D_n(\mu\Vert\rho) and Hel⁡n(μ,ρ)≤(ln⁡2)Dn(μ∥ρ)\operatorname{Hel}_n(\mu,\rho) \le(\ln2)D_n(\mu\Vert\rho). We thus also prove that, up to constant factors, this upper bound extends the cumulative squared Hellinger distance Hel⁡(μ,ρ)\operatorname{Hel}(\mu,\rho).

Specializing to the universal mixture ξU\xi_U and using the relation wμ=Θ(2−K(μ))w_\mu= \Theta(2^{-K(\mu)}), we obtain the following environment-wise prediction-error bound in terms of the Kolmogorov complexity K(μ)K(\mu).

Theorem 2 (Upper bound for universal prediction). If DKL(ξU∥ρ)≤ηD_{\mathrm{KL}}(\xi_U\Vert\rho) \le\eta, then for every μ∈MU\mu\in\mathcal{M}_U,

S(μ,ρ)=O(K(μ)+η⋅2K(μ)),S(\mu,\rho) = O\left(K(\mu) + \eta\cdot2^{K(\mu)}\right),

where the implicit constant depends only on the fixed universal Turing machine.

Environment-Wise Guarantee: Tight Worst-Case Lower Bound

Our next theorem shows that the approximation-dependent term η/wμ\eta/w_\mu in Theorem 1 is unavoidable and tight up to a constant factor. Remarkably, for the universal mixture, this tightness holds for infinitely many environments in MU\mathcal{M}_{\mathrm{U}}. Throughout this subsection, we restrict attention to the binary alphabet X={0,1}\mathcal{X} = \{0,1\}.

Theorem 3 (Tight lower bound for universal prediction). For every η>0\eta> 0, there are infinitely many estimable measures μ\mu such that

sup⁡ρ:DKL(ξU∥ρ)≤ηS(μ,ρ)≥Ω(K(μ)+η2K(μ)).\sup_{\rho: D_{\mathrm{KL}}(\xi_{\mathrm{U}} \Vert\rho) \le\eta} S(\mu,\rho) \ge\Omega\left(K(\mu) + \eta2^{K(\mu)}\right).

where the implicit constant depends only on the fixed universal Turing machine.

Thus, even an arbitrarily small KL-approximation gap can coexist with a cumulative squared prediction error that grows exponentially with the Kolmogorov complexity of the environment. We now describe the high-level idea behind the proof. The complete proof is given in Appendix § 10 and formalizes the following rare-prefix construction.

Rare-prefix construction. The lower bound exploits prefixes that are unlikely under the Bayesian mixture ξ\xi, but occur with probability one under a particular environment. For z∈{0,1}∞z \in\{0,1\}^{\infty}, let δz\delta_z denote the deterministic environment that outputs zz. Suppose μ=δz\mu= \delta_z and that a finite prefix yy of zz has mixture probability q:=ξ(y)q := \xi(y). We construct ρ\rho by replacing the next NN conditional predictions along zz after the prefix yy with the uniform distribution, while leaving all other predictions unchanged.

Each modified history has probability at most qq under ξ\xi, and replacing its next-symbol distribution with the uniform distribution incurs at most one bit of conditional KL divergence. Hence, the total KL cost is at most qNqN. Under μ\mu, however, every modified history is visited with probability one, and each modified prediction contributes exactly 1/21/2 to the squared prediction error. Taking N=⌊η/q⌋N = \lfloor\eta/q \rfloor yields the following lemma.

Lemma 2 (Lower bound from a rare prefix). Let μ=δz∈M\mu= \delta_z \in\mathcal{M}, and let y≺zy \prec z be a finite prefix of zz and q:=ξ(y)q := \xi(y). For every η>0\eta> 0, there exists a probability measure ρ\rho with DKL(ξ∥ρ)≤ηD_{\mathrm{KL}}(\xi\Vert\rho) \le\eta such that

S(μ,ρ)≥S∣y∣(μ,ξ)+12⌊ηq⌋.S(\mu,\rho) \ge S_{|y|}(\mu,\xi) + \frac{1}{2}\left\lfloor\frac{\eta}{q}\right\rfloor.

When q=O(wμ)q = O(w_\mu), it yields an Ω(η/wμ)\Omega(\eta/w_\mu) lower bound whenever η/wμ\eta/w_\mu is sufficiently large. The proof of Theorem 3 identifies infinitely many deterministic environments having prefixes that satisfy this condition. Since wμ=Θ(2−K(μ))w_\mu= \Theta(2^{-K(\mu)}), the resulting approximation penalty is Ω(η2K(μ))\Omega(\eta2^{K(\mu)}).

Finally, we can show that Lemma 2 also extends to cumulative KL and squared Hellinger errors. Then by Lemma 1, we have, for every n≥1n \ge1, Dn(μ∥ρ)≥Sn(μ,ρ)/ln⁡2D_n(\mu\Vert\rho) \ge S_n(\mu,\rho)/\ln2 and Hel⁡n(μ,ρ)≥Sn(μ,ρ)/2\operatorname{Hel}_n(\mu,\rho) \ge S_n(\mu,\rho)/2. Thus, our construction can establish similar lower bounds as in Theorem 3 for cumulative KL and squared Hellinger errors.

Robustness under Approximation: Average-Case Analysis

In this section, we show that the environment-wise prediction guarantee under approximation can be sharply improved when performance is averaged across environments. We then establish a distribution-shift theorem for moving from the training prior ww to a dominated test prior w′w'. The result interpolates between our average-case and environment-wise guarantees. Before stating the theorems and discussing their implications, we explain the motivation for developing an average-case theory of robustness under approximation. § 3.2 shows that the approximation-dependent term η/wμ\eta/w_\mu in Theorem 1 is unavoidable in the worst case. For an environment with a small prior weight wμw_\mu, this term can overwhelm the classical O(log⁡(1/wμ))O(\log(1/w_\mu)) prediction guarantee for the ideal Bayesian predictor.

Such pessimistic worst-case guarantees, however, stand in contrast to the strong empirical performance of learned universal predictors [3, 4] and, more broadly, to the outstanding performance of LLMs across a wide range of tasks and benchmarks. This contrast raises the question of why approximation has a milder effect in practice. Empirical evaluations typically aggregate performance across many tasks or environments, whereas an environment-wise guarantee treats each environment individually. Accordingly, we first study prediction performance averaged over the same prior ww that defines the training mixture ξ\xi. We show that, in sharp contrast to the worst-case setting, approximation has a substantially milder effect under this average-case criterion. Our distribution-shift theorem can then be used to extend this guarantee to other test distributions.

Sharp Contrast between Typical and Task-Wise Prediction Guarantees

Theorem 4 (Approximation robustness: average-case upper bound). If DKL(ξ∥ρ)≤ηD_{\mathrm{KL}}(\xi\mathbin\Vert\rho) \le\eta, then

Eμ∼w[Sn(μ,ρ)−Sn(μ,ξ)]≤(ln⁡2)η.\mathbb{E}_{\mu\sim w}\left[S_n(\mu,\rho)-S_n(\mu,\xi)\right] \le(\ln2)\eta.

This theorem is a consequence of the following exact average-case decomposition:

Proposition 1 (Exact average-case decomposition). For every predictor ρ\rho and every n≥1n \ge1,

Eμ∼wSn(μ,ρ)=Eμ∼wSn(μ,ξ)+Sn(ξ,ρ).\mathbb{E}_{\mu\sim w}S_n(\mu,\rho)=\mathbb{E}_{\mu\sim w}S_n(\mu,\xi)+S_n(\xi,\rho).

Theorem 4 matches the exact prediction-error baseline of the ideal mixture ξ\xi: the average cost of replacing ξ\xi with ρ\rho is Sn(ξ,ρ)S_n(\xi,\rho). Together with Theorem 3, this result shows that approximation can preserve aggregate performance while substantially degrading performance on individual tasks.

Remark 1. Note that Theorem 4 cannot be obtained simply by averaging the bound in Theorem 1. Instead, the proof exploits the mixture structure to identify the average excess error exactly. To see this, consider the case when M\mathcal{M} is infinite, the following average diverges:

Eμ∼w1wμ=∑μ∈Mwμ1wμ=∑μ∈M1=+∞.\mathbb{E}_{\mu\sim w}\frac{1}{w_\mu}=\sum_{\mu\in\mathcal{M}}w_\mu\frac{1}{w_\mu}=\sum_{\mu\in\mathcal{M}}1=+\infty.

A fundamental differentiation: The role of approximation in Theorem 4 also highlights an interesting distinction between exact Bayesian prediction and its approximate counterpart. The classical theory applies to cumulative squared prediction error, KL error, and Hellinger error. As we show in § 3.1, the task-wise guarantees under approximation extend to all three error criteria. By contrast, the average-case decomposition in Proposition 1 holds only for cumulative squared prediction error and cumulative KL error. For KL error, the chain rule immediately yields the analogous decomposition.

Eμ∼wDn(μ∥ρ)=Eμ∼wDn(μ∥ξ)+Dn(ξ∥ρ).\mathbb{E}_{\mu\sim w}D_n(\mu\mathbin\Vert\rho)=\mathbb{E}_{\mu\sim w}D_n(\mu\mathbin\Vert\xi)+D_n(\xi\mathbin\Vert\rho).

Hence, if DKL(ξ∥ρ)≤ηD_{\mathrm{KL}}(\xi\mathbin\Vert\rho)\le\eta, then

Eμ∼wDn(μ∥ρ)≤Eμ∼wDn(μ∥ξ)+η.\mathbb{E}_{\mu\sim w}D_n(\mu\mathbin\Vert\rho)\le\mathbb{E}_{\mu\sim w}D_n(\mu\mathbin\Vert\xi)+\eta.

For cumulative squared Hellinger error, neither the analogous decomposition nor a uniform additive O(η)O(\eta) excess-error bound relative to ξ\xi holds in general. The mixture predictor ξ\xi need not minimize average squared Hellinger error; a counterexample is given in Appendix § 12.

Remark 2. Prior work has shown that the average gains of knowledge distillation can coexist with degraded performance on underrepresented subgroups and tail classes [11 WNZ+23]. By viewing ξ\xi as the teacher model and ρ\rho as the student model, our results provide a complementary explanation in Bayesian sequential prediction: a small population KL distillation loss controls the student’s average excess prediction error, but can coexist with substantial degradation relative to the teacher in rare environments.

Approximation Robustness under Distribution Shift

The preceding analysis evaluates performance under the training prior ww. We now consider a different test prior w′w'. Our next theorem shows that the average-case guarantee remains robust when the test prior is dominated by the training prior, in the sense that wν′≤Cwνw'_\nu\le Cw_\nu for every environment ν\nu and some C≥1C\ge1. This result has several implications beyond establishing a basic transfer principle for sequential prediction and interpolating between the worst-case and average-case analyses of robustness under approximation. One potentially significant implication is that the theory provides basic support for the argument that augmenting real-world datasets with Universal-Turing-Machine-generated (UTM-generated) data can improve prediction performance on practically important families of tasks, as suggested by [3].

Theorem 5 (Approximation robustness under distribution shift). Let w′w' be a probability distribution on M\mathcal{M} satisfying wν′≤Cwνw'_\nu\le Cw_\nu for every ν∈M\nu\in\mathcal{M} and some C≥1C\ge1. Define the corresponding mixture

ξ′≔∑ν∈Mwν′ν.\xi' \coloneqq\sum_{\nu\in\mathcal{M}}w'_\nu\nu.

If DKL(ξ∥ρ)≤ηD_{\mathrm{KL}}(\xi\mathbin\Vert\rho)\le\eta, then, for every n≥1n\ge1,

Eμ∼w′Sn(μ,ρ)≤Eμ∼w′Sn(μ,ξ′)+(ln⁡2)(log⁡C+Cη)2\mathbb{E}_{\mu\sim w'}S_n(\mu,\rho)\le\mathbb{E}_{\mu\sim w'}S_n(\mu,\xi')+(\ln2)\left(\sqrt{\log C}+\sqrt{C\eta}\right)^2
≤Eμ∼w′Sn(μ,ξ)+(ln⁡2)(log⁡C+Cη)2.(2)\le\mathbb{E}_{\mu\sim w'}S_n(\mu,\xi)+(\ln2)\left(\sqrt{\log C}+\sqrt{C\eta}\right)^2. \tag*{(2)}

In particular, the average excess error relative to ξ′\xi' is O(log⁡C+Cη)O(\log C+C\eta).

Cumulative KL error satisfies a distribution-shift bound of the same order. Indeed, the KL decomposition and the domination ξ′≤Cξ\xi'\le C\xi, together with the KL transfer inequality (Lemma 3) used in the proof of Theorem 1, give

Eμ∼w′Dn(μ∥ρ)≤Eμ∼w′Dn(μ∥ξ′)+ee−1(log⁡C+Cη).\mathbb{E}_{\mu\sim w'}D_n(\mu\mathbin\Vert\rho)\le\mathbb{E}_{\mu\sim w'}D_n(\mu\mathbin\Vert\xi')+\frac{e}{e-1}\left(\log C+C\eta\right).

Implication I: Rare task families and targeted sampling. Theorem 5 interpolates between average-case and environment-wise guarantees. Taking w′=ww' = w and C=1C = 1 recovers the average-case upper bound in Theorem 4. At the other extreme, if w′w' is concentrated on a single environment μ\mu, we may take C=1/wμC = 1/w_\mu. Then ξ′=μ\xi' = \mu, and

Sn(μ,ρ)≤(ln⁡2)(log⁡1wμ+ηwμ)2=O(log⁡1wμ+ηwμ).S_n(\mu,\rho) \le(\ln2)\left(\sqrt{\log\frac{1}{w_\mu}}+\sqrt{\frac{\eta}{w_\mu}}\right)^2 = O\left(\log\frac{1}{w_\mu}+\frac{\eta}{w_\mu}\right).

Thus, the theorem also recovers the order of the environment-wise bound in Theorem 1.

More generally, let A⊆MA \subseteq\mathcal{M} be a family of environments with prior mass w(A)>0w(A) > 0, and consider evaluation under w′=w(⋅∣A)w' = w(\cdot\mid A). Since wν′≤wν/w(A)w'_\nu\le w_\nu/w(A), we may take C=1/w(A)C = 1/w(A) and obtain

Eμ∼w′Sn(μ,ρ)≤Eμ∼w′Sn(μ,ξ′)+O(log⁡1w(A)+ηw(A)).(3)\mathbb{E}_{\mu\sim w'}S_n(\mu,\rho) \le\mathbb{E}_{\mu\sim w'}S_n(\mu,\xi') + O\left(\log\frac{1}{w(A)}+\frac{\eta}{w(A)}\right). \tag*{(3)}

For this conditional test distribution, the guarantee depends on the total prior mass of the task family.

This suggests a way to improve coverage of an important but underrepresented family. Let qq be a probability distribution supported on that family, and define

w~:=(1−λ)w+λq,ξq:=∑ν∈Mqνν,ξ~:=∑ν∈Mw~νν=(1−λ)ξ+λξq,\widetilde{w} := (1-\lambda)w+\lambda q,\qquad\xi_q := \sum_{\nu\in\mathcal{M}}q_\nu\nu,\qquad\widetilde{\xi} := \sum_{\nu\in\mathcal{M}}\widetilde{w}_\nu\nu=(1-\lambda)\xi+\lambda\xi_q,

where λ∈(0,1)\lambda\in(0,1) is the fraction of training mass allocated to qq. Since qν≤w~ν/λq_\nu\le\widetilde{w}_\nu/\lambda, any predictor with DKL(ξ~∥ρ)≤ηD_{\mathrm{KL}}(\widetilde{\xi}\mathbin{\|}\rho) \le\eta satisfies

Eμ∼qSn(μ,ρ)≤Eμ∼qSn(μ,ξq)+O(log⁡1λ+ηλ).\mathbb{E}_{\mu\sim q}S_n(\mu,\rho) \le\mathbb{E}_{\mu\sim q}S_n(\mu,\xi_q) + O\left(\log\frac{1}{\lambda}+\frac{\eta}{\lambda}\right).

The approximation guarantee for this family therefore depends on its assigned training mass λ\lambda, independently of its rarity under the original prior ww.

Within this model, the bound provides a quantitative rationale for increasing the training probability assigned to important but underrepresented task families, for example through targeted sampling or synthetic data generation. In particular, it supports augmenting UTM-generated training data with real-world datasets to improve prediction performance on practically important task families, as suggested by [3].

Implication II: Fine-tuning with replay. Replaying pretraining data during adaptation can mitigate forgetting [1, 9]. Theorem 5 can be used to give a population-level analysis of this strategy. Interpret qq as the target-task distribution and ww as the original pretraining distribution. During fine-tuning, draw a fraction λ\lambda of sequences from ξq\xi_q and a fraction 1−λ1-\lambda from ξ\xi. The resulting population training distribution is ξ~=(1−λ)ξ+λξq\widetilde{\xi}=(1-\lambda)\xi+\lambda\xi_q.

Suppose the fine-tuned predictor ρft\rho_{\mathrm{ft}} approximately minimizes the population log-loss, in that

DKL(ξ~∥ρft)≤η.D_{\mathrm{KL}}(\widetilde{\xi}\mathbin{\|}\rho_{\mathrm{ft}}) \le\eta.

Both task distributions are dominated by the fine-tuning prior: qν≤w~νλq_\nu\le\frac{\widetilde{w}_\nu}{\lambda}, wν≤w~ν1−λw_\nu\le\frac{\widetilde{w}_\nu}{1-\lambda}. Applying Theorem 5 to each distribution yields the simultaneous guarantees

Eμ∼qSn(μ,ρft)≤Eμ∼qSn(μ,ξq)+O(log⁡1λ+ηλ),\mathbb{E}_{\mu\sim q}S_n(\mu,\rho_{\mathrm{ft}}) \le\mathbb{E}_{\mu\sim q}S_n(\mu,\xi_q) + O\left(\log\frac{1}{\lambda}+\frac{\eta}{\lambda}\right),
Eμ∼wSn(μ,ρft)≤Eμ∼wSn(μ,ξ)+O(log⁡11−λ+η1−λ).\mathbb{E}_{\mu\sim w}S_n(\mu,\rho_{\mathrm{ft}}) \le\mathbb{E}_{\mu\sim w}S_n(\mu,\xi) + O\left(\log\frac{1}{1-\lambda}+\frac{\eta}{1-\lambda}\right).

The first bound controls prediction error on the target distribution, while the second controls error on the original distribution. Since ξ\xi minimizes average squared prediction error under ww, the second bound also limits the possible increase in average error relative to the predictor before fine-tuning.

For fixed approximation accuracy η\eta, increasing λ\lambda tightens the target-distribution bound while weakening the original-distribution bound. The mixing parameter λ\lambda therefore controls the trade-off between the performance guarantees on the target and original task distributions. Finally, we remark that these guarantees assume that the fine-tuned predictor achieves the stated population approximation accuracy η\eta.

Implication III: Choice of reference universal Turing machine. Let UU and U′U' be two universal Turing machines. By the invariance theorem, there is a constant cU,U′≥0c_{U,U'} \ge0 such that

∣KU(ν)−KU′(ν)∣≤cU,U′\left|K_U(\nu)-K_{U'}(\nu)\right| \le c_{U,U'}

for every estimable ν\nu.

Consider the universal priors wν=2−KU(ν)/ZUw_\nu= 2^{-K_U(\nu)}/Z_U, wν′=2−KU′(ν)/ZU′w'_\nu= 2^{-K_{U'}(\nu)}/Z_{U'}, where ZV:=∑ν∈M2−KV(ν)Z_V := \sum_{\nu\in\mathcal{M}}2^{-K_V(\nu)}. Then we have wν′/wν=2KU(ν)−KU′(ν)⋅ZU/ZU′≤4cU,U′w'_\nu/w_\nu= 2^{K_U(\nu)-K_{U'}(\nu)}\cdot Z_U/Z_{U'} \le4^{c_{U,U'}}. If training uses the mixture ξ\xi induced by UU and DKL(ξ∥ρ)≤ηD_{\mathrm{KL}}(\xi\Vert\rho)\le\eta, then test under the prior induced by U′U' satisfies

Eμ∼w′Sn(μ,ρ)≤Eμ∼w′Sn(μ,ξ′)+O(cU,U′+4cU,U′η).\mathbb{E}_{\mu\sim w'}S_n(\mu,\rho) \le\mathbb{E}_{\mu\sim w'}S_n(\mu,\xi') + O\left(c_{U,U'}+4^{c_{U,U'}}\eta\right).

Thus, changing the reference machine preserves the form of the average-case guarantee, with constants depending only on the pair of machines, independently of the environment and prediction horizon. These constants may nevertheless be large because their dependence on the compiler overhead is exponential.

Robustness of Learning and Prediction with Finite Data

We now examine whether our prediction guarantees remain robust when the predictor is learned from finitely many samples. Fix a prediction horizon nn, and let ρm\rho_m be learned from mm independent training sequences Dm∼(ξ1:n)⊗m\mathcal{D}_m\sim(\xi_{1:n})^{\otimes m} by minimizing the empirical log-loss over the hypothesis class H\mathcal{H} up to an additive optimization error ηopt≥0\eta_{\mathrm{opt}}\ge0. In addition to this optimization error, the model class incurs a representation error ηrep:=min⁡ρ∈HDKL(ξ∥ρ)\eta_{\mathrm{rep}}:=\min_{\rho\in\mathcal{H}}D_{\mathrm{KL}}(\xi\Vert\rho). We consider ηrep+ηopt>0\eta_{\mathrm{rep}}+\eta_{\mathrm{opt}}>0.

We show an exponential upper-tail bound on the population KL error: for every γ>0\gamma>0, there exist constants cγ,Cγ>0c_\gamma,C_\gamma>0 such that2, for all m≥1m\ge1,

Pr⁡Dm{DKLn(ξ∥ρm)>ηrep+ηopt+γ}≤Cγe−cγm.(4)\Pr_{\mathcal{D}_m}\left\{D_{\mathrm{KL}}^n(\xi\Vert\rho_m)>\eta_{\mathrm{rep}}+\eta_{\mathrm{opt}}+\gamma\right\}\le C_\gamma e^{-c_\gamma m}. \tag*{(4)}

Nevertheless, this high-probability guarantee need not imply a finite expected KL error. A learned predictor may assign zero probability to an event that has positive population probability but is absent from the training data. Precisely, it is possible that

EDmDKLn(ξ∥ρm)=+∞for every finite m.(5)\mathbb{E}_{\mathcal{D}_m}D_{\mathrm{KL}}^n(\xi\Vert\rho_m)=+\infty\qquad\text{for every finite }m. \tag*{(5)}

Despite this difficulty, we show that our squared prediction error guarantees remain meaningful in expectation. It follows from two observations. First, if we characterize the approximation quality with a weaker condition Sn(ξ,ρm)≤ηS_n(\xi,\rho_m)\leq\eta instead of DKLn(ξ∥ρm)≤ηD_{\mathrm{KL}}^n(\xi\Vert\rho_m)\leq\eta, then there exist constants cc and CC such that for any m≥1m\geq1,

EDmSn(ξ,ρm)≤ηrep+ηopt+C⋅ne−c⋅m,(6)\mathbb{E}_{\mathcal{D}_m}S_n(\xi,\rho_m)\leq\eta_{\mathrm{rep}}+\eta_{\mathrm{opt}}+C\cdot ne^{-c\cdot m}, \tag*{(6)}

which means that the finite-sample contribution to the approximation error decays exponentially with the training sample size. Moreover, one can check that all of our theorems extend from the KL approximation condition to the weaker condition Sn(ξ,ρ)≤ηS_n(\xi,\rho)\leq\eta, with corresponding changes to the constants. In particular, Theorem 4 and (6) together imply: for any m≥1m\geq1,

EDm[Eμ∼wSn(μ,ρm)−Eμ∼wSn(μ,ξ)]≤ηrep+ηopt+C⋅ne−c⋅m.(7)\mathbb{E}_{\mathcal{D}_m}\left[\mathbb{E}_{\mu\sim w}S_n(\mu,\rho_m)-\mathbb{E}_{\mu\sim w}S_n(\mu,\xi)\right]\leq\eta_{\mathrm{rep}}+\eta_{\mathrm{opt}}+C\cdot ne^{-c\cdot m}. \tag*{(7)}

Conclusion

We characterize how approximation affects Bayesian prediction and Solomonoff induction. Our results show that approximation can preserve average performance while substantially degrading performance on individual tasks. The analysis also extends to dominated shifts from the training prior to the test prior and is robust in the finite-sample setting.

An important direction for future work is to develop mitigation strategies that provide stronger guarantees across all tasks simultaneously. We explore initial approaches in Appendices § 15 and § 16.

Another open direction is length generalization. Our finite-sample analysis considers training and test sequences of the same length; extending these guarantees to longer test sequences remains a challenge. One possibility is to combine pretrained predictors with continual learning, using minimum description length principle [5 PH05] to guide adaptation as new observations become available.

Acknowledgments

We thank Xinyu Mao and Guangxu Yang for early discussions, and Marcus Hutter for his comments. We used AI tools for polishing the language, searching the literature, and developing and drafting all proofs. We have checked and revised all proofs and take full responsibility for the whole content of this work.

Proof of Theorem 1

Lemma 3 (KL transfer under domination). Let P,Q,RP,Q,R be probability distributions on the same finite space Ω\Omega. Suppose that Q≥w⋅PQ \ge w \cdot P for some w∈(0,1]w \in(0,1]. Then

DKL(P∥R)≤ee−1(log⁡1w+1w⋅DKL(Q∥R)).D_{\mathrm{KL}}(P\|R) \le\frac{e}{e-1}\left(\log\frac{1}{w}+\frac{1}{w}\cdot D_{\mathrm{KL}}(Q\|R)\right).

Proof. The claim is immediate when w=1w=1, because then Q=PQ=P. We may therefore assume 0<w<10<w<1. The conclusion is also immediate if DKL(Q∥R)=∞D_{\mathrm{KL}}(Q\|R)=\infty.

Write Q=wP+(1−w)VQ=wP+(1-w)V for a probability distribution VV, and define

α(x):=wP(x)Q(x)\alpha(x):=\frac{wP(x)}{Q(x)}

on the support of QQ, with α(x)=0\alpha(x)=0 elsewhere. Then 0≤α≤10\le\alpha\le1 and EQα=w\mathbb{E}_Q\alpha=w. Introduce an auxiliary binary variable ZZ. Under Q~\widetilde{Q}, let X∼QX\sim Q and

Z∣X=x∼Bern⁡(α(x)).Z\mid X=x\sim\operatorname{Bern}(\alpha(x)).

Thus Q~(X∈⋅∣Z=1)=P\widetilde{Q}(X\in\cdot\mid Z=1)=P. Define R~\widetilde{R} using the same conditional law of ZZ given XX, but with X∼RX\sim R, and put

r:=ERα=Pr⁡[Z=1].r:=\mathbb{E}_R\alpha=\Pr[Z=1].

Finiteness of DKL(Q∥R)D_{\mathrm{KL}}(Q\mathbin\Vert R) implies 0<r<10<r<1. Let R1R_1 denote the conditional law of XX under R~\widetilde{R} given Z=1Z=1, and define R0R_0 analogously. One can check that

R1(x)=α(x)r⋅R(x),R0(x)=1−α(x)1−r⋅R(x),andR=rR1+(1−r)R0.R_1(x)=\frac{\alpha(x)}{r}\cdot R(x),\qquad R_0(x)=\frac{1-\alpha(x)}{1-r}\cdot R(x),\qquad\text{and}\quad R=rR_1+(1-r)R_0.

The conditional kernel from XX to ZZ is the same under the two joint distributions. Hence

DKL(Q~∥R~)=DKL(Q∥R).D_{\mathrm{KL}}(\widetilde{Q}\mathbin\Vert\widetilde{R})=D_{\mathrm{KL}}(Q\mathbin\Vert R).

Applying the chain rule in the other direction gives

DKL(Q∥R)=dB(w∥r)+wDKL(P∥R1)+(1−w)DKL(V∥R0)≥dB(w∥r)+wDKL(P∥R1),(8)\begin{aligned} D_{\mathrm{KL}}(Q\mathbin\Vert R) &=d_B(w\mathbin\Vert r)+wD_{\mathrm{KL}}(P\mathbin\Vert R_1)+(1-w)D_{\mathrm{KL}}(V\mathbin\Vert R_0)\\ &\ge d_B(w\mathbin\Vert r)+wD_{\mathrm{KL}}(P\mathbin\Vert R_1), \tag*{(8)} \end{aligned}

where

dB(u∥v):=ulog⁡uv+(1−u)log⁡1−u1−vd_B(u\mathbin\Vert v):=u\log\frac{u}{v}+(1-u)\log\frac{1-u}{1-v}

is binary KL divergence. Moreover,

R1(x)R(x)=α(x)r,\frac{R_1(x)}{R(x)}=\frac{\alpha(x)}{r},

and therefore

DKL(P∥R)=DKL(P∥R1)+EP[log⁡α]−log⁡r≤DKL(P∥R1)−log⁡r.\begin{aligned} D_{\mathrm{KL}}(P\mathbin\Vert R) &=D_{\mathrm{KL}}(P\mathbin\Vert R_1)+\mathbb{E}_P[\log\alpha]-\log r\\ &\le D_{\mathrm{KL}}(P\mathbin\Vert R_1)-\log r. \end{aligned}

Together with (8), this yields

DKL(P∥R)≤DKL(Q∥R)−dB(w∥r)w−log⁡r.(9)D_{\mathrm{KL}}(P\mathbin\Vert R)\le\frac{D_{\mathrm{KL}}(Q\mathbin\Vert R)-d_B(w\mathbin\Vert r)}{w}-\log r. \tag*{(9)}

We next use the inequality

−log⁡r≤ee−1(log⁡1w+1wdB(w∥r)),0<w,r<1.(10)-\log r\le\frac{e}{e-1}\left(\log\frac{1}{w}+\frac{1}{w}d_B(w\mathbin\Vert r)\right),\qquad0<w,r<1. \tag*{(10)}

To verify it, first observe that

log⁡1w+1wdB(w∥r)=−log⁡r+1−wwlog⁡1−w1−r.\log\frac{1}{w}+\frac{1}{w}d_B(w\mathbin{\|}r)=-\log r+\frac{1-w}{w}\log\frac{1-w}{1-r}.

If r≥wr \ge w, the second term is nonnegative, and (10) follows. If r<wr < w, the desired inequality is equivalent to

e(1−w)log⁡1−r1−w≤−wlog⁡r.e(1-w)\log\frac{1-r}{1-w}\le-w\log r.

For fixed ww, let

Fw(r):=−wlog⁡r−e(1−w)log⁡1−r1−w.F_w(r):=-w\log r-e(1-w)\log\frac{1-r}{1-w}.

This function is strictly convex on (0,w)(0,w), and its stationary point is

r∗:=we−(e−1)w.r_*:=\frac{w}{e-(e-1)w}.

Writing a:=1−wa:=1-w, direct substitution gives

Fw(r∗)=G(a):=[1+(e−1)a]log⁡[1+(e−1)a]−(1−a)log⁡(1−a)−ealog⁡e.F_w(r_*)=G(a):=[1+(e-1)a]\log[1+(e-1)a]-(1-a)\log(1-a)-ea\log e.

Now G(0)=G(1)=0G(0)=G(1)=0 and

G′(a)=(e−1)log⁡[1+(e−1)a]+log⁡(1−a),G'(a)=(e-1)\log[1+(e-1)a]+\log(1-a),

while

G′′(a)=1ln⁡2((e−1)21+(e−1)a−11−a).G''(a)=\frac{1}{\ln2}\left(\frac{(e-1)^2}{1+(e-1)a}-\frac{1}{1-a}\right).

The numerator of G′′G'' after taking a common denominator is affine and strictly decreasing, positive at a=0a=0 and negative at a=1a=1. Thus G′G' first increases and then decreases. Since G′(0)=0G'(0)=0 and G′(a)→−∞G'(a)\to-\infty as a↑1a\uparrow1, it is initially positive and then crosses zero exactly once. Hence GG first increases and then decreases to G(1)=0G(1)=0. It follows that G(a)≥0G(a)\ge0, proving (10).

Let c:=e/(e−1)c:=e/(e-1). Substituting (10) into (9), and using dB(w∥r)≤DKL(Q∥R)d_B(w\mathbin{\|}r)\le D_{\mathrm{KL}}(Q\mathbin{\|}R), gives

DKL(P∥R)≤DKL(Q∥R)w+(c−1)dB(w∥r)w+clog⁡1w≤c(log⁡1w+1wDKL(Q∥R)).\begin{aligned} D_{\mathrm{KL}}(P\mathbin{\|}R)\le\frac{D_{\mathrm{KL}}(Q\mathbin{\|}R)}{w}+(c-1)\frac{d_B(w\mathbin{\|}r)}{w}+c\log\frac{1}{w} \\ &\le c\left(\log\frac{1}{w}+\frac{1}{w}D_{\mathrm{KL}}(Q\mathbin{\|}R)\right). \end{aligned}

Proof of Theorem 1. Fix nn, and apply Lemma 3 to

P=μ1:n,Q=ξ1:n,R=ρ1:n.P=\mu_{1:n},\qquad Q=\xi_{1:n},\qquad R=\rho_{1:n}.

Since ξ≥wμμ\xi\ge w_\mu\mu,

DKLn(μ∥ρ)≤ee−1(log⁡1wμ+DKLn(ξ∥ρ)wμ)≤ee−1(log⁡1wμ+ηwμ).D_{\mathrm{KL}}^n(\mu\mathbin{\|}\rho)\le\frac{e}{e-1}\left(\log\frac{1}{w_\mu}+\frac{D_{\mathrm{KL}}^n(\xi\mathbin{\|}\rho)}{w_\mu}\right)\le\frac{e}{e-1}\left(\log\frac{1}{w_\mu}+\frac{\eta}{w_\mu}\right).

Applying Lemma 1 and taking the supremum over nn gives the conclusion. □

Proof of Lemma 2

Let m:=∣y∣m := |y| and set N:=⌊η/q⌋N := \lfloor\eta/q \rfloor. Note that

q=ξ(y)≥wμμ(y)=wμ>0.q = \xi(y) \ge w_\mu\mu(y) = w_\mu> 0.

For 0≤ℓ<N0 \le\ell< N, write

hℓ:=z1:m+ℓ.h_\ell:= z_{1:m+\ell}.

We construct a measure ρ\rho on {0,1}∞\{0,1\}^{\infty} as follows: set

ρ(⋅∣hℓ):=Bern⁡(1/2),0≤ℓ<N,\rho(\mathord\cdot\mid h_\ell) := \operatorname{Bern}(1/2), \qquad0 \le\ell< N,

and let ρ\rho agree with ξ\xi at every other history of positive ξ\xi-probability. At histories of zero ξ\xi-probability, choose an arbitrary conditional distribution.

For any distribution pp on {0,1}\{0,1\},

DKL(p∥Bern⁡(1/2))=1−H(p)≤1,D_{\mathrm{KL}}(p \mathbin\Vert\operatorname{Bern}(1/2)) = 1 - H(p) \le1,

where H(p)H(p) is the binary entropy. Hence, for every nn, the chain rule gives

DKLn(ξ∥ρ)≤∑0≤ℓ<Nξ(hℓ)DKL(ξ(⋅∣hℓ)∥Bern⁡(1/2))≤∑0≤ℓ<Nξ(hℓ)≤Nq.D_{\mathrm{KL}}^n(\xi\mathbin\Vert\rho) \le\sum_{0 \le\ell< N} \xi(h_\ell)D_{\mathrm{KL}}(\xi(\mathord\cdot\mid h_\ell)\mathbin\Vert\operatorname{Bern}(1/2)) \le\sum_{0 \le\ell< N} \xi(h_\ell) \le Nq.

Taking the supremum over nn yields

DKL(ξ∥ρ)≤η.D_{\mathrm{KL}}(\xi\mathbin\Vert\rho) \le\eta.

The modified conditionals occur only after the prefix yy. Therefore, the first mm predictions along zz are unchanged, and

Sm(μ,ρ)=Sm(μ,ξ).S_m(\mu,\rho) = S_m(\mu,\xi).

At each history hℓh_\ell, the next-symbol distribution under μ=δz\mu= \delta_z is a point mass, whereas ρ(⋅∣hℓ)=Bern⁡(1/2)\rho(\mathord\cdot\mid h_\ell) = \operatorname{Bern}(1/2). Thus

(μ(1∣hℓ)−ρ(1∣hℓ))2+(μ(0∣hℓ)−ρ(0∣hℓ))2=12.(\mu(1 \mid h_\ell) - \rho(1 \mid h_\ell))^2 + (\mu(0 \mid h_\ell) - \rho(0 \mid h_\ell))^2 = \frac{1}{2}.

Consequently,

S(μ,ρ)≥Sm+N(μ,ρ)=Sm(μ,ξ)+N2.S(\mu,\rho) \ge S_{m+N}(\mu,\rho) = S_m(\mu,\xi) + \frac{N}{2}.

This finishes the proof.

Proof of Theorem 3

We remark Lemma 2 already gives a nearly exponential lower bound in the universal setting. Specifically, for every nn, since ∑h∈{0,1}nξU(h)=1\sum_{h \in\{0,1\}^n} \xi_U(h) = 1, there is a string hn∈{0,1}nh_n \in\{0,1\}^n such that ξU(hn)≤2−n\xi_U(h_n) \le2^{-n}. Let μn:=δhn0∞\mu_n := \delta_{h_n0^\infty}. We have

n−O(1)≤K(μn)≤n+O(log⁡n).n - O(1) \le K(\mu_n) \le n + O(\log n).

The first inequality is by combining (i) ξU(hn)≤2−n\xi_U(h_n) \le2^{-n} and (ii) ξU(hn)≥wμn=Θ(2−K(μn)).\xi_U(h_n) \ge w_{\mu_n} = \Theta(2^{-K(\mu_n)}). Lemma 2 therefore yields, for all sufficiently large nn,

sup⁡ρ:DKL(ξU∥ρ)≤ηS(μn,ρ)=Ω(η2K(μn)K(μn)O(1)).\sup_{\rho:D_{\mathrm{KL}}(\xi_U\Vert\rho)\le\eta} S(\mu_n,\rho)=\Omega\left(\eta\frac{2^{K(\mu_n)}}{K(\mu_n)^{O(1)}}\right).

This matches the upper bound in Theorem 1 up to a polynomial factor. We next show that this factor can be removed.

We will make use of the following coding theorem.

Lemma 4 (Corollary 4.3.1 in [12]). If PP is a lower semi-computable semi-measure on {0,1}∗\{0,1\}^* with ∑y∈{0,1}∗P(y)≤1\sum_{y\in\{0,1\}^*}P(y)\le1, then there is a constant cP=K(P)+O(1)c_P=K(P)+O(1) such that K(x)≤−log⁡P(x)+cPK(x)\le-\log P(x)+c_P.

Proof of Theorem 3. For m≥1m\ge1, define

Cm:={1m0s:s∈{0,1}m},C:=⋃m≥1Cm.C_m:=\{1^m0s:s\in\{0,1\}^m\},\qquad C:=\bigcup_{m\ge1}C_m.

Note that the set CC is prefix-free. Since ∣Cm∣=2m|C_m|=2^m, a counting argument gives a string ym∈Cmy_m\in C_m satisfying K(ym)≥mK(y_m)\ge m. Here

K(y):=min⁡{∣p∣:U(p)=y}K(y):=\min\{|p|:U(p)=y\}

is the prefix Kolmogorov complexity of the string yy. Denote μm:=δym0∞\mu_m:=\delta_{y_m0^\infty} the deterministic measure outputting ym0∞y_m0^\infty. Note that μm\mu_m is estimable, as it can hard-code the self-delimiting program generating ymy_m and then output zeros forever. In addition, we have K(μm)≤K(ym)+O(1)K(\mu_m)\le K(y_m)+O(1).

Let MUM_U be the Solomonoff prior

MU(y):=∑p:U(p)=y∗2−∣p∣.M_U(y):=\sum_{p:U(p)=y^*}2^{-|p|}.

which is semicomputable. Since CC is prefix-free, ∑y∈CMU(y)≤1\sum_{y\in C}M_U(y)\le1. By letting P(y)=MU(y)⋅1y∈CP(y)=M_U(y)\cdot1_{y\in C}, Lemma 4 therefore gives

MU(y)=O(2−K(y))for every y∈C,M_U(y)=O\left(2^{-K(y)}\right)\qquad\text{for every }y\in C,

Furthermore, a standard fact in algorithmic information theory (see e.g. Section 1.2.5 in [8]) says that ξU(y)=O(MU(y))\xi_U(y)=O(M_U(y)). Thus,

ξU(y)=O(2−K(y))for every y∈C,\xi_U(y)=O\left(2^{-K(y)}\right)\qquad\text{for every }y\in C,

In particular,

ξU(ym)=O(2−K(ym))=O(2−K(μm)).\xi_U(y_m)=O\left(2^{-K(y_m)}\right)=O\left(2^{-K(\mu_m)}\right).

Fix η>0\eta>0. Applying Lemma 2 with μ=μm\mu=\mu_m and y=ymy=y_m gives: there exists a universal constant CU>0C_U>0, such that

sup⁡ρ:DKL(ξU∥ρ)≤ηS(μm,ρ)≥12⌊η2K(μm)CU⌋≥14CU(K(μm)+η2K(μm)),\sup_{\rho:D_{\mathrm{KL}}(\xi_U\Vert\rho)\le\eta}S(\mu_m,\rho)\ge\frac{1}{2}\left\lfloor\frac{\eta2^{K(\mu_m)}}{C_U}\right\rfloor\ge\frac{1}{4C_U}\left(K(\mu_m)+\eta2^{K(\mu_m)}\right),

for infinitely many mm. □

Proof of Proposition 1

For a history hh with ξ(h)>0\xi(h)>0, let w(μ∣h):=wμμ(h)/ξ(h)w(\mu\mid h):=w_\mu\mu(h)/\xi(h) denote the posterior weight of μ\mu. For any symbol a∈Xa\in\mathcal{X},

ξ(a∣h)=∑μ∈Mw(μ∣h)μ(a∣h).\xi(a\mid h)=\sum_{\mu\in\mathcal{M}}w(\mu\mid h)\mu(a\mid h).

The variance decomposition gives

∑μ∈Mw(μ∣h)(μ(a∣h)−ρ(a∣h))2=∑μ∈Mw(μ∣h)(μ(a∣h)−ξ(a∣h))2+(ξ(a∣h)−ρ(a∣h))2.\sum_{\mu\in\mathcal{M}}w(\mu\mid h)(\mu(a\mid h)-\rho(a\mid h))^2=\sum_{\mu\in\mathcal{M}}w(\mu\mid h)(\mu(a\mid h)-\xi(a\mid h))^2+(\xi(a\mid h)-\rho(a\mid h))^2.

Multiplying by ξ(h)\xi(h) and using ξ(h)w(μ∣h)=wμμ(h)\xi(h)w(\mu\mid h)=w_\mu\mu(h) yields

∑μ∈Mwμμ(h)(μ(a∣h)−ρ(a∣h))2=∑μ∈Mwμμ(h)(μ(a∣h)−ξ(a∣h))2+ξ(h)(ξ(a∣h)−ρ(a∣h))2.\sum_{\mu\in\mathcal{M}}w_\mu\mu(h)(\mu(a\mid h)-\rho(a\mid h))^2=\sum_{\mu\in\mathcal{M}}w_\mu\mu(h)(\mu(a\mid h)-\xi(a\mid h))^2+\xi(h)(\xi(a\mid h)-\rho(a\mid h))^2.

Summing over all histories h∈Xt−1h\in\mathcal{X}^{t-1}, all symbols a∈Xa\in\mathcal{X}, and all 1≤t≤n1\leq t\leq n gives

Eμ∼wSn(μ,ρ)=Eμ∼wSn(μ,ξ)+Sn(ξ,ρ).\mathbb{E}_{\mu\sim w}S_n(\mu,\rho)=\mathbb{E}_{\mu\sim w}S_n(\mu,\xi)+S_n(\xi,\rho).

A counterexample for squared Hellinger error

Let μ1=δ1∞\mu_1=\delta_{1^\infty} and μ0=δ0∞\mu_0=\delta_{0^\infty}, with prior weights w1=3/4w_1=3/4 and w0=1/4w_0=1/4, respectively. Write qr=rμ1+(1−r)μ0q_r=r\mu_1+(1-r)\mu_0, so that ξ=q3/4\xi=q_{3/4}. After the first symbol x1x_1, every qrq_r with r∈(0,1)r\in(0,1) predicts the remaining sequence perfectly. Thus its averaged cumulative squared Hellinger error is

R(r):=Eμ∼wHel⁡(μ,qr)=2−2[w1r+w01−r].R(r):=\mathbb{E}_{\mu\sim w}\operatorname{Hel}(\mu,q_r)=2-2\left[w_1\sqrt{r}+w_0\sqrt{1-r}\right].

This is minimized at

r∗=w12w12+w02=910≠34.r_*=\frac{w_1^2}{w_1^2+w_0^2}=\frac{9}{10}\ne\frac{3}{4}.

Hence ξ\xi is not a minimizer, ruling out the analogous decomposition into its average error and a nonnegative approximation term. Moreover, let ρu=q3/4−u\rho_u=q_{3/4-u} for u>0u>0 sufficiently small. Since ρu\rho_u and ξ\xi differ only in their first-step predictions,

ηu:=DKL(ξ∥ρu)=w1log⁡w1w1−u+w0log⁡w0w0+u=Θ(u2).\eta_u:=D_{\mathrm{KL}}(\xi\mathbin{\|}\rho_u)=w_1\log\frac{w_1}{w_1-u}+w_0\log\frac{w_0}{w_0+u}=\Theta(u^2).

However,

R(3/4−u)−R(3/4)=3−12u+O(u2)=Θ(ηu).R(3/4-u)-R(3/4)=\frac{\sqrt{3}-1}{2}u+O(u^2)=\Theta(\sqrt{\eta_u}).

Thus, no finite constant CC can make R(3/4−u)≤R(3/4)+CηuR(3/4-u)\leq R(3/4)+C\eta_u hold for all sufficiently small uu.

Proof of Theorem 5

By Proposition 1, we have

Eμ∼w′Sn(μ,ρ)=Eμ∼w′Sn(μ,ξ′)+Sn(ξ′,ρ),(11)\mathbb{E}_{\mu\sim w'} S_n(\mu,\rho)=\mathbb{E}_{\mu\sim w'} S_n(\mu,\xi')+S_n(\xi',\rho), \tag*{(11)}

and

Eμ∼w′Sn(μ,ξ)=Eμ∼w′Sn(μ,ξ′)+Sn(ξ′,ξ)≥Eμ∼w′Sn(μ,ξ′).\mathbb{E}_{\mu\sim w'} S_n(\mu,\xi)=\mathbb{E}_{\mu\sim w'} S_n(\mu,\xi')+S_n(\xi',\xi)\ge\mathbb{E}_{\mu\sim w'} S_n(\mu,\xi').

In the following, we will show that

Sn(ξ′,ρ)≤(ln⁡2)(log⁡C+Cη)2,(12)S_n(\xi',\rho)\le(\ln2)\left(\sqrt{\log C}+\sqrt{C\eta}\right)^2, \tag*{(12)}

which concludes the proof.

The assumption wν′≤Cwνw'_\nu\le Cw_\nu implies that, for every finite history hh,

ξ′(h)=∑ν∈Mwν′ν(h)≤C∑ν∈Mwνν(h)=Cξ(h).\xi'(h)=\sum_{\nu\in\mathcal{M}}w'_\nu\nu(h)\le C\sum_{\nu\in\mathcal{M}}w_\nu\nu(h)=C\xi(h).

In particular, DKLn(ξ′∥ξ)≤log⁡CD_{\mathrm{KL}}^n(\xi'\|\xi)\le\log C. Hence, by Lemma 1, we have

Sn(ξ′,ξ)≤(ln⁡2)⋅DKLn(ξ′∥ξ)≤(ln⁡2)⋅log⁡C.(13)S_n(\xi',\xi)\le(\ln2)\cdot D_{\mathrm{KL}}^n(\xi'\|\xi)\le(\ln2)\cdot\log C. \tag*{(13)}

Next, define

Bn:=∑t=1n∑h∈Xt−1ξ′(h)∑a∈X(ξ(a∣h)−ρ(a∣h))2.B_n:=\sum_{t=1}^{n}\sum_{h\in\mathcal{X}^{t-1}}\xi'(h)\sum_{a\in\mathcal{X}}\left(\xi(a\mid h)-\rho(a\mid h)\right)^2.

Using ξ′(h)≤Cξ(h)\xi'(h)\le C\xi(h) and Lemma 1, we obtain

Bn≤C∑t=1n∑h∈Xt−1ξ(h)∑a∈X(ξ(a∣h)−ρ(a∣h))2=C⋅Sn(ξ,ρ)≤(Cln⁡2)⋅DKLn(ξ∥ρ)≤(ln⁡2)⋅Cη.(14)B_n\le C\sum_{t=1}^{n}\sum_{h\in\mathcal{X}^{t-1}}\xi(h)\sum_{a\in\mathcal{X}}\left(\xi(a\mid h)-\rho(a\mid h)\right)^2=C\cdot S_n(\xi,\rho)\le(C\ln2)\cdot D_{\mathrm{KL}}^n(\xi\|\rho)\le(\ln2)\cdot C\eta. \tag*{(14)}

Expanding the square, we obtain

Sn(ξ′,ρ)=Sn(ξ′,ξ)+Bn+2Tn,S_n(\xi',\rho)=S_n(\xi',\xi)+B_n+2T_n,

where

Tn:=∑t=1n∑h∈Xt−1ξ′(h)∑a∈X(ξ′(a∣h)−ξ(a∣h))(ξ(a∣h)−ρ(a∣h)).T_n:=\sum_{t=1}^{n}\sum_{h\in\mathcal{X}^{t-1}}\xi'(h)\sum_{a\in\mathcal{X}}\left(\xi'(a\mid h)-\xi(a\mid h)\right)\left(\xi(a\mid h)-\rho(a\mid h)\right).

By the Cauchy–Schwarz inequality,

∣Tn∣≤Sn(ξ′,ξ)Bn.|T_n|\le\sqrt{S_n(\xi',\xi)B_n}.

It follows that

Sn(ξ′,ρ)≤Sn(ξ′,ξ)+Bn+2Sn(ξ′,ξ)Bn=(Sn(ξ′,ξ)+Bn)2.\begin{aligned} S_n(\xi',\rho)&\le S_n(\xi',\xi)+B_n+2\sqrt{S_n(\xi',\xi)B_n}\\ &=\left(\sqrt{S_n(\xi',\xi)}+\sqrt{B_n}\right)^2. \end{aligned}

Together with (13) and (14), this yields (12).

Proofs for Section 5

Fix a horizon nn. Write P:=ξ1:nP := \xi_{1:n}, H:=H(P)H := H(P), and a:=ηrep+ηopta := \eta_{\mathrm{rep}} + \eta_{\mathrm{opt}}. Let ρ∗∈H\rho^* \in\mathcal{H} denote the predictor achieving DKLn(ξ∥ρ∗)=ηrepD_{\mathrm{KL}}^n(\xi\Vert\rho^*) = \eta_{\mathrm{rep}}. Write R^m\widehat{R}_m for the empirical log-loss, so that R^m(ρm)≤R^m(ρ∗)+ηopt\widehat{R}_m(\rho_m) \le\widehat{R}_m(\rho^*) + \eta_{\mathrm{opt}}.

Proof of (4). Let P^m\widehat{P}_m be the empirical distribution of the training sequences. For 0<τ<10 < \tau< 1, define

Em,τ:={∃x∈supp⁡(P):∣P^m(x)−P(x)∣>τP(x)}.E_{m,\tau} := \left\{\exists x \in\operatorname{supp}(P) : \left|\widehat{P}_m(x) - P(x)\right| > \tau P(x)\right\}.

Write d:=∣supp⁡(P)∣d := |\operatorname{supp}(P)| and

pmin⁡:=min⁡x∈supp⁡(P)P(x)>0,p_{\min} := \min_{x \in\operatorname{supp}(P)} P(x) > 0,

Hoeffding’s inequality and a union bound give

Pr⁡[Em,τ]≤2dexp⁡(−2mτ2pmin⁡2).\Pr[E_{m,\tau}] \le2d\exp\left(-2m\tau^2p_{\min}^2\right).

Conditioned on E‾m,τ\overline{E}_{m,\tau}, the nonnegativity of log-loss and approximate empirical optimality imply

(1−τ)[H+DKLn(ξ∥ρm)]≤R^m(ρm)≤(1+τ)(H+ηrep)+ηopt.(1-\tau)\left[H+D_{\mathrm{KL}}^n(\xi\Vert\rho_m)\right] \le\widehat{R}_m(\rho_m) \le(1+\tau)(H+\eta_{\mathrm{rep}})+\eta_{\mathrm{opt}}.

Thus,

DKLn(ξ∥ρm)≤a+τ1−τ[2(H+ηrep)+ηopt].D_{\mathrm{KL}}^n(\xi\Vert\rho_m) \le a+\frac{\tau}{1-\tau}\left[2(H+\eta_{\mathrm{rep}})+\eta_{\mathrm{opt}}\right].

For any γ>0\gamma>0, choose τ>0\tau>0 small enough that the second term is at most γ\gamma. The claim follows with Cγ=2dC_\gamma=2d and cγ=2τ2pmin⁡2c_\gamma=2\tau^2p_{\min}^2.

Example establishing (5). Take n=1n=1, P=Bernoulli⁡(1/2)P=\operatorname{Bernoulli}(1/2), and H\mathcal{H} consisting of ρ0:=δ0\rho_0:=\delta_0 and ρ1:=Bernoulli⁡(1/4)\rho_1:=\operatorname{Bernoulli}(1/4). On the event that all mm training observations are zero, which has probability 2−m2^{-m}, exact empirical log-loss minimization selects ρm=ρ0\rho_m=\rho_0. Since DKL(P∥ρ0)=+∞D_{\mathrm{KL}}(P\Vert\rho_0)=+\infty, the expected KL error is infinite for every finite mm. Padding deterministic zeros extends the example to any fixed nn.

Proof of (6). Recall a=ηrep+ηopta=\eta_{\mathrm{rep}}+\eta_{\mathrm{opt}}, let γa:=(1/ln⁡2−1)a\gamma_a := (1/\ln2-1)a. By 0≤Sn≤2n0\le S_n\le2n and Sn(ξ,ρm)≤(ln⁡2)DKLn(ξ∥ρm)S_n(\xi,\rho_m)\le(\ln2)D_{\mathrm{KL}}^n(\xi\Vert\rho_m), we have

EDm[(Sn(ξ,ρm)−a)+]≤2nPr⁡{DKLn(ξ∥ρm)>a+γa}≤2nCγae−cγam.\mathbb{E}_{\mathcal{D}_m}\left[(S_n(\xi,\rho_m)-a)_+\right] \le2n\Pr\left\{D_{\mathrm{KL}}^n(\xi\Vert\rho_m)>a+\gamma_a\right\} \le2nC_{\gamma_a}e^{-c_{\gamma_a}m}.

Theorems 4, 5, and 1 under squared-error approximation. Suppose Sn(ξ,ρ)≤ηS_n(\xi,\rho)\le\eta. By Proposition 1, we have

Eμ∼wSn(μ,ρ)=Eμ∼wSn(μ,ξ)+Sn(ξ,ρ)≤Eμ∼wSn(μ,ξ)+η.\mathbb{E}_{\mu\sim w}S_n(\mu,\rho)=\mathbb{E}_{\mu\sim w}S_n(\mu,\xi)+S_n(\xi,\rho)\le\mathbb{E}_{\mu\sim w}S_n(\mu,\xi)+\eta.

In the proof of Theorem 5, by almost the same argument except adjusting (14) to Bn≤CηB_n\le C\eta, we will get

Eμ∼w′Sn(μ,ρ)≤Eμ∼w′Sn(μ,ξ′)+((ln⁡2)log⁡C+Cη)2.\mathbb{E}_{\mu\sim w'}S_n(\mu,\rho)\le\mathbb{E}_{\mu\sim w'}S_n(\mu,\xi')+\left(\sqrt{(\ln2)\log C}+\sqrt{C\eta}\right)^2.

Letting w′w' concentrate on a single environment μ\mu, we recover Theorem 1, up to constants:

Sn(μ,ρ)≤((ln⁡2)log⁡1wμ+ηwμ)2=O(log⁡1wμ+ηwμ).S_n(\mu,\rho)\le\left(\sqrt{(\ln2)\log\frac{1}{w_\mu}}+\sqrt{\frac{\eta}{w_\mu}}\right)^2=O\left(\log\frac{1}{w_\mu}+\frac{\eta}{w_\mu}\right).

Theorem 3 under squared-error approximation. By Lemma 1,

{ρ:DKL(ξU∥ρ)≤η/ln⁡2}⊆{ρ:S(ξU,ρ)≤η}.\{\rho: D_{\mathrm{KL}}(\xi_U\|\rho) \leq\eta/\ln2\} \subseteq\{\rho: S(\xi_U,\rho) \leq\eta\}.

Thus Theorem 3, applied with budget η/ln⁡2\eta/\ln2, implies the same infinite-horizon lower bound under squared-error approximation, up to constants.

Mitigation With Category Information

The worst-case bounds of order Θ(n/wμ)\Theta(n/w_\mu) in Theorem 1 arise when approximation is controlled only through a single aggregate KL bound DKL(ξ∥ρ)≤ηD_{\mathrm{KL}}(\xi\|\rho) \leq\eta. When available, training-time task category information enables separate control of approximation errors within each task category, potentially improving category-wise prediction performance. Notably, the learned predictor does not require category tags at test time.

Let T={T1,…,Tg}\mathcal{T} = \{T_1,\ldots,T_g\} be a finite set of categories, with tag⁡:M→T\operatorname{tag} : \mathcal{M} \to\mathcal{T} defining the partition Mj:={μ∈M:tag⁡(μ)=Tj}\mathcal{M}_j := \{\mu\in\mathcal{M} : \operatorname{tag}(\mu) = T_j\}. Write

pj:=∑μ∈Mjwμ,ξj:=∑μ∈Mjwμpjμ.p_j := \sum_{\mu\in\mathcal{M}_j} w_\mu,\qquad\xi_j := \sum_{\mu\in\mathcal{M}_j} \frac{w_\mu}{p_j}\mu.

Thus ξ=∑j=1gpjξj\xi= \sum_{j=1}^{g} p_j \xi_j. Recall that, by Theorem 1, an aggregate approximation guarantee DKL(ξ∥ρ)≤ηD_{\mathrm{KL}}(\xi\|\rho) \leq\eta gives

Sn(ξj,ρ)=O(log⁡1pj+ηpj).S_n(\xi_j,\rho) = O\left(\log\frac{1}{p_j} + \frac{\eta}{p_j}\right).

Direct control of the category-wise KL error avoids this inverse-category-mass amplification. The following guarantee follows immediately from Lemma 1 and Proposition 1.

Proposition 2 (Category-wise approximation). If DKLn(ξj∥ρ)≤ηjD_{\mathrm{KL}}^n(\xi_j\|\rho) \leq\eta_j, then

Eμ∼w(⋅∣j)Sn(μ,ρ)−Eμ∼w(⋅∣j)Sn(μ,ξj)=Sn(ξj,ρ)≤(ln⁡2)ηj.\mathbb{E}_{\mu\sim w(\cdot\mid j)}S_n(\mu,\rho)-\mathbb{E}_{\mu\sim w(\cdot\mid j)}S_n(\mu,\xi_j)=S_n(\xi_j,\rho)\leq(\ln2)\eta_j.

In particular, if the tag identifies the generating task and DKLn(ξμ∥ρ)≤ημD_{\mathrm{KL}}^n(\xi_\mu\|\rho) \leq\eta_\mu, then

Sn(μ,ρ)=O(ημ).S_n(\mu,\rho)=O(\eta_\mu).

To control the category-wise approximation errors DKLn(ξj∥ρ)D_{\mathrm{KL}}^n(\xi_j\|\rho), one may minimize the following worst-category excess log-loss, or a suitable surrogate:

min⁡ρmax⁡1≤j≤gDKLn(ξj∥ρ).\min_\rho\max_{1\leq j\leq g} D_{\mathrm{KL}}^n(\xi_j\|\rho).

Higher moments of sequence log-loss

One may instead minimize the following sample-only training objective:

Lp(ρ):=Ex∼ξ[(−log⁡ρ(x))p],p≥2.\mathcal{L}_p(\rho) := \mathbb{E}_{x\sim\xi}\left[(-\log\rho(x))^p\right],\qquad p\geq2.

Fix a horizon nn. Let qq be the minimizer of Lp\mathcal{L}_p among all probability distributions on Xn\mathcal{X}^n. Suppose the predictor ρ\rho satisfies

Lp(ρ1:n)≤Lp(q)+η.(15)\mathcal{L}_p(\rho_{1:n}) \leq\mathcal{L}_p(q)+\eta. \tag*{(15)}

Lemma 5. For every μ∈M\mu\in\mathcal{M},

Sn(μ,ρ)=Op,∣X∣(log⁡1wμ+log⁡(n+1)+(ηwμ)1/p).S_n(\mu,\rho) = O_{p,|\mathcal{X}|}\left(\log\frac{1}{w_\mu} + \log(n+1) + \left(\frac{\eta}{w_\mu}\right)^{1/p}\right).

Here, the implicit constant in Op,∣X∣(⋅)O_{p,|\mathcal{X}|}(\cdot) may depend on pp and ∣X∣|\mathcal{X}|, but not on any other parameters.

Proof. Let Ωn:={x∈Xn:ξ(x)>0}\Omega_n := \{x \in\mathcal{X}^n : \xi(x) > 0\} be the support of ξ1:n\xi_{1:n}. Since ξ≥wμμ\xi\ge w_\mu\mu, the distribution μ1:n\mu_{1:n} is also supported on Ωn\Omega_n. The minimizer qq assigns all its mass to Ωn\Omega_n, since otherwise, renormalizing its restriction to Ωn\Omega_n would strictly decrease the objective. If ∣Ωn∣=1|\Omega_n| = 1, then the result follows immediately from

(−log⁡ρ(x))p≤η(-\log\rho(x))^p \le\eta

on the unique point x∈Ωnx \in\Omega_n. We henceforth assume ∣Ωn∣≥2|\Omega_n| \ge2. In this case, q(x)∈(0,1)q(x) \in(0,1) for every x∈Ωnx \in\Omega_n.

Write ℓ(x):=−log⁡q(x)\ell(x) := -\log q(x). Consider the Lagrangian

L(q,λ):=∑x∈Ωnξ(x)(−log⁡2q(x))p+λ(∑x∈Ωnq(x)−1).\mathcal{L}(q,\lambda) := \sum_{x\in\Omega_n}\xi(x)(-\log_2 q(x))^p+\lambda\left(\sum_{x\in\Omega_n}q(x)-1\right).

Since the minimizer is an interior point, the first-order condition gives

∂L∂q(x)=−p ξ(x)ℓ(x)p−1q(x)ln⁡2+λ=0,x∈Ωn.\frac{\partial\mathcal{L}}{\partial q(x)}=-\frac{p\,\xi(x)\ell(x)^{p-1}}{q(x)\ln2}+\lambda=0,\qquad x\in\Omega_n.

Thus, setting cn:=λln⁡2/pc_n := \lambda\ln2/p, we obtain

ξ(x)ℓ(x)p−1=cnq(x),x∈Ωn.(16)\xi(x)\ell(x)^{p-1}=c_nq(x),\qquad x\in\Omega_n. \tag*{(16)}

Since ξ(x)>0\xi(x)>0, ℓ(x)>0\ell(x)>0, and q(x)>0q(x)>0, we also have cn>0c_n>0. Summing (16) over xx gives

cn=Ex∼ξ[ℓ(x)p−1].c_n=\mathbb{E}_{x\sim\xi}\left[\ell(x)^{p-1}\right].

Since u↦u(p−1)/pu\mapsto u^{(p-1)/p} is concave, Jensen’s inequality gives

cn≤(Ex∼ξ[ℓ(x)p])(p−1)/p=Lp(q)(p−1)/p≤Lp(Unif⁡(Ωn))(p−1)/p≤(nlog⁡∣X∣)p−1.c_n\le\left(\mathbb{E}_{x\sim\xi}\left[\ell(x)^p\right]\right)^{(p-1)/p}=\mathcal{L}_p(q)^{(p-1)/p}\le\mathcal{L}_p(\operatorname{Unif}(\Omega_n))^{(p-1)/p}\le(n\log|\mathcal{X}|)^{p-1}.

We next show that qq dominates ξ\xi. If ℓ(x)≥1\ell(x)\ge1, then (16) gives

q(x)ξ(x)=ℓ(x)p−1cn≥1(nlog⁡∣X∣)p−1.\frac{q(x)}{\xi(x)}=\frac{\ell(x)^{p-1}}{c_n}\ge\frac{1}{(n\log|\mathcal{X}|)^{p-1}}.

If ℓ(x)<1\ell(x)<1, then q(x)>1/2q(x)>1/2, and hence

q(x)ξ(x)≥q(x)>12.\frac{q(x)}{\xi(x)}\ge q(x)>\frac{1}{2}.

The two cases imply

q(x)≥ξ(x)Cn,p,Cn,p:=2(nlog⁡∣X∣)p−1.(17)q(x)\ge\frac{\xi(x)}{C_{n,p}},\qquad C_{n,p}:=2(n\log|\mathcal{X}|)^{p-1}. \tag*{(17)}

We now use the approximate optimality of ρ\rho. Define z(x):=log⁡(q(x)/ρ(x))z(x) := \log(q(x)/\rho(x)). Since Lp(ρ1:n)<∞\mathcal{L}_p(\rho_{1:n}) < \infty, it has that ρ(x)>0\rho(x) > 0 on Ωn\Omega_n, and thus

−log⁡ρ(x)=ℓ(x)+z(x)≥0.-\log\rho(x) = \ell(x) + z(x) \ge0.

For p≥2p \ge2 and u,v≥0u,v \ge0, we have

vp≥up+pup−1(v−u)+∣v−u∣p.(18)v^p \ge u^p + pu^{p-1}(v-u) + |v-u|^p. \tag*{(18)}

Indeed, when v=u+sv=u+s with s≥0s\ge0, subtracting the right-hand side from the left-hand side gives a function F+(s)F_+(s) satisfying F+(0)=0F_+(0)=0 and

F+′(s)=p((u+s)p−1−up−1−sp−1)≥0.F_+'(s)=p\left((u+s)^{p-1}-u^{p-1}-s^{p-1}\right)\ge0.

When v=u−sv=u-s with 0≤s≤u0\le s\le u, the corresponding function satisfies F−(0)=0F_-(0)=0 and

F−′(s)=p(up−1−(u−s)p−1−sp−1)≥0.F_-'(s)=p\left(u^{p-1}-(u-s)^{p-1}-s^{p-1}\right)\ge0.

Applying (18) with

u=ℓ(x),v=−log⁡ρ(x)=ℓ(x)+z(x),u=\ell(x), \qquad v=-\log\rho(x)=\ell(x)+z(x),

we obtain

Lp(ρ)−Lp(q)=Ex∼ξ[(ℓ(x)+z(x))p−ℓ(x)p]≥Ex∼ξ[∣z(x)∣p]+pEx∼ξ[ℓ(x)p−1z(x)].\mathcal{L}_p(\rho)-\mathcal{L}_p(q) =\mathbb{E}_{x\sim\xi}\left[(\ell(x)+z(x))^p-\ell(x)^p\right] \ge\mathbb{E}_{x\sim\xi}\left[|z(x)|^p\right] +p\mathbb{E}_{x\sim\xi}\left[\ell(x)^{p-1}z(x)\right].

By (16),

Ex∼ξ[ℓ(x)p−1z(x)]=cn∑x∈Ωnq(x)log⁡q(x)ρ(x)=cnDKL(q∥ρ1:n)≥0.\mathbb{E}_{x\sim\xi}\left[\ell(x)^{p-1}z(x)\right] =c_n\sum_{x\in\Omega_n}q(x)\log\frac{q(x)}{\rho(x)} =c_nD_{\mathrm{KL}}(q\Vert\rho_{1:n})\ge0.

It follows from the approximation guarantee that

Ex∼ξ[∣log⁡q(x)ρ(x)∣p]≤η.(19)\mathbb{E}_{x\sim\xi}\left[\left|\log\frac{q(x)}{\rho(x)}\right|^p\right]\le\eta. \tag*{(19)}

Since ξ(x)≥wμμ(x)\xi(x)\ge w_\mu\mu(x), (17) and (19) imply

q(x)≥wμCn,pμ(x)q(x)\ge\frac{w_\mu}{C_{n,p}}\mu(x)

and

Ex∼μ[∣z(x)∣p]≤ηwμ.\mathbb{E}_{x\sim\mu}\left[|z(x)|^p\right]\le\frac{\eta}{w_\mu}.

Therefore, by Holder’s inequality,

DKLn(μ∥ρ)=Ex∼μ[log⁡μ(x)q(x)+z(x)]≤log⁡Cn,pwμ+Ex∼μ∣z(x)∣≤log⁡Cn,pwμ+(ηwμ)1/p=Op,∣X∣(log⁡1wμ+log⁡(n+1)+(ηwμ)1/p).\begin{aligned} D_{\mathrm{KL}}^n(\mu\Vert\rho) =\mathbb{E}_{x\sim\mu}\left[\log\frac{\mu(x)}{q(x)}+z(x)\right] \le\log\frac{C_{n,p}}{w_\mu}+\mathbb{E}_{x\sim\mu}|z(x)| \le\log\frac{C_{n,p}}{w_\mu}+\left(\frac{\eta}{w_\mu}\right)^{1/p} \\ &=O_{p,|\mathcal{X}|}\left(\log\frac{1}{w_\mu}+\log(n+1)+\left(\frac{\eta}{w_\mu}\right)^{1/p}\right). \end{aligned}

By applying Lemma 1, we obtain the lemma. □

References

  1. [1][BGB+25] Louis Béthune, David Grangier, Dan Busbridge, Eleonora Gualdoni, Marco Cuturi, and Pierre Ablin. Scaling laws for forgetting during finetuning with pretraining data injection. In Aarti Singh, Maryam Fazel, Daniel Hsu, Simon Lacoste-Julien, Felix Berkenkamp, Tegan Maharaj, Kiri Wagstaff, and Jerry Zhu, editors, Forty-second International Conference on Machine Learning, ICML 2025, Vancouver, BC, Canada, July 13-19, 2025, volume 267 of Proceedings of Machine Learning Research. PMLR / OpenReview.net, 2025.
  2. [2]DeepSeek-AI. Deepseek-v3.2: Pushing the frontier of open large language models, 2025.arxiv.org/abs/2512.02556
  3. [3]Jordi Grau-Moya, Tim Genewein, Marcus Hutter, Laurent Orseau, Grégoire Delétang, Elliot Catt, Anian Ruoss, Li Kevin Wenliang, Christopher Mattern, Matthew Aitchison, and Joel Veness. Learning universal predictors. In International Conference on Machine Learning, 2024.
  4. [4]Tim Genewein, Jordi Grau-Moya, Li Kevin Wenliang, Laurent Orseau, and Marcus Hutter. Algorithmic compression via pretrained neural networks. Entropy, 28(6):596, 2026.DOI
  5. [5]Peter D Grünwald. The minimum description length principle. The MIT press, 2007.DOI
  6. [7]Marcus Hutter, David Quarel, and Elliot Catt. An introduction to universal artificial intelligence. CRC Press, 2024.DOI
  7. [8]Marcus Hutter. Universal artificial intelligence: Sequential decisions based on algorithmic probability. Springer Science & Business Media, 2005.
  8. [9]Adam Ibrahim, Benjamin Thérien, Kshitij Gupta, Mats L. Richter, Quentin Gregory Anthony, Eugene Belilovsky, Timothée Lesort, and Irina Rish. Simple and scalable strategies to continually pre-train large language models. Trans. Mach. Learn. Res., 2024, 2024.arxiv.org/abs/2403.08763
  9. [11]Michal Lukasik, Srinadh Bhojanapalli, Aditya Krishna Menon, and Sanjiv Kumar. Teacher’s pet: understanding and mitigating biases in distillation. Trans. Mach. Learn. Res., 2022, 2022.arxiv.org/abs/2106.10494
  10. [12]Ming Li and Paul Vitányi. An Introduction to Kolmogorov Complexity and Its Applications. Texts in Computer Science. Springer, New York, NY, 3 edition, 2008.
  11. [13]Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. Advances in neural information processing systems, 35:27730–27744, 2022.arxiv.org/abs/2203.02155

Paper details

vlnc:W_5w3c7mnb
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Computer Science

AI tools · View statement →

Looking for related papers…
Contents