PILCO, PETS, Ensembles, and MBPO › Short model rollouts for policy optimization

Michael BrenndoerferJuly 13, 20266 min read
World Models HandbookAll chapters
Part 8 of 12Decision-Centric Research Lineages
Chapter 43PILCO, PETS, Ensembles, and MBPO › Short model rollouts for policy optimization
Reading section 6 of 10 · Short model rollouts for policy optimization · 6 minSection 6 of 10 · 6 min

Book contents

Section 6 of 10 · 6 min read

PILCO, PETS, Ensembles, and MBPO › Short model rollouts for policy optimizationOne section · Sections in this chapter6 / 10 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

We now shift from online planning to policy learning. MBPO uses its learned model to generate transitions for an off-policy learner during environment training; it does not use the model as an MPC planner at action time.

Long free-running model trajectories can expose policy learning to distribution shift. Multi-step deviation need not increase monotonically: stable errors can saturate or cancel, and an exact model does not drift. Even so, the opportunity for accumulated error and off-support states generally increases with horizon. Calling arbitrary long model-generated policy data "model-based value expansion" is also too broad: Model-Based Value Expansion is a specific short-rollout value-target method.

MBPO instead starts branches from states sampled from the real-environment replay buffer and rolls the current policy through the model for up to kk steps. A short branch limits consecutive model use and repeatedly refreshes branch starts from real data. This does not guarantee that every generated transition is accurate, but it reduces exposure relative to a full free-running trajectory.

The useful horizon is task- and training-stage-dependent. The original paper reports single-step rollouts as a strong baseline and a Hopper configuration whose rollout length is scheduled from 1 to 15; that is not a universal 1–15 rule. The claim that most generative-model value always lies in the first few steps should likewise be read as an empirical result on the reported benchmarks, not a general theorem.

Before the algorithmic details, consider a deliberately hand-designed illustration. It defines a saturating benefit and a linear cost as functions of rollout length. Their difference has an interior maximum by construction; this is not an empirical MBPO result or a derivation of its theorem.

Out[4]:
Visualization
Three curves show a saturating benefit, a decreasing negative linear cost, and their hump-shaped net value; a dashed vertical line marks the net-value maximum.
Hand-designed rollout-length illustration. A saturating benefit, a negative linear cost, and their net value are plotted against k; the dashed line marks the constructed net-value maximum. The curves illustrate a possible tradeoff and are not measurements or the MBPO theorem.

The three ingredients of MBPO

Original MBPO combines:

  • A probabilistic dynamics-and-reward ensemble. In the original MBPO paper, each member predicts next state and reward conditioned on current state and action. At each simulated transition, the algorithm samples a model from the ensemble; disagreement is not used as an explicit stopping rule or caution penalty.
  • A short-branch generator. Branch starts are sampled from the real-environment replay buffer. The current policy supplies actions for model branches up to a globally configured rollout cap kk, and generated transitions enter a model replay buffer.
  • An off-policy learner. In the released implementation, SAC updates its actor and Q-functions from minibatches containing both real and model-generated replay data.

The released MBPO model is trained to predict reward and a state increment. Before sampling, the released simulator adds the current state to each ensemble member's predicted increment mean; the sampled vector is then split into reward and next state. A task-specific termination function supplies the done flag. The resulting synthetic replay entry contains (s,a,r,s′,done)(s,a,r,s',\mathrm{done}); termination is not predicted by an extra model head.

Sampling across ensemble members can diversify generated transitions when their predictive distributions differ, but baseline MBPO does not infer a locally safe horizon from ensemble spread, reject uncertain transitions, or make SAC intrinsically cautious. Those would be additional algorithmic mechanisms.

Reading MBPO's rollout bounds

The paper's analysis compares true return with return under kk-step branches. Its first worst-case bound uses model error measured under the data-collecting policy together with divergence ϵπ\epsilon_\pi between that policy and the updated policy. The paper explicitly describes this version as overly pessimistic: taken literally, it favors real off-policy data over model-generated data and does not justify a positive rollout length.

The paper's refined analysis aims to estimate model error ϵm′\epsilon'_m on the updated policy's state-action distribution. The expression printed in Theorem 4.3 has two qualitative dependencies on kk:

  • policy-divergence contributions decrease geometrically with γk\gamma^k, where γ\gamma is the discount factor;
  • the current-policy model-error contribution grows linearly with kϵm′k\epsilon'_m.

All terms are scaled by reward and discount-dependent factors. For this printed penalty, sufficiently small ϵm′\epsilon'_m can make a positive finite kk preferable to k=0k=0; that algebra does not show that actual policy return must have an interior optimum. Lemma B.4 in the full paper with appendices defines pre- and post-branch errors but applies them to reversed time ranges in its proof, a mismatch also identified by an independent reproduction. The main Theorem 4.3 statement also describes updated-policy model error while indexing the displayed condition by the data-collecting policy; Appendix A.2 uses the updated policy. We therefore treat the printed tradeoff as the paper's motivation for short model use, not an independently verified performance guarantee. Model error on the current policy distribution still has to be estimated, and rollout schedules require empirical validation.

Original rollout schedule and data mixture

Original MBPO uses a rollout length scheduled globally by training epoch, not a state-dependent horizon chosen from local disagreement. Every branch generated at a given training stage uses that configured kk as a maximum; terminal branches can end sooner. Ensemble spread remains a heuristic disagreement statistic; using it for adaptive local horizons would require a separately specified and validated method.

The algorithm maintains a real replay buffer and a model replay buffer. In the released implementation, policy minibatches mix both sources using a configured real-data fraction. The paper's Algorithm 2 pseudocode, by contrast, writes policy updates on Dmodel\mathcal{D}_{\mathrm{model}} alone. For example, a released HalfCheetah configuration fixes the real-data fraction at 0.05 within a run, while the MBPO class separately defaults to 0.1 if no override is supplied; model-generated samples form most of the minibatch in either case. Meanwhile, the rollout length may increase on a global schedule as training progresses. These are implementation-specific choices, not a recommendation that every task use the same fraction, and original MBPO does not prescribe shrinking the synthetic share as real data accumulates.