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
Related terms
Sim-to-real transfer
Sim-to-real transfer applies a model, policy, or behavior developed in simulation to a physical system. Its central challenge is the difference between the simulated environment and the robot, sensors, and interactions encountered in reality.
System identification
System identification estimates a model of a physical system from measured inputs and outputs. In robotics, it can recover parameters such as inertia and friction or learn a more general model of how actions change the system state.
Trajectory optimization
Trajectory optimization finds a time-varying motion, and often control inputs, that minimizes an objective while satisfying specified constraints. Robot applications can include geometric, kinematic, and dynamic constraints.
Reinforcement learning
Reinforcement learning trains an agent to choose actions that maximize expected cumulative reward through experience with an environment. In robotics, the learned policy can select movements or higher-level behaviors from observations.