arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1706.07145cs.CVcs.LG
收藏

平衡Quantization:一种有效的量化神经网络方法

Balanced Quantization: An Effective and Efficient Approach to Quantized Neural Networks

University of Chinese Academy of Sciences(中国科学院大学);Megvii Inc.(旷视科技有限公司)

Shuchang Zhou, Yuzhi Wang, He Wen, Qinyao He, Yuheng Zou

摘要:

量化神经网络(QNN),它使用低位宽的数字来表示参数和执行计算,已经被提出来减少计算复杂度,存储大小和内存使用。在QNN中,参数和激活被均匀量化,使得乘法和加法可以通过逐位操作来加速。然而,神经网络中的参数分布往往是不平衡的,使得根据极值确定的均匀量化可能会不充分利用可用的位宽。在本文中,我们提出了一种新的量化方法,可以确保量化值的分布的平衡。我们的方法首先递归地分区的参数的平衡箱,然后应用均匀量化。我们还介绍了计算上更便宜的近似的计算开销,以减少引入。总的来说,我们的方法提高了QNN的预测精度,而不会在推理过程中引入额外的计算,对训练速度的影响可以忽略不计,并且适用于卷积神经网络和递归神经网络。在ImageNet和Penn Treebank等标准数据集上的实验验证了该方法的有效性。在ImageNet上,我们的4位量化GoogLeNet模型的前5名出错率为12.7\%,优于最先进的QNN。

英文摘要:

Quantized Neural Networks (QNNs), which use low bitwidth numbers for representing parameters and performing computations, have been proposed to reduce the computation complexity, storage size and memory usage. In QNNs, parameters and activations are uniformly quantized, such that the multiplications and additions can be accelerated by bitwise operations. However, distributions of parameters in Neural Networks are often imbalanced, such that the uniform quantization determined from extremal values may under utilize available bitwidth. In this paper, we propose a novel quantization method that can ensure the balance of distributions of quantized values. Our method first recursively partitions the parameters by percentiles into balanced bins, and then applies uniform quantization. We also introduce computationally cheaper approximations of percentiles to reduce the computation overhead introduced. Overall, our method improves the prediction accuracies of QNNs without introducing extra computation during inference, has negligible impact on training speed, and is applicable to both Convolutional Neural Networks and Recurrent Neural Networks. Experiments on standard datasets including ImageNet and Penn Treebank confirm the effectiveness of our method. On ImageNet, the top-5 error rate of our 4-bit quantized GoogLeNet model is 12.7\%, which is superior to the state-of-the-arts of QNNs.

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

↑