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

01/31/2023
by   Wonyeol Lee, et al.
0

Recent work has shown that automatic differentiation 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 automatic differentiation when the parameter space of a neural network consists solely of machine-representable numbers. For a neural network with bias parameters, we prove that automatic differentiation is correct at all parameters where the network is differentiable. In contrast, it is incorrect at all parameters where the network is non-differentiable, since it never informs non-differentiability. To better understand this non-differentiable set of parameters, we prove a tight bound on its size, which is linear in the number of non-differentiabilities in activation functions, and provide a simple necessary and sufficient condition for a parameter to be in this set. We further prove that automatic differentiation always computes a Clarke subderivative, even on the non-differentiable set. We also extend these results to neural networks possibly without bias parameters.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/12/2020

On Correctness of Automatic Differentiation for Non-Differentiable Functions

Differentiation lies at the core of many machine-learning algorithms, an...
research
07/16/2019

RayTracer.jl: A Differentiable Renderer that supports Parameter Optimization for Scene Reconstruction

In this paper, we present RayTracer.jl, a renderer in Julia that is full...
research
12/20/2018

Calibrating Lévy Process from Observations Based on Neural Networks and Automatic Differentiation with Convergence Proofs

The Lévy process has been widely applied to mathematical finance, quantu...
research
11/06/2020

Automatic Differentiation in PCF

We study the correctness of automatic differentiation (AD) in the contex...
research
10/16/2022

Logical Relations for Partial Features and Automatic Differentiation Correctness

We present a simple technique for semantic, open logical relations argum...
research
01/14/2019

Remarks on stochastic automatic adjoint differentiation and financial models calibration

In this work, we discuss the Automatic Adjoint Differentiation (AAD) for...
research
01/11/2018

Review of theory and implementation of hyper-dual numbers for first and second order automatic differentiation

In this review we present hyper-dual numbers as a tool for the automatic...

Please sign up or login with your details

Forgot password? Click here to reset