TL;DR
DeepMind researchers introduce Imagination-Augmented Agents (I2A), a hybrid reinforcement learning (RL) architecture that combines the robustness of model-free learning with the foresight of model-based planning. Instead of relying on a world model to provide a perfect plan, I2As learn to interpret imperfect internal simulations as additional context for a model-free policy, making them significantly more robust to model errors and data-efficient than standard baselines.
What Problem Does This Paper Address?
In reinforcement learning, there is a classic divide:
- Model-free RL: The agent learns a direct mapping from observations to actions (like a reflex). It is robust but requires massive amounts of data and struggles with long-term planning.
- Model-based RL: The agent learns a "world model" to predict future states and rewards (imagination). While theoretically more efficient, these agents often fail in complex environments because small errors in the model compound over time, leading to "hallucinations" that result in poor decision-making.
The authors tackle the brittleness of model-based RL. They ask: How can an agent benefit from a world model even if that model is imperfect or poorly specified?
Methods
The core innovation of I2A is that it doesn't use its world model to "plan" in the traditional sense (e.g., searching a tree for the highest reward). Instead, it treats the model's predictions as features.
The architecture consists of several key components:
- Imagination Core (IC): This module takes the current state and a potential action, then uses a learned environment model to predict the next state and reward. It "rolls out" these predictions multiple steps into the future.
- Rollout Encoder: This is the "secret sauce." Instead of just summing up predicted rewards, an LSTM processes the entire imagined trajectory. This allows the agent to learn which parts of its imagination are reliable and which are nonsense. If the model starts "hallucinating," the encoder can learn to ignore the later steps of the rollout.
- Aggregator: Since the agent performs rollouts for multiple possible actions, the aggregator combines these different "futures" into a single "imagination code."
- Policy Module: Finally, the agent combines this "imagination code" with a standard model-free path (a direct look at the current state). The final policy is decided by looking at both the immediate reality and the encoded "what-if" scenarios.
Datasets
The researchers evaluated I2A on two main environments:
- Sokoban: A classic puzzle game where an agent pushes boxes onto targets. It is notoriously difficult because many moves are irreversible (e.g., pushing a box into a corner), requiring deep planning. The levels were procedurally generated to ensure the agent couldn't just memorize layouts.
- MiniPacman: A simplified version of the classic game used to test multi-task learning. The agent had to handle different reward structures (e.g., "Regular," "Avoid," "Hunt") using a single shared world model.
Key Insights and Ideas
- Learning to Interpret: Traditional planning (like Monte Carlo Tree Search) is a "slave" to the model—if the model is wrong, the plan is wrong. I2A interprets the model. It learns to extract useful signals even from flawed simulations.
- Robustness to "Bad" Models: In a striking experiment, the authors gave I2A an intentionally "poor" model with heavy artifacts. While traditional planning methods crashed, I2A still performed well, proving it could filter out the noise.
- Guided Imagination: I2A uses a "distilled" version of its own policy to decide which actions to imagine. This ensures it spends its computational "thought" on trajectories that are actually relevant to its current goals.
- Imagination as Context: By providing the imagination as context to a model-free path, the agent has a "safety net." If the imagination is useless, it can still fall back on its model-free intuition.
Key Results
- Sokoban Performance: I2A solved 85% of levels, compared to less than 60% for a standard model-free agent.
- Efficiency vs. MCTS: To reach a similar level of performance, I2A required only 1,400 calls to the environment model, whereas Monte Carlo Tree Search (MCTS) required 25,000 to 100,000 calls.
- Generalization: An I2A trained on Sokoban with 4 boxes generalized surprisingly well to levels with 7 boxes, significantly outperforming model-free baselines.
- Sparse Rewards: In MiniPacman, I2A excelled in "Hunt" and "Ambush" tasks where rewards are rare, demonstrating that "imagining" ghost movements helped it navigate even when it wasn't currently eating dots.
Limitations and Future Work
- Computational Overhead: While I2A is data-efficient (needs fewer real-world steps), it is computationally expensive. Running multiple LSTMs for internal rollouts makes it slower per interaction than a simple model-free agent.
- Pixel-Level Planning: The current model predicts raw pixels. The authors suggest that future work should focus on abstract environment models—planning in a "latent space" rather than trying to predict every pixel, which would be more efficient and scale to higher-resolution environments.
- Rollout Depth: There are diminishing returns to longer rollouts. Finding the optimal "imagination horizon" remains a challenge.
Summary updated