TL;DR
Temporal Difference Models (TDMs) bridge the gap between model-free and model-based reinforcement learning by training goal-conditioned value functions that act as "multi-step models." This approach allows agents to learn with the extreme sample efficiency of model-based methods while maintaining the high asymptotic performance (the "peak" ability) of model-free algorithms.
The Problem: Model-Free vs. Model-Based RL
In the world of Reinforcement Learning (RL), researchers constantly navigate a classic trade-off:
- Model-Free RL (like Q-learning) is powerful but notoriously "hungry" for data. It learns from scalar rewards, meaning if an agent wanders around and finds no reward, it learns almost nothing from that experience. However, given enough data, it achieves excellent asymptotic performance.
- Model-Based RL is highly sample-efficient because it learns the "physics" of the environment—predicting the next state from the current one. Unfortunately, these models are often slightly wrong. This "model bias" compounds during planning, leading to mediocre final performance compared to model-free counterparts.
The authors ask a fundamental question: Can we create a method that gets the best of both worlds? They seek a way to use the rich information in every state transition (like model-based RL) without being limited by the compounding inaccuracies of a single-step predictive model.
The Solution: Temporal Difference Models (TDMs)
The core innovation of this paper is the Temporal Difference Model (TDM). A TDM is a goal-conditioned value function, $Q(s, a, s_g, \tau)$, that answers a specific question: "If I start at state $s$, take action $a$, and try to reach goal $s_g$ in exactly $\tau$ steps, how close will I get?"
Key technical components include:
- The Horizon ($\tau$) as a Bridge: When $\tau=0$, the TDM is essentially a standard predictive model (predicting the next state). As $\tau$ increases, it behaves more like a long-term policy. This allows the system to smoothly interpolate between model-based planning and model-free execution.
- Hindsight Relabeling: Similar to Hindsight Experience Replay (HER), TDMs "re-imagine" past experiences. Every transition is used to learn about many different possible goals and many different time horizons simultaneously, massively increasing the supervision signal.
- Vectorized Rewards: Instead of learning a single scalar distance to a goal, TDMs learn to predict the distance for each dimension of the state space separately. This provides the neural network with much richer feedback during training.
- Model Predictive Control (MPC) Integration: At test time, the TDM is used within an MPC framework. Because the TDM can predict over multiple steps, the planner can look further into the future with fewer computational steps.
Experimental Setup and Key Results
The authors evaluated TDMs on several challenging continuous control tasks using the MuJoCo physics engine and OpenAI Gym, including a 7-DoF Reacher, a Pusher, a Half Cheetah, and an Ant robot.
The results highlight several major advantages of TDMs:
- Sample Efficiency: In tasks like the Ant and Pusher, TDMs reached high performance levels in significantly fewer environment steps than standard DDPG or HER. By using vectorized rewards and relabeling, the agent learns from every single movement, matching the efficiency of model-based RL.
- Asymptotic Performance: Unlike pure model-based methods, which often plateau early due to model bias, TDMs continued to improve, eventually matching or exceeding the best model-free baselines. By learning the "long-term" result of a policy directly, TDMs avoid the compounding errors of traditional step-by-step models.
- Ablation on Vectorized Rewards: The authors demonstrated that vectorized rewards were a critical feature; using a simple scalar distance was significantly slower and less stable.
Real-World Success
Beyond simulation, the TDM successfully trained a physical 7-DoF Sawyer robot arm to perform a reaching task.
The real-world experiments demonstrated that TDMs could learn faster and more effectively than the model-free baseline, proving the practical applicability of the method for physical robotics where sample efficiency is paramount.
Limitations and Future Work
While TDMs offer a powerful new paradigm, there are areas for future exploration:
- State Representation: The current work relies on having a meaningful distance metric (like Euclidean distance) in the state space. Applying this to raw pixels would likely require first learning a latent embedding space.
- Stochasticity: While the paper suggests TDMs can handle stochastic environments by predicting expected distance, the experiments were primarily conducted in deterministic or near-deterministic simulators.
- Planning Complexity: The MPC used in this work was relatively simple. Integrating TDMs with more sophisticated constrained optimization or trajectory optimization could yield even better results.
Summary updated