# Automatic differentiation in ML: Where we are and where we should be going

arXiv: https://arxiv.org/abs/1810.11530 · HTML: https://mlsanity.com/paper/1810.11530/

## Key facts

- Cited by 20 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 26 Oct 2018.

## Built on by (most cited first, 20 of 20)

- [MixMo: Mixing Multiple Inputs for Multiple Outputs via Deep Subnetworks](https://mlsanity.com/paper/2103.06132/) (2021)
- [Monte Carlo PINNs: deep learning approach for forward and inverse problems involving high dimensional fractional partial differential equations](https://mlsanity.com/paper/2203.08501/) (2022)
- [Physics-Informed Geometry-Aware Neural Operator](https://mlsanity.com/paper/2408.01600/) (2024)
- [On learning agent-based models from data](https://mlsanity.com/paper/2205.05052/) (2022)
- [Applications of the Free Energy Principle to Machine Learning and Neuroscience](https://mlsanity.com/paper/2107.00140/) (2021)
- [Physics-informed Neural Networks with Periodic Activation Functions for Solute Transport in Heterogeneous Porous Media](https://mlsanity.com/paper/2212.08965/) (2022)
- [Generalized Neural Closure Models with Interpretability](https://mlsanity.com/paper/2301.06198/) (2023)
- [Selected Trends in Artificial Intelligence for Space Applications](https://mlsanity.com/paper/2212.06662/) (2022)
- [Solving the Discretised Multiphase Flow Equations with Interface Capturing on Structured Grids Using Machine Learning Libraries](https://mlsanity.com/paper/2401.06755/) (2024)
- [A parameter refinement method for Ptychography based on Deep Learning concepts](https://mlsanity.com/paper/2105.08058/) (2021)
- [r-Adaptive Deep Learning Method for Solving Partial Differential Equations](https://mlsanity.com/paper/2210.10900/) (2022)
- [Machines of finite depth: towards a formalization of neural networks](https://mlsanity.com/paper/2204.12786/) (2022)
- [SelFSR: Self-Conditioned Face Super-Resolution in the Wild via Flow Field Degradation Network](https://mlsanity.com/paper/2112.10683/) (2021)
- [Forecasting the 2016-2017 Central Apennines Earthquake Sequence with a Neural Point Process](https://mlsanity.com/paper/2301.09948/) (2023)
- [Auto-Differentiation of Relational Computations for Very Large Scale Machine Learning](https://mlsanity.com/paper/2306.00088/) (2023)
- [Coarsening Optimization for Differentiable Programming](https://mlsanity.com/paper/2110.02307/) (2021)
- [A Brief Introduction to Automatic Differentiation for Machine Learning](https://mlsanity.com/paper/2110.06209/) (2021)
- [Mining Explainable Predictive Features for Water Quality Management](https://mlsanity.com/paper/2212.04419/) (2022)
- [Accurate and Fast Fischer-Tropsch Reaction Microkinetics using PINNs](https://mlsanity.com/paper/2311.10456/) (2023)
- [Transformed Physics-Informed Neural Networks for The Convection-Diffusion Equation](https://mlsanity.com/paper/2409.07671/) (2024)

## Abstract (arXiv)

We review the current state of automatic differentiation (AD) for array programming in machine learning (ML), including the different approaches such as operator overloading (OO) and source transformation (ST) used for AD, graph-based intermediate representations for programs, and source languages. Based on these insights, we introduce a new graph-based intermediate representation (IR) which specifically aims to efficiently support fully-general AD for array programming. Unlike existing dataflow programming representations in ML frameworks, our IR naturally supports function calls, higher-order functions and recursion, making ML models easier to implement. The ability to represent closures allows us to perform AD using ST without a tape, making the resulting derivative (adjoint) program amenable to ahead-of-time optimization using tools from functional language compilers, and enabling higher-order derivatives. Lastly, we introduce a proof of concept compiler toolchain called Myia which uses a subset of Python as a front end.
