Skip to main content
QUICK REVIEW

[论文解读] Simultaneously Optimizing Weight and Quantizer of Ternary Neural Network using Truncated Gaussian Approximation

Zhezhi He, Deliang Fan|arXiv (Cornell University)|Oct 2, 2018
Advanced Neural Network Applications参考文献 20被引用 8
一句话总结

本文提出了一种新型的三值神经网络(TNN)训练方法,通过使用闭式截断高斯近似联合优化网络权重和量化器阈值,实现端到端的反向传播。该方法在使用ResNet-50时仅造成2.16%的top-1准确率下降,在ImageNet上实现了最先进(SOTA)的性能,显著优于以往采用固定阈值的TNN方法。

ABSTRACT

In the past years, Deep convolution neural network has achieved great success in many artificial intelligence applications. However, its enormous model size and massive computation cost have become the main obstacle for deployment of such powerful algorithm in the low power and resource-limited mobile systems. As the countermeasure to this problem, deep neural networks with ternarized weights (i.e. -1, 0, +1) have been widely explored to greatly reduce the model size and computational cost, with limited accuracy degradation. In this work, we propose a novel ternarized neural network training method which simultaneously optimizes both weights and quantizer during training, differentiating from prior works. Instead of fixed and uniform weight ternarization, we are the first to incorporate the thresholds of weight ternarization into a closed-form representation using the truncated Gaussian approximation, enabling simultaneous optimization of weights and quantizer through back-propagation training. With both of the first and last layer ternarized, the experiments on the ImageNet classification task show that our ternarized ResNet-18/34/50 only has 3.9/2.52/2.16% accuracy degradation in comparison to the full-precision counterparts.

研究动机与目标

  • 解决因固定且未优化的量化器导致的低比特量化神经网络中的准确率下降与收敛缓慢问题。
  • 通过可微分的三值化函数近似,实现网络权重与量化阈值的端到端可微训练。
  • 通过在直通估计器中引入梯度正确性优化,提升训练稳定性和收敛速度。
  • 在ImageNet等大规模数据集上,实现全层三值化下的三值神经网络最先进性能。

提出的方法

  • 提出一种基于截断高斯近似的闭式表达式来确定三值化阈值,使阈值可微分并可通过反向传播进行训练。
  • 将层内量化器阈值视为网络中的可学习参数,实现与网络权重及缩放因子的联合优化。
  • 在直通估计器中提出一种梯度正确性方法,以校正因层内缩放因子导致的梯度缩放问题。
  • 将该方法应用于全精度预训练的ResNet架构,在训练过程中对第一层和最后一层进行三值化,而中间层保持全精度。
  • 对权重和阈值采用自适应学习率调度以及SGD/Adam优化器,阈值初始化为每层最大绝对权重的10%。

实验结果

研究问题

  • RQ1在训练过程中联合优化量化器阈值与网络权重是否能提升三值神经网络的准确率?
  • RQ2对三值化函数的闭式可微分近似是否能有效支持通过量化器的反向传播?
  • RQ3在直通估计器中引入梯度正确性如何影响收敛速度与最终准确率?
  • RQ4在所提出的方法中,阈值初始化对训练性能有何影响?

主要发现

  • 在使用全三值化的ResNet-18上,该方法在ImageNet上实现了66.01%的top-1准确率,仅比全精度基线模型低3.9%。
  • 对于ResNet-34,该方法实现了70.79%的top-1准确率,相比全精度模型仅下降2.52%。
  • 在ResNet-50上,该方法实现了73.97%的top-1准确率,与全精度模型相比仅下降2.16%。
  • 该方法优于以往最先进的三值化技术(如APPRENTICE和TTN),尤其在全三值化设置下表现更优。
  • 当在直通估计器中应用梯度正确性时,训练收敛速度显著加快且更加稳定。
  • 阈值初始化对性能影响极小,因为完全可训练的阈值在训练初期即可快速适应。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。