Learning Generalizable Representations for Reinforcement Learning via Adaptive Meta-learner of Behavioral Similarities

Jianda Chen, Sinno Pan

Reinforcement Learning (RL) from pixels is notoriously difficult. While humans can easily distinguish between a car we are driving and the clouds moving in the background, standard RL agents often get "distracted." They try to model every pixel in their field of vision, leading to representations that fail the moment the background changes.

In their ICLR 2022 paper, "Learning Generalizable Representations for Reinforcement Learning via Adaptive Meta-Learner of Behavioral Similarities," Jianda Chen and Sinno Jialin Pan introduce AMBS, a framework that uses meta-learning to help agents focus on "behavioral similarity" rather than visual fluff.

Executive Summary

AMBS improves visual RL generalization by decomposing state representations into reward and dynamics components and using neural meta-learners to learn how similar two states actually are. By adaptively balancing these components, the agent learns to ignore task-irrelevant visual noise (like moving backgrounds), outperforming state-of-the-art baselines on distracting control tasks and autonomous driving simulations.

The Problem: Distraction in Visual RL

The "holy grail" of visual RL is learning a low-dimensional representation of a high-dimensional image that captures only what is necessary for the task.

Traditional approaches often use reconstruction losses (like Variational Autoencoders), but these are too "honest"—they try to reconstruct every pixel, including distracting backgrounds. Recent research has turned to bisimulation metrics, which define two states as "similar" if they yield the same immediate reward and lead to similar future states.

However, existing bisimulation methods (like Deep Bisimulation for Control, or DBC) usually rely on hand-crafted distance functions (like the $L_1$ norm) in the latent space. The authors argue that these fixed distances are too restrictive, provide unstable gradients, and fail to account for the fact that the relative importance of rewards versus dynamics can change depending on the environment.

Methods: The AMBS Framework

To overcome the limitations of fixed distance metrics, the authors propose the Adaptive Meta-learner of Behavioral Similarities (AMBS).

The AMBS architecture featuring decomposed encoders and meta-learners for reward and dynamics similarity.

The architecture consists of several key moving parts:

  1. Decomposed Encoders: Instead of a single monolithic embedding, AMBS uses two distinct representations: $\phi_r$ (capturing reward-relevant features) and $\phi_d$ (capturing dynamics-relevant features).
  2. Meta-Learners ($f_r, f_d$): Instead of using a fixed $L_1$ distance, the authors introduce two neural networks to learn the similarity between embeddings. These meta-learners are trained via regression to approximate the reward difference and the Wasserstein distance of the transition dynamics.
  3. Adaptive Balancing ($c$): A learnable parameter $c$ adaptively weights the importance of the reward term versus the dynamics term. This is learned jointly with the Q-function, allowing the agent to prioritize whichever signal is more reliable in a given environment.
  4. Integration with SAC: The framework is built on top of Soft Actor-Critic (SAC) and incorporates data augmentation (random crops) to further boost robustness.

Datasets and Evaluation

The authors evaluated AMBS across three increasingly difficult settings:

  • DeepMind (DM) Control Suite: The standard benchmark for continuous control.
  • Distracting DM Control Suite: The same tasks, but with the background replaced by natural videos (e.g., driving scenes from the Kinetics dataset) to test robustness to visual noise.
  • CARLA: A high-fidelity autonomous driving simulator. They tested on the "Town04" map, which includes complex highway traffic and changing weather conditions.
  • DAVIS 2017: Used specifically to test generalization to completely unseen video backgrounds.

Key Insights

  • Neural Similarity Outperforms Euclidean Distance: The core insight is that a neural network is a better judge of similarity than a simple $L_1$ norm. The meta-learners provide smoother, more stable gradients, which prevents the representation learning from "collapsing" or becoming erratic during training.
  • The "Distraction" Filter: In environments with heavy visual noise (like a video playing behind a robot arm), the dynamics of the background are complex but irrelevant. AMBS learns to down-weight the dynamics component in these cases, effectively filtering out the noise.
  • Decomposition is Key: By separating reward and dynamics, the model can preserve information that is useful for predicting rewards even if it isn't useful for predicting the next state's pixels, and vice versa.

Key Results

Performance of AMBS compared to baselines across various DM Control Suite tasks.
  • Superior Generalization: In the Distracting DM Control Suite, AMBS significantly outperformed baselines like DBC and DrQ. While other agents' performance plummeted when natural videos were introduced, AMBS maintained scores close to those achieved on clean backgrounds.
  • CARLA Performance: In the autonomous driving task, AMBS achieved the highest driving distance and best collision avoidance, proving it can handle the "real-world" visual complexity of a driving simulator.
  • Stable Learning: Experimental plots show that AMBS achieves a much lower regression loss for the bisimulation metric compared to $L_1$-based methods, confirming that the meta-learners successfully provide a better optimization target.

Limitations and Future Work

While highly effective, AMBS does come with trade-offs:

  • Computational Complexity: Training two encoders and two meta-learners alongside the standard RL machinery adds significant computational overhead compared to simpler methods like DrQ.
  • Partial Observability: The paper assumes the environment is fully observable through frame stacking. In truly partially observable environments (where the state isn't just in the pixels), the bisimulation metric might need further refinement.
  • Hyperparameter Sensitivity: While the balancing factor $c$ is learned, the meta-learners themselves introduce new architectural choices (layer size, depth) that may require tuning for different domains.

For researchers looking to deploy RL in visually "messy" environments, AMBS provides a robust blueprint for learning what to watch—and what to ignore.

Summary updated

BibTeX
@inproceedings{chen2022learning,
  author = {Jianda Chen and Sinno Pan},
  title = {{Learning Generalizable Representations for Reinforcement Learning via Adaptive Meta-learner of Behavioral Similarities}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=zBOI9LFpESK},
}
Figure