Optimizing Automatic Differentiation with Deep Reinforcement Learning
Not on the map. Why?
Abstract (arXiv)
Computing Jacobians with automatic differentiation is ubiquitous in many scientific domains such as machine learning, computational fluid dynamics, robotics and finance. Even small savings in the number of computations or memory usage in Jacobian computations can already incur massive savings in energy consumption and runtime. While there exist many methods that allow for such savings, they generally trade computational efficiency for approximations of the exact Jacobian. In this paper, we present a novel method to optimize the number of necessary multiplications for Jacobian computation by leveraging deep reinforcement learning (RL) and a concept called cross-country elimination while still computing the exact Jacobian. Cross-country elimination is a framework for automatic differentiation that phrases Jacobian accumulation as ordered elimination of all vertices on the computational graph where every elimination incurs a certain computational cost. We formulate the search for the optimal elimination order that minimizes the number of necessary multiplications as a single player game which is played by an RL agent. We demonstrate that this method achieves up to 33% improvements over state-of-the-art methods on several relevant tasks taken from diverse domains. Furthermore, we show that these theoretical gains translate into actual runtime improvements by providing a cross-country elimination interpreter in JAX that can efficiently execute the obtained elimination orders.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 13 of its 49 references that are in the map. First posted on arXiv 7 Jun 2024.
Builds on
13 of 49 references.
References · 13
- 2017Attention Is All You Needcited by 59,932
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2019Mastering Atari, Go, Chess and Shogi by Planning with a Learned Modelcited by 1,327
- 2015Automatic differentiation in machine learning: a surveycited by 846
- 2014Deep Learning in Neural Networks: An Overviewcited by 765
- 2017Deep Reinforcement Learning that Matterscited by 727
- 2017Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithmcited by 723
- 2021Equinox: neural networks in JAX via callable PyTrees and filtered transformationscited by 143
- 2020Differentiable Rendering: A Surveycited by 123
- 2020Transferable Graph Optimizers for ML Compilerscited by 29
- 2020Instead of Rewriting Foreign Code for Machine Learning, Automatically Synthesize Fast Gradientscited by 26
1 more
Built on by
Citing papers per year: 2025: 2.
2 papers.