TL;DR
Imagining with Derived Memory (IDM) enhances model-based reinforcement learning by augmenting an agent's "imagination" with synthetic, diverse memories. By combining a robust world model that handles latent noise with a trajectory evaluator to filter out unrealistic hallucinations, IDM achieves superior sample efficiency and remarkable robustness to visual noise compared to previous state-of-the-art methods like Dreamer.
What Problem Does This Paper Address?
Model-Based Reinforcement Learning (MBRL) allows agents to learn by "imagining" future scenarios using a learned world model, rather than relying solely on expensive real-world interactions. However, current SOTA methods (like Dreamer) typically start their imaginations from actual past experiences.
The authors identify a major bottleneck: limited imagination diversity. If an agent only imagines scenarios branching off from its narrow set of real experiences, the resulting policy becomes "brittle"—it performs poorly when faced with even slight environmental noise or distribution shifts. Furthermore, simply adding noise to the agent's internal "memory" (latent states) usually results in "hallucinations" that don't correspond to real physical states, leading to poor learning.
Methods
The authors introduce the IDM framework, which consists of three core technical innovations:
- Robust Recurrent Stochastic State Model (R2S2): This is an upgrade to the standard RSSM world model. It introduces a decoding constraint during training. This constraint ensures that if you add noise to a latent state, the reconstructed image remains similar to the original. This forces the latent space to be "smooth" and ensures that "derived" (noisy) memories still represent physically plausible states.
- Derived Memory Generation: IDM generates "derived memories" by injecting Gaussian noise into the agent's hidden and stochastic latent states. This simulates a variety of potential uncertainties (like camera shake or slight physical perturbations) without requiring new real-world data.
- Trajectory Evaluator: To prevent the agent from learning from "bad" imaginations (where the world model might be inaccurate), the authors add a discriminator. This evaluator learns to distinguish between real sequences and "fake" overshoot sequences. It assigns a reliability score to every imagined trajectory, which is then used to weight the policy gradients. Essentially, the agent listens more to its "realistic" imaginations and ignores the "crazy" ones.
Datasets
The framework was evaluated on the DeepMind Control Suite (DMControl), a standard benchmark for continuous control from pixels. The authors tested on six diverse tasks:
- Walker (Walk and Run)
- Hopper (Stand)
- Cartpole (Swingup)
- Cheetah (Run)
- Finger (Spin)
To test robustness, they introduced a specific "image uncertainty" protocol where the input images were randomly rotated by $\pm 5^\circ$ at test time to simulate camera instability.
Key Insights and Ideas
- The "Memory Prosthesis" Inspiration: The paper draws a fascinating parallel to neuroscience, where external implants can stimulate the hippocampus to augment human memory. IDM acts as a digital version of this, providing the agent with "synthetic" experiences to learn from.
- Smoothness is Key: The "aha moment" here is that you can't just add noise to an agent's brain and expect it to work. Without the decoding constraint in R2S2, the agent's imagination becomes distorted (blurry or nonsensical), which confuses the policy.
- Selective Learning: By using the Trajectory Evaluator, the authors acknowledge that world models are imperfect. Instead of trying to make the model perfect everywhere, they simply teach the agent to trust its model only where it is reliable.
- Latent Noise vs. Image Noise: Training with noise in the latent space (the agent's internal representation) naturally makes the agent robust to noise in the input space (the actual pixels), even if that specific pixel noise wasn't seen during training.
Key Results
- Superior Robustness: Under image uncertainty (random rotations), IDM significantly outperformed both Dreamer (MBRL) and DrQ (Model-Free RL). For example, in the Walker-Walk task, IDM maintained a score of 914.9, while DrQ dropped to 151.9.
- Improved Sample Efficiency: IDM often reached higher performance levels at 100k environment steps than other models reached at 500k steps.
- Ablation Success: The authors showed that the Trajectory Evaluator is particularly critical for unstable tasks like Hopper-Stand, where the world model is more prone to error. Without the evaluator, performance in these tasks dropped significantly.
Limitations and Future Work
- Noise Distribution: The current method uses simple Gaussian noise to derive memories. The authors suggest that exploring more complex or learned noise distributions could further improve diversity.
- Task Complexity: In extremely high-speed or complex tasks (like Walker-Run), the benefit of derived memory was less pronounced, suggesting that the "gap" between imagination and reality is harder to bridge when the dynamics are highly volatile.
- Integration with Contrastive Learning: The authors note that IDM is compatible with other representation learning techniques (like CURL or RAD) and suggest that combining these could lead to even more powerful agents.
Summary updated