Moonwalk: Inverse-Forward Differentiation
Not on the map. Why?
Abstract (arXiv)
Backpropagation's main limitation is its need to store intermediate activations (residuals) during the forward pass, which restricts the depth of trainable networks. This raises a fundamental question: can we avoid storing these activations? We address this by revisiting the structure of gradient computation. Backpropagation computes gradients through a sequence of vector-Jacobian products, an operation that is generally irreversible. The lost information lies in the cokernel of each layer's Jacobian. We define submersive networks -- networks whose layer Jacobians have trivial cokernels -- in which gradients can be reconstructed exactly in a forward sweep without storing activations. For non-submersive layers, we introduce fragmental gradient checkpointing, which records only the minimal subset of residuals necessary to restore the cotangents erased by the Jacobian. Central to our approach is a novel operator, the vector-inverse-Jacobian product (vijp), which inverts gradient flow outside the cokernel. Our mixed-mode algorithm first computes input gradients with a memory-efficient reverse pass, then reconstructs parameter gradients in a forward sweep using the vijp, eliminating the need to store activations. We implement this method in Moonwalk and show that it matches backpropagation's runtime while training networks more than twice as deep under the same memory budget.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 22 of its 60 references that are in the map. First posted on arXiv 22 Feb 2024.
Builds on
22 of 60 references.
References · 22
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 6,979
- 2015Variational Inference with Normalizing Flowscited by 2,161
- 2018Glow: Generative Flow with Invertible 1x1 Convolutionscited by 1,539
- 2014NICE: Non-linear Independent Components Estimationcited by 1,052
- 2016Training Deep Nets with Sublinear Memory Costcited by 825
- 2019Deep Equilibrium Modelscited by 603
- 2018Invertible Residual Networkscited by 364
- 2022Reducing Activation Recomputation in Large Transformer Modelscited by 300
- 2017The Reversible Residual Network: Backpropagation Without Storing Activationscited by 215
- 2018i-RevNet: Deep Invertible Networkscited by 137
10 more
- 2016Decoupled Neural Interfaces using Synthetic Gradientscited by 135
- 2019Checkmate: Breaking the Memory Wall with Optimal Tensor Rematerializationcited by 90
- 2017In-Place Activated BatchNorm for Memory-Optimized Training of DNNscited by 81
- 2016Memory-Efficient Backpropagation Through Timecited by 78
- 2022Scaling Forward Gradient With Local Lossescited by 65
- 2023Reversible Vision Transformerscited by 33
- 2018Reversible Recurrent Neural Networkscited by 22
- 2019Backprop with Approximate Activations for Memory-efficient Network Trainingcited by 19
- 2022Few-Bit Backward: Quantized Gradients of Activation Functions for Memory Footprint Reductioncited by 14
- 2023Rockmate: an Efficient, Fast, Automatic and Generic Tool for Re-materialization in PyTorchcited by 4
Built on by
Citing papers per year: 2024: 1.
1 paper.