Unified State Representation Learning under Data Augmentation

Taylor Hearn, Sravan Jayanthi, Sehoon HaarXiv 2022 · DOI

Abstract

Reinforcement Learning (RL) agents often struggle with zero-shot domain adaptation, failing when visual characteristics change despite identical underlying physics. We present USRA (Unified State Representation Learning under Data Augmentation), a framework that combines latent state disentanglement with auxiliary Q-value consistency losses. Unlike traditional methods that freeze visual encoders after pre-training, USRA continues to update the encoder during policy learning. Our results on the DeepMind Control Generalization Benchmark show that USRA achieves significant performance boosts in zero-shot adaptation over existing state-of-the-art methods.

Introduction

Reinforcement Learning agents are notoriously brittle. An agent trained to walk on a green field might completely fail if the environment's visual textures are modified, such as changing the ground color or introducing dynamic video backgrounds. This represents a failure of zero-shot domain adaptation: the ability to take a policy learned in a "source" domain and apply it to a "target" domain with different visual characteristics but the same underlying physics.

Existing approaches often attempt to learn a "domain-general" representation of the world by focusing on task-relevant features (like joint angles) while ignoring irrelevant visual noise. However, these methods typically freeze the visual encoder after an initial pre-training phase. This research argues that freezing the encoder is a mistake; if the encoder does not continue to learn while the agent explores, it fails to represent specific states discovered during high-reward trajectories.

Methodology

The proposed USRA framework merges two powerful concepts to create a robust visual representation:

  1. Latent Unified State Representation (LUSR): This utilizes a cycle-consistent Variational Autoencoder (VAE) to disentangle an image into a domain-general embedding (e.g., the agent's posture) and a domain-specific embedding (e.g., background color).
  2. Stabilized Q-Value Estimation under Augmentation (SVEA): This auxiliary loss function forces the agent to predict consistent Q-values for a state, regardless of whether it is processing a clean image or a heavily augmented version.
The USRA workflow consists of a pre-training phase using LUSR and SVEA losses, followed by a fine-tuning phase that continues to update the encoder during RL training.

The USRA Workflow

As illustrated in the architecture above, the training process is divided into two distinct phases:

  • Phase 1 (Pre-training): The encoder is trained on observations from a random policy. It learns to disentangle general features from specific ones using the LUSR cycle-consistency loss and the SVEA augmentation loss.
  • Phase 2 (Fine-tuning): Unlike previous methods, USRA continues to update the encoder while the RL agent learns its policy. It uses the SVEA loss to ensure that as the agent discovers new areas of the state space, the encoder remains robust to visual noise without "forgetting" the general features learned in Phase 1.

Experimental Results

The researchers evaluated USRA using the DeepMind Control Generalization Benchmark (DMControl-GB), specifically focusing on the "Walker" task. Evaluation domains included varying levels of difficulty in color shifts and video background overlays.

Evaluation results on the 'Color Hard' task demonstrate USRA's superior zero-shot generalization performance compared to SVEA and LUSR baselines.

USRA consistently outperformed the baselines across all test scenarios:

  • Source Domain: Achieved 6.3% higher returns than the next best method.
  • Zero-Shot Generalization: In the most difficult "Video Hard" environment, USRA outperformed SVEA by 21.2% and LUSR by a massive margin (245 vs 43 reward points).
  • Sample Efficiency: As shown in the evaluation curves, USRA begins to significantly outpace other methods after approximately 500 training episodes, reaching higher asymptotic performance faster.

Key Insights

  • Online Learning is Essential: Encoders should not be frozen. By fine-tuning the encoder on observations collected by the active policy, the agent learns a representation that is optimized for the task, not just for image reconstruction.
  • Stronger Augmentations: Ablation studies indicated that Random Convolutions (RandConv) are more effective than simple color jittering. Stronger distortions force the encoder to find the underlying "truth" of the state.
  • Differential Learning Rates: To prevent "catastrophic forgetting" during fine-tuning, lowering the learning rate of the encoder (by 10x) relative to the rest of the network significantly improved stability.

Conclusion and Future Work

USRA demonstrates that combining latent disentanglement with continuous encoder updates significantly improves RL robustness. While the current work focuses on the Walker environment and assumes static physics, future research may explore how these representations assist in "few-shot" learning when the agent's own mechanics change or when applied to a wider variety of MuJoCo tasks.

Summary updated

BibTeX
@misc{hearn2022unified,
  author = {Taylor Hearn and Sravan Jayanthi and Sehoon Ha},
  title = {{Unified State Representation Learning under Data Augmentation}},
  year = {2022},
  eprint = {2209.05302},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.05302},
}
Figure