DiffTaichi: Differentiable Programming for Physical Simulation
Yuanming Hu, Luke Anderson, Tzu-Mao Li, Qi Sun, Nathan Carr, Jonathan, Ragan-Kelley, Fr\'edo Durand

TL;DR
DiffTaichi is a new differentiable programming language designed for high-performance physical simulation, enabling efficient gradient computation and optimization in simulation-based tasks.
Contribution
It introduces a source code transformation approach for gradients, preserving parallelism and efficiency, and demonstrates significant performance improvements over existing implementations.
Findings
Differentiable elastic object simulator is 4.2x shorter than CUDA version.
Runs as fast as hand-engineered CUDA code.
Neural network controllers optimize in tens of iterations.
Abstract
We present DiffTaichi, a new differentiable programming language tailored for building high-performance differentiable physical simulators. Based on an imperative programming language, DiffTaichi generates gradients of simulation steps using source code transformations that preserve arithmetic intensity and parallelism. A light-weight tape is used to record the whole simulation program structure and replay the gradient kernels in a reversed order, for end-to-end backpropagation. We demonstrate the performance and productivity of our language in gradient-based learning and optimization tasks on 10 different physical simulators. For example, a differentiable elastic object simulator written in our language is 4.2x shorter than the hand-engineered CUDA version yet runs as fast, and is 188x faster than the TensorFlow implementation. Using our differentiable programs, neural network…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Finally, Differentiable Physics is Here!· youtube
Taxonomy
TopicsModel Reduction and Neural Networks · Computer Graphics and Visualization Techniques · 3D Shape Modeling and Analysis
