Stabilizing Backpropagation Through Time to Learn Complex Physics
Abstract: Of all the vector fields surrounding the minima of recurrent learning setups, the gradient field with its exploding and vanishing updates appears a poor choice for optimization, offering little beyond efficient computability. We seek to improve this suboptimal practice in the context of physics simulations, where backpropagating feedback through many unrolled time steps is considered crucial to acquiring temporally coherent behavior. The alternative vector field we propose follows from two principles: physics simulators, unlike neural networks, have a balanced gradient flow, and certain modifications to the backpropagation pass leave the positions of the original minima unchanged. As any modification of backpropagation decouples forward and backward pass, the rotation-free character of the gradient field is lost. Therefore, we discuss the negative implications of using such a rotational vector field for optimization and how to counteract them. Our final procedure is easily implementable via a sequence of gradient stopping and component-wise comparison operations, which do not negatively affect scalability. Our experiments on three control problems show that especially as we increase the complexity of each task, the unbalanced updates from the gradient can no longer provide the precise control signals necessary while our method still solves the tasks. Our code can be found at https://github.com/tum-pbs/StableBPTT.
- OptNet: Differentiable optimization as a layer in neural networks. In International Conference on Machine Learning, 2017.
- Rethinking optimization with differentiable simulation from a global perspective. In Conference on Robot Learning, pp. 276–286. PMLR, 2023.
- Structured agents for physical construction. In International Conference on Machine Learning, pp. 464–474, 2019.
- Learning data-driven discretizations for partial differential equations. Proceedings of the National Academy of Sciences, 116(31):15344–15349, 2019.
- Simulation as an engine of physical scene understanding. Proceedings of the National Academy of Sciences, 110(45), 2013.
- End-to-end differentiable physics for learning and control. In Advances in neural information processing systems, 2018.
- Learning long-term dependencies with gradient descent is difficult. IEEE transactions on neural networks, 5(2):157–166, 1994.
- Message passing neural PDE solvers. In International Conference on Learning Representations, 2022.
- Discovering governing equations from data by sparse identification of nonlinear dynamical systems. Proceedings of the National Academy of Sciences, 113(15):3932–3937, 2016.
- Lagrangian neural networks. arXiv:2003.04630, 2020.
- Equations of motion from a data series. Complex systems, 1(417-452):121, 1987.
- A differentiable physics engine for deep learning in robotics. Frontiers in Neurorobotics, 13, 2019. ISSN 1662-5218. doi: 10.3389/fnbot.2019.00006. URL https://www.frontiersin.org/articles/10.3389/fnbot.2019.00006.
- Global convergence of policy gradient methods for the linear quadratic regulator. In Jennifer Dy and Andreas Krause (eds.), Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 1467–1476. PMLR, 10–15 Jul 2018. URL https://proceedings.mlr.press/v80/fazel18a.html.
- Razvan V. Florian. Correct equations for the dynamics of the cart-pole system. 2005. URL https://api.semanticscholar.org/CorpusID:13144387.
- Brax–a differentiable physics engine for large scale rigid body simulation. arXiv preprint arXiv:2106.13281, 2021.
- Deep learning. MIT press, 2016.
- Hamiltonian neural networks. In Advances in Neural Information Processing Systems, pp. 15353–15363, 2019.
- Neuroanimator: Fast neural network emulation and control of physics-based models. In Proceedings of the 25th annual conference on Computer graphics and interactive techniques, pp. 9–20, 1998.
- Long short-term memory. Neural Computation, 9(8):1735–1780, 1997. doi: 10.1162/neco.1997.9.8.1735.
- Learning to control pdes with differentiable physics. International Conference on Learning Representations (ICLR), 2020.
- Learning neural pde solvers with convergence guarantees. arXiv:1906.01200, 2019.
- Difftaichi: Differentiable programming for physical simulation. International Conference on Learning Representations (ICLR), 2020.
- Learning protein structure with a differentiable simulator. In International conference on learning representations, 2018.
- Equation-free, coarse-grained multiscale computation: Enabling mocroscopic simulators to perform system-level analysis. Communications in Mathematical Sciences, 1(4):715–762, 2003.
- Deep fluids: A generative network for parameterized fluid simulations. In Computer Graphics Forum, volume 38(2), pp. 59–70. Wiley Online Library, 2019.
- Adam: A method for stochastic optimization. arXiv:1412.6980 [cs], December 2014.
- Asymptotic behavior and control of a “guidance by repulsion” model. Mathematical Models and Methods in Applied Sciences, 30(04):765–804, 2020. doi: 10.1142/S0218202520400047. URL https://doi.org/10.1142/S0218202520400047.
- Machine learning–accelerated computational fluid dynamics. Proceedings of the National Academy of Sciences, 118(21):e2101784118, 2021.
- Learning compositional koopman operators for model-based control. arXiv:1910.08264, 2019.
- Differentiable cloth simulation for inverse problems. In Advances in Neural Information Processing Systems, pp. 771–780, 2019.
- Learned turbulence modelling with differentiable fluid solvers: physics-based loss functions and optimisation horizons. Journal of Fluid Mechanics, 949:A25, 2022. doi: 10.1017/jfm.2022.738.
- PDE-Net: Learning PDEs from data. arXiv:1710.09668, 2017.
- Learning recurrent neural networks with hessian-free optimization. In Proceedings of the 28th international conference on machine learning (ICML-11), pp. 1033–1040, 2011.
- Gradients are not all you need. arXiv preprint arXiv:2111.05803, 2021.
- Deep dynamical modeling and control of unsteady fluid flows. In Advances in Neural Information Processing Systems, 2018.
- Pipps: Flexible model-based policy search robust to the curse of chaos. In International Conference on Machine Learning, pp. 4065–4074. PMLR, 2018.
- Guaranteed conservation of momentum for learning particle-based fluid dynamics. Advances in Neural Information Processing Systems, 35, 2022.
- Efficient differentiable simulation of articulated bodies. In International Conference on Machine Learning, pp. 8661–8671. PMLR, 2021.
- Hidden physics models: Machine learning of nonlinear partial differential equations. Journal of Computational Physics, 357:125–141, 2018.
- An artificial neural network as a troubled-cell indicator. Journal of Computational Physics, 367:166–191, Aug 2018. ISSN 0021-9991. doi: 10.1016/j.jcp.2018.04.029. URL http://dx.doi.org/10.1016/j.jcp.2018.04.029.
- Spnets: Differentiable fluid dynamics for deep neural networks. In Conference on Robot Learning, pp. 317–335, 2018.
- Jax, md: End-to-end differentiable, hardware accelerated, molecular dynamics in pure python. arXiv:1912.04232, 2019.
- Physics-aware difference graph networks for sparsely-observed dynamics. International Conference on Learning Representations (ICLR), 2020.
- Dgm: A deep learning algorithm for solving partial differential equations. Journal of Computational Physics, 375:1339–1364, 2018.
- Learned coarse models for efficient turbulence simulation. arXiv:2112.15275, 2021.
- Do differentiable simulators give better policy gradients? In International Conference on Machine Learning, pp. 20668–20696. PMLR, 2022.
- Ilya Sutskever. Training recurrent neural networks. University of Toronto Toronto, ON, Canada, 2013.
- Physics-based Deep Learning. WWW, 2021. URL https://physicsbaseddeeplearning.org.
- Differentiable physics and stable modes for tool-use and manipulation planning. In Robotics: Science and Systems, 2018.
- Solver-in-the-loop: Learning from differentiable physics to interact with iterative pde-solvers. In Advances in Neural Information Processing Systems, pp. 6111–6122. Curran Associates, Inc., 2020.
- John Von Neumann. Mathematical foundations of quantum mechanics. Princeton university press, 2018.
- Towards physics-informed deep learning for turbulent flow prediction. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 1457–1466, 2020a.
- Differentiable molecular simulations for control and learning. arXiv:2003.00868, 2020b.
- Visual interaction networks: Learning a physics simulator from video. In Advances in neural information processing systems, 2017.
- E Weinan. A proposal on machine learning via dynamical systems. Communications in Mathematics and Statistics, 5(1):1–11, 2017.
- Paul J Werbos. Generalization of backpropagation with application to a recurrent gas market model. Neural networks, 1(4):339–356, 1988.
- A globalized newton method for the accurate solution of a dipole quantum control problem. SIAM Journal on Scientific Computing, 31(6):4176–4203, 2009. doi: 10.1137/09074961X.
- Accelerated policy learning with parallel differentiable simulation. In International Conference on Learning Representations, 2021.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.