Abstract
Unsupervised skill discovery aims to learn a diverse repertoire of behaviors without external reward signals, typically by maximizing the mutual information (MI) between states and latent skill codes. However, existing methods often converge to "static posing" behaviors—actions that are easily discriminable but fail to explore the environment effectively. We present Behavior Contrastive Learning (BeCL), a framework that treats different trajectories of the same skill as multiple views of a behavior. By maximizing the mutual information between these views using a contrastive objective, BeCL implicitly maximizes state entropy and ensures multi-view consistency. Experimental results on the Unsupervised Reinforcement Learning Benchmark (URLB) demonstrate that BeCL discovers far-reaching, dynamic skills and achieves state-of-the-art performance across complex control tasks.
Introduction
In traditional Reinforcement Learning (RL), agents are guided by hand-crafted reward functions. While effective, designing these rewards for complex tasks is often difficult and time-consuming. Unsupervised Skill Discovery offers an alternative by allowing agents to learn useful behaviors—such as walking, jumping, or manipulating objects—through self-supervised exploration.
The prevailing approach in this field involves maximizing the Mutual Information (MI) between the agent's state and a latent skill label. The objective is to make different skills as distinct as possible. However, a significant limitation has emerged: because the skill space is typically much smaller than the state space, agents often find a local maximum by learning "static poses." For example, a bipedal agent might learn that tilting its torso at a specific angle is a unique "skill." While this behavior is easy for a classifier to distinguish, it does not result in meaningful movement or environment exploration. Consequently, these agents exhibit poor state coverage and fail to solve downstream tasks that require dynamic movement.
Methodology
Multi-View Trajectories
BeCL addresses the limitations of previous MI-based methods by shifting to a multi-view perspective. Instead of maximizing the MI between a single state and a skill label, BeCL considers two different trajectories generated by the same skill. These trajectories are treated as different "views" of the same underlying behavior, accounting for environmental stochasticity and policy variance.
The BeCL Objective
The core objective of BeCL is to maximize the mutual information between these different views, denoted as $I(S^{(1)}; S^{(2)})$. This objective can be mathematically decomposed into two critical components:
- Skill Discovery: Ensuring that states belonging to the same skill are similar in the representation space, while states from different skills are distinct.
- Multi-view Consistency: Forcing the policy to be robust so that the same latent skill produces consistent behavioral outcomes across different executions.
Contrastive Implementation
To optimize this objective in high-dimensional state spaces, BeCL utilizes a contrastive loss similar to those used in self-supervised computer vision (e.g., SimCLR).
- Positive Pairs: States sampled from two different trajectories of the same skill.
- Negative Pairs: States sampled from trajectories of different skills.
By minimizing this contrastive loss, the agent learns a representation where the "same" behaviors are clustered together and "different" behaviors are pushed apart.
Implicit Entropy Maximization
A key theoretical contribution of this work is the proof that minimizing the BeCL contrastive loss implicitly maximizes state entropy. This provides a mathematical "repulsive force" that pushes the agent to explore new areas of the environment to make its skills more distinct. This mechanism directly solves the "static posing" problem by rewarding the agent for reaching states that have not been covered by other skills.
Experimental Setup
The researchers evaluated BeCL against several state-of-the-art unsupervised RL methods, including DIAYN, DADS, APS, and CIC. The evaluation focused on two primary environments:
- Continuous 2D Maze: A constrained space used to visualize the agent's ability to achieve broad state coverage.
- Unsupervised RL Benchmark (URLB): A standard benchmark based on the DeepMind Control Suite (DMC), featuring three domains:
- Walker: A bipedal figure requiring balance and locomotion.
- Quadruped: A high-dimensional four-legged robot.
- Jaco Arm: A 6-DOF robotic arm for manipulation tasks.
Results and Discussion
Performance on URLB
BeCL achieved state-of-the-art performance on the URLB benchmark, reaching an Interquartile Mean (IQM) score of 75.38%. This outperformed the previous leading method, CIC, and showed a massive improvement over classic methods like APS (a 38.2% increase). These results suggest that the behaviors learned during the unsupervised phase are significantly more useful for fine-tuning on downstream tasks with rewards.
Exploration and Dynamics
In the 2D maze tasks, BeCL was the only competence-based method capable of reaching the far side of the environment. While methods like DIAYN remained trapped near the starting position due to the posing trap, BeCL’s implicit entropy maximization forced it to navigate the entire maze. Qualitatively, BeCL discovers dynamic behaviors—such as actual running, flipping, and reaching—rather than the static, immobile poses characteristic of earlier MI-based approaches.
The Role of Temperature
The hyperparameter $\kappa$ (temperature) in the contrastive loss was found to be a critical factor. It controls the trade-off between uniformity and tolerance in the feature space. A lower temperature encourages wider exploration by penalizing similarity between different skills more harshly, though extremely low values can eventually make skills difficult to distinguish.
Conclusion
Behavior Contrastive Learning (BeCL) represents a significant advancement in unsupervised skill discovery. By framing skill learning as a multi-view consistency problem, it provides a robust upper bound on standard MI objectives and naturally encourages environment exploration. While BeCL currently uses random skill sampling during fine-tuning, future work could involve developing meta-controllers for more efficient skill selection or incorporating hard negative mining to further refine the distinctness of discovered behaviors.
Summary updated