# Sleeping Experts in the (reflective) Solomonoff Prior

*Epistemic status: This first collaboration between Daniel Chiang (who is interested in the algorithmic information theory of incrementally constructed representations) and myself (Cole Wyeth) contains some fairly simple but elegant results that help illustrate differences between ordinary and reflective Oracle Solomonoff Induction (rOSI). Update 02/15/26: The connection between rOSI and sleeping experts was apparently known to MIRI researchers, if not published (?):* [*https://www.lesswrong.com/posts/iBBK4j6RWC7znEiDv/history-of-the-development-of-logical-induction *](https://www.lesswrong.com/posts/iBBK4j6RWC7znEiDv/history-of-the-development-of-logical-induction)

Practical reasoning relies on context-specific prediction rules, which can be described as "incomplete models" or "partial experts." One simple example is "sleeping experts" which make predictions only at certain times (when they are "awake"), discussed here: [https://www.lesswrong.com/posts/CGzAu8F3fii7gdgMC/a-simple-explanation-of-incomplete-models](https://www.lesswrong.com/posts/CGzAu8F3fii7gdgMC/a-simple-explanation-of-incomplete-models)

Can Solomonoff's universal distribution take advantage of sleeping experts? We argue that the ordinary universal distribution has only a weak version of this property, while reflective Oracle Solomonoff Induction (rOSI) is perfectly capable of representing sleeping experts.

**Note on inequalities:** Globally assume that $\overset{+}{\leq}$ is up to a small additive constant independent of all measures and sequences but possibly depending on the choice of UTM.  

Independent Sub-Environments with M
-----------------------------------

We first prove a simple lemma which we call "modular loss bound" for the ordinary universal distribution $M(x)$ where $x$ is a binary string. The rough idea is that if we have a true environment $\mu(x)$, while $\nu(x)$ is a simpler environment which agrees with $\mu(x)$ on the first $n$ bits, then we should we be able to bound the KL divergence between $\mu(x)$ and $M(x)$ for the first $n$ bits using $K(\nu)$, since both environments have identical behavior on the first $n$ bits. Let $\mathcal{M}$ be the set of lower semicomputable semimeasures.

**Lemma 1** (Modular loss bound): Denote $D_n=\sum_{t=1}^n E_\mu [d_t(\cdot)]$ where $d_t(x_{<t}) := \sum_{x_t \in \mathcal{X}} \mu(x_t|x_{<t})\ln\left(\frac{\mu(x_t|x_{<t})}{M(x_t|x_{<t})}\right)$ as the KL divergence between $\mu(x)$ and $M(x)$ for the first $n$ bits, let $\mathcal{M}^n_\mu=\{\nu\in \mathcal{M}|\forall x_{1:n}\in B^n, \nu(x_{1:n})=\mu(x_{1:n})\}$  and $\nu=\underset{\nu'\in \mathcal{M^n_\mu}}{\text{argmin}}\quad K(\nu')$, then we have $D_n\leq ln(2)K(\nu)$ with $K(\nu)\leq K(\mu)$ by definition.

**Proof:**

Define $\xi(x)=\sum_{\nu\in \mathcal M} 2^{-K(\nu)}\nu(x)$

By universality, we have

$M(x)\overset{\times}{=}\xi(x)\geq 2^{-K(\nu)}\nu(x)$$\implies ln\frac{\nu(x)}{M(x)}\leq ln(2)K(\nu)$

The first equality can be made exact to avoid introducing an additive constant on the right. This is possible by e.g. Sterkenberg's ["Universal Prediction"](https://philsci-archive.pitt.edu/14486/7/proeffin.pdf) Theorem 2.16. or slightly less rigorous but self-contained [https://arxiv.org/abs/1111.3854](https://arxiv.org/abs/1111.3854). Unfortunately that result is high context; a casual reader who still wants a rigorous proof can simply substitute $\xi$ for $M$ in our theorem statement and proof then proceed.

From the assumption $\nu\in \mathcal{M^n_\mu}$, we have $\mu(x_{1:n})=\nu(x_{1:n})$, using the telescoping property of KL divergence, we get:

$D_n=\sum_{t=1}^n E_\mu [d_t(\cdot)]=\sum_{x_{1:n}}\mu(x_{1:n})ln\frac{\mu(x_{1:n})}{M(x_{1:n})}$

$=\sum_{x_{1:n}}\mu(x_{1:n})ln\frac{\nu(x_{1:n})}{M(x_{1:n})}\leq \sum_{x_{1:n}}\mu(x_{1:n})ln(2)K(\nu)$

$=ln(2)K(\nu)$

with $K(\nu)\leq K(\mu)$ by definition  
 

Note that we can swap $\nu$ with any other $\nu'\in\mathcal{M^n_\mu}$ , with $\nu$ giving us the optimal bound.

QED

We now consider the scenario where we have a sequence of independent sub-environments $\nu_1,...\nu_k$ where we switch to the next sub-environment only at particular time-indices. By constructing an environment $\nu^*$ that implements the switching of sub-environments, we can obtain a modular loss bound based on the kolmogorov complexity of the sequence and all of the sub environments

**Proposition 2 (Modular loss bound for independent sub-environments):**

Let $0=t_0<t_1<..<t_k$ be a sequence of index and r be the K complexity of the sequence,  let $\nu_1...\nu_k \in \mathcal{M}$ be a a sequence of environments, we can construct an environment $\nu^*$  such that for $t_{j} < n\leq t_{j+1}$  we have $\nu^*(x_{1:n})=\nu_j(x_{t_{j}:n})\Pi_{i=1}^{j-1} \nu_i(x_{t_{i-1}:t_i})$. Then, for all environments $\mu$ that agree with $\nu^*$ for the first $n$ bits, we have $D_n\overset{+}{\leq} ln(2)(r+\sum_{i=1}^k K(\nu_i))$ where $D_n$ is the KL divergence between $\mu(x)$ and  $M(x)$. 

**Proof**  
We have $K(\nu^*)\leq r+\sum_{i=1}^k K(\nu_i)$ since we can construct $\nu^*$ by first computing the time indices, then implement switching of each of the sub-environments $\nu_i$. Then, for all true environments $\mu\quad s.t. \nu^*\in M_\mu^{n}, K(\mu)\geq K(\nu^*)$ , we have

$D_n=\sum_{x_{1:n}}\mu(x_{1:n})ln\frac{\mu(x_{1:n})}{M(x_{1:n})}$

$=\sum_{x_{1:n}}\mu(x_{1:n})ln\frac{\nu^*(x_{1:n})}{M(x_{1:n})}$

$\leq \sum_{x_{1:n}}\mu(x_{1:n})ln(2)K(\nu^*)=ln(2)K(\nu^*)$

$\overset{+}{\leq} ln(2)(r+\sum_{i=1}^k K(\nu_i))$

QED

**Note:** Setting some $\nu_j = M$ for $j > 1$ indicates a kind of fractal structure of $M$ at simple indices.

Sleeping Experts with rOSI
--------------------------

There is a similar modular loss bound for rOSI, but now we are able to condition the "experts" that predict each segment of the sequence on the entire previous sequence, because the class  $\mathcal{M}^O_\text{refl}$ of reflective oracle computable (rO-computable) measures is constructed in terms of Markov kernels, not joint distributions. Let $\xi^O \overset{\times}{\geq} \mathcal{M}^O_\text{refl}$ be a universal "mixture" in the class constructed as in Algorithm 1 of ["Limit-Computable Grains of Truth for Arbitrary Computable Extensive-Form (Un)Known Games"](https://www.arxiv.org/pdf/2508.16245) with the prior weight $w_\nu := 2^{-K(\nu)}$.

**Proposition 3 (Modular loss bound for rO-computable sub-environments):**

Let $0=t_0<t_1<..<t_k$ be a sequence of indices and r be the K complexity of the sequence,  let $\nu_1...\nu_k \in \mathcal{M}^O_\text{refl}$ be a a sequence of environments, we can construct an environment $\nu^*$  such that for $t_{j}<n\leq t_{j+1}$  we have $\nu^*(x_n|x_{<n})=\nu_j(x_n|x_{<n})$. Then, for all environments $\mu$ that agree with $\nu^*$ for the first $n$ bits, we have $D_n\overset{+}{\leq} ln(2)(r+\sum_{i=1}^k K(\nu_i))$ where $D_n$ is the KL divergence of $\xi^O$ from $\mu$ on the first $n$ bits.  

**Proof:** Unchanged from above.

If we do not wish to make any assumptions about a "true" environment $\mu$, it is also possible to bound the surprisal of $\xi$ on an *arbitrary* prefix $x_{1:n}$ by the cumulative surprisals ($-\lg$ loss) of $\nu_1...\nu_k$ along with Kolmogorov complexity terms as above. This is more in the spirit of prediction with expert advice. Note that we do not assume anything about a "true environment" $\mu$ in the following:

**Proposition 4 (Uniform loss bound against rO-computable sleeping experts):**

Let $0=t_0<t_1<..<t_k$ be a sequence of indices and r be the K complexity of the sequence,  let $\nu_1...\nu_k \in \mathcal{M}^O_\text{refl}$ be a a sequence of environments. Then

$-\lg \xi^O(x_{1:n}) \overset{+}{\leq} r+\sum_{i=1}^k K(\nu_i) +\sum_{j=1}^k \sum_{n = t_{j-1}}^{t_j} (-\lg \nu_j(x_n|x_{<n}))$  

where the additive constant is independent of the sequence $t_j$ and measures $\nu_j$. 

**Proof:** Simply note that $\xi^O \geq 2^{-K(\nu^*)}\nu^*$, take $-\lg()$ of both sides and expand. 

A version of Proposition 4 for an infinite but algorithmically simple sequence of switches between experts is an easy extension. Though we have not explicitly proved that ordinary Solomonoff induction fails to satisfy any of these properties, the negative results in ["Universal Prediction of Selected Bits"](https://arxiv.org/abs/1107.5531) indicate that it at least does not satisfy the infinite switching extension. 

**Future work:** An alternative proof by a market metaphor should be accessible by adapting a result of [@SamEisenstat](https://www.lesswrong.com/users/sameisenstat?mention=user).