Model Errors & Value-Equivalent Models
Compounding errors, the simulation lemma, and models that only need to get values right.
A model can be wrong about half of everything it predicts and still be perfect for planning, or nearly right everywhere and still mislead the planner. This lesson makes precise what model error costs: an exact identity for the value error, how errors compound along rollouts, why maximum likelihood trains the model on the wrong objective, and the value-equivalence principle, which asks a model to get only values right.
What you’ll learn
- Prove the simulation lemma in occupancy form, and derive from it the classical sup-norm bound with its compounding factor.
- Bound how predicted state distributions drift over model steps: linearly in total variation, and geometrically in Wasserstein distance for expanding Lipschitz dynamics.
- Explain objective mismatch, and derive why maximum-likelihood training controls value error only loosely while value-aware losses target it directly.
- State value equivalence and proper value equivalence, and prove that a model proper-value-equivalent for all deterministic policies plans optimally.
An exact formula for value error
Run in the model from and add a telescoping sum of true values, which collapses to because is bounded and . Writing for expectations along model trajectories:
Condition on . In the model , and the environment's Bellman equation, averaged over , replaces by in expectation. Each term becomes a one-step error:
Sum over with weights and group the terms by the pair visited; by definition , which gives the identity.
The identity says three things. Only the projection onto matters: an error in that cannot see costs nothing. Exploitation is built in: the average runs over , and a planner that maximizes steers that occupancy toward pairs where the bracket is positive, where the model overrates the future. The classical bound follows. Because , any constant can be subtracted from first; choosing the midpoint of its range gives , where is half the distance and when rewards lie in .
Rewards are known exactly and lie in , , and every transition distribution is off by total variation . What does the bound give for ?
Show the answer
99
, while returns lie in : the guarantee is nearly vacuous. A 1% per-step error is not small at an effective horizon of 100 steps. The occupancy form explains why practice is often kinder: errors that are orthogonal to , or that sit where puts little mass, cost nothing.
Compounding: how rollouts drift
Dyna-style methods rarely roll out to the end of the episode: they branch steps from states the agent has really visited. The relevant question is then how far the model's -step state distribution drifts from the true one. Let be a start distribution, the true distribution after steps of and the model's.
Write distributions as row vectors and . Add and subtract :
A Markov kernel never increases total variation, so the first term has TV at most . Each row of the second differs by at most in (average the per-action errors over ), so its TV is at most . Starting from :
In Wasserstein distance the inherited error is not merely carried along but stretched: a -Lipschitz kernel can multiply the distance between two distributions by . The same decomposition then gives a recursion whose solution is geometric, and taking whichever model's constant is smaller gives :
A model's one-step Wasserstein error is and the smaller Lipschitz constant is , slightly expanding dynamics. What does the bound give for the error after steps?
Show the answer
0.57
, almost three times the that linear accumulation would give. At it is about , more than a thousand times . With the sum instead stays below : contracting dynamics forget errors, expanding ones amplify them.
Both bounds assume the model is accurate on every input. A learned model is accurate on its training distribution, and a rollout feeds it its own predictions, which drift off that distribution: the same covariate shift that undoes behavior cloning (Compounding Errors & Interactive Imitation). Training procedures respond in kind. Hallucinated replay (Talvitie, 2014) trains the model to correct itself when it produces errors, by feeding it its own sampled predictions and asking for the true next state; Talvitie (2017) reports that this ability to self-correct is more tightly related to model-based RL performance than one-step prediction error. Data as Demonstrator (Venkatraman, Hebert & Bagnell, 2015) casts multi-step prediction as imitation learning: the model's own predicted states become training inputs and the recorded continuation the target, in the spirit of DAgger.
Objective mismatch and value-aware losses
The standard recipe fits by maximum likelihood on observed transitions and then plans. The model is thus trained on one objective, predicting next states, and used for another, choosing actions that earn return. Lambert, Amos, Yadan and Calandra (2020) named this objective mismatch and showed that the likelihood of one-step predictions is not always correlated with control performance: a model that serves a task well need not be accurate everywhere, and an accurate-looking model can serve it badly. How loosely are the two objectives tied?
Fix a pair and a bounded function . Hölder's inequality and then Pinsker's inequality, , give
Average over the data distribution of pairs and apply Jensen's inequality to the concave square root. The expected KL divergence equals the negative log-likelihood minus an entropy that does not depend on , so maximum likelihood minimizes exactly the quantity under the root:
So likelihood does control value error, but loosely, through a square root and a worst case over every bounded , and indiscriminately: it pays as much for the flicker of a screen in the background of a camera image as for the position of the ball the robot must catch. It also weights errors by the data distribution , while the simulation lemma weights them by where the policy goes in the model.
The value-equivalence principle
Let the model be PVE for and let be optimal in the model; in a finite MDP it can be chosen deterministic, so PVE applies to it:
For any deterministic , PVE and the optimality of in the model give, state by state,
The environment has a deterministic optimal policy , so take : , and is optimal. The condition is sufficient, not necessary: the flicker-bit model is not PVE for policies that condition on , yet it plans optimally.
This is the theory behind MuZero, whose model is trained only to predict rewards, values and policies along observed action sequences, never observations. Grimm et al. (2021) show that, under a mild smoothness condition, minimizing MuZero's loss minimizes an upper bound on a squared PVE loss with respect to a single policy, the one that generated the data. MuZero learns a value-equivalent model of the behavior it has seen, not of the world (MuZero: Planning with a Learned Model).
Think first If value equivalence is all planning needs, why not always learn the smallest value-equivalent model?
Because the sets and are not known in advance. A model that is value equivalent only for the policies seen so far says nothing reliable about the policy that planning will produce next, which is exactly where the simulation lemma's wanders. A model that is value equivalent for one reward function is useless for a new task. And value-equivalent states need not mean anything, which complicates exploration, transfer and inspection. Richer prediction targets buy robustness to these shifts at the price of modeling more than the current task needs.
Key takeaways
- Simulation lemma, occupancy form: . Errors count only through and only where the policy goes in the model.
- Centering gives the classical bound : per-step error, times horizon, times value range.
- Rollout distributions drift at most in total variation, but in Wasserstein distance a Lipschitz constant amplifies errors geometrically, .
- Maximum likelihood bounds value error only through , for every at once and on the data distribution: objective mismatch. Value-aware losses weight model errors by the value functions that matter.
- Value equivalence asks a model to reproduce Bellman updates, not observations; a model proper-value-equivalent for all deterministic policies plans optimally, and MuZero's loss bounds a PVE loss for the data-generating policy.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Which property of a model guarantees that an optimal policy computed in the model is optimal in the environment?
- Total-variation error below at every state–action pair
- Maximum-likelihood training on a very large dataset
- Proper value equivalence with respect to all deterministic policies
- Value equivalence with respect to the policy that generated the data
Show the answer
C. Proper value equivalence with respect to all deterministic policies
If every deterministic policy has the same value in the model as in the environment, the model's optimal deterministic policy is at least as good as the environment's optimal one. Small TV error only bounds the loss, by an amount that can be large at long horizons, and equivalence for one policy says nothing about others.
In the occupancy form of the simulation lemma, the one-step model errors are averaged over which distribution?
- The distribution of the training data
- The occupancy measure of in the true environment
- The uniform distribution over state–action pairs
- The occupancy measure of inside the model
Show the answer
D. The occupancy measure of inside the model
Telescoping runs along model trajectories, so the weights are . That is the formal face of model exploitation: optimizing moves toward the pairs where the model overestimates, even if those pairs are rare in the data.
Two learned models have the same tiny one-step error. One models a stable system (), the other an unstable one (). What do the Lipschitz bounds say about 50-step rollouts?
- Both errors grow linearly with the number of steps
- The stable system's error stays below , while the unstable system's bound grows geometrically, by a factor of about per step
- Both errors stay bounded, because the one-step errors are tiny
- The unstable system's model is more accurate because it moves faster
Show the answer
B. The stable system's error stays below , while the unstable system's bound grows geometrically, by a factor of about per step
The bound is at most for , while for and it is . Expanding dynamics stretch every inherited error.
In the sup-norm simulation bound , what do the two factors of account for?
- One for the number of steps over which errors occur, one for the range of values a one-step error can redirect
- Both for the variance of the return
- One for the reward error and one for the transition error
- They are an artifact of the proof and cancel in practice
Show the answer
A. One for the number of steps over which errors occur, one for the range of values a one-step error can redirect
The occupancy form sums one-step errors over the effective horizon, giving one factor, and each one-step error moves probability mass between next states whose values can differ by up to , giving the other.
Further reading
- M. Kearns & S. Singh, "Near-optimal reinforcement learning in polynomial time," Machine Learning 49 (2002), 209–232.
- K. Asadi, D. Misra & M. L. Littman, "Lipschitz continuity in model-based reinforcement learning," ICML (2018).
- A.-m. Farahmand, A. M. S. Barreto & D. N. Nikovski, "Value-aware loss function for model-based reinforcement learning," AISTATS (2017).
- C. Grimm, A. Barreto, S. Singh & D. Silver, "The value equivalence principle for model-based reinforcement learning," NeurIPS (2020).
- C. Grimm, A. Barreto, G. Farquhar, D. Silver & S. Singh, "Proper value equivalence," NeurIPS (2021).