arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.02736cs.LGcs.NAmath.NAmath.OCstat.ML
收藏

非光滑自动微分的数值可靠性研究:以MaxPool为例

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

Toulouse School of Economics(图卢兹经济学院);Université de Toulouse(图卢兹大学);Thales LAS France(泰雷兹法国激光与航空系统公司)

Ryan Boustany

AI总结:

本文研究非光滑MaxPool操作下自动微分在不同精度和架构中的数值可靠性,发现低范数Jacobian有助于稳定训练,而高范数Jacobian导致性能下降,并可通过批归一化、Adam优化器或提高精度缓解。

摘要:

本文研究了涉及非光滑MaxPool操作的神经网络中自动微分(AD)的可靠性。我们考察了不同精度水平(16、32、64位)和卷积架构(LeNet、VGG和ResNet)在多种数据集(MNIST、CIFAR10、SVHN和ImageNet)上AD的行为。尽管AD可能不正确,但近期研究表明,即使在存在非光滑操作(如MaxPool和ReLU)的情况下,AD也几乎处处与导数一致。另一方面,在实践中,AD使用浮点数(而非实数)运算,因此有必要探索AD在数值上可能不正确的子集。这些子集包括分岔区(在实数上AD不正确)和补偿区(在浮点数上AD不正确但在实数上正确)。使用SGD进行训练,我们研究了MaxPool函数的不同非光滑Jacobian选择对16位和32位精度的影响。这些发现表明,具有较低范数的非光滑MaxPool Jacobian有助于维持稳定且高效的测试准确率,而具有较高范数的Jacobian可能导致不稳定和性能下降。我们还观察到,通过使用批归一化、类Adam优化器或提高精度水平,可以减小MaxPool非光滑Jacobian对学习的影响。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑