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

Sample-efficient Reinforcement Learning Representation Learning with Curiosity Contrastive Forward Dynamics Model

Thanh Nguyen, Tung Minh Luu, Thang Vu, Chang D. Yoo · DOI

TL;DR

This paper introduces the Curiosity Contrastive Forward Dynamics Model (CCFDM), a novel framework that significantly improves sample efficiency and generalization in reinforcement learning (RL) agents trained on raw pixel observations. By integrating a forward dynamics model with contrastive learning and a curiosity-driven exploration strategy, CCFDM learns more effective visual representations, outperforming existing state-of-the-art methods on challenging control tasks.

What Problem Does This Paper Address?

Reinforcement learning (RL) agents have shown impressive capabilities in various domains, from games to robotics. However, a major hurdle remains: achieving high performance when learning directly from high-dimensional sensory inputs like raw pixels. This is particularly challenging due to two key issues:

  • Sample Inefficiency: RL agents often require an enormous amount of data (interactions with the environment) to learn effective policies. This is computationally expensive and impractical for real-world applications like robotics.
  • Generalization: Agents trained on specific environments or tasks often struggle to adapt to new, unseen situations or variations.

Existing methods have made progress by combining techniques from computer vision, such as contrastive learning and data augmentation, with RL. However, these approaches often overlook the importance of temporal information within observations and lack robust exploration strategies, limiting their overall effectiveness. This paper aims to bridge this gap by developing a more sample-efficient and generalizable RL framework that learns powerful visual representations.

Methods

The core of the proposed solution is the Curiosity Contrastive Forward Dynamics Model (CCFDM). This framework integrates several key components:

  • Image Encoder (Query Encoder - QE): A deep convolutional neural network that maps raw pixel observations into meaningful feature representations.
  • Momentum Encoder (KE): A "slow-updating" version of the QE, inspired by MoCo [19]. This helps stabilize the learning of the QE by providing consistent targets for contrastive learning.
  • Forward Dynamics Model (FDM): This module learns to predict the next observation's feature representation given the current observation's feature and the executed action. This encourages the image encoder to capture temporal dynamics.
  • Contrastive Learning: This technique is used to train the image encoder. It works by ensuring that representations of augmented versions of the same observation (query and positive key) are pulled closer together in the feature space, while representations of different observations (query and negative keys) are pushed further apart. This helps the encoder learn discriminative features.
  • Curiosity Module (CM): This module generates intrinsic rewards based on the prediction error of the FDM. When the FDM struggles to predict the next observation, it indicates a novel or surprising state, and the agent receives an intrinsic reward. This encourages exploration of unfamiliar parts of the environment.

The CCFDM framework is trained end-to-end, meaning all modules are updated simultaneously. The RL agent (in this case, Soft Actor-Critic or SAC) uses the learned features from the QE and receives both extrinsic rewards from the environment and intrinsic rewards from the CM.

Datasets

The paper evaluates CCFDM on six continuous control tasks from the DeepMind Control Suite (DMC) [16]. These tasks are chosen for their diversity, including challenges like sparse rewards, complex dynamics, and hard exploration. The specific tasks used are: Cartpole-Swingup, Ball in cup-Catch, Reacher-Easy, Finger-Spin, Cheetah-Run, and Walker-Walk.

Key Insights and Ideas

  • FDM for Temporal Understanding: By forcing the FDM to predict future states, the image encoder is implicitly trained to capture temporal relationships between consecutive observations. This is crucial for understanding dynamic environments.
  • Curiosity as an Exploration Driver: Using FDM prediction error as an intrinsic reward is an efficient way to encourage exploration. Novel states, where the FDM is likely to be wrong, are rewarded, guiding the agent to discover more diverse experiences.
  • Synergy of Contrastive Learning and FDM: The combination of contrastive learning (for spatial and discriminative features) and FDM (for temporal features) creates a powerful representation learning mechanism. The image encoder is pushed to learn features that are both discriminative and temporally informative.
  • Hand-crafted Features Aren't Always Optimal: The paper suggests that in some cases, CCFDM's learned features can even outperform human-designed features (as seen with SAC State), highlighting the power of learned representations.

Key Results

CCFDM demonstrates significant improvements in sample efficiency and generalization across the tested DMC tasks.

  • State-of-the-Art Performance: CCFDM achieves state-of-the-art performance on four out of the six DMC tasks at 500k environment steps. It performs competitively on the remaining two tasks, often just below other strong baselines.
  • Improved Sample Efficiency: At 100k environment steps, CCFDM shows substantially higher performance compared to pixel-based baselines like SAC-Pixel and is competitive with methods like SLAC and CURL.
  • Near-Optimal Convergence: CCFDM converges to near-optimal scores on all six tasks within 500k steps, demonstrating its ability to learn efficiently.
  • Outperforming SAC State: In some tasks (Finger-Spin and Ball in Cup-Catch), CCFDM even surpasses the performance of SAC State, which uses hand-crafted features, suggesting the superiority of learned representations.

Limitations and Future Work

  • Batch Size Sensitivity: The paper notes that larger batch sizes generally lead to better performance in CCFDM, which is attributed to the contrastive learning component. However, larger batch sizes increase training time. The authors suggest that this trade-off needs to be managed wisely.
  • Computational Cost: While incorporating CURL [11] into CCFDM was straightforward, it did not improve performance but increased training time. The authors hypothesize that CCFDM already captures the benefits of CURL and leave a formal proof for future work.
  • Future Research Directions: The authors suggest exploring more efficient and lightweight modules that can be integrated with CCFDM to further enhance RL performance. They also leave the formal proof of CCFDM encompassing CURL's effects as a future research task.

Summary updated

BibTeX
@inproceedings{nguyen2021sample,
  author = {Thanh Nguyen and Tung Minh Luu and Thang Vu and Chang D. Yoo},
  title = {{Sample-efficient Reinforcement Learning Representation Learning with Curiosity Contrastive Forward Dynamics Model}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2021},
  doi = {10.1109/iros51168.2021.9636536},
}
Figure