Skip to content

Planning and Control: TD-MPC and Mechanism Comparison

Mechanism 3: TD-MPC, the Bridge Between the Two

TD-MPC (Temporal Difference Model Predictive Control) [Hansen et al., 2022] combines the lookahead planning capability of MPC with the temporal-difference learning efficiency of Actor-Critic.

Core design:

ComponentRole
Latent consistency lossTrains the implicit dynamics model: z^t+1=f(zt,at) should be consistent with the encoder output sg(zt+1)
Temporal-difference targetUpdates the Q function (action-value function, Q(s,a) represents the expected cumulative discounted reward obtained by executing action a in state s and following the policy thereafter) via the Bellman equation: Q(zt,at)=rt+γQ(zt+1,π(zt+1)), where γ (discount factor) causes future rewards to decay exponentially
CEM planningAt each decision step, uses CEM to search for the optimal action sequence in latent space

These three components are trained jointly: the consistency loss shapes the latent space, while the TD target trains the Q function to guide CEM search.

The role of stop-gradient: The sg(z_{t+1}) in the consistency loss denotes stop-gradient. If both sides of the encoder can receive gradient updates, the model may learn an "identity function" that maps all states to a single point, driving the consistency loss to zero while being completely meaningless. Stop-gradient fixes the target side, preventing this mode collapse (where the model finds a degenerate solution: mapping all different inputs to the same output, minimizing the loss but producing no useful representation).

📖 Bellman Equation: Q(st,at)=rt+γmaxaQ(st+1,a). This transforms the infinite-horizon cumulative reward problem into a form that only looks at "one-step reward + next-step Q value". Bootstrapping: using the model's own estimates (such as Q(st+1,a)) as training targets, "predicting from oneself". TD learning uses the Bellman equation for bootstrapping, allowing learning to occur at every step without waiting for an episode to end.

TD learning uses the Bellman equation to substitute "current reward + next-step Q value estimate" for a full rollout, reducing the effective planning depth from "exact model steps" to "1 step + Q function bootstrapping".

Comparison with DreamerV3:

DimensionDreamerV3TD-MPC2
World model formExplicit generative (reconstructs pixels/observations)Implicit (only guarantees accurate value prediction)
Planning approachLatent space Actor-CriticCEM + TD
Applicable task scopeVisually complex tasks requiring rich observationsState-observation tasks, efficient continuous control
InterpretabilityCan visualize reconstructionsLatent space has no direct semantics

Comparison of Three Planning Mechanisms

DimensionCEM-MPCDreamer Actor-CriticTD-MPC
Planning approachRandom searchPolicy gradient (differentiable)Random search + TD
Requires pixel reconstructionNoYesNo
Long-horizon planning capabilityLimited by HRelies on Critic bootstrappingTD + MPC combined
Computational costHigh (large N)Medium (imagined rollouts)Low to medium
High-dimensional action spaceLow efficiencyGradient optimizes directlyQ function guides search
Model exploitation riskMedium (myopic)High (policy can exploit model)Medium (TD suppresses accumulated error)
Typical scenarioSimple continuous controlVisually complex tasksEfficient continuous control

Core Planning Checkpoint

  • Three learning paradigms clarify what the training data can identify: observation-only data reveals visual regularities, interaction data reveals how actions change outcomes, and value-coupled training teaches which predicted outcomes matter for the task.
  • Three planning mechanisms determine how a model is used for decision-making: CEM is the most straightforward but inefficient in high-dimensional spaces, Actor-Critic is the most elegant but carries model exploitation risk, and TD-MPC most pragmatically balances both.
  • Dreamer = interaction-based paradigm + RSSM + latent Actor-Critic, and is the core reference system for this curriculum.
  • TD-MPC = action-conditioned latent dynamics + CEM + TD. It serves here as the hybrid comparison point. P04 instead focuses on the separate question of replacing the RSSM backbone with a Transformer.

Next Step

You now have enough conceptual machinery to complete P03: Train a Dreamer Agent. After running the complete encoder, RSSM, actor, and critic loop, continue to Backbone Selection to compare the RSSM against Transformer and diffusion alternatives. That ordering makes each architecture choice answer a bottleneck you have observed rather than a name you have merely encountered.

Further Reading

Key papers covered in this lecture, listed in order of appearance:

Foundational Architectures

Transformer Architectures

Diffusion Architectures

Planning Mechanisms

JEPA Series

Genie / Interactive Generation

RWM / Robot Deployment

WAM / Joint Learning