CURL: Contrastive Unsupervised Representations for Reinforcement Learning

TL;DR

CURL integrates contrastive learning with off-policy RL, boosting sample efficiency by nearly 2x in DM control and 1.2x in Atari.

cs.LG 🔴 Advanced 2020-04-09 46 views
Aravind Srinivas Michael Laskin Pieter Abbeel
Reinforcement Learning Contrastive Learning Self-supervised Representation Pixel Control Sample Efficiency

Key Findings

Methodology

CURL employs a contrastive learning framework that maximizes agreement between augmented views of the same observation using InfoNCE loss. It utilizes a query encoder trained jointly with RL algorithms like SAC and Rainbow, and a momentum-averaged key encoder to stabilize representations. Data augmentation ensures temporal consistency across frame stacks, capturing spatial and temporal features. The approach integrates seamlessly into existing off-policy algorithms, significantly improving sample efficiency in high-dimensional pixel environments, as validated on DM control and Atari benchmarks.

Key Results

  • On DM control tasks, CURL combined with SAC achieves a median 1.9x performance gain over Dreamer at 100K environment steps, nearly matching state-based methods' sample efficiency. In Atari, coupling with a data-efficient Rainbow variant yields a median 1.2x improvement over prior pixel-based methods, outperforming benchmarks like SimPLe and Efficient Rainbow on 19 of 26 games, with some surpassing human performance.
  • The method demonstrates robustness and stability in data-limited settings, especially on complex continuous control tasks. Its simplicity and compatibility with standard RL pipelines facilitate reproducibility. Ablation studies confirm that instance discrimination and momentum encoding are critical for performance gains.
  • Results indicate that contrastive objectives outperform reconstruction-based losses in learning high-quality representations, leading to faster convergence and better generalization across diverse environments. This marks a significant step toward end-to-end pixel-based RL with sample efficiency comparable to state-based approaches.

Significance

This work addresses a core challenge in reinforcement learning: sample inefficiency with high-dimensional inputs. By leveraging contrastive self-supervised learning, CURL enables agents to extract meaningful semantic features directly from raw pixels, reducing data requirements and accelerating training. Its success in both simulated control and Atari environments demonstrates broad applicability, paving the way for more practical autonomous agents in robotics, gaming, and real-world applications. The approach bridges the gap between high-capacity representation learning and efficient policy optimization, marking a paradigm shift in pixel-based RL research.

Technical Contribution

CURL introduces a simple yet effective framework that integrates contrastive learning into off-policy RL with minimal architectural overhead. Key innovations include the use of instance discrimination with data augmentation, momentum-averaged key encoders inspired by MoCo, and a bilinear similarity measure. The method maintains end-to-end differentiability, enabling joint training of representations and policies. Extensive experiments validate its superiority over prior methods, establishing a new standard for sample-efficient pixel-based RL. The approach also offers theoretical insights into the benefits of contrastive objectives for representation learning in dynamic environments.

Novelty

This is the first comprehensive application of contrastive self-supervised learning as an auxiliary task to significantly improve sample efficiency in pixel-based reinforcement learning across both continuous and discrete control tasks. Unlike prior works focusing on predictive or reconstruction losses, CURL employs a straightforward instance discrimination approach with momentum encoding, achieving performance close to state-based methods. Its simplicity, effectiveness, and broad applicability distinguish it from existing approaches, filling a critical gap in the literature.

Limitations

  • While effective, CURL's performance may degrade in environments with highly dynamic or noisy observations where augmentation strategies fail to preserve meaningful features. Its reliance on data augmentation parameters necessitates careful tuning.
  • Computational overhead from contrastive loss and momentum encoder, though minimal, can be significant in large-scale or real-time applications. Further optimization is needed for deployment in resource-constrained settings.
  • The method's robustness in real-world robotic scenarios remains to be validated, especially under sensory noise and partial observability. Future work should explore adaptive augmentation and multi-modal integration.

Future Work

Future directions include combining contrastive learning with predictive models to enhance long-term planning, extending to multi-modal sensory inputs, and applying in real-world robotics. Investigating adaptive augmentation strategies and scaling to more complex environments will further improve robustness. Additionally, exploring theoretical guarantees for representation quality and transferability across tasks remains an open avenue.

AI Executive Summary

CURL represents a significant advancement in pixel-based reinforcement learning by integrating contrastive self-supervised learning into off-policy algorithms such as SAC and Rainbow. The core idea is to learn high-quality, semantic-rich representations directly from raw pixel observations, which traditionally posed a major challenge due to high dimensionality and sample inefficiency.

The framework employs instance discrimination, where augmented views of the same observation are pulled together in the embedding space, while different observations are pushed apart. This process is stabilized through momentum-averaged encoders, inspired by MoCo, and uses a bilinear similarity measure for better performance. The contrastive loss (InfoNCE) is jointly optimized with RL objectives, enabling the agent to learn effective policies with significantly fewer environment interactions.

Experimental results demonstrate that CURL coupled with SAC achieves 1.9x performance over Dreamer on DM control tasks at 100K steps, nearly matching state-based methods’ sample efficiency. In Atari benchmarks, combining CURL with a data-efficient Rainbow variant yields a median 1.2x improvement over prior pixel-based methods, with some games surpassing human performance. These results highlight the method’s robustness and generality across diverse control problems.

The significance of this work lies in its ability to extract meaningful features from high-dimensional pixel data, reducing the reliance on large amounts of interaction data. This breakthrough opens new avenues for deploying reinforcement learning in real-world scenarios where data collection is costly or limited. Its simplicity and compatibility with existing RL algorithms facilitate broad adoption and further research.

Despite its success, challenges remain in environments with highly dynamic or noisy observations. Future work aims to combine contrastive learning with predictive models, extend to multi-modal inputs, and validate in real robotic systems. Overall, CURL sets a new benchmark for sample-efficient pixel-based reinforcement learning, bridging the gap between raw sensory inputs and effective control policies.

Deep Dive

Abstract

We present CURL: Contrastive Unsupervised Representations for Reinforcement Learning. CURL extracts high-level features from raw pixels using contrastive learning and performs off-policy control on top of the extracted features. CURL outperforms prior pixel-based methods, both model-based and model-free, on complex tasks in the DeepMind Control Suite and Atari Games showing 1.9x and 1.2x performance gains at the 100K environment and interaction steps benchmarks respectively. On the DeepMind Control Suite, CURL is the first image-based algorithm to nearly match the sample-efficiency of methods that use state-based features. Our code is open-sourced and available at https://github.com/MishaLaskin/curl.

cs.LG cs.CV stat.ML