What Went Wrong? Closing the Sim-to-Real Gap via Differentiable Causal Discovery

Peide Huang, Xilun Zhang, Ziang Cao, Shiqi Liu, Mengdi Xu, Wenhao Ding, Jonathan Francis, Bingqing Chen, Ding Zhao · DOI

Abstract

Bridging the gap between simulation and reality remains a fundamental challenge in robotics. While System Identification (SysID) aims to align simulator parameters with real-world physics, the high dimensionality of modern simulators makes manual parameter selection intractable. We present COMPASS, a framework that treats the sim-to-real gap as a differentiable causal discovery problem. By learning a sparse causal graph, COMPASS identifies the specific environment parameters responsible for trajectory mismatches, enabling efficient and interpretable alignment.

Introduction

Simulators are indispensable for training robotic policies safely and efficiently. However, the "sim-to-real gap"—the discrepancy between a robot's behavior in simulation and the physical world—often prevents policies from transferring successfully. This gap arises from simplified physics models and unknown physical properties, such as friction coefficients or motor latencies.

Traditional System Identification (SysID) attempts to bridge this gap by tuning simulation parameters. However, modern simulators like robosuite involve hundreds of tunable variables. Manually identifying which parameters to tune requires significant domain expertise and does not scale. Automated methods often treat the simulator as a black box, leading to the "curse of dimensionality" and a lack of interpretability.

The COMPASS Framework

COMPASS (Causality-between-envirOnMent-PArameterS-and-the-Sim-to-real-gap) addresses these challenges by framing SysID as a causal discovery task. The framework consists of several key components:

1. Differentiable Causal Discovery

Instead of searching through the entire parameter space, COMPASS learns a sparse adjacency matrix representing the causal relationships between environment parameters ($\epsilon$) and trajectory errors ($d_\tau$). To make the discovery of this discrete graph structure compatible with gradient-based optimization, the framework employs the Gumbel-Softmax trick.

2. Structural Causal Modeling (SCM)

The system learns a mapping from environment parameters to the observed sim-to-real gap. Because the entire model is fully differentiable, gradients can be backpropagated from the trajectory error directly to the environment parameters, allowing for rapid convergence compared to sampling-based methods.

3. Causality-Guided Domain Randomization

During the optimization process, COMPASS identifies which parameters are truly influential. By only randomizing these causal parameters, the framework avoids the "conservative policy" problem, where a robot becomes overly cautious due to training against irrelevant noise in non-causal dimensions.

Experimental Evaluation

The researchers evaluated COMPASS across three complex robotic manipulation tasks using the Kinova Gen 3 robot and the MuJoCo physics engine:

  • Mini-Air-Hockey with Obstacle: A task involving high-speed collisions between a pusher, puck, and walls, featuring 64 tunable parameters.
  • Double-Bouncing-Ball: A physics-sensitive task where a ball must bounce off two inclined plates into a goal, involving 82 parameters.
  • Push-I: A manipulation task where a robot moves an I-shaped block to a target, involving 67 parameters.

Results and Discussion

COMPASS demonstrated significant improvements over existing baselines in both simulation and real-world environments.

Performance Metrics

In sim-to-sim benchmarks, COMPASS achieved a Mean Absolute Percentage Error (MAPE) of 0.22, outperforming EXI-Net (0.95) and NPDR (0.29). In real-world air hockey trials, COMPASS achieved an 80% success rate. In contrast, the strongest baseline (NPDR) achieved only 39%, while the nominal (un-tuned) simulator failed completely (0% success).

Interpretability and Sparsity

A key advantage of COMPASS is its ability to prune the search space. In the air hockey task, the model correctly identified that the damping of the right wall was a primary causal factor—a result that matched the experimental setup where pucks were initialized to collide mostly with that side. This level of interpretability allows engineers to understand why a simulator is failing, rather than just treating it as a black-box error.

Robustness to Unmodeled Dynamics

The framework also proved resilient to factors not explicitly modeled in the simulator. For instance, when a fan introduced non-uniform air flow in the real-world setup, COMPASS compensated by adjusting the closest physical parameter proxies, maintaining high performance despite the unmodeled disturbance.

Conclusion

COMPASS offers a scalable, interpretable solution to the sim-to-real gap. By leveraging differentiable causal discovery, it identifies the root causes of simulation inaccuracies and optimizes them efficiently. While future work may explore maintaining parameter distributions rather than point estimates to further improve robustness, COMPASS represents a significant step toward automated and transparent robot learning.

Summary updated

BibTeX
@inproceedings{huang2023what,
  author = {Peide Huang and Xilun Zhang and Ziang Cao and Shiqi Liu and Mengdi Xu and Wenhao Ding and Jonathan Francis and Bingqing Chen and Ding Zhao},
  title = {{What Went Wrong? Closing the Sim-to-Real Gap via Differentiable Causal Discovery}},
  booktitle = {Conference on Robot Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=T6WbDHuVR6},
}
Figure