Abstract
Differentiable simulation is a promising toolkit for fast gradient-based policy optimization and system identification. However, existing approaches to differentiable simulation have largely tackled scenarios where obtaining smooth gradients has been relatively easy, such as systems with mostly smooth dynamics. In this work, we study the challenges that differentiable simulation presents when it is not feasible to expect that a single descent reaches a global optimum, which is often a problem in contact-rich scenarios. We analyze the optimization landscapes of diverse scenarios that contain both rigid bodies and deformable objects. In dynamic environments with highly deformable objects and fluids, differentiable simulators produce rugged landscapes with nonetheless useful gradients in some parts of the space. We propose a method that combines Bayesian optimization with semi-local ’leaps’ to obtain a global search method that can use gradients effectively, while also maintaining robust performance in regions with noisy gradients. We show that our approach outperforms several gradient-based and gradient-free baselines on an extensive set of experiments in simulation, and also validate the method using experiments with a real robot and deformables.
Introduction
Differentiable physics simulators have emerged as a powerful paradigm for robotics, offering the ability to compute gradients of simulation outputs with respect to input parameters. In theory, this enables efficient gradient-based optimization for tasks like policy learning and system identification. However, the practical utility of these gradients is often hampered by the complex, "rugged" nature of the optimization landscapes they generate.
While previous successes in differentiable simulation have focused on relatively smooth dynamics, contact-rich scenarios—particularly those involving deformable objects like cloth, clay, or fluids—present significant hurdles. These landscapes are frequently characterized by discontinuities, local minima, and vast plateaus where gradients are zero or misleading. Standard gradient descent algorithms often become trapped in local optima or fail to find any useful direction for improvement.
The BO-Leap Methodology
To address these challenges, we introduce BO-Leap (Bayesian Optimization with semi-local Leaps). This hybrid algorithm is designed to navigate rugged landscapes by operating across three distinct scales of search and refinement.
The method functions as follows:
- Global Search: At the highest level, a Gaussian Process (GP) models the overall loss landscape. Bayesian Optimization (BO) uses this model to identify promising, unexplored regions of the parameter space, selecting a starting point for more localized search.
- Semi-local Leaps: From the BO-selected starting point, the algorithm performs a "leap" using a gradient-free approach inspired by the Covariance Matrix Adaptation Evolution Strategy (CMA-ES). By sampling a population of candidates in the local neighborhood, it can jump over small local barriers that might trap a gradient-based solver.
- Local Refinement: Once a promising neighborhood is identified, the algorithm leverages the simulator's analytical gradients to perform fine-grained descent.
A key feature of BO-Leap is its adaptive nature. The algorithm monitors gradient quality and loss stagnation. If gradients become too noisy or progress halts, it terminates the local search early to conserve computational resources, returning control to the global Bayesian optimizer.
Experimental Evaluation
We evaluated BO-Leap across a diverse set of differentiable simulation frameworks, including Nimble, Warp, DiffTaichi, and PlasticineLab. Our benchmarks included established tasks like Assembly and RollingPin, as well as new, highly challenging scenarios designed to test rugged landscapes:
- 3-Link Cartpole: A high-dimensional (400D) control task.
- Fluid Manipulation: Scooping a sugar cube out of a liquid.
- Dynamic Deformables: Tasks like Swing & Flip (cloth swinging and pancake flipping) which generate deceptive gradients due to rapid contact changes.
Key Results
BO-Leap consistently outperformed a wide range of baselines, including Reinforcement Learning (PPO, SAC), pure CMA-ES, and standard Gradient Descent.
In the high-dimensional 3-Link Cartpole (400D), BO-Leap was the only method capable of achieving the target precision. Furthermore, in real-world validation, policies discovered by BO-Leap for fluid scooping achieved a success rate of over 70% on a physical Kinova robot, compared to less than 10% for the CMA-ES baseline. The method also proved effective for "real-to-sim" tasks, accurately identifying 68 physical parameters of real paper and cloth to synchronize simulation with reality.
Insights and Conclusion
Our analysis reveals that in complex tasks, "gradients can lie." Physics approximations during rapid contact changes can produce gradients pointing away from the true optimum. Deformable objects exacerbate this by creating landscapes with massive plateaus.
BO-Leap demonstrates that hybridization is essential for modern differentiable simulation. Purely global methods are too slow for high-dimensional control, while purely local methods are easily trapped. By using a "leap" strategy as a bridge, BO-Leap effectively utilizes available gradient information while maintaining the robustness of global search. Future work will explore scaling these methods to even higher-dimensional spaces, such as those required for end-to-end vision-to-action neural networks.
Summary updated