English
Related papers

Related papers: Dual-Numbers Reverse AD, Efficiently

200 papers

Automatic differentiation (AD) is a range of algorithms to compute the numeric value of a function's (partial) derivative, where the function is typically given as a computer program or abstract syntax tree. AD has become immensely popular…

Programming Languages · Computer Science 2023-05-16 Tom Schrijvers , Birthe van den Berg , Fabrizio Riguzzi

Forward Automatic Differentiation (AD) is a technique for augmenting programs to compute derivatives. The essence of Forward AD is to attach perturbations to each number, and propagate these through the computation. When derivatives are…

Symbolic Computation · Computer Science 2019-09-23 Oleksandr Manzyuk , Barak A. Pearlmutter , Alexey Andreyevich Radul , David R. Rush , Jeffrey Mark Siskind

We study two procedures (reverse-mode and forward-mode) for computing the gradient of the validation error with respect to the hyperparameters of any iterative learning algorithm such as stochastic gradient descent. These procedures mirror…

Machine Learning · Statistics 2017-12-13 Luca Franceschi , Michele Donini , Paolo Frasconi , Massimiliano Pontil

Dual numbers are a well-established tool for computing derivatives and constitute the basis of forward-mode automatic differentiation. While the theoretical framework for computing derivatives of arbitrary order is well understood,…

Numerical Analysis · Mathematics 2026-02-06 F. Peñuñuri , K. B. Cantún-Avila , R. Peón-Escalante

We present semantic correctness proofs of forward-mode Automatic Differentiation (AD) for languages with sources of partiality such as partial operations, lazy conditionals on real parameters, iteration, and term and type recursion. We…

Programming Languages · Computer Science 2024-05-28 Matthijs Vákár

We show how to apply forward and reverse mode Combinatory Homomorphic Automatic Differentiation (CHAD) to total functional programming languages with expressive type systems featuring the combination of - tuple types; - sum types; -…

Programming Languages · Computer Science 2023-11-13 Fernando Lucatelli Nunes , Matthijs Vákár

The successes of deep learning, variational inference, and many other fields have been aided by specialized implementations of reverse-mode automatic differentiation (AD) to compute gradients of mega-dimensional objectives. The AD…

Machine Learning · Computer Science 2021-03-16 Deniz Oktay , Nick McGreivy , Joshua Aduol , Alex Beatson , Ryan P. Adams

The performance of deep neural networks is well-known to be sensitive to the setting of their hyperparameters. Recent advances in reverse-mode automatic differentiation allow for optimizing hyperparameters with gradients. The standard way…

Machine Learning · Computer Science 2016-04-07 Jie Fu , Hongyin Luo , Jiashi Feng , Kian Hsiang Low , Tat-Seng Chua

Dual-encoder-based dense retrieval models have become the standard in IR. They employ large Transformer-based language models, which are notoriously inefficient in terms of resources and latency. We propose Fast-Forward indexes -- vector…

Information Retrieval · Computer Science 2023-11-03 Jurek Leonhardt , Henrik Müller , Koustav Rudra , Megha Khosla , Abhijit Anand , Avishek Anand

Automatic differentiation (AD) aims to compute derivatives of user-defined functions, but in Turing-complete languages, this simple specification does not fully capture AD's behavior: AD sometimes disagrees with the true derivative of a…

Programming Languages · Computer Science 2021-12-07 Alexander K. Lew , Mathieu Huot , Vikash K. Mansinghka

We introduce Combinatory Homomorphic Automatic Differentiation (CHAD), a principled, pure, provably correct define-then-run method for performing forward- and reverse-mode automatic differentiation (AD) on programming languages with…

Programming Languages · Computer Science 2026-05-05 Matthijs Vákár , Tom Smeding

We present a simple technique for semantic, open logical relations arguments about languages with recursive types, which, as we show, follows from a principled foundation in categorical semantics. We demonstrate how it can be used to give a…

Programming Languages · Computer Science 2022-10-25 Fernando Lucatelli Nunes , Matthijs Vákár

We decompose reverse-mode automatic differentiation into (forward-mode) linearization followed by transposition. Doing so isolates the essential difference between forward- and reverse-mode AD, and simplifies their joint implementation. In…

Programming Languages · Computer Science 2021-05-21 Roy Frostig , Matthew J. Johnson , Dougal Maclaurin , Adam Paszke , Alexey Radul

We propose extensions to Fortran which integrate forward and reverse Automatic Differentiation (AD) directly into the programming model. Irrespective of implementation technology, embedding AD constructs directly into the language extends…

Programming Languages · Computer Science 2012-03-09 Alexey Radul , Barak A. Pearlmutter , Jeffrey Mark Siskind

We describe an implementation of the Farfel Fortran AD extensions. These extensions integrate forward and reverse AD directly into the programming model, with attendant benefits to flexibility, modularity, and ease of use. The…

Programming Languages · Computer Science 2016-02-09 Alexey Radul , Barak A. Pearlmutter , Jeffrey Mark Siskind

Automatic differentiation, also known as backpropagation, AD, autodiff, or algorithmic differentiation, is a popular technique for computing derivatives of computer programs accurately and efficiently. Sometimes, however, the derivatives…

Numerical Analysis · Mathematics 2023-05-15 Jan Hückelheim , Harshitha Menon , William Moses , Bruce Christianson , Paul Hovland , Laurent Hascoët

Reverse-mode differentiation is used for optimization, but it introduces references, which break the purity of the underlying programs, making them notoriously harder to optimize. We present a reverse-mode differentiation on a purely…

Programming Languages · Computer Science 2023-04-27 Mathieu Huot , Amir Shaikhha

There are several AD tools available, which all implement different strategies for the reverse mode of AD. The major strategies are primal value taping (implemented e.g. by ADOL-c) and Jacobi taping (implemented e.g. by adept and dco/c++).…

Mathematical Software · Computer Science 2017-09-22 Max Sagebaum , Tim Albring , Nicolas R. Gauger

Optimizing neural networks with loss that contain high-dimensional and high-order differential operators is expensive to evaluate with back-propagation due to $\mathcal{O}(d^{k})$ scaling of the derivative tensor size and the…

Machine Learning · Computer Science 2025-01-14 Zekun Shi , Zheyuan Hu , Min Lin , Kenji Kawaguchi

A large class of non-smooth practical optimization problems can be written as minimization of a sum of smooth and partly smooth functions. We examine such structured problems which also depend on a parameter vector and study the problem of…

Optimization and Control · Mathematics 2024-10-28 Sheheryar Mehmood , Peter Ochs