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

ACQ:通过注意力校正改进生成式无数据量化

ACQ: Improving Generative Data-free Quantization Via Attention Correction

Institute of Semiconductors, Chinese Academy of Sciences(中国科学院半导体研究所);University of Chinese Academy of Sciences(中国科学院大学);Materials and Optoelectronics Research Center, University of Chinese Academy of Sciences(中国科学院大学材料与光电研究中心);College of Microelectronics, University of Chinese Academy of Sciences(中国科学院大学微电子学院)

Jixing Li, Xiaozhou Guo, Benzhe Dai, Guoliang Gong, Min Jin, Gang Chen, Wenyu Mao, Huaxiang Lu

AI总结:

本文提出ACQ方法,通过注意力中心位置条件生成器和一致性惩罚修复合成样本的注意力同质化与模式差异问题,在多种设置下实现最佳无数据量化性能。

摘要:

无数据量化旨在不访问任何真实样本的情况下实现模型量化。这在涉及数据隐私的应用导向场景中具有重要意义。通过生成器将噪声向量转换为合成样本是一种流行的无数据量化方法,被称为生成式无数据量化。然而,合成样本与真实样本在注意力上存在差异。这一点总是被忽视,并限制了量化性能。首先,由于同一类别的合成样本倾向于具有同质化的注意力,量化网络只能学习有限的注意力模式。其次,合成样本在评估模式和训练模式下表现出不同的注意力。因此,batch-normalization 统计匹配往往不准确。本文提出 ACQ 来修复合成样本的注意力。针对类内注意力同质化问题,建立了一个注意力中心位置条件生成器。在注意力中心匹配损失的约束下,将注意力中心作为生成器的条件输入,引导合成样本获得多样化的注意力。此外,我们设计了相同条件下成对合成样本的对抗损失,以防止生成器过度关注条件,这可能导致模式崩溃。为了提高合成样本在不同网络模式下的注意力相似性,我们引入一致性惩罚以保证准确的 BN 统计匹配。实验结果表明,ACQ 有效改善了合成样本的注意力问题。在各种训练设置下,ACQ 实现了最佳量化性能。对于 Resnet18 和 Resnet50 的 4-bit 量化,ACQ 分别达到 67.55% 和 72.23% 的准确率。

英文摘要:

Data-free quantization aims to achieve model quantization without accessing any authentic sample. It is significant in an application-oriented context involving data privacy. Converting noise vectors into synthetic samples through a generator is a popular data-free quantization method, which is called generative data-free quantization. However, there is a difference in attention between synthetic samples and authentic samples. This is always ignored and restricts the quantization performance. First, since synthetic samples of the same class are prone to have homogenous attention, the quantized network can only learn limited modes of attention. Second, synthetic samples in eval mode and training mode exhibit different attention. Hence, the batch-normalization statistics matching tends to be inaccurate. ACQ is proposed in this paper to fix the attention of synthetic samples. An attention center position-condition generator is established regarding the homogenization of intra-class attention. Restricted by the attention center matching loss, the attention center position is treated as the generator's condition input to guide synthetic samples in obtaining diverse attention. Moreover, we design adversarial loss of paired synthetic samples under the same condition to prevent the generator from paying overmuch attention to the condition, which may result in mode collapse. To improve the attention similarity of synthetic samples in different network modes, we introduce a consistency penalty to guarantee accurate BN statistics matching. The experimental results demonstrate that ACQ effectively improves the attention problems of synthetic samples. Under various training settings, ACQ achieves the best quantization performance. For the 4-bit quantization of Resnet18 and Resnet50, ACQ reaches 67.55% and 72.23% accuracy, respectively.

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

↑