On the numerical reliability of nonsmooth autodiff: a MaxPool case study - ANITI - Artificial and Natural Intelligence Toulouse Institute Accéder directement au contenu
Article Dans Une Revue Transactions on Machine Learning Research Journal Année : 2024

On the numerical reliability of nonsmooth autodiff: a MaxPool case study

Résumé

This paper considers the reliability of automatic differentiation (AD) for neural networks involving the nonsmooth MaxPool operation. We investigate the behavior of AD across different precision levels (16, 32, 64 bits) and convolutional architectures (LeNet, VGG, and ResNet) on various datasets (MNIST, CIFAR10, SVHN, and ImageNet). Although AD can be incorrect, recent research has shown that it coincides with the derivative almost everywhere, even in the presence of nonsmooth operations (such as MaxPool and ReLU). On the other hand, in practice, AD operates with floating-point numbers (not real numbers), and there is, therefore, a need to explore subsets on which AD can be numerically incorrect. These subsets include a bifurcation zone (where AD is incorrect over reals) and a compensation zone (where AD is incorrect over floating-point numbers but correct over reals). Using SGD for the training process, we study the impact of different choices of the nonsmooth Jacobian for the MaxPool function on the precision of 16 and 32 bits. These findings suggest that nonsmooth MaxPool Jacobians with lower norms help maintain stable and efficient test accuracy, whereas those with higher norms can result in instability and decreased performance. We also observe that the influence of MaxPool's nonsmooth Jacobians on learning can be reduced by using batch normalization, Adam-like optimizers, or increasing the precision level.
Fichier principal
Vignette du fichier
autodiff_maxpooling/autodiff_reliability.pdf (1000.91 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-04372374 , version 1 (04-01-2024)
hal-04372374 , version 2 (24-06-2024)

Identifiants

Citer

Ryan Boustany. On the numerical reliability of nonsmooth autodiff: a MaxPool case study. Transactions on Machine Learning Research Journal, 2024, 23 p. ⟨hal-04372374v2⟩
49 Consultations
18 Téléchargements

Altmetric

Partager

Gmail Mastodon Facebook X LinkedIn More