Artificial intelligence

Differentiable simulation

Definition

Differentiable simulation is physical simulation that provides derivatives of simulated outcomes or losses with respect to inputs such as controls, initial states, model parameters, or robot design variables. Those gradients can drive optimisation and learning through the simulated dynamics.

Also known as: Differentiable physics, Differentiable physics simulation

Updated

Gradients through simulated dynamics

An ordinary simulator maps an initial state and sequence of inputs to a trajectory. A differentiable simulator also computes how a chosen output changes when those inputs or model parameters change. Reverse-mode differentiation can propagate a task loss backwards through many simulation steps to obtain gradients for optimisation.

DiffTaichi uses source transformations and a recorded simulation program structure to generate gradients for several physical simulators. Its reported examples include optimising neural-network controllers. The concept is broader than that implementation and can use automatic, analytic, or carefully derived numerical differentiation.

Uses in robotics

Gradients can tune a control sequence in trajectory optimization, estimate friction or mass in system identification, train a policy, or change a robot design parameter. Compared with perturbing every parameter independently, a reverse-mode gradient can be attractive when one scalar loss depends on many decisions.

Differentiable simulation is not the same as reinforcement learning. It is a model capability that an optimiser or learning algorithm may use. A policy can be trained without differentiable physics, and a differentiable simulator can optimise variables without training a policy.

Contact and long rollouts complicate gradients

Impacts, frictional transitions, and contact creation are not smooth in the same way as free-flight dynamics. Implementations may soften contact or choose surrogate derivatives, which changes the optimisation problem. Long rollouts can also amplify numerical error.

A 2026 study by Yang and colleagues reports gradient sensitivity to parallel accumulation order, rollout length, and objective construction in two material-manipulation benchmarks. Those findings concern the tested simulators and tasks, but they illustrate why gradient checks and reproducibility matter. Even an accurate simulation gradient only differentiates the model; it does not remove the sim-to-real gap.

Sources