NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

CCLF: A Contrastive-Curiosity-Driven Learning Framework for Sample-Efficient Reinforcement Learning

Chenyu Sun, Hangwei Qian, Chunyan Miao · DOI

Abstract

Reinforcement Learning (RL) from high-dimensional observations, such as raw pixels, is notoriously data-intensive. While Data Augmentation (DA) has emerged as a powerful tool to improve sample efficiency by teaching agents spatial invariances, current methods often treat all data samples and augmentations uniformly. This leads to computational inefficiencies and potential training instability. This paper introduces the Contrastive-Curiosity-driven Learning Framework (CCLF), a model-agnostic approach that prioritizes the most informative data through a novel "contrastive curiosity" metric. By repurposing contrastive loss as a measure of surprise, CCLF optimizes input selection, experience replay, and exploration. Our results across the DeepMind Control Suite, Atari 100K, and MiniGrid benchmarks demonstrate that CCLF significantly outperforms state-of-the-art baselines, often achieving target performance in half the environment steps.

1. Introduction

Teaching artificial agents to perform complex tasks from visual inputs remains a fundamental challenge in RL. Unlike humans, who can grasp game mechanics in minutes, AI agents often require millions of frames to achieve proficiency. This gap is largely due to the difficulty of simultaneously learning robust representations and optimal policies.

Existing techniques utilize Data Augmentation to help agents recognize that a robot remains the same entity even when shifted or cropped. However, these methods typically sample from memory uniformly and apply augmentations blindly. This "brute-force" approach results in computational waste on redundant or "easy" samples and can introduce instability if the augmentations alter the semantic meaning of the state. CCLF addresses these issues by focusing the agent's attention on "surprising" data—samples that the model currently finds difficult to represent or understand.

2. The CCLF Framework

The technical core of CCLF is Contrastive Curiosity. The framework leverages the contrastive loss term from the CURL (Contrastive Unsupervised Representations for Reinforcement Learning) architecture. In this setup, the agent attempts to match two different augmented views of the same image. CCLF interprets the prediction error of this matching process as a measure of "surprise."

If the agent fails to recognize that two views originate from the same observation, it indicates that the sample contains under-learned information. This curiosity metric is integrated into four distinct components of the RL pipeline:

  1. Augmented Input Selection: Instead of processing all generated augmentations, the framework selects the two most "surprising" versions to train on.
  2. Experience Replay: Transitions with high curiosity scores are prioritized in the replay buffer, ensuring the agent revisits challenging moments more frequently.
  3. Learning Regularization: The loss functions for the Q-function and the image encoder are weighted so the model pays more attention to high-curiosity samples.
  4. Task Exploration: The framework provides an intrinsic "curiosity reward," incentivizing the agent to explore states it does not yet fully understand.

Notably, CCLF is model-agnostic and has been successfully integrated with Soft Actor-Critic (SAC) for continuous tasks, Rainbow DQN for discrete tasks, and A2C for on-policy navigation.

3. Experimental Evaluation

CCLF was evaluated against three major benchmarks to test its versatility and efficiency:

  • DeepMind Control (DMC) Suite: Six continuous control tasks (e.g., Cheetah Run, Walker Walk).
  • Atari 100K: Twenty-six discrete games evaluated at a strict 100,000-step limit to simulate extreme data scarcity.
  • MiniGrid: Three navigation tasks featuring sparse rewards, which necessitate sophisticated exploration strategies.

3.1 Key Results

In the DMC Suite, CCLF outperformed state-of-the-art baselines like CURL and DrQ in five out of six tasks. In several instances, CCLF reached target performance levels in approximately 50% of the environment steps required by competing methods.

On the Atari 100K benchmark, CCLF achieved higher scores than CURL in 11 games and DrQ in 18 games. In specific titles such as Road Runner and Alien, performance improved by 1.6x to 2x. Furthermore, in MiniGrid's "DoorKey" tasks, CCLF achieved up to 1.63x higher performance than RE3, a dedicated curiosity-driven baseline, proving its efficacy in sparse-reward environments.

4. Discussion and Insights

The success of CCLF highlights a shift from "quantity" to "quality" in RL data processing. By using 60% fewer augmented inputs than brute-force methods like CURL++, CCLF still achieved superior results. This suggests that identifying the right data to learn from is more impactful than simply increasing the volume of data.

Ablation studies further revealed that the framework's components work collaboratively; no single feature (such as prioritized replay or input selection) acts as a silver bullet. Instead, their combination stabilizes the learning process and prevents the performance jitters common in pixel-based RL.

5. Conclusion

CCLF provides a robust framework for improving sample efficiency by making agents "curious" about their own training data. By utilizing contrastive loss as a computationally inexpensive metric for surprise, CCLF prioritizes informative experiences and stabilizes representation learning. Future work may explore the application of contrastive curiosity to more complex augmentation types, such as color jittering or Gaussian blur, to further enhance agent robustness.

Summary updated

BibTeX
@inproceedings{sun2022cclf,
  author = {Chenyu Sun and Hangwei Qian and Chunyan Miao},
  title = {{CCLF: A Contrastive-Curiosity-Driven Learning Framework for Sample-Efficient Reinforcement Learning}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/478},
}
Figure