Overview
This paper introduces "self-consistency" for model-based reinforcement learning (RL), a paradigm where a learned model and value function are trained to be internally consistent with one another. By using a semi-gradient "direct" update to jointly optimize both components, the authors demonstrate improved sample efficiency and representation learning across diverse environments including Atari, Go, and Sokoban.
The Problem: One-Way Learning in RL
In model-based RL, agents learn a "model" of how the world works (predicting rewards and state transitions) and use it to plan or improve their "value function" (an estimate of future rewards).
Traditionally, this relationship is a one-way street. The model is trained to match real-world experience ("grounding"), and then the value function is updated to be consistent with that model—a classic example being the Dyna architecture. However, the model and value function are rarely encouraged to be consistent with each other during the learning process. This paper explores whether we can improve learning by forcing the model and value function to jointly satisfy the Bellman equation. Essentially, it asks the agent to ensure its internal world-view and its expectations of success are mathematically compatible.
Methods: The Self-Consistency Loss
The authors propose augmenting standard RL training with a self-consistency loss. While standard losses ground the agent in real data, the self-consistency loss operates on "imagined" trajectories rolled out by the model.
They investigate three ways to formulate this loss based on the Bellman equation ($v = r + \gamma v'$):
- SC-Residual: Updates both sides of the equation simultaneously. This often leads to "degenerate" solutions where the agent decides everything is worth zero just to satisfy the math.
- SC-Direct (The Winner): A semi-gradient approach that treats the target (reward + next state value) as fixed and updates the current state's value and the model. This mirrors standard Temporal Difference (TD) learning but crucially allows the model to adapt to the value function.
- SC-Reverse: Treats the current value as fixed and updates the model to match it.
The researchers integrated these updates into Muesli, a state-of-the-art agent that uses "value-equivalent" models (models that don't predict every pixel, but only the abstract information relevant to calculating values).
Key Insights
- The "Direct" Update is Crucial: Naive self-consistency (SC-Residual) fails because the agent can "cheat" the loss by learning a model that predicts zero rewards everywhere. The semi-gradient SC-Direct update prevents this by grounding the target.
- Information Flows Both Ways: Unlike Dyna, where the model acts as a fixed teacher, self-consistency allows the value function to influence the model. This "bidirectional" flow helps the agent converge on a useful representation much faster.
- Imagination Needs Diversity: The authors found that simply replaying real actions in imagination wasn't very helpful. The real gains came from "search control"—sampling new, diverse action sequences in the model to explore states the agent hadn't actually visited yet.
- Regularization Effect: Even when the model isn't used for active planning, the self-consistency loss acts as a powerful regularizer for representation learning, helping the agent's neural network better understand the underlying structure of the environment.
Key Results
The authors evaluated their approach across a diverse range of environments, from tabular MDPs to complex games.
- Atari-57: The self-consistent agent showed a modest but consistent improvement in median human-normalized scores over the Muesli baseline across the full suite of 57 classic games.
- Sokoban: In this planning-heavy puzzle domain, self-consistency provided a massive boost. This proves that joint updates are particularly helpful when the model must be relied upon heavily for long-term reasoning.
- Go (9x9): The agent outperformed the baseline both with and without Monte Carlo Tree Search (MCTS) at evaluation time, confirming the model's robustness in self-play scenarios.
- Sample Efficiency: In tabular settings, SC-Direct significantly accelerated value learning compared to both model-free baselines and standard Dyna.
Limitations and Future Work
- Pollution Risk: If the reward model is initialized poorly, self-consistency can "pollute" the dynamics model. The dynamics model might try to become consistent with incorrect reward predictions, hindering early learning.
- Policy Improvement: This work focused primarily on policy evaluation (making the value function accurate). The authors suggest that future work should extend self-consistency to policy improvement, allowing the agent to optimize its strategy for arbitrary imagined trajectories.
- Hyperparameter Sensitivity: While robust in many cases, the effectiveness of the update can depend heavily on the "search control" strategy—specifically, how the agent chooses which imagined states to update.
Summary updated