Unbiased First-Order Randomized Smoothing for Differentiable Simulators

Mathis Scheffler, Wilson Jallet, Cordelia Schmid, Justin CarpentierNeurIPS 2026

TL;DR

Physics in the real world is full of sharp jumps—bouncing balls, colliding gears, and sudden friction—that break standard gradient-based optimization. While "randomized smoothing" blurs these jumps to recover usable gradients, existing methods force a painful choice between noisy, gradient-free guesses and fast, derivative-based estimates that turn out to be mathematically wrong (biased) at the jumps. This paper uses generalized calculus to pinpoint the exact missing math behind that bias, introducing new estimators that give robotics simulators the best of both worlds: exact, unbiased gradients across sharp discontinuities and orders-of-magnitude lower noise everywhere else.

What Problem Does This Paper Address?

Differentiable simulators allow robots to learn and plan by taking derivatives through physics. However, rigid contact and hard thresholds introduce discontinuities—like a step function where the derivative is zero everywhere except at the cliff, where it is undefined.

A popular fix is randomized smoothing: instead of differentiating a jagged function $f(x)$ directly, you inject random noise (typically Gaussian) and optimize the blurred average. To estimate the gradient of this smoothed function via Monte Carlo sampling, practitioners have two standard tools:

  1. Zeroth-Order Bundled Gradients (ZoBG): Queries only function values $f(x)$. It is always unbiased (accurate on average), even across cliffs, but suffers from high variance (noise).
  2. First-Order Bundled Gradients (FoBG): Averages the simulator's analytical gradients $\nabla f(x)$. In smooth regions, this slashes variance dramatically. However, across discontinuities, averaging classical gradients completely misses the jump itself—for a step function, FoBG averages a bunch of zeros and tells the optimizer the terrain is completely flat!

Until now, roboticists had to either fall back on noisy zeroth-order methods or heuristically blend the two, accepting lingering bias that frequently causes optimization to fail.

Methods

Borrowing a page from differentiable rendering, the authors treat nonsmooth physics as Schwartz distributions (generalized functions). By taking the distributional derivative, they prove that the true smoothed gradient equals the standard FoBG expectation plus surface integrals over all discontinuity boundaries (weighted by the size of the jumps). Standard FoBG fails simply because it drops these boundary integrals.

From this exact formula, the authors build two new estimators depending on what you know about the system:

  • QFoBG (When discontinuities are known): In structured geometry problems like 3D mesh collision detection, the discontinuity boundaries are known cones attached to mesh edges. QFoBG evaluates the exact boundary integrals deterministically using Gauss–Legendre quadrature—requiring zero random sampling.
  • CFoBG (When discontinuities are unknown): In a full multi-step simulator, tracking every possible collision boundary is intractable. Corrected First-order Bundled Gradient (CFoBG) requires only standard evaluations of $f$ and $\nabla f$. It computes the smooth part using antithetic (paired $+ \omega$ and $- \omega$) FoBG, and estimates the missing jump term via an unbiased zeroth-order residual, using a clever leave-one-out trick to keep noise samples statistically independent.

Datasets

  • GraspNet-1Billion: All 3D object meshes from this benchmark (plus a synthetic cylinder) are used to validate differentiable collision detection.
  • Trajectory & Policy Optimization Tasks: No new datasets are introduced, though the authors build a custom discontinuous 2D Platformer (requiring hard-threshold jumps up a staircase). They also evaluate on standard MuJoCo Hopper tasks (jump, and land & jump) from Le Lidec et al. [2022], alongside analytical 1D discontinuity benchmarks (Bounce, Wall impact, Bar collision) and three contact-rich tasks (Planar Pushing, Coulomb Friction, and Tennis) from Suh et al. [2022b].

Key Insights and Ideas

  • Why multi-step simulators can't just track boundaries: You might wonder why we can't track discontinuities step-by-step in a simulator. The authors illustrate a fascinating trap: if you drop a ball from slightly higher, it might miss the ground at step $t$ and bounce at step $t+1$ instead. Two step-level discontinuities are crossed, yet the final trajectory varies smoothly because the jumps cancel out! Sampling one boundary without its hidden twin actively injects fake error.
Crossing step-level discontinuities that cancel out over time
  • Smoothing doesn't commute: Smoothing a whole simulator end-to-end is mathematically different from smoothing each time step individually—the authors note they can differ by a factor of 22 even on two composed step functions.
  • An exploding advantage as optimization converges: As optimization progresses, the smoothing radius $\sigma$ is typically shrunk toward zero. Away from jumps, ZoBG variance stays stuck at $O(\|\nabla f\|^2 / N)$, whereas CFoBG variance shrinks rapidly at $O(\sigma^4 / N)$.
Figure 2: Estimator variance on three tasks involving discontinuity from Suh et al. [2022b]. Columns: f(θ) and fp(θ), variance at and away from discontinuities as a function of σ. CFoBG matches ZoBG near discontinuities but achieves O(σ4/N) variance away from them. Contrary to Suh et al. [2022b], our first-order estimator is unbiased.

Key Results

  • 3D Collision Detection: Because QFoBG uses deterministic quadrature instead of Monte Carlo sampling, it has zero variance and converges exponentially. On 3D meshes, QFoBG hits a $10^{-5}$ relative error in a few microseconds ($0.3\text{ }\mu\text{s}$ to a few $\mu\text{s}$ on a single CPU core), whereas ZoBG needs ~1,000 $\mu\text{s}$ just to reach $10^{-2}$ error. Qualitative sphere renderings also show QFoBG avoids the dotted edge artifacts seen in closed-form Gumbel (softmax) smoothing.
Figure 3: Average relative error of ZoBG and QFoBG as a function of computation time, for four different meshes. ZoBG computation time scales linearly with the number of MC samples; QFoBG computation time scales with the number of quadrature points.
  • Trajectory Optimization: On the discontinuous 2D Platformer, standard FoBG gets completely stuck at ground level (median loss 100.7), blind to the jump trigger. Both ZoBG and CFoBG discover the double-jump and reach the target (loss 9.29). Conversely, on the smooth MuJoCo Hopper tasks, CFoBG slashes Jacobian estimator variance by 3 to 4 orders of magnitude compared to ZoBG (e.g., Variance AUC of 1.8e-3 vs. 1.6e1 on land & jump), matching FoBG's low trajectory loss (0.105 vs 0.153 for ZoBG). Across all additional contact-rich benchmarks, CFoBG is consistently best or tied-best without needing to know if the underlying physics is smooth or discontinuous.

Limitations and Future Work

  • No free lunch right on the cliff: Right next to a discontinuity, local gradients tell you nothing about how high the cliff is. Consequently, CFoBG's variance falls back to $O(1/(N\sigma^2))$, matching ZoBG. Proving whether any first-order estimator can beat this bound at a jump remains an open question.
  • Scaling QFoBG: Directly integrating over boundaries works beautifully for isolated modules like collision detection, but enumerating surfaces across full simulators is intractable; finding ways to locate or estimate them on the fly is left for future work.
  • Curse of dimensionality: Like all randomized smoothing methods, CFoBG's performance degrades in high dimensions (for neural policies, the authors suggest smoothing in small action/state spaces rather than network weight spaces). Future work includes bringing this bias-correction trick to sampling-based controllers (like MPPI) and first-order reinforcement learning.

Summary updated

Abstract

Computing informative gradients through nonsmooth physical models—such as those involving hard contact or bouncing—is a cornerstone challenge in robotics and machine learning. Randomized smoothing offers a principled way to obtain well-behaved surrogate gradients, yet standard first-order estimators of these smoothed gradients are biased whenever the underlying function is discontinuous. In this work, we show that this bias arises from neglected discontinuity contributions and derive a corrected first-order formula that eliminates it. When the discontinuity structure is known, we exploit it to build discontinuity-aware gradient estimators, which we instantiate for differentiable collision detection on 3D meshes. When it is unknown, we propose a complementary estimator that leverages classical gradients to reduce variance. We validate this estimator on nonsmooth trajectory optimization instances, demonstrating variance reductions of several orders of magnitude over zeroth-order baselines in the smooth regime, while remaining unbiased under discontinuities where standard first-order estimators fail.
BibTeX
@inproceedings{scheffler2026unbiased,
  author = {Mathis SCHEFFLER and Wilson Jallet and Cordelia Schmid and Justin Carpentier},
  title = {{Unbiased First-Order Randomized Smoothing for Differentiable Simulators}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=iXltG66DNN},
}

Loading related content...

Figure