DiffTaichi: Differentiable Programming for Physical Simulation

by   Yuanming Hu, et al.
berkeley college

We study the problem of learning and optimizing through physical simulations via differentiable programming. We present DiffTaichi, a new differentiable programming language tailored for building high-performance differentiable physical simulations. 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 faster than the hand-engineered CUDA version yet runs as fast, and is 188x faster than TensorFlow. Using our differentiable programs, neural network controllers are typically optimized within only tens of iterations. Finally, we share the lessons learned from our experience developing these simulators, that is, differentiating physical simulators does not always yield useful gradients of the physical system being simulated. We systematically study the underlying reasons and propose solutions to improve gradient quality.


page 6

page 7

page 17


AsyncTaichi: Whole-Program Optimizations for Megakernel Sparse Computation and Differentiable Programming

We present a whole-program optimization framework for the Taichi program...

Differentiable Physics: A Position Piece

Differentiable physics provides a new approach for modeling and understa...

k-meansNet: When k-means Meets Differentiable Programming

In this paper, we study how to make clustering benefiting from different...

ξ-torch: differentiable scientific computing library

Physics-informed learning has shown to have a better generalization than...

PlasticineLab: A Soft-Body Manipulation Benchmark with Differentiable Physics

Simulated virtual environments serve as one of the main driving forces b...

Using Differentiable Programming for Flexible Statistical Modeling

Differentiable programming has recently received much interest as a para...

Half-Inverse Gradients for Physical Deep Learning

Recent works in deep learning have shown that integrating differentiable...

Code Repositories


Productive & portable programming language for high-performance, sparse & differentiable computing on CPUs & GPUs

view repo


10 differentiable physical simulators built with Taichi differentiable programming (DiffTaichi, ICLR 2020)

view repo

Please sign up or login with your details

Forgot password? Click here to reset