DiffCoTune: Differentiable Co-Tuning for Cross-Domain Robot Control

Lokesh Krishna, Sheng Cheng, Junheng Li, Naira Hovakimyan, Quan NguyenIEEE RA-L 2025 · DOI

TL;DR

This paper introduces DiffCoTune, a novel framework for automatically adapting robot controllers to new environments (like a real robot or a different simulator) by simultaneously tuning both the controller and a differentiable simulator. This "co-tuning" approach significantly improves transferability and performance with minimal real-world interaction, addressing a key bottleneck in robot deployment.

What Problem Does This Paper Address?

Deploying robot controllers from simulation to the real world, or even between different simulation environments, is notoriously difficult. This challenge, often called the "sim-to-real gap," arises from discrepancies between the simulated model and the actual system. These discrepancies can stem from simplifications made for computational tractability, unmodeled dynamics, or noise. Traditionally, bridging this gap requires extensive manual tuning or complex domain adaptation techniques. While existing methods can adapt controllers or simulators independently, they often struggle to achieve robust performance efficiently, especially with complex systems and controllers. This paper tackles the problem of systematically and automatically adapting robot controllers to a target domain by jointly optimizing the controller and the simulator's parameters.

Methods

The core of DiffCoTune is an iterative co-tuning process that leverages differentiable simulators and controllers. The framework operates by:

  • Differentiable Simulation and Control: It assumes access to a differentiable simulator (where gradients with respect to its parameters can be computed) and a differentiable controller (where gradients with respect to its parameters can be computed).
  • Iterative Co-Tuning: The method collects a small number of rollouts (trajectories) in the target deployment domain. These rollouts are then used to simultaneously update both the simulator's parameters (to better match the target domain) and the controller's parameters (to perform better in the updated simulator).
  • Update Strategies: Two main strategies are proposed for this co-tuning:
  • Combined: A single optimization step that jointly minimizes a weighted sum of a system identification loss (for the simulator) and a task performance loss (for the controller).
  • Split-Alternate: An alternating optimization approach where the simulator parameters are updated first using system identification objectives, followed by updating the controller parameters using task performance objectives. This strategy is found to be more robust.
  • Gradient-Based Optimization: The updates for both simulator and controller parameters are performed using gradient descent, facilitated by automatic differentiation tools.

Datasets

The paper does not introduce new datasets. Instead, it evaluates its approach on a variety of existing robotic systems and tasks, including:

  • Cart-pole stabilization: Using both LQR and DNN controllers.
  • Quadrupedal locomotion: Velocity tracking tasks in both sim-to-sim (Barkour robot) and sim-to-real (Unitree Gol robot) settings, using DNN controllers.
  • Bipedal locomotion: Jumping and tracking tasks, using MPC and Trajectory Optimization controllers.

The "deployment domains" are either different simulators (MuJoCo, Pybullet) or real hardware.

Key Insights and Ideas

  • Co-tuning is Crucial: The paper strongly suggests that jointly tuning the simulator and controller is more effective than tuning them independently, especially in the presence of model uncertainty. This is because adapting the simulator can provide a more accurate "training ground" for the controller.
  • Iterative Data Collection is Key: The iterative nature of collecting data from the target system and then using it to refine both the simulator and controller is vital. This contrasts with methods that collect all data upfront for system identification before tuning the controller.
  • Split-Alternate Strategy is Robust: The Split-Alternate update strategy proved to be more stable and less sensitive to initial conditions or weight choices compared to the Combined strategy, particularly when dealing with significant model uncertainties.
  • Minimal Real-World Interaction: The framework demonstrates impressive performance improvements with a very small number of rollouts (<5) in the target domain, making it practical for real-world applications where data collection is expensive or time-consuming.

Key Results

  • Significant Performance Improvements: DiffCoTune consistently improved controller performance across various systems and tasks, including cart-pole stabilization, quadrupedal tracking, and bipedal jumping. For instance, in quadrupedal tracking, it achieved a 60% performance improvement in sim-to-sim transfer.
  • Effective Sim-to-Real Transfer: The approach demonstrated successful transfer to real hardware, with notable improvements in tracking accuracy and stability for bipedal jumping and quadrupedal locomotion.
  • Robustness to Model Uncertainty: DiffCoTune showed superior performance compared to baselines like DiffTune (which only tunes the controller) when significant model mismatches (e.g., 300% mass discrepancy) were introduced.
  • Scalability: The method was validated on systems with varying complexity, from low-dimensional cart-pole to high-dimensional quadruped and biped robots, and with diverse controller types (LQR, DNN, MPC, TO).

Limitations and Future Work

  • Differentiability Requirement: The core requirement for the approach is that both the simulator and the controller must be numerically differentiable. This might limit its applicability to systems or controllers that are inherently non-differentiable.
  • Fragility of Combined Strategy: The paper notes that the Combined update strategy can be fragile and prone to divergence, especially with model uncertainty. While Split-Alternate mitigates this, it's still a consideration.
  • Future Work: The authors suggest several promising directions:
  • Extending the framework to tune controllers over their entire region of attraction.
  • Co-tuning DNN-based residual dynamics models to capture unknown unmodeled effects.
  • Investigating applicability to more complex scenarios and a wider range of robotic systems.

Summary updated

BibTeX
@article{krishna2025diffcotune,
  author = {Lokesh Krishna and Sheng Cheng and Junheng Li and Naira Hovakimyan and Quan Nguyen},
  title = {{DiffCoTune: Differentiable Co-Tuning for Cross-Domain Robot Control}},
  journal = {IEEE RA-L},
  year = {2025},
  doi = {10.1109/lra.2025.3610021},
}
Figure