TL;DR
This paper introduces the Contrastive Initial State Buffer (CL-Buffer), a novel framework that improves Reinforcement Learning (RL) exploration by intelligently resetting agents to promising past states during training. By mapping states into a latent space based on how much the agent learns from them, the method automatically discovers and samples from diverse, high-value training scenarios without requiring any prior knowledge of the environment.
What Problem Does This Paper Address?
A major bottleneck in deep reinforcement learning for robotics is sample inefficiency. Complex tasks—like a quadruped traversing rocky terrain or a drone navigating a race track—require massive amounts of exploration just to encounter informative states and receive a meaningful reward signal.
While standard RL algorithms use replay buffers to reuse past experiences for policy updates, they typically initialize the agent from a fixed or random starting distribution during data collection. If an agent constantly resets to the very beginning of a difficult track after crashing, it wastes valuable training iterations repeatedly mastering the easy, early segments while rarely practicing the challenging later stages. Existing methods that try to fix this by resetting agents to intermediate states usually rely on strict domain knowledge (like a pre-mapped layout of the environment), limiting their general applicability.
Methods
The authors propose the Initial State Buffer (ISB) framework. Instead of always starting an episode at the default initial state $s_0$, the agent has a high probability (e.g., 80%) of being initialized at a state sampled from a buffer of previously visited states.
To prevent the buffer from simply oversampling easy, frequently visited states, they introduce the Contrastive Learning Buffer (CL-Buffer):
- Value-Driven Embedding Space: A neural network maps raw observations into a latent embedding space. Crucially, the network is trained using an unsupervised contrastive loss (InfoNCE). States are pulled closer together if they exhibit a similar change in the value function ($\Delta V$) after a policy update, signaling that they offer similar learning experiences or require similar "skills."
- Adaptive Clustering: The framework applies $K$-means clustering within this learned embedding space.
- Diverse Sampling: By selecting states closest to the cluster centers, the CL-Buffer ensures the agent is initialized across a wide, diverse spectrum of distinct task-relevant situations (e.g., balancing, forward locomotion, recovering from a near-fall).
Datasets & Tasks
The method was validated entirely in simulation across two highly dynamic robotic control benchmarks:
- Quadrupedal Locomotion: A quadruped robot learning to follow velocity commands across diverse terrains (stairs, rough ground, discrete obstacles) using the IsaacGym simulator.
- Drone Racing: A quadrotor drone learning to fly through a sequence of gates at high speeds using the Flightmare simulator.
Key Insights and Ideas
- Observation Closeness $\neq$ Task Closeness: A naive baseline approach might cluster states based on raw observations (e.g., visual features or joint angles). However, the authors show this fails because two visually identical states can have drastically different outcomes (e.g., a drone perfectly level vs. a drone tilted a fraction of a degree right before a catastrophic crash).
- Emergent Skill Discovery: By defining similarity based on policy-gradient value updates, the embedding network automatically groups states into semantic "skills" (such as Walking Forward, Walking Sideways Up, and Failure States) completely unsupervised.
- Dynamic Focus: As the agent masters certain sub-tasks, the value function for those states stabilizes ($\Delta V \to 0$). The contrastive framework naturally shifts the buffer's focus toward newer or harder states where the agent still has a lot to learn.
Key Results
The CL-Buffer demonstrates substantial improvements in both learning speed and final task performance without modifying the underlying RL algorithm (PPO):
- Quadruped Locomotion: The CL-Buffer achieved an 18.3% higher overall reward compared to the nominal vanilla baseline. It also outperformed simpler buffer variants (like randomly sampling past states or clustering purely based on raw observations).
- Drone Racing: The contrastive buffer dramatically improved training reliability, achieving a 0.9 success rate (completing the track), whereas the vanilla baseline frequently got stuck due to the challenge of delayed gratification, managing only a 0.2 success rate.
Limitations and Future Work
While the CL-Buffer operates without explicit environment maps, it still relies on a basic pre-selection heuristic to filter out uninformative states before they enter the visited states buffer (for example, discarding states from the first few timesteps of an episode or states with negative accumulated rewards).
For future work, the authors suggest exploring prioritized sampling directly from the initial state buffer rather than uniform cluster sampling, which could further optimize the training curriculum by targeting the absolute hardest states first.
Summary updated