Approximate Equivariance in Reinforcement Learning

Jung Yeon Park, Sujay Bhatt, Sihan Zeng, Lawson L.s. Wong, Alec Koppel, Sumitra Ganesh, Robin Walters

Abstract

Equivariant neural networks have shown great success in reinforcement learning (RL), improving sample efficiency and generalization when there is symmetry in the task. However, in many problems, only approximate symmetry is present, which makes imposing exact symmetry inappropriate. Recently, approximately equivariant networks have been proposed for supervised classification and modeling physical systems. In this work, we develop approximately equivariant algorithms in RL. We define approximately equivariant MDPs and theoretically characterize the effect of approximate equivariance on the optimal Q function. We propose novel RL architectures using relaxed group and steerable convolutions and experiment on several continuous control domains and stock trading with real financial data. Our results demonstrate that the approximately equivariant network performs on par with exactly equivariant networks when exact symmetries are present, and outperforms them when the domains exhibit approximate symmetry. As an added byproduct of these techniques, we observe increased robustness to noise at test time.

Introduction

Symmetry is a powerful inductive bias in machine learning. In robotics, for instance, if an agent learns that reaching left is a mirror image of reaching right, it can effectively double its learning efficiency. This property is known as equivariance. However, strict equivariance is often too rigid for real-world applications. A robot's left motor might be slightly weaker than its right, or environmental factors like lighting or textures might break perfect visual symmetry.

Current RL agents typically face a trade-off:

  1. Strictly Equivariant Models: Highly data-efficient but unable to adapt to symmetry-breaking factors.
  2. Non-Equivariant Models: Flexible enough to learn any pattern but requiring significantly more data to "re-learn" physics for every orientation.
Approximate equivariance: transforming a state $s$ by $g$ leads to an action $\pi(gs)$ that is approximately the transformed action $ga$.

This research bridges this gap by formalizing Approximately Equivariant Markov Decision Processes (MDPs) and designing architectures that can "relax" symmetry constraints where necessary.

Methods: Relaxed Convolutions

The proposed framework rests on two main pillars: a theoretical foundation and a novel architecture.

Theoretical Foundation

The authors define a "mismatch" parameter ($\epsilon$) for rewards and transitions within an MDP. They prove that if an environment is nearly symmetric, the optimal Q-function is also nearly symmetric. This theoretical result justifies the use of approximately equivariant networks to approximate these functions.

Relaxed Group and Steerable Convolutions

Instead of standard group convolutions that enforce the same filter across all transformations, the authors introduce Relaxed Group and Steerable Convolutions.

The approximately equivariant architecture utilizes relaxed group convolutions in the encoder and policy to balance symmetry and flexibility.

In a standard equivariant layer, a single kernel is transformed to handle different orientations. In a relaxed layer, the output is a weighted combination of several equivariant kernels. These weights can vary depending on the specific transformation (e.g., rotation vs. reflection), allowing the model to "turn down" the symmetry if the data indicates it is broken. This architecture was integrated into state-of-the-art RL algorithms like DrQv2 for image-based tasks and SAC for vector-based tasks.

Experimental Evaluation

The method was evaluated across two distinct domains:

  1. Modified DeepMind Control Suite: Benchmarks like Acrobot, Cartpole, BallInCup, and Reacher were modified with synthetic symmetry-breaking factors, such as tilting gravity or region-specific action repeats.
  2. Real-World Financial Data: Using Dow Jones index data (2001–2024), the model looked for temporal translation and temporal scaling symmetries, which are only approximately true in volatile markets.

Key Results and Insights

The approximately equivariant models consistently outperformed both strict and non-equivariant baselines in asymmetric environments. For example, in a "Gravity" variant of Acrobot, the agent achieved a reward of 471, compared to 382 for the strictly equivariant agent and 358 for the non-equivariant one. In stock trading, the model achieved a 12.0% annualized return, surpassing both the strictly equivariant (10.3%) and standard SAC (9.6%) models.

Crucially, there was no "symmetry tax": on perfectly symmetric environments, the approximate model performed on par with the strictly equivariant one. Furthermore, the model demonstrated increased robustness to Gaussian noise at test time. By analyzing the learned "relaxed weights," the authors observed the model "discovering" environmental asymmetries, such as the increased importance of recent data in financial markets.

Conclusion

Treating symmetry as a flexible prior rather than a hard constraint allows RL agents to benefit from the efficiency of equivariance without sacrificing the ability to learn from real-world imperfections. Future work includes automating the discovery of symmetry groups and applying these techniques to complex robotic manipulation tasks with natural obstacles.

Summary updated

BibTeX
@inproceedings{park2025approximate,
  author = {Jung Yeon Park and Sujay Bhatt and Sihan Zeng and Lawson L.S. Wong and Alec Koppel and Sumitra Ganesh and Robin Walters},
  title = {{Approximate Equivariance in Reinforcement Learning}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2025},
  url = {https://openreview.net/forum?id=SOrZWcuz3j},
}
Figure