arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1808.05240cs.LGcs.CVstat.ML
收藏

全Quantization深度神经网络的混合粗梯度下降算法

Blended Coarse Gradient Descent for Full Quantization of Deep Neural Networks

University of California at Los Angeles(加利福尼亚大学洛杉矶分校);Qualcomm AI Research(高通人工智能研究院);University of California at Irvine(加利福尼亚大学欧文分校)

Penghang Yin, Shuai Zhang, Jiancheng Lyu, Stanley Osher, Yingyong Qi, Jack Xin

摘要:

量化深度神经网络(QDNN)由于其比常规全精度对应物低得多的内存存储和更快的推理速度而具有吸引力。为了保持相同的性能水平,特别是在低位宽时,QDNN必须重新训练。它们的训练涉及分段常数激活函数和离散权重,因此数学挑战出现了。我们引入粗梯度的概念,提出了混合粗梯度下降(BCGD)算法,用于训练完全量化的神经网络。粗梯度通常不是任何函数的梯度,而是人工的上升方向。BCGD的权重更新通过全精度权重的加权平均值及其量化(所谓的混合)的粗梯度校正进行,这产生了目标值的充分下降,从而加速了训练。我们的实验表明,这种简单的混合技术是非常有效的量化在极低的位宽,如二进制化。在ResNet-18的ImageNet分类任务的完全量化中,BCGD在所有层的二进制权重和4位自适应激活下给出了64.36\%的top-1准确率。如果第一层和最后一层中的权重保持全精度,则该数字增加到65.46%。作为理论证明,我们给出了高斯输入数据的两线性层神经网络模型的粗梯度下降的收敛性分析,并证明了期望的粗梯度与潜在的真实梯度正相关.

英文摘要:

Quantized deep neural networks (QDNNs) are attractive due to their much lower memory storage and faster inference speed than their regular full precision counterparts. To maintain the same performance level especially at low bit-widths, QDNNs must be retrained. Their training involves piecewise constant activation functions and discrete weights, hence mathematical challenges arise. We introduce the notion of coarse gradient and propose the blended coarse gradient descent (BCGD) algorithm, for training fully quantized neural networks. Coarse gradient is generally not a gradient of any function but an artificial ascent direction. The weight update of BCGD goes by coarse gradient correction of a weighted average of the full precision weights and their quantization (the so-called blending), which yields sufficient descent in the objective value and thus accelerates the training. Our experiments demonstrate that this simple blending technique is very effective for quantization at extremely low bit-width such as binarization. In full quantization of ResNet-18 for ImageNet classification task, BCGD gives 64.36\% top-1 accuracy with binary weights across all layers and 4-bit adaptive activation. If the weights in the first and last layers are kept in full precision, this number increases to 65.46\%. As theoretical justification, we show convergence analysis of coarse gradient descent for a two-linear-layer neural network model with Gaussian input data, and prove that the expected coarse gradient correlates positively with the underlying true gradient.

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

↑