Manuscript Offprint
arXiv:2609.30951Bundled Contact Gradients: Stabilizing Differentiable Simulation for Deployable Dynamic Tasks
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Dyuman Aditya , Jin Cheng , Clemens Schwarke , Quan Nguyen , Gaurav Sukhatme , Stelian Coros , Gabriele Fadini
Abstract—Differentiable simulation provides analytic gradients of robot dynamics, enabling fast and sample-efficient first-order policy optimization. However, obtaining smooth and informative gradients through rigid-body contact typically requires softened contact models, often at the expense of physical fidelity and thereby limiting learned policies largely to simulation. This trade-off becomes particularly consequential for dynamic humanoid motions, where accurate contact dynamics are critical for transferring policies to the real world. Increasing contact stiffness in rigid-body simulation improves the fidelity of interactions, but also makes the dynamics increasingly sensitive to small state perturbations, producing high-variance gradients that can destabilize first-order policy learning. To address this, we propose Bundled Contact Gradients (BCG), a contact-local randomized smoothing framework for differentiable policy learning. When stiff contact is detected, our method evaluates a local bundle of randomized perturbation rollouts around the stiff contact configuration and aggregates their gradient signal thereby reducing gradient variance. We demonstrate the effectiveness of our method by successfully training and transferring dynamic motions zero-shot onto a real-world Unitree G1 humanoid platform. Videos and supplementary information can be found at bundledcontactgradients.github.io
I. INTRODUCTION
Learning dynamic, contact-rich behaviors, such as agile locomotion and whole-body motions is predominantly achieved by model-free reinforcement learning (RL) [1], [2]. By optimizing policies without differentiating through the underlying dynamics, model-free RL can be applied directly to simulators with non-smooth contact models and has made it the workhorse behind recent sim-to-real successes in legged-robot control [3]. However, its reliance on zero-order gradient estimation makes policy optimization sample inefficient, particularly for long-horizon, high-dimensional control problems [4]. As a result, training often requires billions of environment interactions and substantial wall-clock time [5].
Differentiable simulation offers a more efficient alternative. By exposing analytic derivatives of the dynamics, it enables first-order policy optimization, by backpropagating gradients through the simulated dynamics to the policy. When the dynamics are smooth, the resulting gradients have far lower variance than their zero-order counterparts, and methods such as SHAC [4] report large gains in sample and wall-clock efficiency over zero-order RL. The promise of
(a)

(b)
per-rollout gradient
B branch rollouts
bundled average
bundled gradient
sampled foot position + velocity
stiff contact
(c)
Fig. 1. Bundled Contact Gradients. (a) Dynamic, contact-rich Unitree G1 motions learned in differentiable simulation with stiff, deployable contact. (b) At stiff contact (time t), B perturbations of the contacting foot's position and velocity are sampled from a local sphere of radius and simulated in parallel for H differentiable steps, then aggregated into the bundled state (blue). In the right-to-left backward pass, per-step sample gradients agree out of contact but diverge sharply at stiff contact (red). Bundling concentrates them around a common direction (blue), stabilizing first-order policy optimization at deployable contact stiffness. (c) Zero-shot transfer of the learned policies to hardware.
first-order learning, however, has largely been confined to simulation due to highly softened contact models that are employed.
Modeling stiff ground contacts in rigid-body differentiable simulation for legged control introduces a fundamental trade-off between physical fidelity and gradient quality. Compliant, low-stiffness contact yields smooth gradients but permits soft, penetrating interactions that do not transfer to hardware. Raising the stiffness toward physically faithful, deployable values restores realism but makes the analytic gradient high-variance and biased across contact events [6], [7], which destabilizes first-order optimization. Existing first-order methods largely sidestep this tension: they either soften
Corresponding author: Dyuman Aditya agdyuman@usc.edu
University of Southern California, LA, USA.
ETH Zurich, Switzerland.
NVIDIA.
Zurich University of Applied Sciences, Switzerland.
contact or shorten the differentiable horizon around contact events [8], discarding gradient information where contact-rich behavior must be learned.
Our approach is to retain stiff contact dynamics while stabilizing the gradients used for policy learning. At a stiff contact event, the gradient from a single contact configuration can be highly sensitive to small perturbations; averaging gradients over nearby configurations can provide a more stable learning signal. Building on randomized smoothing and bundle gradients [9], [10], we apply this principle within first-order policy learning. But rather than applying smoothing globally, as in prior trajectory-optimization settings where evaluating bundles over entire trajectories can be computationally expensive, we apply it locally, only at stiff contact events. We propose Bundled Contact Gradients (BCG) (Fig. 1): when stiff contact is detected, the simulator evaluates a small bundle of perturbations sampled in Cartesian space, and simulated over a horizon in parallel. Aggregating the branches yields a locally smoothed transition, so the forward rollout retains stiff, deployable contact while the backward pass with automatic differentiation [11] receives a lower-variance, averaged contact gradient. Because bundling is triggered only at stiff contact and executed in parallel on the GPU, the overhead is limited and incurred only where the first-order gradient is most fragile.
We integrate BCG into Warp [11] and use it within a SHAC-style actor-critic framework for first-order policy optimization. To learn dynamic humanoid behaviors, we apply this framework to motion imitation, where the policy tracks reference motions using rewards from Adversarial Differential Discriminators (ADD) [12].
In summary, our main contributions are:
• We introduce Bundled Contact Gradients (BCG), a contact-local randomized-smoothing scheme that stabilizes first-order policy gradients under stiff contact without softening the forward dynamics.
• We show that BCG learns deployable humanoid motion-tracking policies with fewer samples and less training time than PPO, while achieving lower tracking error after sim-to-sim transfer.
• We demonstrate zero-shot sim-to-real transfer of dynamic motions learned through differentiable simulation to real humanoid hardware.
To the best of our knowledge, this work represents the first successful zero-shot transfer of a policy trained in differentiable simulation onto a real humanoid platform, as well as the first pairing of ADD with first-order differentiable-simulation policy learning.
A. Reinforcement Learning for Dynamic Robot Control
Model-free RL, and PPO [13] in particular, is the dominant paradigm for learning dynamic and contact-rich robot skills [14], [15]. Because it optimizes through sampled returns rather than dynamics derivatives, it is robust to the discontinuous physics of contact and underlies many sim-to-real results in legged locomotion [16], [17]. However, this robustness comes at the price of high-variance policy gradients and correspondingly poor sample efficiency, especially with higher dimensional systems like humanoids.
B. Differentiable Simulation and First-Order Policy Optimization
Differentiable simulation has progressed from early engines [18], [19] to GPU-accelerated frameworks [20], [21], [11], [22], [23], enabling first-order policy optimization by backpropagating through simulated rollouts [24], [25], [26]. SHAC [4] combines short differentiable windows with a learned critic, and subsequent work extends first-order learning to deployable locomotion [27], [28], agile flight [29], [26], and multiphysics settings [30], [31]. For quadruped locomotion, Song et al. [28] combine forward simulation in a non-differentiable simulator with gradients from a single rigid-body surrogate, while Luo et al. [32] guide SHAC with a frozen trotting policy and learned residual actions. Schwarke et al. [27] demonstrate zero-shot transfer of quadruped locomotion using an analytically smoothed contact model, described in Section III-C. We build on this contact formulation to learn dynamic humanoid motions, where smaller stability margins place greater demands on accurate and robust foot-ground interactions.
C. Gradients through Stiff Contact
The contact formulation in a differentiable simulator is important for both physical fidelity and gradient quality.
Soft penalty-based contact models ease differentiation by regularizing contact forces [21], [22], but excessive compliance can distort the foot-ground interactions needed for hardware transfer. Increasing the stiffness of these models improves physical fidelity, but makes the dynamics more difficult to resolve accurately with finite simulation timesteps, leading to inaccurate autodiff gradients [33]. To address this issue, Paulus et al. [33] introduce adaptive time integration to more accurately resolve stiff contact events and improve gradient fidelity. However, the resulting increase in simulation steps raises computational cost and lengthens the differentiable rollout which can lead to vanishing or exploding gradients.
Hard-contact models instead express non-penetration and friction through complementarity constraints, providing higher physical fidelity but less informative gradients around contact transitions. Werling et al. [34] analytically differentiate a Linear Complementarity Problem (LCP). Dojo [35] uses a Nonlinear Complementarity Problem (NCP) and implicit differentiation of its interior-point solver. It obtains smooth contact gradients by implicitly differentiating a relaxed complementarity problem. However, neither reported implementation targets massively parallel GPU rollouts, and both can leave gradient-based optimization trapped in poor local solutions.
Gradient propagation over long rollouts presents a further difficulty: repeated Jacobian products can cause vanishing or exploding gradients [7]. AHAC [8] adapts the differentiable horizon using a contact-stiffness constraint and bootstraps the remaining return with a critic. This limits exposure to unstable derivatives, but truncating at stiff contacts discards direct gradient information about how actions influence subsequent motion through these events, potentially removing sensitivities important for learning contact-rich behavior.
To combine informative gradients with physically faithful contact, we build on the analytically smoothed compliant contact model of Schwarke et al. [27], described in Section III-C, and increase its stiffness while stabilizing its gradients through local randomized smoothing.
D. Randomized Smoothing and Bundled Gradients for Contact
Randomized smoothing offers a way to obtain smoother contact responses by averaging over nearby, randomly perturbed configurations. Bundled gradients replace the exact contact derivative with a randomized-smoothing estimate and improve convergence of trajectory optimization through contact [9], an approach that connects the sampling behavior of RL to analytic smoothing and enables global planning over quasi-dynamic contact models [36], [37], complementing classical contact-implicit trajectory optimization [38], [39]. Randomized smoothing has likewise been used to augment differentiable physics and to control nonsmooth systems [40], [10], with recent work addressing the bias such smoothing introduces [41]. These methods operate largely in trajectory optimization or quasi-static manipulation and smooth the contact model globally. In contrast, we adapt randomized smoothing to first-order RL policy learning and apply it locally, only at stiff contacts, so that dynamic, deployable motion-tracking can be trained under stiff contact.
III. BACKGROUND
A. Reinforcement Learning
Policy learning is formalized as a Markov decision process with state , action , transition density , reward , and discount factor . A stochastic policy with parameters induces a trajectory distribution. The objective is to maximize the expected discounted return
Model-free methods estimate using the likelihood-ratio (score-function) identity
where is an advantage estimate [42]. This estimator differentiates only the policy and treats the dynamics as a black box; it is therefore a zero-order gradient that requires no derivatives of the physics and is robust to non-smooth contact, at the cost of variance that grows with the horizon and action dimension. PPO [13] is a widely used instance.
B. Differentiable Simulation
A differentiable simulator replaces the black-box transition of Section III-A with a smooth, differentiable map
where parameterizes the stiffness of the contact model, and it exposes the transition Jacobians and . The contact formulation used in this work is described in Section III-C. Rolling out a deterministic policy over a horizon produces a differentiable return , whose gradient is obtained by backpropagating through the unrolled computation graph, with the state sensitivity propagated recursively through time,
This first-order gradient is typically far lower in variance than the score-function estimator, which is the source of the improved sample and wall-clock efficiency of differentiable-simulation methods. The advantage holds only while is smooth: as is increased toward physically faithful, deployable contact, the Jacobians become stiff and the gradient develops large variance across contact events. Overcoming this failure mode is the subject of Section IV.
C. Analytically Smoothed Contact Model
We use the contact model of Schwarke et al. [27], which replaces discontinuous hard-contact activation with a continuous, analytically smoothed response, enabling gradient computation through contact. Within Moreau's time-stepping scheme [43], contact impulses are computed using a modified Gauss–Seidel solver and scaled according to the penetration depth d by
where denotes penetration and denotes separation. This scaling replaces abrupt contact activation with a smooth transition and permits forces at small separations, providing gradient information before contact occurs.
The parameter controls the extent of smoothing (i.e. the contact stiffness): smaller values produce a wider, softer transition, whereas larger values reduce smoothing and approach the original hard-contact response, increasing physical fidelity in the rigid-contact regime. For finite , contact activation remains continuous, although its derivatives become increasingly sensitive as grows. Throughout this paper, stiff contact therefore means a large but finite , rather than the discontinuous hard-contact limit.
BCG requires continuous contact dynamics with computable local derivatives, since averaging derivatives cannot generally recover sensitivities across discontinuous jumps. It therefore uses a large but finite and local randomized smoothing to stabilize gradients while remaining close to hard contact.
Policy actions at every step

Fig. 2. Policy learning with BCG in a SHAC-style framework and ADD. The policy drives parallel rollouts. At stiff contact, B perturbed branches advance for H steps under shared policy actions and are averaged to continue the rollout. ADD compares simulated and reference motion features to provide imitation rewards, whose gradients propagate through the dynamics to update the policy.
D. First-Order Policy Optimization with SHAC
First-order policy optimization updates the policy using analytic gradients obtained by backpropagating through the differentiable rollout. While this can provide lower-variance updates than zero-order RL, differentiating through long horizons can cause vanishing or exploding gradients due to repeated Jacobian products [4], [8]. In this work we use Short Horizon Actor Critic (SHAC) [4], which collects short N-step differentiable rollouts from E simulated environments in parallel and bootstraps the remaining return with a learned critic . Its actor objective is
with the critic trained by value regression. The short horizon limits unstable gradient propagation while retaining direct dynamics gradients over each rollout. SHAC nonetheless inherits the contact sensitivity of the underlying gradient: at the high stiffness required for deployable behavior, its truncated gradients can vary sharply with individual contact events, the gap addressed in next Section IV.
IV. BUNDLED CONTACT GRADIENTS
We propose Bundled Contact Gradients (BCG) to stabilize first-order policy learning through stiff contact. At a stiff contact event, BCG creates nearby contact configurations, advances them in parallel, and aggregates their states. Differentiating through this local bundle combines sensitivities from several contact realizations, reducing reliance on any single derivative. Each branch retains the large but finite contact stiffness of Section III-C. Figure 2 summarizes how BCG connects the simulator, policy, and imitation objective.
Let be the simulator state at control step , the action, and the differentiable transition between consecutive control steps. We describe a bundle beginning at control step , with branches indexed by and duration control steps. Outside a bundle rollout, the simulator follows an ordinary single branch transition.
BCG proceeds in three phases: contact-local perturbation, multi-step bundled rollout, and gradient propagation. We describe these phases below, followed by their integration into policy learning for motion imitation.
A. Contact-Local Perturbations
A bundle step is triggered when the set of contacts whose normal impulse exceeds a detection threshold is nonempty. We perturb the contacting kinematic chain in Cartesian space so that the perturbation scale has a direct physical interpretation. Let denote the joint positions of the contacting kinematic chains and the current Cartesian positions of their final links. For each branch We sample position and velocity offsets and map them to joint-space increments:
Here, is a Gaussian distribution, is the identity matrix of the Cartesian perturbation dimension, and and are the position and velocity standard deviations. denotes the damped pseudoinverse of the Jacobian . Embedding the increments and into the simulator state gives an offset and initial branch state ; all other state components are unchanged. During backpropagation, each offset is treated as a constant. Gradients therefore pass unchanged through the additive update to , without differentiating through perturbation sampling or its Jacobian-based mapping.
Algorithm 1 BCG rollout segment with duration H control steps
Require: State , current action , policy , simulator (S substeps per transition), bundle size B, duration H, scales , , threshold
1: Detect contacts using threshold
2: if then
3: return at step
4: end if
5: Compute Jacobian and
6: for in parallel do
7: Sample using ,
8: Map to using
9: Initialize
10: end for
11: for do
12: if then
13:
14: end if
15: for in parallel do
16:
17: end for
18:
19: end for
20: return at step
B. Multi-Step Bundled Rollout
Starting from the perturbed states , the branches evolve for control steps under shared actions, initially using the current action from the nominal rollout. Each transition integrates simulation substeps with the action held constant, after which the branch states are averaged. Thus, even allows substeps of branch evolution before the average supplies rewards and the next action. Their propagation and aggregation are
(1)
where aggregates the branch states into a representative state , using arithmetic means for positions and velocities.
At subsequent control boundaries , the policy with parameters computes , and the same action is applied to every branch. The averaged state also supplies the observation and reward at that boundary. The nominal rollout then resumes from . Algorithm 1 summarizes this procedure for one environment. However, in our implementation branch transitions over all bundling environments run in parallel on the GPU to reduce overhead.
C. Gradient Propagation
Let and denote the total sensitivities of the state and action to the policy parameters. Write and for the transition Jacobians, evaluated at . Without bundling, gradients propagate along a single trajectory:
BCG instead propagates a sensitivity along each perturbed branch, with Jacobians evaluated at . Since the perturbations are treated as constants, . For ,
(3)
where . For state components aggregated arithmetically, the corresponding rows of this expression become
This average is the local smoothing mechanism: it can attenuate sharp, contact-dependent variations by combining sensitivities from nearby trajectories. The shared action sensitivity includes the policy's dependence on for , so the recurrence retains feedback through all simulation substeps. These state and action sensitivities enter the imitation-objective gradient through the chain rule, as described next.
D. Policy Learning and Imitation Objective
We use this bundled rollout inside SHAC [4], minimizing from Section III-D with rewards and critic inputs evaluated on the averaged states during a bundle.
To learn dynamic humanoid behaviors, we apply this framework to motion imitation using Adversarial Differential Discriminators (ADD) [12]. We choose ADD because its differentiable reward allows backpropagation through both the objective and simulated rollouts, while its learned aggregation avoids the manual tuning of individual tracking-reward weights used in other motion-imitation frameworks. The imitation reward is
(5)
where and are simulated and phase-matched reference motion features. The discriminator is trained to distinguish the ideal zero residual from policy-generated residuals, providing an adaptive tracking objective. We use this reward in and backpropagate through the discriminator's input and the bundled simulator rollout to update the policy. ADD thus supplies the imitation objective, while BCG stabilizes its propagation through stiff contact.
| κ | Run | Jump | Fight | Dance | ||||
|---|---|---|---|---|---|---|---|---|
| Falls ↓ | Δd ↓ | Falls ↓ | Δd ↓ | Falls ↓ | Δd ↓ | Falls ↓ | Δd ↓ | |
| 50 | 5/5 | 10.6 | 5/5 | 12.6 | 5/5 | 13.3 | 5/5 | 13.5 |
| 100 | 5/5 | 8.1 | 4/5 | 10.8 | 3/5 | 9.1 | 4/5 | 9.5 |
| 300 | 0/5 | 3.1 | 0/5 | 3.3 | 0/5 | 3.4 | 0/5 | 2.9 |
Table 1. Contact-stiffness ablation with BCG (Q1). All policies are trained with SHAC+BCG at the indicated stiffness and evaluated over 5 runs after transfer to MuJoCo. Falls: number of runs in which root height drops below , reported as . : difference in mean foot penetration depth [mm] between the training simulator and MuJoCo; positive values indicate deeper penetration during training.
V. EXPERIMENTS
Our experiments are designed to test whether Bundled Contact Gradients (BCG) enable first-order policy optimization under stiff, deployable contact, and if the resulting policies transfer to another simulator and hardware. We organize the evaluation around five questions: 1) Is stiff contact necessary for dynamic humanoid motions? (Sec. V-B.1), 2) How does BCG reduce gradient variance under stiff contact and stabilize gradient propagation? (Sec. V-B.2), 3) How do SHAC+BCG, vanilla SHAC, and PPO compare in sample efficiency, training time, and convergence? (Sec. V-B.3), 4) How does SHAC+BCG's tracking accuracy compare with PPO after sim-to-sim transfer? (Sec. V-B.4) 5) Do the learned policies transfer zero-shot to real humanoid hardware? (Sec. V-B.5).
A. Experimental Setup
We evaluate our framework on the Unitree G1 humanoid by training policies to imitate four dynamic, contact-rich motions from the LAFAN1 dataset [44]: Run, Jump, Fight, and Dance, each lasting 15 s. Policies are trained in the differentiable rigid-body simulator of [27], which implements an analytically smoothed contact model in NVIDIA Warp [11]. We assess sim-to-sim transfer by evaluating the trained policies in MuJoCo. All experiments are run on an NVIDIA RTX 2080 Ti GPU. All SHAC+BCG experiments use a differentiable rollout horizon of control steps, bundle size , bundle duration , and Cartesian perturbation scales cm and cm/s. We define stiff contact as a normal contact force exceeding N (which is greater than the robot's body weight), that triggers bundling. Other training parameters are listed on the website.
B. Results
-
Q1: Effect of Contact Stiffness on Transfer: We vary the training contact stiffness while using the same SHAC+BCG training procedure at every stiffness level, including the soft contact settings. Table 1 reports falls after transfer to MuJoCo and the difference in foot penetration between the training simulator and MuJoCo. As stiffness is raised, the number of falls goes down showing how contact fidelity in differentiable simulation affects transfer reliability.
-
Q2: Gradient Variance and Contact Sensitivities: Retaining stiff contact requires gradients that remain stable enough during training. We therefore examine gradient variability during training with and without BCG as well as understand how BCG works to reduce gradient variance at a low level. For the Jump motion, we compare policy-gradient variance across all training environments at saved checkpoints. We compute variance by summing the sample variances of all policy-gradient components across environments. Figure 3 shows lower variance with BCG, indicating greater agreement among the environment-wise gradients combined in each policy update. In other words, fewer environments produce conflicting parameter-update directions, resulting in a more consistent learning signal.

Fig. 3. Policy-gradient variance during training (Q2). Shading shows one standard deviation across 4,000 resamples of the 128 training environments, showing how much the estimated variance changes when the recorded gradients are resampled.

(a)
(b)
Fig. 4. Contact-local gradient averaging Q2. (a) One contact bundle with 10 samples during stiff contact over a window of (4 physics substeps per control step) (b) Ellipses summarize the spread of the gradient point clouds, where orange points are gradients from individual perturbed contact samples and blue points are the corresponding BCG-averaged gradients. Each ellipse encloses of the probability mass of a fitted Gaussian distribution.
To examine the underlying mechanism in BCG, we rollout steps of the differentiable simulator with a single environment () and measure how small changes in the state affect the G1's pelvis' vertical velocity within a bundle stage. Figure 4(a) plots one element of the state-gradient vector: , which measures the sensitivity of future pelvis vertical velocity to the current pelvis height over the bundle window. We choose this component because vertical pelvis motion in the Jump task is strongly coupled to foot-ground contact, making it an intuitive measure of contact-induced gradient sensitivity. At stiff contact, indi-

Fig. 5. Learning curves on the four reference motions (Rows) plotted against three budgets: training iterations (left), environment samples (middle), and wall-clock time (right). The sample axis is logarithmic
vidual perturbed branches exhibit markedly different sensitivities, while their bundled average attenuates the extreme responses. This illustrates how BCG reduces dependence on a single contact realization that would otherwise cause varied gradients, while retaining stiff dynamics.
Figure 4(b) examines the sensitivity of the same pelvis vertical velocity to all input-state components over the bundle window. We collect these sensitivities into vectors and use Principal Component Analysis (PCA) to display them in a shared two-dimensional view. Each orange point represents one perturbed branch, and each blue diamond represents the bundled gradient from one sampling draw. Nearby points have similar sensitivity patterns in this projection. The orange points are widely spread, whereas the blue points cluster closely together. The smaller blue ellipse summarizes this reduction in variation across bundle draws, showing that the averaging effect extends beyond pelvis height to the joint variation of the full state-gradient vector.
Together, these results show how contact-local averaging reduces variability in simulator sensitivities and provides a more consistent learning signal under stiff contact. By moderating contact-induced gradient fluctuations, BCG helps keep gradients stable over longer rollout horizons compared to previous work [27].
- Q3: Learning Efficiency and Convergence: Figure 5 shows SHAC+BCG reaching comparable reward levels with over an order of magnitude fewer samples than PPO, while vanilla SHAC stalls at low reward. BCG reaches higher final rewards compared to PPO in a few motions as well.
SHAC+BCG and vanilla SHAC consume comparable sample budgets at a given iteration count. BCG's more informative gradients allow training with 64 environments instead of 128, offsetting the additional branch samples used for bundling at stiff contacts. BCG therefore learns substantially more from a similar simulation budget. BCG does however have a slightly higher computational overhead compared with Vanilla SHAC due to a larger computational graph for backpropagation.
| Motion | SHAC-Stiff + BCG [cm] | PPO [cm] |
|---|---|---|
| Run | 34.1 ± 0.4 | 42.8 ± 0.7 |
| Jump | 18.6 ± 0.4 | 18.0 ± 0.2 |
| Fight | 13.5 ± 0.3 | 34.3 ± 1.4 |
| Dance | 18.5 ± 0.8 | 19.0 ± 0.1 |
Table 2. Tracking accuracy after sim-to-sim transfer (Q4). Global mean per-body position error [cm], reported as mean std over 5 runs.
-
Q4: Tracking Performance across Methods: After transfer to MuJoCo, we compare SHAC+BCG and PPO using global mean per-body position error (Table 2). SHAC+BCG achieves lower mean error on three of the four motions. PPO has slightly lower error on Jump, but its policy keeps both feet on the ground instead of reproducing the jumping motion, as shown in the accompanying videos. These results highlight the potential of first-order learning with informative gradients, which can guide the policy toward more faithful motion tracking.
-
Q5: Sim-to-Real Transfer: Finally, we deploy the learned SHAC+BCG policies zero-shot on the real Unitree G1 without any hardware fine-tuning. The robot successfully executes the learned dynamic motions, providing qualitative evidence that the stiff-contact policies transfer beyond simulation; videos of the hardware results are available on the project website.
VI. CONCLUSION
We presented Bundled Contact Gradients (BCG), a contact-local randomized smoothing method for stabilizing first-order policy learning under stiff, deployable contact dynamics. BCG aggregates sensitivities across nearby contact configurations, providing a more consistent learning signal while retaining the contact fidelity required for transfer. Integrated with SHAC and ADD, BCG enables dynamic humanoid motion learning with over an order of magnitude fewer environment samples than PPO, improves tracking accuracy after transfer to MuJoCo compared to PPO, and enables zero-shot deployment of the learned motions on a real Unitree G1. These results demonstrate that the analytic gradients provided by differentiable simulation can remain useful even in the stiff contact regime required for real-world dynamic control.
BCG introduces additional computation and memory from simulating and differentiating through multiple contact branches. While contact-local activation limits this cost, tasks with sustained stiff contact may incur greater overhead than PPO. The perturbation scales and number of bundle samples also require tuning to balance smoothing, bias, and computational cost. Future work could adapt these parameters automatically based on local contact sensitivity and extend
BCG to higher-dimensional, contact-rich problems such as humanoid loco-manipulation and dexterous manipulation. More broadly, we view BCG as a step toward making differentiable simulation a practical tool for learning increasingly complex, deployable robotic behaviors efficiently.
REFERENCES
[1] J. Hwangbo, J. Lee, A. Dosovitskiy, D. Bellicoso, V. Tsounis, V. Koltun, and M. Hutter, “Learning agile and dynamic motor skills for legged robots,” Science Robotics, vol. 4, no. 26, 2019.
[2] X. B. Peng, P. Abbeel, S. Levine, and M. van de Panne, “DeepMimic: Example-guided deep reinforcement learning of physics-based character skills,” ACM Transactions on Graphics, vol. 37, no. 4, pp. 143:1–143:14, 2018.
[3] J. Lee, J. Hwangbo, L. Wellhausen, V. Koltun, and M. Hutter, "Learning quadrupedal locomotion over challenging terrain," Science Robotics, vol. 5, no. 47, 2020.
[4] J. Xu, V. Makoviychuk, Y. Narang, F. Ramos, W. Matusik, A. Garg, and M. Macklin, “Accelerated policy learning with parallel differentiable simulation,” in International Conference on Learning Representations, 2022.
[5] C. Sferrazza, D.-M. Huang, X. Lin, Y. Lee, and P. Abbeel, “Humanoid-Bench: Simulated humanoid benchmark for whole-body locomotion and manipulation,” in Robotics: Science and Systems, 2024.
[6] H. J. T. Suh, M. Simchowitz, K. Zhang, and R. Tedrake, “Do differentiable simulators give better policy gradients?” in International Conference on Machine Learning, 2022.
[7] L. Metz, C. D. Freeman, S. S. Schoenholz, and T. Kachman, “Gradients are not all you need,” arXiv:2111.05803, 2021.
[8] I. Georgiev, K. Srinivasan, J. Xu, E. Heiden, and A. Garg, “Adaptive horizon actor-critic for policy learning in contact-rich differentiable simulation,” in International Conference on Machine Learning, 2024.
[9] H. J. T. Suh, T. Pang, and R. Tedrake, “Bundled gradients through contact via randomized smoothing,” CoRR, vol. abs/2109.05143, 2021.
[10] Q. Le Lidec, F. Schramm, L. Montaut, C. Schmid, I. Laptev, and J. Carpentier, “Leveraging randomized smoothing for optimal control of nonsmooth dynamical systems,” Nonlinear Analysis: Hybrid Systems, vol. 52, p. 101468, 2024.
[11] M. Macklin, “Warp: A high-performance python framework for gpu simulation and graphics,” NVIDIA GPU Technology Conference (GTC), 2022, https://github.com/NVIDIA/warp.
[12] Z. Zhang, S. Bashkirov, D. Yang, Y. Shi, M. Taylor, and X. B. Peng, “Physics-based motion imitation with adversarial differential discriminators,” in SIGGRAPH Asia 2025 Conference Papers, 2025.
[13] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov, "Proximal policy optimization algorithms," arXiv:1707.06347, 2017.
[14] A. Handa, A. Allshire, V. Makoviychuk, A. Petrenko, R. Singh, J. Liu, D. Makoviichuk, K. Van Wyk, A. Zhurkevich, B. Sundaralingam, and Y. Narang, “Dextreme: Transfer of agile in-hand manipulation from simulation to reality,” in IEEE International Conference on Robotics and Automation, 2023, pp. 5977–5984.
[15] N. Rudin, D. Hoeller, P. Reist, and M. Hutter, “Learning to walk in minutes using massively parallel deep reinforcement learning,” in Conference on Robot Learning. PMLR, 2022, pp. 91–100.
[16] X. Cheng, K. Shi, A. Agarwal, and D. Pathak, “Extreme parkour with legged robots,” in IEEE International Conference on Robotics and Automation, 2024.
[17] I. Radosavovic, T. Xiao, B. Zhang, T. Darrell, J. Malik, and K. Sreenath, “Real-world humanoid locomotion with reinforcement learning,” Science Robotics, vol. 9, no. 89, p. eadi9579, 2024.
[18] J. Degrave, M. Hermans, J. Dambre, and F. wyffels, “A differentiable physics engine for deep learning in robotics,” Frontiers in Neuro-robotics, vol. 13, p. 6, 2019.
[19] F. de Avila Belbute-Peres, K. Smith, K. Allen, J. Tenenbaum, and J. Z. Kolter, “End-to-end differentiable physics for learning and control,” in Advances in Neural Information Processing Systems, 2018.
[20] Y. Hu, L. Anderson, T.-M. Li, Q. Sun, N. Carr, J. Ragan-Kelley, and F. Durand, “Difftaichi: Differentiable programming for physical simulation,” in International Conference on Learning Representations, 2020.
[21] C. D. Freeman, E. Frey, A. Raichuk, S. Girgin, I. Mordatch, and O. Bachem, “Brax – a differentiable physics engine for large scale rigid body simulation,” arXiv:2106.13281, 2021.
[22] M. Geilinger, D. Hahn, J. Zehnder, M. Bächer, B. Thomaszewski, and S. Coros, “ADD: Analytically differentiable dynamics for multi-body systems with frictional contact,” in ACM Transactions on Graphics (SIGGRAPH Asia), 2020.
[23] Y.-L. Qiao, J. Liang, V. Koltun, and M. C. Lin, “Efficient differentiable simulation of articulated bodies,” in International Conference on Machine Learning, 2021.
[24] M. A. Z. Mora, M. Peychev, S. Ha, M. Vechev, and S. Coros, “PODS: Policy optimization via differentiable simulation,” in International Conference on Machine Learning, 2021, pp. 7805–7817.
[25] S. Gillen and K. Byl, “Leveraging reward gradients for reinforcement learning in differentiable physics simulations,” arXiv:2203.02857, 2022.
[26] N. Wiedemann, V. Wüest, A. Loquercio, M. Müller, D. Floreano, and D. Scaramuzza, “Training efficient controllers via analytic policy gradient,” IEEE International Conference on Robotics and Automation, 2023.
[27] C. Schwarke, V. Klemm, J. Bagajo, J.-P. Sleiman, I. Georgiev, J. Tordesillas, and M. Hutter, “Learning deployable locomotion control via differentiable simulation,” in Conference on Robot Learning, 2025.
[28] Y. Song, S. Kim, and D. Scaramuzza, “Learning quadruped locomotion using differentiable simulation,” arXiv:2403.14864, 2024.
[29] Y. Zhang, Y. Hu, Y. Song, D. Zou, and W. Lin, “Learning vision-based agile flight via differentiable physics,” Nature Machine Intelligence, pp. 1–13, 2025.
[30] E. Xing, V. Luk, and J. Oh, “Stabilizing reinforcement learning in differentiable multiphysics simulation,” International Conference on Learning Representations, 2025.
[31] J. Amigo, R. Khorrambakht, E. Chane-Sane, N. Mansard, and L. Righetti, “First order model-based r1 through decoupled backpropagation,” arXiv:2509.00215, 2025.
[32] J. Y. Luo, Y. Song, V. Klemm, F. Shi, D. Scaramuzza, and M. Hutter, “Residual policy learning for perceptive quadruped control using differentiable simulation,” arXiv:2410.03076, 2024.
[33] A. Paulus, A. R. Geist, P. Schumacher, V. Musil, S. Rappenecker, and G. Martius, “Differentiable simulation of hard contacts with soft gradients for learning and control,” in International Conference on Learning Representations, 2026.
[34] K. Werling, D. Omens, J. Lee, I. Exarchos, and C. K. Liu, “Fast and feature-complete differentiable physics engine for articulated rigid bodies with contact constraints,” in Robotics: Science and Systems, 2021.
[35] T. A. Howell, S. Le Cleac'h, J. Z. Kolter, M. Schwager, and Z. Manchester, "Dojo: A differentiable simulator for robotics," arXiv:2203.00806, 2022.
[36] T. Pang, H. J. T. Suh, L. Yang, and R. Tedrake, “Global planning for contact-rich manipulation via local smoothing of quasi-dynamic contact models,” IEEE Transactions on Robotics, vol. 39, no. 6, pp. 4691–4711, 2023.
[37] T. Pang and R. Tedrake, “A convex quasistatic time-stepping scheme for rigid multibody systems with contact and friction,” in IEEE International Conference on Robotics and Automation, 2021, pp. 6614–6620.
[38] M. Posa, C. Cantu, and R. Tedrake, “A direct method for trajectory optimization of rigid bodies through contact,” The International Journal of Robotics Research, vol. 33, no. 1, pp. 69–81, 2014.
[39] R. Budhiraja, J. Carpentier, C. Mastalli, and N. Mansard, “Differential dynamic programming for multi-phase rigid contact dynamics,” in IEEE-RAS International Conference on Humanoid Robots, 2018, pp. 1–9.
[40] Q. Le Lidec, L. Montaut, C. Schmid, I. Laptev, and J. Carpentier, “Augmenting differentiable physics with randomized smoothing,” arXiv:2206.11884, 2022.
[41] M. Scheffler, W. Jallet, C. Schmid, and J. Carpentier, “Unbiased First-Order Randomized Smoothing for Differentiable Simulators,” 2026, preprint. [Online]. Available: https://hal.science/hal-05629540
[42] J. Schulman, P. Moritz, S. Levine, M. Jordan, and P. Abbeel, “High-dimensional continuous control using generalized advantage estimation,” in International Conference on Learning Representations, 2016.
[43] J. J. Moreau, Unilateral Contact and Dry Friction in Finite Freedom Dynamics. Springer Vienna, 1988, pp. 1–82.
[44] F. G. Harvey, M. Yurick, D. Nowrouzezahrai, and C. Pal, “Robust motion in-betweening,” ACM Transactions on Graphics, vol. 39, no. 4, 2020.