This paper introduces a powerful new framework for reinforcement learning (RL) agents to explore complex, sparse-reward environments. By combining a novel long-term memory mechanism called RECODE with a transformer-based representation learner called CASM, the authors achieved superhuman performance on the notoriously difficult DM-HARD-8 benchmark and became the first to "beat" the Atari game Pitfall!.
TL;DR
The authors present RECODE, a non-parametric exploration method that uses online clustering to track state visitation counts over thousands of episodes. When paired with CASM—a transformer-based representation that filters out uncontrollable noise—the agent achieves state-of-the-art results on the hardest RL benchmarks, including reaching the end screen of Pitfall! for the first time.
The Challenge of Sparse Rewards
In many RL tasks, rewards are "sparse"—an agent might have to perform thousands of specific actions before seeing any feedback. To solve this, researchers use intrinsic rewards (novelty bonuses) to encourage the agent to visit new states. However, current methods have two major flaws:
- The Memory Gap: Parametric methods (like Random Network Distillation) use neural networks to estimate novelty but suffer from "catastrophic forgetting" and slow adaptation. Non-parametric methods (like episodic memory) are great at short-term novelty but usually reset every episode, losing the "big picture" of what has been explored over the long term.
- The Noisy TV Problem: If an environment contains random noise (like a static-filled TV screen), many exploration agents get "stuck" staring at it because the noise is always "novel." Agents need a representation that ignores uncontrollable features and focuses on what actually matters for navigation.
Proposed Methods
The paper proposes a two-pronged solution to tackle these exploration bottlenecks:
1. RECODE: Robust Exploration via Clustering-based Online Density Estimation
RECODE is a non-parametric memory that doesn't reset at the end of an episode. Instead of storing every single state, it maintains a fixed-size set of "atoms" (cluster centroids) in an embedding space.
- Online Clustering: As the agent moves, it either updates the nearest "atom" or, if the state is very new, creates a new one by removing an old, under-visited atom.
- Count Decay: To handle the fact that the agent's "understanding" of the world (its embeddings) changes over time, RECODE slowly decays the visitation counts of all atoms. This prevents the agent from being "bored" by a location just because it visited it 1,000 episodes ago using a completely different representation.
2. CASM: Coupled Action-State Masking
To build the embedding space for RECODE, the authors introduce CASM, a representation learning method based on Masked Transformers.
- The model takes a sequence of actions and states and randomly masks some of them.
- It must reconstruct the missing parts. This forces the agent to learn the relationship between its actions and the environment's changes over long trajectories, effectively filtering out "uncontrollable" noise that doesn't correlate with its actions.
Key Insights and Results
The authors evaluated their agent on two of the most challenging benchmarks in RL: Hard-Exploration Atari Games (including Montezuma’s Revenge and Pitfall!) and DM-HARD-8 (a suite of 3D, first-person tasks requiring object manipulation and long-term planning).
- Clustering as a Bridge: RECODE acts as a middle ground between the "perfect memory" of episodic buffers and the "generalization" of neural density models. It allows for a memory horizon that spans thousands of episodes without the computational cost of storing every frame.
- Representations Matter: The "Noisy TV" experiment showed that while standard agents fail completely when white noise is added to the screen, RECODE remains robust because its underlying representation (CASM) ignores features it cannot control.
State-of-the-Art Performance
- DM-HARD-8: The agent achieved super-human performance (scoring >100 in human-normalized scores) in 6 out of 10 tasks, significantly outperforming previous SOTA agents like BYOL-Explore, as seen in the rapid convergence and higher peak performance.
- Pitfall!: RECODE is the first agent to reach the end screen of Pitfall!, a game with 255 rooms and a strict time limit that requires highly efficient backtracking and exploration.
- Efficiency: Because RECODE shares its memory across all "actors" in a distributed system, it learns much faster and is less prone to "representation drift."
Limitations and Future Work
The authors acknowledge that while CASM is powerful, it relies on a "controllability prior"—the assumption that the most important features are the ones the agent can influence. This works perfectly for video games but might be a limitation in real-world robotics where important environmental factors (like a moving car or weather) are completely outside the agent's control. Future work could involve exploring how to integrate "interesting" but uncontrollable events into this clustering framework without falling back into the Noisy TV trap.
Summary updated