SimSR: Simple Distance-based State Representation for Deep Reinforcement Learning

Hongyu Zang, Xin Li, Mingzhong Wang

Abstract

Learning reinforcement learning (RL) policies directly from high-dimensional images is notoriously sample-inefficient. This paper introduces Simple State Representation (SimSR), a novel method that learns compact, task-relevant state representations using a cosine-distance-based bisimulation metric. By sidestepping the heavy computational costs of traditional bisimulation and preventing "representation collapse," SimSR achieves state-of-the-art sample efficiency and robustness in visual RL tasks.

Introduction

In deep RL, learning policies from raw pixels is significantly more challenging than learning from low-dimensional physical states, such as a robot's joint angles or velocities. To bridge this gap, researchers often employ auxiliary tasks like image reconstruction or contrastive learning (e.g., CURL) to compress images into lower-dimensional representations. However, these methods often encode all visual information, including task-irrelevant background noise.

A promising alternative is the use of bisimulation metrics, which measure the "behavioral difference" between two states. Intuitively, two states are deemed similar if they yield similar immediate rewards and lead to similar future states. While powerful for filtering out irrelevant visual noise, bisimulation typically requires computing the Wasserstein distance between probability distributions—a computationally intractable task in continuous spaces. Existing workarounds often suffer from "representation collapse," where the network maps all observations to the same point in latent space.

Methodology

The authors propose SimSR, which adapts the bisimulation metric using a simple cosine-based operator. The method consists of four key components:

  1. Cosine Distance as the Base Metric: Instead of Euclidean distance, SimSR measures the difference between latent states using cosine distance, projecting all representations onto a unit sphere.
  2. Latent State Dynamics: SimSR learns an ensemble of probabilistic latent dynamics models. The agent encodes observations, predicts next latent states using this ensemble, and computes distances based on these predictions.
  3. Matrix-based Updates: Computational efficiency is improved by computing distances between all observations in a batch simultaneously using cross-correlation matrix operations.
  4. Stabilization: To prevent training divergence, the authors employ a momentum encoder and use a Huber loss to manage gradient spikes.

Experiments and Results

The method was evaluated on the DeepMind Control (DMC) Suite and tested for robustness using the Kinetics dataset to provide complex, natural video distractors.

Sample Efficiency

On standard DMC benchmarks, SimSR outperformed state-of-the-art baselines like CURL, DBC, MICo, and DeepMDP by a large margin on several core tasks, including Finger Spin, Hopper Hop, and Hopper Stand.

Performance on the Hopper Hop task, showing SimSR's superior sample efficiency compared to baselines.

Robustness to Visual Noise

When tested with natural video backgrounds from the Kinetics dataset, SimSR consistently outperformed all baselines. Visualizations showed that SimSR successfully clustered states with similar robot configurations while ignoring chaotic background distractors.

Examples of the DMC environments with and without natural video distractors from the Kinetics dataset.

Zero-Shot Generalization

The authors demonstrated that a SimSR encoder trained on one task (e.g., Walker_Walk) could be frozen and effectively reused for related tasks (Walker_Stand, Walker_Run), performing nearly as well as task-specific fine-tuned agents.

Conclusion

SimSR provides a robust and efficient framework for learning task-relevant state representations. While the joint training of representations and RL policies can be volatile, requiring stabilization techniques like Huber loss, the method's ability to avoid representation collapse and filter out visual noise makes it a powerful tool for visual RL. Future work may explore combining distance-based representations with data augmentation to further enhance signal extraction.

Summary updated

BibTeX
@inproceedings{zang2022simsr,
  author = {Hongyu Zang and Xin Li and Mingzhong Wang},
  title = {{SimSR: Simple Distance-based State Representation for Deep Reinforcement Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i8.20883},
}
Figure