paper-with-me

홈 › Papers

On Correctness of Automatic Differentiation for Non-Differentiable Functions

2020-06-12 · NeurIPS 2020 12 · 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.

📄 PDF Abstract BibTeX arXiv:2006.06903

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

ReLU How Do I Communicate to Expedia? How Do I Communicate to Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Live Support & Special Travel…

Similar Papers 제목 키워드 기반

On the Correctness of Automatic Differentiation for Neural Networks with Machine-Representable Parameters

2023-01-31 · Wonyeol Lee, Sejun Park, Alex Aiken

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 num…

$ω$PAP Spaces: Reasoning Denotationally About Higher-Order, Recursive Probabilistic and Differentiable Programs

2023-02-21 · Mathieu Huot, Alexander K. Lew, Vikash K. Mansinghka, Sam Staton

We introduce a new setting, the category of $\omega$PAP spaces, for reasoning denotationally about expressive differentiable and probabilistic programming languages. Our semantics is general enough to assign meanings to …

Probabilistic Programming

DQC: a Python program package for Differentiable Quantum Chemistry

2021-10-22 · Muhammad F. Kasim, Susi Lehtola, Sam M. Vinko

Automatic differentiation represents a paradigm shift in scientific programming, where evaluating both functions and their derivatives is required for most applications. By removing the need to explicitly derive expressi…

Differentiable Quantum Programming with Unbounded Loops

2022-11-08 · Wang Fang, Mingsheng Ying, Xiaodi Wu

The emergence of variational quantum applications has led to the development of automatic differentiation techniques in quantum computing. Recently, Zhu et al. (PLDI 2020) have formulated differentiable quantum programmi…

Probabilistic Programming

Conservative set valued fields, automatic differentiation, stochastic gradient method and deep learning

2019-09-23 · Jérôme Bolte, Edouard Pauwels

Modern problems in AI or in numerical analysis require nonsmooth approaches with a flexible calculus. We introduce generalized derivatives called conservative fields for which we develop a calculus and provide representa…