Goal-conditioned Batch Reinforcement Learning for Rotation Invariant Locomotion

Aditi MavalankararXiv 2020

Abstract

We propose a novel approach to learn goal-conditioned policies for locomotion in a batch RL setting. The batch data is collected by a policy that is not goal-conditioned. For the locomotion task, this translates to data collection using a policy learnt by the agent for walking straight in one direction, and using that data to learn a goal-conditioned policy that enables the agent to walk in any direction. The data collection policy used should be invariant to the direction the agent is facing i.e. regardless of its initial orientation, the agent should take the same actions to walk forward. We exploit this property to learn a goal-conditioned policy using two key ideas: (1) augmenting data by generating trajectories with the same actions in different directions, and (2) learning an encoder that enforces invariance between these rotated trajectories with a Siamese framework. We show that our approach outperforms existing RL algorithms on 3-D locomotion agents like Ant, Humanoid and Minitaur.

Introduction

Goal-Conditioned Reinforcement Learning (RL) aims to train agents to reach arbitrary targets. In the batch RL setting, this is particularly challenging when the available data is not goal-conditioned—for example, a robot trained only to walk forward. Standard RL algorithms often fail to generalize in these scenarios because they do not account for the inherent symmetries of the environment. This paper introduces a method to bridge this gap by enforcing rotation invariance, allowing agents to navigate to any (x, y) coordinate using data from a single-direction policy.

Methodology: Exploiting Rotation Invariance

The core insight is that locomotion on a uniform plane is rotationally invariant. The proposed framework leverages this symmetry through two primary mechanisms:

Data Augmentation

By mathematically rotating the agent's state and the goal's position by an angle $\theta$, a single "forward-walking" trajectory can be transformed into an infinite variety of "any-direction" trajectories. Since the physics of the environment remain constant regardless of orientation, the sequence of leg movements (actions) remains valid for the rotated goal.

Siamese Representation Learning

To ensure the policy generalizes effectively, the authors employ a Siamese Network architecture. An encoder $E(s, g)$ maps a state-goal pair to an embedding $h$. A specialized loss function forces the embeddings of a pair $(s, g)$ and its rotated counterpart $(\tilde{s}, \tilde{g})$ to be identical. This forces the policy $\pi(h)$ to treat rotated scenarios as functionally equivalent, effectively "hard-coding" the symmetry of the world into the agent's representation.

Visualization of rotationally invariant trajectories for the Ant agent across time steps $t_1$ through $t_4$. The top and bottom rows represent equivalent trajectories rotated in space.

Experimental Results

The method was evaluated on three high-dimensional 3D locomotion environments: the OpenAI Gym Ant (111-D state space), and Pybullet's Humanoid (43-D) and Minitaur (17-D). The primary metric is the minimum distance to the goal achieved during an episode (lower is better).

Model Humanoid Minitaur Ant
Standard RL (SAC/PPO) 2.160 1.358 2.608
Goal-Conditioned RL (HER) 2.891 1.380 2.475
Proposed Equivalence Method 1.779 0.904 1.105

As shown in the table, the proposed method significantly improves the agent's ability to reach goals compared to standard baselines and Hindsight Experience Replay (HER). In the Ant environment, the method achieved a distance of 1.105, more than twice as accurate as the best standard RL baseline.

Conclusion

This work demonstrates that domain-specific symmetries, such as rotation invariance in locomotion, can be leveraged to solve difficult batch RL problems. By combining data augmentation with invariant representation learning, agents can learn to navigate complex environments using highly restricted datasets. Future work may involve the automatic discovery of such symmetries to reduce reliance on human-specified priors.

Summary updated

BibTeX
@misc{mavalankar2020goal,
  author = {Aditi Mavalankar},
  title = {{Goal-conditioned Batch Reinforcement Learning for Rotation Invariant Locomotion}},
  year = {2020},
  eprint = {2004.08356},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2004.08356},
}
Figure