BayRnTune: Adaptive Bayesian Domain Randomization via Strategic Fine-tuning

Tianle Huang, Nitish Sontakke, K. Niranjan Kumar, Irfan Essa, Stefanos Nikolaidis, Dennis W. Hong, Sehoon Ha

Training robots in simulation is fast and safe, but the "sim-to-real gap"—the discrepancy between simulated physics and the messy real world—often causes policies to fail when deployed on physical hardware. BayRnTune offers a clever way to bridge this gap faster and more effectively by combining Bayesian Optimization with strategic policy fine-tuning.

TL;DR

BayRnTune accelerates Bayesian Domain Randomization by fine-tuning existing policies instead of retraining from scratch at every iteration. By strategically selecting which previous "checkpoint" to resume from, it achieves 25% to 400% higher rewards than standard methods in complex robotic tasks like quadrupedal pushing and bipedal walking.

What Problem Does This Paper Address?

To handle the sim-to-real gap, researchers use Domain Randomization (DR), where a robot is trained across a wide range of simulated environments (varying friction, mass, etc.). However, if the randomization range is too narrow, the robot isn't robust; if it’s too wide, the robot becomes overly "conservative" and performs poorly.

Automated methods like Bayesian Domain Randomization (BayRn) try to find the "just right" physics parameters by using real-world performance as a feedback signal. The catch? Standard BayRn is incredibly slow. Every time the algorithm suggests a new set of physics parameters, it throws away the old policy and trains a new one from scratch. This makes it computationally prohibitive for complex robots.

Methods

The authors introduce BayRnTune, which replaces "training from scratch" with Strategic Fine-tuning. The core idea is that the optimal policy for one set of physics parameters is likely a good starting point for a slightly different set.

The researchers investigated four strategies to decide which previous policy (checkpoint) to fine-tune from:

  1. Infinite Chain: Always fine-tune from the very last policy trained. This essentially treats the process as one long training session where the environment distribution shifts over time.
  2. Best Only: Always resume from the policy that achieved the highest real-world reward so far.
  3. Best of Last 5: A middle ground that picks the best performer from the most recent five iterations.
  4. Normalized Closest Only: Picks the policy that was trained on physics parameters most similar (in Euclidean distance) to the new target parameters.

Datasets and Environments

The authors evaluated their method across five simulated "sim-to-real" setups:

  • OpenAI Gym Benchmarks: Standard locomotion tasks including Hopper-v3, HalfCheetah-v3, and Ant-v3.
  • BALLU Walking: A unique, buoyancy-assisted legged robot (balloon-based) simulated in PyBullet. It is highly sensitive to friction and drag.
  • Quadruped Pushing: A Unitree A1 robot tasked with pushing a puck to a target in NVIDIA’s IsaacGym. This environment used a massively parallel simulation (4,096 robots) to test the limits of the algorithm.

Key Insights and Ideas

  • Fine-tuning is a Game Changer: By reusing weights, BayRnTune reaches high-performing policies in a fraction of the time required by standard BayRn. Standard BayRn often "failed" in these experiments simply because it didn't have enough time to converge in any single iteration.
  • The "Infinite Chain" Winner: Surprisingly, the simplest strategy—Infinite Chain—often performed best. The authors suggest this is because it allows the model to accumulate experience over the longest continuous period, acting like a form of curriculum learning.
  • Distance in Physics $\neq$ Distance in Policy: The "Normalized Closest" strategy performed poorly. This reveals an important "aha moment": just because two sets of physics parameters are numerically close doesn't mean the optimal behaviors for them are similar. Control problems are often multi-modal, meaning a small change in friction might require a completely different gait.

Key Results

  • Performance Boost: BayRnTune outperformed vanilla DR and standard BayRn by 25% to 400% across various tasks.
  • Robotic Success: In the BALLU walking task, BayRnTune achieved a reward of 56.09, compared to just 14.11 for vanilla DR. The resulting policy allowed the robot to walk 4.19 meters further in 20 seconds.
  • Precision Pushing: In the quadruped task, the BayRnTune policy pushed the puck to the target with an average error of only 1 cm, significantly outperforming the baseline.

Limitations and Future Work

While BayRnTune is a significant step forward, the authors note a few areas for growth:

  • Strategy Selection: No single fine-tuning strategy was the absolute winner in every single environment. Choosing the right strategy currently requires some trial and error.
  • Reward Landscape: The paper notes that the "reward landscape" of these physics parameters can be complex and non-linear. More work is needed to understand how Bayesian Optimization navigates these "jagged" spaces.
  • Hardware Deployment: The current study uses a "simulated real world" (a ground-truth sim). The next logical step, which the authors intend to pursue, is deploying these fine-tuned policies onto physical BALLU and Unitree A1 hardware.

Summary updated

BibTeX
@inproceedings{huang2024bayrntune,
  author = {Tianle Huang and Nitish Sontakke and K. Niranjan Kumar and Irfan Essa and Stefanos Nikolaidis and Dennis W. Hong and Sehoon Ha},
  title = {{BayRnTune: Adaptive Bayesian Domain Randomization via Strategic Fine-tuning}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2024},
  doi = {10.1109/iros58592.2024.10802145},
}
Figure