On the Correctness of Automatic Differentiation for Neural Networks with Machine-Representable Parameters
Not on the map. Why?
Abstract (arXiv)
Recent work has shown that forward- and reverse- mode automatic differentiation (AD) over the reals is almost always correct in a mathematically precise sense. However, actual programs work with machine-representable numbers (e.g., floating-point numbers), not reals. In this paper, we study the correctness of AD when the parameter space of a neural network consists solely of machine-representable numbers. In particular, we analyze two sets of parameters on which AD can be incorrect: the incorrect set on which the network is differentiable but AD does not compute its derivative, and the non-differentiable set on which the network is non-differentiable. For a neural network with bias parameters, we first prove that the incorrect set is always empty. We then prove a tight bound on the size of the non-differentiable set, which is linear in the number of non-differentiabilities in activation functions, and give a simple necessary and sufficient condition for a parameter to be in this set. We further prove that AD always computes a Clarke subderivative even on the non-differentiable set. We also extend these results to neural networks possibly without bias parameters.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 27 of its 61 references that are in the map. First posted on arXiv 31 Jan 2023.
Builds on
27 of 61 references.
References · 27
- 2018Neural Tangent Kernel: Convergence and Generalization in Neural Networkscited by 2,621
- 2015Automatic differentiation in machine learning: a surveycited by 855
- 2014Deep Learning in Neural Networks: An Overviewcited by 770
- 2017The Expressive Power of Neural Networks: A View from the Widthcited by 320
- 2014Caffe: Convolutional Architecture for Fast Feature Embeddingcited by 288
- 2019Universal Approximation with Deep Narrow Networkscited by 200
- 2018Stochastic subgradient method converges on tame functionscited by 124
- 2020Minimum Width for Universal Approximationcited by 94
- 2019Conservative set valued fields, automatic differentiation, stochastic gradient method and deep learningcited by 72
- 2020A mathematical model for automatic differentiation in machine learningcited by 45
- 2018The simple essence of automatic differentiationcited by 23
- 2019Chainer: A Deep Learning Framework for Accelerating the Research Cyclecited by 22
15 more
- 2020On Correctness of Automatic Differentiation for Non-Differentiable Functionscited by 20
- 2020Correctness of Automatic Differentiation via Diffeologies and Categorical Gluingcited by 12
- 2019A Simple Differentiable Programming Languagecited by 11
- 2022You Only Linearize Once: Tangents Transpose to Gradientscited by 10
- 2017The Multilinear Structure of ReLU Networkscited by 9
- 2018Provably Correct Automatic Subdifferentiation for Qualified Programscited by 8
- 2020On the Versatility of Open Logical Relations: Continuity, Automatic Differentiation, and a Containment Theoremcited by 5
- 2019Backpropagation in the Simply Typed Lambda-calculus with Linear Negationcited by 4
- 2020Automatic Differentiation in PCFcited by 4
- 2022On the complexity of nonsmooth automatic differentiationcited by 4
- 2016DiffSharp: An AD Library for .NET Languagescited by 3
- 2020Reverse AD at Higher Types: Pure, Principled and Denotationally Correctcited by 3
- 2018Tangent: Automatic differentiation using source-code transformation for dynamically typed array programmingcited by 2
- 2022Parallel Dual-Numbers Reverse ADcited by 2
- 2021Towards Denotational Semantics of AD for Higher-Order, Recursive, Probabilistic Languagescited by 1
Built on by
Citing papers per year: 2023: 1; 2024: 1; 2025: 0; 2026: 1.
3 papers.