arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.11323cs.LGcs.CV
收藏

用STE变量训练量化神经网络:加性噪声退火算法

Training Quantised Neural Networks with STE Variants: the Additive Noise Annealing Algorithm

ETH Zürich(苏黎世联邦理工学院);Università di Trento(特伦托大学);Università di Bologna(博洛尼亚大学)

Matteo Spallanzani, Gian Paolo Leonardi, Luca Benini

摘要:

训练量化神经网络(QNN)是一个不可微的优化问题,因为权值和特征由分段常数函数输出。标准的解决方案是应用直通估计器(STE),在推理和梯度计算步骤中使用不同的函数。在文献中已经提出了几种STE变体,旨在最大限度地提高训练网络的任务精度。在本文中,我们分析了STE变体,并研究了它们对QNN训练的影响。我们首先观察到,大多数这样的变体可以建模为阶梯函数的随机调节,虽然这种直观的解释并不新鲜,我们严格的讨论推广到进一步的变体。然后,我们分析QNN混合不同的调节,发现一些适当的同步平滑的每一层地图是必要的,以保证逐点合成收敛到目标不连续函数。基于这些理论见解,我们提出了加性噪声退火(ANA),一种新的算法,训练QNN包括标准STE及其变种作为特殊情况。在CIFAR-10图像分类基准上测试ANA时,我们发现对任务准确性的主要影响不是由于规则的定性形状,而是根据理论结果,网络中使用的不同STE变体的适当同步。

英文摘要:

Training quantised neural networks (QNNs) is a non-differentiable optimisation problem since weights and features are output by piecewise constant functions. The standard solution is to apply the straight-through estimator (STE), using different functions during the inference and gradient computation steps. Several STE variants have been proposed in the literature aiming to maximise the task accuracy of the trained network. In this paper, we analyse STE variants and study their impact on QNN training. We first observe that most such variants can be modelled as stochastic regularisations of stair functions; although this intuitive interpretation is not new, our rigorous discussion generalises to further variants. Then, we analyse QNNs mixing different regularisations, finding that some suitably synchronised smoothing of each layer map is required to guarantee pointwise compositional convergence to the target discontinuous function. Based on these theoretical insights, we propose additive noise annealing (ANA), a new algorithm to train QNNs encompassing standard STE and its variants as special cases. When testing ANA on the CIFAR-10 image classification benchmark, we find that the major impact on task accuracy is not due to the qualitative shape of the regularisations but to the proper synchronisation of the different STE variants used in a network, in accordance with the theoretical results.

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

↑