Abstract
In this paper we explore methods to exploit symmetries for ensuring sample efficiency in reinforcement learning (RL), this problem deserves ever increasing attention with the recent advances in the use of deep networks for complex RL tasks which require large amount of training data. We introduce a novel method to detect symmetries using reward trails observed during episodic experience and prove its completeness. We also provide a framework to incorporate the discovered symmetries for functional approximation. Finally we show that the use of potential based reward shaping is especially effective for our symmetry exploitation mechanism. Experiments on various classical problems show that our method improves the learning performance significantly by utilizing symmetry information.
Introduction
Reinforcement Learning (RL) is notoriously data-hungry, often requiring millions of interactions to master complex tasks. A primary driver of this inefficiency is the agent's tendency to treat identical or "mirror-image" states as entirely novel experiences. While many environments—such as a Cart-Pole system or a Grid World—possess intrinsic symmetries, manually specifying these is often impractical in complex real-world scenarios.
This research addresses how an agent can automatically detect these symmetries from raw experience and leverage that knowledge to accelerate learning in deep RL contexts. By identifying these redundancies, agents can generalize knowledge across symmetric states, significantly reducing the required training data.
Methodology
The proposed framework consists of two main components: Symmetry Detection and Symmetry Exploitation.
Symmetry Detection via Reward Trails
The core hypothesis is that symmetric state-action pairs should produce identical sequences of rewards, or "reward trails," over time. To track this, the authors utilize a Reward History Tree to store reward sequence prefixes and their frequencies. A similarity measure is then defined based on the likelihood of two state-action pairs sharing the same reward "future."
Potential-Based Reward Shaping
To enhance the informativeness of reward trails, the authors employ potential-based reward shaping. By adding a potential (e.g., distance to a goal) to the reward signal, the underlying environmental symmetries become more distinguishable in the observed data, acting as a magnifying glass for the detection algorithm.
Sym DQN Algorithm
Discovered symmetries are integrated into a Deep Q-Network (DQN) via a modified loss function. In addition to the standard Temporal Difference (TD) error, a Symmetry Loss term ($L_{Sym}$) is added. This term penalizes the network for predicting divergent Q-values for symmetric state-action pairs, acting as a soft constraint that encourages generalization across equivalent states.
Experimental Evaluation
The approach was evaluated on two primary benchmarks:
- Grid World (2D and 3D): Navigation tasks where the agent seeks the shortest path. The 3D variants test the method's ability to handle the "curse of dimensionality," where the number of symmetries increases exponentially with the number of dimensions.
- Cart-Pole: A classic control problem from OpenAI Gym. Observations were discretized for symmetry detection while maintaining continuous observations for the agent's policy.
Results and Discussion
The "Sym DQN" demonstrated significant improvements in sample efficiency across all tested domains. In Grid World experiments, Sym DQN reached convergence in approximately 37 iterations, compared to 136 iterations for a standard (Naive) DQN—a nearly 4x improvement.
In the Cart-Pole domain, the symmetry-aware agent achieved significantly higher mean and maximum rewards compared to the baseline ($p < 10^{-4}$). The method also proved robust to environmental noise, maintaining effectiveness in stochastic environments.
Key Insights
- Rewards as Dynamics Proxies: The reward signal, if sufficiently rich, contains enough information to group equivalent states without needing full transition dynamics.
- Synergy with Shaping: Reward shaping serves a dual purpose: guiding the agent toward a goal and making environmental structure visible for symmetry detection.
- Scaling Benefits: The method becomes increasingly beneficial as problem complexity (and thus the number of symmetries) grows, turning the curse of dimensionality into an opportunity for exploitation.
Conclusion
This work provides a robust framework for discovering and exploiting environmental symmetries to improve RL sample efficiency. While the current implementation relies on discretization for continuous tasks and requires a "rich" reward signal, it represents a significant step toward more efficient autonomous learning. Future work will explore purely continuous reward signals and more memory-efficient data structures for reward histories.
Summary updated