arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2303.11906cs.CV
收藏

从理论视角解决后训练量化中的振荡问题

Solving Oscillation Problem in Post-Training Quantization Through a Theoretical Perspective

Xiamen University(厦门大学);ByteDance Inc.(字节跳动公司);Peng Cheng Laboratory(鹏城实验室);Shenzhen Research Institute of Xiamen University(厦门大学深圳研究院)

Yuexiao Ma, Huixia Li, Xiawu Zheng, Xuefeng Xiao, Rui Wang, Shilei Wen, Xin Pan, Fei Chao, Rongrong Ji

AI总结:

本文从理论视角证明后训练量化(PTQ)中的振荡问题源于模块容量差异,通过定义模块容量并联合优化差值最大的模块,有效减少了量化性能下降,在多种网络和PTQ方法上表现优异。

摘要:

后训练量化(PTQ)因其数据隐私和低计算成本,在实践中被广泛认为是最有效的压缩方法之一。我们认为,PTQ方法中存在一个被忽视的振荡问题。在本文中,我们率先探索并提出了理论证明来解释为何该问题在PTQ中至关重要。随后,我们通过在理论上引入一个有原则且通用的框架来尝试解决此问题。具体而言,我们首先对PTQ中的振荡进行形式化定义,并证明该问题是由模块容量的差异引起的。为此,我们在数据依赖和无数据场景下定义了模块容量,其中相邻模块之间的差值用于衡量振荡程度。然后,通过选择前k个差值来解决该问题,其中对应的模块被联合优化和量化。大量实验表明,我们的方法成功减少了性能下降,并泛化到不同的神经网络和PTQ方法。例如,在2/4位ResNet-50量化中,我们的方法比之前最先进的方法高出1.9%。在小模型量化上效果更显著,例如在MobileNetV2*0.5上比BRECQ方法高出6.61%。

英文摘要:

Post-training quantization (PTQ) is widely regarded as one of the most efficient compression methods practically, benefitting from its data privacy and low computation costs. We argue that an overlooked problem of oscillation is in the PTQ methods. In this paper, we take the initiative to explore and present a theoretical proof to explain why such a problem is essential in PTQ. And then, we try to solve this problem by introducing a principled and generalized framework theoretically. In particular, we first formulate the oscillation in PTQ and prove the problem is caused by the difference in module capacity. To this end, we define the module capacity (ModCap) under data-dependent and data-free scenarios, where the differentials between adjacent modules are used to measure the degree of oscillation. The problem is then solved by selecting top-k differentials, in which the corresponding modules are jointly optimized and quantized. Extensive experiments demonstrate that our method successfully reduces the performance drop and is generalized to different neural networks and PTQ methods. For example, with 2/4 bit ResNet-50 quantization, our method surpasses the previous state-of-the-art method by 1.9%. It becomes more significant on small model quantization, e.g. surpasses BRECQ method by 6.61% on MobileNetV2*0.5.

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

↑