VKVlad KulikovPublic / lectures
Information Theory for ML13 / 16

Module 13. Reasoning in LLMs: computation, search, and information

Try each exercise first. Expand worked answers or project guidance when needed; their open state is shared between RU/EN.

Download course files (.zip) 33.9 KB

The archive preserves the folder structure of nine Python solution files shared by RU/EN.

Exercise 1. Why an internal chain adds no Shannon information

Let (X,Y∗)∼P(X,Y^*)\sim P and C=Gθ(X,U)C=G_\theta(X,U), where U⊥Y∗∣XU\perp Y^*\mid X.

  1. Prove

    I(Y∗;C∣X)=0.I(Y^*;C\mid X)=0.
  2. Derive

    H(Y∗∣X,C)=H(Y∗∣X).H(Y^*\mid X,C)=H(Y^*\mid X).
  3. Explain why a restricted model can nevertheless become more accurate.

  4. Give an external observation OO for which

    I(Y∗;O∣X)>0.I(Y^*;O\mid X)>0.
Show answer and solution

Let

C=Gθ(X,U),U⊥Y∗∣X.C=G_\theta(X,U), \qquad U\perp Y^*\mid X.

1. Conditional mutual information

For fixed xx and y∗y^*,

p(c∣x,y∗)=∑u1{Gθ(x,u)=c} p(u∣x,y∗)=∑u1{Gθ(x,u)=c} p(u∣x)=p(c∣x).\begin{aligned} p(c\mid x,y^*) &= \sum_u \mathbf 1\{G_\theta(x,u)=c\} \,p(u\mid x,y^*)\\ &= \sum_u \mathbf 1\{G_\theta(x,u)=c\} \,p(u\mid x)\\ &=p(c\mid x). \end{aligned}

Therefore

Y∗⊥C∣X,Y^*\perp C\mid X,

and

I(Y∗;C∣X)=0.\boxed{I(Y^*;C\mid X)=0}.

2. Conditional entropy

By definition,

I(Y∗;C∣X)=H(Y∗∣X)−H(Y∗∣X,C).I(Y^*;C\mid X) = H(Y^*\mid X)-H(Y^*\mid X,C).

The left-hand side is zero, so

H(Y∗∣X,C)=H(Y∗∣X).\boxed{H(Y^*\mid X,C)=H(Y^*\mid X)}.

3. Why model accuracy can still improve

The equality concerns the complete input and the Bayes-optimal conditional entropy. A real model is computationally restricted. A scratchpad supplies sequential steps and memory, so the target function may become accessible to a restricted readout.

In parity, the answer is already determined by XX. A linear classifier on the raw bits cannot recover it, while a linear classifier on the state

St=St−1⊕XtS_t=S_{t-1}\oplus X_t

reads the answer exactly from SnS_n.

4. An external observation

Let XX ask for the current temperature in Tel Aviv and let Y∗Y^* be the actual temperature. A weather API response OO may satisfy

I(Y∗;O∣X)>0I(Y^*;O\mid X)>0

because the prompt itself contains no current measurement.

Other examples include a retrieval result, a hidden test, a sensor measurement, or an environmental observation following an agent action.

A calculator is a different case. If every operand and operation is already in XX, its output may add no information about a deterministic Y∗Y^*, while still supplying a reliable computation.


Exercise 2. Voting and correlated errors

For odd NN, derive

Pmaj(N,p)=∑r=(N+1)/2N(Nr)pr(1−p)N−r.P_{\mathrm{maj}}(N,p) = \sum_{r=(N+1)/2}^{N} {N\choose r}p^r(1-p)^{N-r}.
  1. Show that for p>1/2p>1/2 and independent attempts the probability tends to one.

  2. What happens for p<1/2p<1/2?

  3. Construct a fully correlated error model and show that increasing NN provides no benefit.

  4. Which sampling mechanisms might reduce trajectory correlation?

Show answer and solution

Let Bi∈{0,1}B_i\in\{0,1\} indicate whether trajectory ii is correct, with

P(Bi=1)=p.P(B_i=1)=p.

Under independence,

R=∑i=1NBiR=\sum_{i=1}^{N}B_i

is binomial. For odd NN, the majority is correct exactly when

R≥N+12.R\ge\frac{N+1}{2}.

Hence

Pmaj(N,p)=∑r=(N+1)/2N(Nr)pr(1−p)N−r.\boxed{ P_{\mathrm{maj}}(N,p) = \sum_{r=(N+1)/2}^{N} {N\choose r}p^r(1-p)^{N-r} }.

1. The case p>1/2p>1/2

The law of large numbers gives

RN→p>12\frac RN\to p>\frac12

almost surely, and therefore

P ⁣(R>N2)→1.P\!\left(R>\frac N2\right)\to1.

2. The case p<1/2p<1/2

Similarly,

P ⁣(R>N2)→0.P\!\left(R>\frac N2\right)\to0.

Voting does not repair a systematically weak base trajectory; it amplifies its most common error.

3. Fully correlated errors

Let one latent variable

B∼Bernoulli⁡(p)B\sim\operatorname{Bernoulli}(p)

be copied by every attempt:

B1=⋯=BN=B.B_1=\cdots=B_N=B.

Then majority voting is identical to one attempt:

Pmaj=pP_{\mathrm{maj}}=p

for every NN. The nominal sample count is large, but the effective number of independent observations is one.

4. Reducing correlation

Possible mechanisms include:

  • different random seeds and temperatures;
  • different prompt formulations and decompositions;
  • forced branching over alternative assumptions;
  • different models or checkpoints;
  • different tools and evidence sources;
  • penalties for reproducing an existing trajectory.

Lexical diversity is not the same as error diversity. Correlations in answers and failure modes should be measured directly.


Exercise 3. Best-of-(N) with an imperfect verifier

  1. With an ideal verifier, prove

    Psuccess=1−(1−p)N.P_{\mathrm{success}}=1-(1-p)^N.
  2. Construct an example in which incorrect candidates sometimes receive higher scores than correct ones.

  3. Explain why increasing NN can lower selected accuracy while oracle pass@N rises.

  4. Which two metrics should be reported to separate generator and verifier quality?

Show answer and solution

1. Ideal verifier

All NN independent candidates are wrong with probability

(1−p)N.(1-p)^N.

Therefore the probability that at least one candidate is correct is

Psuccess=1−(1−p)N.\boxed{ P_{\mathrm{success}}=1-(1-p)^N }.

An ideal verifier always selects it.

2. A weak scorer

Suppose correct candidates receive

Sc∼N(1.35,0.552),S_c\sim\mathcal N(1.35,0.55^2),

while incorrect candidates usually receive

Sw∼N(0,0.752).S_w\sim\mathcal N(0,0.75^2).

With a small probability ε\varepsilon, however, an incorrect candidate exploits the verifier and receives

Sw∼N(3.8,0.452).S_w\sim\mathcal N(3.8,0.45^2).

For small NN, a correct candidate often has the largest score. For large NN, the probability of at least one extreme false maximum grows.

3. Why selected accuracy can decline

Oracle pass@N depends only on the generator and increases monotonically:

1−(1−p)N.1-(1-p)^N.

Selected accuracy depends on ranking. If incorrect-score tails are heavier or contain a rare exploit mode, larger NN creates more chances for a false maximum. A correct answer may be present almost surely while the verifier selects another candidate.

4. Metrics to report

At minimum, report:

  • oracle pass@N: was a correct candidate present?
  • selected pass@N: did the actual verifier choose it?

Their difference measures selection loss. Verifier calibration, distribution-shift robustness, and accuracy on deliberately constructed exploits are also useful.


Exercise 4. ICL as a Bayesian mixture

Let ZZ be a latent task. The demonstrations DD and the new pair (xm+1,ym+1)(x_{m+1},y_{m+1}) are conditionally independent given ZZ, each with law p(x,y∣z)p(x,y\mid z).

  1. Derive p(z∣D)p(z\mid D).

  2. Derive the posterior predictive distribution for a new input. When may p(z∣xm+1,D)p(z\mid x_{m+1},D) be replaced by p(z∣D)p(z\mid D)?

  3. Show that

    I(Z;D)≥0.I(Z;D)\ge0.
  4. Explain why this is exact only for the stated generative model rather than a universal description of every LLM.

  5. Compare the information roles of demonstrations DD and an internally generated chain CC.

Show answer and solution

Let latent task ZZ have prior p(z)p(z), with demonstrations conditionally independent given ZZ:

p(D∣z)=∏i=1mp(xi,yi∣z).p(D\mid z) = \prod_{i=1}^{m}p(x_i,y_i\mid z).

1. Posterior

Bayes’ rule gives

p(z∣D)=p(z)∏i=1mp(xi,yi∣z)∫p(z′)∏i=1mp(xi,yi∣z′) dz′.\boxed{ p(z\mid D) = \frac{ p(z)\prod_{i=1}^{m}p(x_i,y_i\mid z) }{ \int p(z')\prod_{i=1}^{m}p(x_i,y_i\mid z')\,dz' } }.

For discrete ZZ, replace the integral with a sum.

2. Posterior predictive

The new pair is conditionally independent of DD given ZZ. First update the task distribution using the new input: p(z∣xm+1,D)∝p(xm+1∣z)p(z∣D)p(z\mid x_{m+1},D)\propto p(x_{m+1}\mid z)p(z\mid D). Then

p(ym+1∣xm+1,D)=∫p(ym+1∣xm+1,z) p(z∣xm+1,D) dz.\boxed{ p(y_{m+1}\mid x_{m+1},D) = \int p(y_{m+1}\mid x_{m+1},z) \,p(z\mid x_{m+1},D)\,dz }.

If Xm+1⊥Z∣DX_{m+1}\perp Z\mid D, no additional update is needed. Without that condition it matters: for empty DD, a fair bit ZZ, Y=ZY=Z, and P(X=Z)=0.9P(X=Z)=0.9, we obtain P(Y=1∣X=1)=0.9P(Y=1\mid X=1)=0.9. Averaging over the old p(z)p(z) would incorrectly give 0.50.5.

3. Nonnegativity of I(Z;D)I(Z;D)

I(Z;D)=DKL(PZD∥PZPD)≥0.I(Z;D) = D_{\mathrm{KL}} \left( P_{ZD}\|P_ZP_D \right) \ge0.

Equality holds exactly when the demonstrations are independent of the latent task.

4. Scope of the model

The derivation is exact for the specified generative setting. It does not prove that a real LLM explicitly stores p(z∣D)p(z\mid D), that all model parameters have a Bayesian interpretation, or that the actual prompt came from the assumed task mixture.

5. Demonstrations versus an internal chain

Demonstrations DD arrive externally and may satisfy

I(Z;D)>0.I(Z;D)>0.

They update the state of knowledge about the task. An internal chain C=G(X,U)C=G(X,U) built after observing the full context satisfies

I(Z;C∣X)=0I(Z;C\mid X)=0

under the private-randomness assumption. It can improve computation without adding a new external example.


Exercise 5. Faithfulness and monitorability

Design an experiment for a reasoning model.

  1. Choose tasks with unambiguous, checkable answers.

  2. Obtain an intermediate trajectory and a final answer.

  3. Apply at least three interventions: remove a step, change a number, insert a false inference, or paraphrase the explanation.

  4. Define separate metrics for causal sensitivity, answer robustness, and external monitoring quality.

  5. Explain why an unchanged answer may indicate either robust reconstruction or disregard for the visible chain.

  6. Propose a test of whether monitorability survives optimization against the monitor.

Show answer and solution

One possible protocol is as follows.

1. Task set

Choose tasks for which:

  • the final answer is automatically checkable;
  • intermediate quantities have unambiguous meanings;
  • several solution methods exist;
  • controlled false steps can be constructed.

Arithmetic, short programs with tests, logic puzzles, and formally checkable transformations are suitable.

2. Baseline observations

For each task, store:

  • the original prompt;
  • the visible trajectory;
  • the final answer;
  • probability or confidence, when available;
  • independent verifier results.

3. Interventions

Apply several interventions:

  1. delete a materially important step;

  2. change an intermediate number;

  3. insert a plausible but false inference;

  4. swap two dependent steps;

  5. paraphrase a step without changing its meaning.

The last intervention is a control: the system should be more sensitive to semantics than to surface form.

4. Separate metrics

Causal sensitivity:

Δcausal=P(Y^base≠Y^intervened),\Delta_{\mathrm{causal}} = P(\widehat Y_{\mathrm{base}}\ne\widehat Y_{\mathrm{intervened}}),

or the change in log probability of the original answer under semantically important interventions.

Robustness: the fraction of cases that remain correct after semantically equivalent paraphrases or removal of redundant steps.

Monitorability: the accuracy of an external monitor tasked with detecting a known error, prohibited strategy, or use of a hint from the trajectory.

5. Why an unchanged answer is ambiguous

If the answer survives a step replacement, at least two explanations are possible:

  • the system reconstructed the solution from other context;
  • the visible chain did not participate in the causal computation.

Repeated interventions, masking the original context, error-localization tests, and independent tool signals help distinguish them.

6. Pressure against the monitor

Train or optimize the model in an environment where a monitor penalizes explicit mention of a prohibited strategy. Then measure separately:

  • the actual rate of prohibited behavior;
  • the ability of the original and a new monitor to detect it from the chain;
  • changes in the language of the chain;
  • transfer to new task types.

If behavior persists while detection falls, monitorability has degraded. This does not prove complete unfaithfulness, but it shows that optimization changed the trajectory’s diagnostic value.


Exercise 6. Python: computation, voting, and verification

Run M13_test_time_compute_experiments.py. It contains three experiments:

  1. parity: a linear readout from XX versus a readout from a sequential working state;

  2. voting under independent and correlated errors;

  3. best-of-NN under a good and a weak verifier.

Explain:

  • why the scratchpad makes the answer linearly accessible even though I(Y;C∣X)=0I(Y;C\mid X)=0;
  • why correlation reduces the return from additional samples;
  • why oracle pass@N can rise while selected accuracy falls.
Show answer and solution

The script uses a fixed seed and reproduces three regimes.

1. Parity

text
direct_linear_accuracy:     0.492500
scratchpad_linear_accuracy: 1.000000

A linear classifier on the raw 12 bits remains near chance. The sequential state stores running parity, so its final bit determines the answer linearly.

This does not contradict

I(Y;C∣X)=0.I(Y;C\mid X)=0.

The scratchpad is a function of the input and makes the answer accessible to a restricted readout.

2. Voting

text
N=  1: independent=0.620000, correlated=0.620296
N=  3: independent=0.676544, correlated=0.646168
N=  5: independent=0.716509, correlated=0.665120
N=  9: independent=0.773776, correlated=0.690492
N= 15: independent=0.831285, correlated=0.715040
N= 25: independent=0.890677, correlated=0.742372
N= 51: independent=0.959769, correlated=0.772616

Under independence, majority accuracy rapidly approaches one. In the correlated mixture, some tasks force every trajectory to copy one latent outcome, sharply reducing the return from additional samples.

3. Best-of-NN

text
N=  1: oracle=0.197786, strong=0.197786, weak=0.197786
N=  2: oracle=0.360929, strong=0.360043, weak=0.331514
N=  4: oracle=0.589200, strong=0.586186, weak=0.482800
N=  8: oracle=0.834543, strong=0.829214, weak=0.604886
N= 16: oracle=0.970971, strong=0.966643, weak=0.629143
N= 32: oracle=0.999329, strong=0.998271, weak=0.537686
N= 64: oracle=1.000000, strong=0.999800, weak=0.349900
N=128: oracle=1.000000, strong=0.999986, weak=0.143071

Oracle pass@N rises monotonically and approaches one. A strong verifier nearly realizes generator coverage. A weak verifier improves at first and then increasingly selects rare false candidates with extreme scores.

The central distinction is

search quality≠generator quality≠selection quality.\text{search quality} \ne \text{generator quality} \ne \text{selection quality}.

Code solution · the same source file for RU/EN

PythonM13_test_time_compute_experiments.pyDownload .py
from __future__ import annotations

"""Reproducible experiments for Module 13.

The script demonstrates three separate mechanisms:
1. a sequential scratchpad can make parity linearly accessible without adding
   Shannon information beyond the input;
2. correlated reasoning errors sharply reduce the gain from self-consistency;
3. oracle pass@N may rise while a weak verifier's selected accuracy eventually
   declines because extreme false positives become more likely.
"""

from math import comb
from pathlib import Path

import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score

SEED = 13
ROOT = Path(__file__).resolve().parent
OUT = ROOT / "generated_experiment"
OUT.mkdir(exist_ok=True)


def parity_experiment(rng: np.random.Generator) -> dict[str, float]:
    n_bits = 12
    n_train = 12_000
    n_test = 6_000

    x_train = rng.integers(0, 2, size=(n_train, n_bits), dtype=np.int8)
    x_test = rng.integers(0, 2, size=(n_test, n_bits), dtype=np.int8)
    y_train = np.bitwise_xor.reduce(x_train, axis=1)
    y_test = np.bitwise_xor.reduce(x_test, axis=1)

    direct = LogisticRegression(C=1.0, max_iter=2_000, random_state=SEED)
    direct.fit(x_train, y_train)
    direct_acc = accuracy_score(y_test, direct.predict(x_test))

    # Sequential scratchpad state S_t = parity of the first t bits.
    s_train = np.bitwise_xor.accumulate(x_train, axis=1)
    s_test = np.bitwise_xor.accumulate(x_test, axis=1)

    # A linear readout from the final one-bit state now solves the task.
    scratch = LogisticRegression(C=1.0, max_iter=2_000, random_state=SEED)
    scratch.fit(s_train[:, [-1]], y_train)
    scratch_acc = accuracy_score(y_test, scratch.predict(s_test[:, [-1]]))

    fig, ax = plt.subplots(figsize=(7.2, 4.6))
    ax.bar(["Linear readout\non raw bits", "Linear readout\non final scratch state"],
           [direct_acc, scratch_acc])
    ax.axhline(0.5, linestyle="--", linewidth=1.2, label="chance")
    ax.set_ylim(0.0, 1.05)
    ax.set_ylabel("Test accuracy")
    ax.set_title("Parity: sequential state changes accessibility, not input information")
    ax.legend()
    fig.tight_layout()
    fig.savefig(OUT / "M13_parity_scratchpad.png", dpi=180, bbox_inches="tight", pad_inches=0.08)
    plt.close(fig)

    return {
        "direct_linear_accuracy": float(direct_acc),
        "scratchpad_linear_accuracy": float(scratch_acc),
    }


def independent_majority_probability(n: int, p: float) -> float:
    threshold = n // 2 + 1
    return float(sum(comb(n, r) * p**r * (1.0 - p)**(n - r)
                     for r in range(threshold, n + 1)))


def self_consistency_experiment(
    rng: np.random.Generator, p: float = 0.62,
) -> dict[str, list[float]]:
    rho = 0.55
    n_values = np.array([1, 3, 5, 9, 15, 25, 51], dtype=int)
    n_tasks = 250_000

    independent = np.array([independent_majority_probability(int(n), p)
                            for n in n_values])

    # Correlated model: on a fraction rho of tasks, all trajectories share one
    # latent Bernoulli outcome; otherwise trajectories are independent.
    correlated_values: list[float] = []
    for n in n_values:
        shared_mask = rng.random(n_tasks) < rho
        shared_outcome = rng.random(n_tasks) < p
        independent_draws = rng.random((n_tasks, int(n))) < p
        votes = independent_draws.sum(axis=1)
        independent_majority = votes >= (int(n) // 2 + 1)
        majority = np.where(shared_mask, shared_outcome, independent_majority)
        correlated_values.append(float(majority.mean()))

    correlated = np.array(correlated_values)

    fig, ax = plt.subplots(figsize=(7.4, 4.8))
    ax.plot(n_values, independent, marker="o", label="independent errors")
    ax.plot(n_values, correlated, marker="s", label=f"correlated mixture (rho={rho:.2f})")
    ax.axhline(p, linestyle="--", linewidth=1.1, label="single trajectory")
    ax.set_xlabel("Number of trajectories N")
    ax.set_ylabel("Majority-vote accuracy")
    ax.set_ylim(0.0, 1.01)
    ax.set_title("Self-consistency: correlation reduces effective sample count")
    ax.legend()
    fig.tight_layout()
    fig.savefig(OUT / "M13_self_consistency.png", dpi=180, bbox_inches="tight", pad_inches=0.08)
    plt.close(fig)

    return {
        "N": n_values.tolist(),
        "independent": independent.tolist(),
        "correlated": correlated.tolist(),
    }


def best_of_n_experiment(rng: np.random.Generator) -> dict[str, list[float]]:
    p_correct = 0.20
    n_values = np.array([1, 2, 4, 8, 16, 32, 64, 128], dtype=int)
    n_tasks = 70_000

    oracle: list[float] = []
    selected_good: list[float] = []
    selected_weak: list[float] = []

    for n in n_values:
        correct = rng.random((n_tasks, int(n))) < p_correct
        oracle.append(float(correct.any(axis=1).mean()))

        # Strong verifier: well-separated, light-tailed score distributions.
        score_good = np.where(
            correct,
            rng.normal(2.0, 0.45, size=correct.shape),
            rng.normal(0.0, 0.55, size=correct.shape),
        )
        chosen_good = np.argmax(score_good, axis=1)
        selected_good.append(float(correct[np.arange(n_tasks), chosen_good].mean()))

        # Weak verifier: correct candidates are usually preferred, but a small
        # fraction of incorrect candidates receive exploitatively high scores.
        base_wrong = rng.normal(0.0, 0.75, size=correct.shape)
        exploit = rng.random(correct.shape) < 0.018
        exploit_score = rng.normal(3.8, 0.45, size=correct.shape)
        wrong_score = np.where(exploit, exploit_score, base_wrong)
        score_weak = np.where(
            correct,
            rng.normal(1.35, 0.55, size=correct.shape),
            wrong_score,
        )
        chosen_weak = np.argmax(score_weak, axis=1)
        selected_weak.append(float(correct[np.arange(n_tasks), chosen_weak].mean()))

    oracle_arr = np.array(oracle)
    good_arr = np.array(selected_good)
    weak_arr = np.array(selected_weak)

    fig, ax = plt.subplots(figsize=(7.6, 4.9))
    ax.plot(n_values, oracle_arr, marker="o", label="oracle pass@N")
    ax.plot(n_values, good_arr, marker="s", label="selected by strong verifier")
    ax.plot(n_values, weak_arr, marker="^", label="selected by weak verifier")
    ax.set_xscale("log", base=2)
    ax.set_xticks(n_values, [str(x) for x in n_values])
    ax.set_xlabel("Number of candidates N")
    ax.set_ylabel("Accuracy")
    ax.set_ylim(0.0, 1.02)
    ax.set_title("Best-of-N: more candidates expose both solutions and verifier exploits")
    ax.legend()
    fig.tight_layout()
    fig.savefig(OUT / "M13_best_of_n.png", dpi=180, bbox_inches="tight", pad_inches=0.08)
    plt.close(fig)

    return {
        "N": n_values.tolist(),
        "oracle_pass_at_n": oracle_arr.tolist(),
        "selected_strong": good_arr.tolist(),
        "selected_weak": weak_arr.tolist(),
    }


def main() -> None:
    rng = np.random.default_rng(SEED)

    parity = parity_experiment(rng)
    self_consistency = self_consistency_experiment(rng)
    best_of_n = best_of_n_experiment(rng)

    print("=== Parity and scratchpad ===")
    for key, value in parity.items():
        print(f"{key}: {value:.6f}")

    print("\n=== Self-consistency ===")
    for n, ind, corr in zip(self_consistency["N"],
                            self_consistency["independent"],
                            self_consistency["correlated"]):
        print(f"N={n:3d}: independent={ind:.6f}, correlated={corr:.6f}")

    print("\n=== Best-of-N ===")
    for n, oracle, strong, weak in zip(best_of_n["N"],
                                       best_of_n["oracle_pass_at_n"],
                                       best_of_n["selected_strong"],
                                       best_of_n["selected_weak"]):
        print(f"N={n:3d}: oracle={oracle:.6f}, strong={strong:.6f}, weak={weak:.6f}")


if __name__ == "__main__":
    main()

Bonus. When a cross-entropy difference equals CMI

  1. For arbitrary Sj−1S_{j-1} and SjS_j, prove

    H(Y∣Sj−1)−H(Y∣Sj)=I(Y;Sj∣Sj−1)−I(Y;Sj−1∣Sj).H(Y\mid S_{j-1})-H(Y\mid S_j) = I(Y;S_j\mid S_{j-1}) - I(Y;S_{j-1}\mid S_j).
  2. Derive the simplification for nested states.

  3. Introduce predictors gj−1g_{j-1} and gjg_j and derive the decomposition through their variational gaps.

  4. State conditions under which the cross-entropy difference equals CMI.

  5. Explain why the predictive entropy of a single model does not establish those conditions.

Show answer and solution

1. Arbitrary states

By definition,

I(Y;Sj∣Sj−1)=H(Y∣Sj−1)−H(Y∣Sj−1,Sj),I(Y;S_j\mid S_{j-1}) = H(Y\mid S_{j-1})-H(Y\mid S_{j-1},S_j), I(Y;Sj−1∣Sj)=H(Y∣Sj)−H(Y∣Sj−1,Sj).I(Y;S_{j-1}\mid S_j) = H(Y\mid S_j)-H(Y\mid S_{j-1},S_j).

Subtracting gives

H(Y∣Sj−1)−H(Y∣Sj)=I(Y;Sj∣Sj−1)−I(Y;Sj−1∣Sj).\boxed{ H(Y\mid S_{j-1})-H(Y\mid S_j) = I(Y;S_j\mid S_{j-1}) - I(Y;S_{j-1}\mid S_j) }.

2. Nested states

If Sj−1S_{j-1} is a function of SjS_j, then

H(Sj−1∣Sj)=0H(S_{j-1}\mid S_j)=0

and consequently

I(Y;Sj−1∣Sj)=0.I(Y;S_{j-1}\mid S_j)=0.

Thus

I(Y;Sj∣Sj−1)=H(Y∣Sj−1)−H(Y∣Sj).\boxed{ I(Y;S_j\mid S_{j-1}) = H(Y\mid S_{j-1})-H(Y\mid S_j) }.

3. Variational predictors

For gj(y∣sj)g_j(y\mid s_j),

CE⁡j=E[−log⁡gj(Y∣Sj)].\operatorname{CE}_j = \mathbb E[-\log g_j(Y\mid S_j)].

Adding and subtracting the true conditional log probability gives

CE⁡j=H(Y∣Sj)+Δj,\operatorname{CE}_j = H(Y\mid S_j)+\Delta_j,

where

Δj=ESjDKL(P(⋅∣Sj)∥gj(⋅∣Sj)).\Delta_j = \mathbb E_{S_j} D_{\mathrm{KL}} \left( P(\cdot\mid S_j) \|g_j(\cdot\mid S_j) \right).

Therefore

CE⁡j−1−CE⁡j=I(Y;Sj∣Sj−1)−I(Y;Sj−1∣Sj)+Δj−1−Δj.\boxed{ \operatorname{CE}_{j-1}-\operatorname{CE}_j = I(Y;S_j\mid S_{j-1}) - I(Y;S_{j-1}\mid S_j) + \Delta_{j-1}-\Delta_j }.

4. Sufficient conditions for equality with CMI

It is sufficient that:

  1. Sj−1S_{j-1} is recoverable from SjS_j;

  2. Δj−1=Δj=0\Delta_{j-1}=\Delta_j=0, so both predictors are Bayes-optimal;

or, more generally, that the difference between the variational gaps is known and corrected.

5. Why predictive entropy is insufficient

The quantity

H(gj(⋅∣Sj))H(g_j(\cdot\mid S_j))

describes concentration of gjg_j’s own prediction. It does not establish:

  • that gj=P(Y∣Sj)g_j=P(Y\mid S_j);
  • that the states are nested;
  • that no relevant information was lost;
  • that the variational gap is controlled.

A decrease in predictive entropy therefore cannot automatically be interpreted as positive true information gain.