On Correctness of Automatic Differentiation for Non-Differentiable Functions
Wonyeol Lee, Hangyeol Yu, Xavier Rival, Hongseok Yang
摘要
Differentiation lies at the core of many machine-learning algorithms, and is well-supported by popular autodiff systems, such as TensorFlow and PyTorch. Originally, these systems have been developed to compute derivatives of differentiable functions, but in practice, they are commonly applied to functions with non-differentiabilities. For instance, neural networks using ReLU define non-differentiable functions in general, but the gradients of losses involving those functions are computed using autodiff systems in practice. This status quo raises a natural question: are autodiff systems correct in any formal sense when they are applied to such non-differentiable functions? In this paper, we provide a positive answer to this question. Using counterexamples, we first point out flaws in often-used informal arguments, such as: non-differentiabilities arising in deep learning do not cause any issues because they form a measure-zero set. We then investigate a class of functions, called PAP functions, that includes nearly all (possibly non-differentiable) functions in deep learning nowadays. For these PAP functions, we propose a new type of derivatives, called intensional derivatives, and prove that these derivatives always exist and coincide with standard derivatives for almost all inputs. We also show that these intensional derivatives are what most autodiff systems compute or try to compute essentially. In this way, we formally establish the correctness of autodiff systems applied to non-differentiable functions.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper14
- Nonsmooth Implicit Differentiation for Machine-Learning and OptimizationJérôme Bolte, Tam Le, Edouard Pauwels, Antonio Silveti-FallsNeurIPS 2021 · 被引用 85 次
- A mathematical model for automatic differentiation in machine learningJérôme Bolte, Edouard PauwelsNeurIPS 2020 · 被引用 84 次
- Automatic differentiation in PCFDamiano Mazza, Michele PaganiPOPL 2021 · 被引用 47 次
- A Simple and Efficient Tensor CalculusSören Laue, Matthias Mitterreiter, Joachim GiesenAAAI 2020 · 被引用 40 次
- Automatic differentiation of nonsmooth iterative algorithmsJérôme Bolte, Edouard Pauwels, Samuel VaiterNeurIPS 2022 · 被引用 33 次
它引用的顶会 Paper2
相关 Paper
- What does automatic differentiation compute for neural networks?Sejun Park, Sanghyuk Chun, Wonyeol LeeICLR 2024
- On the Correctness of Automatic Differentiation for Neural Networks with Machine-Representable ParametersWonyeol Lee, Sejun Park, Alex AikenICML 2023 · 被引用 6 次
- Floating-Point Networks with Automatic Differentiation Can Represent Almost All Floating-Point Functions and Their GradientsSejun Park, Yeachan Park, Geonho HwangICML 2026
- ωPAP Spaces: Reasoning Denotationally About Higher-Order, Recursive Probabilistic and Differentiable ProgramsMathieu Huot, Alexander K. Lew, Vikash K. Mansinghka, Sam StatonLICS 2023 · 被引用 5 次
- 𝜆ₛ: computable semantics for differentiable programming with higher-order functions and datatypesBenjamin Sherman, Jesse Michel, Michael CarbinPOPL 2021 · 被引用 11 次
