Introduction
Differentiable physics simulators represent a significant advancement in reinforcement learning (RL), allowing agents to compute exact first-order gradients of rewards with respect to actions. This capability enables highly efficient gradient-based policy optimization, such as the Analytic Policy Gradient (APG) method. However, these methods often suffer from extreme instability in practice. Physical collisions introduce gradient discontinuities, while backpropagating through long trajectories frequently leads to vanishing or exploding gradients.
While Model-Based RL (MBRL) can theoretically mitigate these issues by learning a smooth dynamics model, it introduces the challenge of compounding prediction errors. Over extended horizons, a learned model's inaccuracies accumulate, corrupting both state predictions and the gradient signals essential for policy updates. This paper introduces MB-MIX, a framework designed to harness differentiable simulators while overcoming these training instabilities.
The MB-MIX Framework
MB-MIX addresses the limitations of differentiable MBRL through two primary technical innovations: Trajectory Length Mixing and Sobolev Model Training.
Trajectory Length Mixing (MIX)
Rather than calculating path derivatives over a single fixed-length trajectory—which is prone to high variance and compounding model errors—MB-MIX computes a weighted average of expected rewards from trajectories of varying lengths. Shorter trajectories rely more heavily on a learned value function to estimate future returns, while longer trajectories utilize the learned dynamics model. This hybrid approach significantly reduces the variance of the policy gradient estimation, providing a more stable learning signal.
Sobolev Model Training
Standard MBRL models typically optimize for zeroth-order accuracy (predicting the next state). However, for policy optimization via backpropagation, the model's derivatives are just as critical as its predictions. MB-MIX employs Sobolev training, which penalizes errors in the model's gradient outputs. By supervising the first-order gradients of the transition function, the model ensures that accurate gradient signals are preserved during the backpropagation process.
Experimental Evaluation
The authors evaluated MB-MIX across a diverse set of environments, including the DiffRL rigid-body simulator, the Bruce bipedal humanoid simulation, Brax for object manipulation, and DaXBench for deformable object tasks like cloth folding.
Key Results and Stability
A critical finding is the relationship between trajectory horizon and performance stability. In standard differentiable RL, performance often collapses as the horizon increases due to gradient explosion or model error accumulation. As shown in the comparative analysis of the Ant and Cheetah tasks, the "Mix" component allows the agent to maintain high performance even as the horizon grows, whereas versions without mixing see a sharp decline.
In the complex Humanoid task within DiffRL, MB-MIX achieved a score of 4955 ± 197, vastly outperforming the SHAC baseline (3321 ± 968) and the model-based DreamerV3 (294 ± 103). Similar gains were observed in deformable object manipulation, where MB-MIX achieved a 0.73 success metric on cloth unfolding compared to 0.50 for SHAC.
Conclusion
MB-MIX demonstrates that combining gradient-aware model training with multi-horizon trajectory mixing effectively tames the instabilities of differentiable reinforcement learning. By ensuring accurate gradient transmission and reducing estimator variance, the framework achieves state-of-the-art performance across rigid-body, humanoid, and deformable object manipulation tasks. Future work aims to extend the theoretical variance-reduction proofs to the full model-based setting, accounting for the interaction between model error and gradient variance.
Summary updated