Contrastive Behavioral Similarity Embeddings for Generalization in Reinforcement Learning

Rishabh Agarwal, Marlos C. Machado, Pablo Samuel Castro, Marc G. Bellemare
1/13/2021
cs.LGcs.AIstat.ML
rl

Official code: google-research/google-research (39,251 stars, Jupyter Notebook, Apache-2.0, last commit 2026-04-30).

Abstract

Reinforcement learning methods trained on few environments rarely learn policies that generalize to unseen environments. To improve generalization, we incorporate the inherent sequential structure in reinforcement learning into the representation learning process.

Show full abstract

This approach is orthogonal to recent approaches, which rarely exploit this structure explicitly. Specifically, we introduce a theoretically motivated policy similarity metric (PSM) for measuring behavioral similarity between states. PSM assigns high similarity to states for which the optimal policies in those states as well as in future states are similar. We also present a contrastive representation learning procedure to embed any state similarity metric, which we instantiate with PSM to obtain policy similarity embeddings (PSEs). We demonstrate that PSEs improve generalization on diverse benchmarks, including LQR with spurious correlations, a jumping task from pixels, and Distracting DM Control Suite.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Google Research

39,2518,516Jupyter Notebook, PythonOct 4, 20187 months agoApache-2.0
aimachine-learningresearch

Similar Papers

Cite this paper

@article{agarwal2021contrastive,
  title  = {Contrastive Behavioral Similarity Embeddings for Generalization in Reinforcement Learning},
  author = {Rishabh Agarwal and Marlos C. Machado and Pablo Samuel Castro and Marc G. Bellemare},
  year   = {2021},
  eprint = {2101.05265},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2101.05265}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2101.05265.svg)](https://codeofpaper.com/paper/2101.05265)

Discussion