Equivariant Data Augmentation for Generalization in Offline Reinforcement Learning

Cristina Pinneri, Sarah Bechtle, Markus Wulfmeier, Arunkumar Byravan, Jingwei Zhang, William F. Whitney, Martin A. RiedmillerarXiv 2023 · DOI

Offline Reinforcement Learning (RL) is often considered the "holy grail" for real-world robotics, as it allows agents to learn from fixed datasets of logged experiences without the need for expensive or potentially dangerous real-time trial and error. However, a major hurdle remains: distribution mismatch. If a robot is trained on data where a target object is always in the center of a table, it will likely fail if the object is moved to a corner during deployment.

While Computer Vision addresses similar issues through data augmentation (e.g., flipping or rotating images), RL cannot simply "flip" state data without considering the underlying physics. Arbitrarily shifting coordinates might violate gravity or joint constraints. EDAS (Equivariant Data Augmentation from State-inputs) addresses this by automatically discovering physics-preserving symmetries within a dataset to enable robust out-of-distribution (OOD) generalization.

The EDAS Framework

EDAS introduces a three-step framework designed to expand the reach of offline datasets while maintaining physical consistency:

The EDAS Framework: A three-step process involving dynamics modeling, equivariant set expansion, and policy training on augmented data.
  1. Train a Dynamics Model: The system first learns a model $f_\theta(s, a) \to s'$ that predicts the next state based on the current state and action using the available logged data.
  2. Expand the Equivariant Set: This is the core innovation. The method defines a transformation group (such as translations) and learns the maximum valid range (bounds) for these transformations. This is achieved by optimizing two competing objectives:
  3. Equivariance Loss: Ensures the transformation is "legal." If an input state is shifted, the predicted next state must shift by the same amount. High prediction errors indicate an invalid transformation.
  4. Entropy Regularization: Pushes the transformation bounds to be as wide as possible, effectively "stretching" the dataset to cover the maximum allowable state space.
  5. Offline RL: The original dataset is augmented with these learned, physics-consistent transformations. A standard offline RL algorithm, such as Critic Regularized Regression (CRR), is then trained on this expanded dataset.

For environments with noisy dynamics, EDAS utilizes a "relative error" formulation. This prevents the algorithm from generating synthetic data in regions where the dynamics model is naturally uncertain, ensuring that only high-quality augmentations are used.

Key Insights and Methodology

The central hypothesis of EDAS is that equivariance serves as a proxy for physics. If a learned dynamics model remains equivariant under a specific transformation, that transformation likely respects the environment's underlying physical laws.

Unlike previous methods that rely on manually hard-coded rules or tiny, fixed perturbations, EDAS automatically discovers the maximum safe transformation. For example, in a navigation task, it can learn that while positions can be translated across an entire arena, velocities cannot. This allows the agent to bridge the gap between model-based insights and model-free policy execution.

Experimental Evaluation

The researchers evaluated EDAS on modified tasks from the DeepMind Control (DMControl) Suite, specifically designed to test OOD generalization by placing test goals in areas never visited during training.

Point Mass Trajectories: Visualization of the limited training trajectories in the Point Mass environment, where all paths converge to a central goal.
  • Point Mass: In this 2D arena task, training data only contained trajectories ending at the center $(0,0)$. Without augmentation, agents failed completely on OOD goals. With EDAS, the agent achieved a normalized return of nearly 1.0, matching its training performance perfectly.
  • Planar Reacher: EDAS significantly closed the performance gap by identifying that the system was invariant to rotations around the shoulder joint (modeled as translations in joint-angle space).
  • Robustness to Noise: In experiments with asymmetric noise, EDAS successfully learned to only augment data in "clean" regions, demonstrating it does not blindly expand into unreliable state spaces.

Conclusion and Future Work

EDAS demonstrates that learning the symmetries of an environment's dynamics is a powerful tool for offline RL generalization. By automatically discovering the maximum range of valid transformations, it allows agents to reach goals far beyond their initial training distribution.

Future research directions include expanding the framework to handle more complex symmetries (like scaling or reflections), applying the method to high-dimensional pixel data via latent space models, and developing end-to-end architectures where the dynamics model and policy are optimized simultaneously.

Summary updated

BibTeX
@misc{pinneri2023equivariant,
  author = {Cristina Pinneri and Sarah Bechtle and Markus Wulfmeier and Arunkumar Byravan and Jingwei Zhang and William F. Whitney and Martin A. Riedmiller},
  title = {{Equivariant Data Augmentation for Generalization in Offline Reinforcement Learning}},
  year = {2023},
  eprint = {2309.07578},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.07578},
}
Figure