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

一切都在老师:Zero-Shot Quantization让老师更近

It's All In the Teacher: Zero-Shot Quantization Brought Closer to the Teacher

Yonsei University(延世大学);NAVER(NAVER公司)

Kanghyun Choi, Hye Yoon Lee, Deokki Hong, Joonsang Yu, Noseong Park, Youngsok Kim, Jinho Lee

摘要:

模型量化被认为是一种很有前途的方法,可以大大降低深度神经网络的资源需求。为了解决量化误差引起的性能下降,一种流行的方法是使用训练数据来微调量化网络。然而,在现实世界的环境中,这样的方法通常是不可行的,因为训练数据由于安全、隐私或机密性问题而不可用。Zero-shot量化解决了这些问题,通常通过从全精度教师网络的权重中获取信息来补偿量化网络的性能下降。在本文中,我们首先分析了国家的最先进的zero-shot量化技术的损失面,并提供了几个发现。与通常知识蒸馏问题相比,zero-shot量化通常遭受1)一起优化多个损失项的困难,以及2)由于使用合成样本而导致的较差的泛化能力。此外,我们观察到许多权重在训练量化网络期间未能越过舍入阈值,即使为了更好的性能而必须这样做。基于这些观察,我们提出了AIT,一种简单而强大的zero-shot量化技术,它以以下方式解决了上述两个问题:AIT i)仅使用KL距离损失而没有交叉熵损失,以及ii)操纵梯度以保证在越过舍入阈值后正确更新某一部分权重。实验表明,AIT的性能优于许多现有的方法的很大幅度,接管在该领域的整体国家的最先进的位置。

英文摘要:

Model quantization is considered as a promising method to greatly reduce the resource requirements of deep neural networks. To deal with the performance drop induced by quantization errors, a popular method is to use training data to fine-tune quantized networks. In real-world environments, however, such a method is frequently infeasible because training data is unavailable due to security, privacy, or confidentiality concerns. Zero-shot quantization addresses such problems, usually by taking information from the weights of a full-precision teacher network to compensate the performance drop of the quantized networks. In this paper, we first analyze the loss surface of state-of-the-art zero-shot quantization techniques and provide several findings. In contrast to usual knowledge distillation problems, zero-shot quantization often suffers from 1) the difficulty of optimizing multiple loss terms together, and 2) the poor generalization capability due to the use of synthetic samples. Furthermore, we observe that many weights fail to cross the rounding threshold during training the quantized networks even when it is necessary to do so for better performance. Based on the observations, we propose AIT, a simple yet powerful technique for zero-shot quantization, which addresses the aforementioned two problems in the following way: AIT i) uses a KL distance loss only without a cross-entropy loss, and ii) manipulates gradients to guarantee that a certain portion of weights are properly updated after crossing the rounding thresholds. Experiments show that AIT outperforms the performance of many existing methods by a great margin, taking over the overall state-of-the-art position in the field.

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

↑