Learning Cross-Domain Correspondence for Control with Dynamics Cycle-Consistency

Qiang Zhang, Tete Xiao, Alexei A Efros, Lerrel Pinto, Xiaolong Wang

At the heart of many advanced robotics problems lies the challenge of learning correspondences across different domains. Whether transferring a policy from a physics simulator to a real-world robot (sim-to-real), teaching a robot to imitate a human, or adapting behaviors between robots with different bodies, the core hurdle is translating knowledge from one environment to another.

Existing solutions typically rely on expensive, strictly paired data—such as a video and a state log of the exact same movement—or attempt to learn invariant features, which can be overly restrictive for complex tasks. This paper introduces a novel framework to align different robotic domains using only unpaired, randomly collected data. By enforcing "dynamics cycle-consistency," the model learns to map observations and actions across domains, enabling the direct, zero-shot transfer of control policies without any additional fine-tuning.

The Challenge of Unpaired Domain Alignment

In robotics, transferring knowledge requires finding a functional correspondence: How does a pixel in a real-world video relate to a joint angle in a simulator? How does a motor command for a two-legged robot translate to a command for a three-legged one?

Tackling this with unpaired and unaligned data means finding these mappings using just a random collection of movements from Domain A and an independent collection from Domain B.

Methods: Dynamics Cycle-Consistency

To solve this, the authors propose a framework based on Dynamics Cycle-Consistency. Instead of merely looking at static images (as seen in traditional style-transfer models like CycleGAN), this approach looks at how things move and evolve over time.

Aligning uncalibrated monocular video of a real xArm robot to a simulated rendering over time using observation and action correspondence.

The system consists of three main components:

  1. Observation Mapping ($G$): Translates an observation from Domain X (e.g., a raw image) to Domain Y (e.g., a simulator state vector).
  2. Action Mapping ($H$): Translates an action from Domain X to an equivalent action in Domain Y.
  3. Forward Dynamics Model ($F$): A model trained on Domain Y that predicts the next state given a current state and action.

The Dynamics Cycle To train the system without paired data, the authors create a predictive cycle:

  • Start with a state and action in Domain X ($x_t, a_t$).
  • Map them to Domain Y using $G$ and $H$ to get a predicted state and action ($\tilde{y}_t, \tilde{u}_t$).
  • Use the forward model $F$ to predict the next state in Domain Y ($\tilde{y}_{t+1}$).
  • The Constraint: This predicted state $\tilde{y}_{t+1}$ must match the mapping of the actual next state from Domain X ($G(x_{t+1})$).

By forcing the "physics" of the translated actions to match the observed outcomes, the model learns a functional correspondence between the two worlds. An alternating joint training algorithm is used to prevent the models from finding trivial shortcuts.

Datasets and Experiments

The researchers evaluated their method across several challenging scenarios, proving its versatility:

  • MuJoCo Simulators: Standard benchmarks including HalfCheetah, Walker2d, Hopper, and Swimmer.
  • Cross-Physics: Domains with differing mass and friction parameters.
  • Cross-Modality: Aligning raw RGB video to internal simulator states.
  • Cross-Morphology: Aligning robots with different physical structures.
Cross-morphology alignment between robots with different structures, demonstrating observation and action correspondence.

Key Insights and Results

  • Dynamics as a Universal Language: While visual appearances vary wildly between reality and simulation, the underlying laws of physics provide a consistent structure that can anchor correspondences.
  • Moving Beyond Pixels: Prior cycle-consistency methods only align visual styles. For robotic control, aligning behaviors is necessary, which requires explicitly incorporating actions and time.
  • Zero-Shot Policy Transfer: Once the correspondence is learned, a reinforcement learning policy trained entirely in a simulator can be run on a real robot simply by translating the inputs and outputs through the learned mapping functions.

Performance Highlights: * Superior Sim-to-Real: On a real xArm robot, the method achieved a state estimation L1 error of just 0.025, significantly outperforming CycleGAN baselines (0.18). * Handling Different Bodies: The model successfully transferred policies between robots with different numbers of limbs (e.g., a 3-limb vs. 4-limb Swimmer). Standard baselines failed completely in these cross-morphology tasks, while this method maintained high performance. * Outperforming Domain Randomization: In cross-physics tasks (like altering the mass of a HalfCheetah), the proposed method outperformed standard Domain Randomization, the current industry standard for sim-to-real transfer.

Limitations and Future Work

While powerful, the framework has limitations. Primarily, it requires a reliable forward dynamics model in at least one domain (usually the simulator). If the simulator's physics diverge too far from reality, the mapping may fail. Additionally, the method assumes "shared intent," meaning the random data collected in both domains must cover similar types of behaviors.

A promising future direction is applying this dynamics cycle-consistency to even more diverse domains, such as human-to-robot imitation, where the morphological differences are far more extreme than adding a limb to a simulated robot.

Summary updated

BibTeX
@inproceedings{zhang2021learning,
  author = {Qiang Zhang and Tete Xiao and Alexei A Efros and Lerrel Pinto and Xiaolong Wang},
  title = {{Learning Cross-Domain Correspondence for Control with Dynamics Cycle-Consistency}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=QIRlze3I6hX},
}
Figure