[论文解读] Diverse Sample Generation: Pushing the Limit of Generative Data-free Quantization
本文提出了一种新颖的多样化样本生成(DSG)方案,旨在通过增强合成数据的多样性,缓解严格批量归一化(BN)统计对齐导致的同质化问题,从而提升生成式数据免费量化性能。DSG在多种网络结构和位宽设置下均表现优异,尤其在超低比特设置中效果显著,实现了最先进性能,包括在MobileNetV2的W3A3设置下相较ZeroQ实现34.33%的准确率提升。
Generative data-free quantization emerges as a practical compression approach that quantizes deep neural networks to low bit-width without accessing the real data. This approach generates data utilizing batch normalization (BN) statistics of the full-precision networks to quantize the networks. However, it always faces the serious challenges of accuracy degradation in practice. We first give a theoretical analysis that the diversity of synthetic samples is crucial for the data-free quantization, while in existing approaches, the synthetic data completely constrained by BN statistics experimentally exhibit severe homogenization at distribution and sample levels. This paper presents a generic Diverse Sample Generation (DSG) scheme for the generative data-free quantization, to mitigate detrimental homogenization. We first slack the statistics alignment for features in the BN layer to relax the distribution constraint. Then, we strengthen the loss impact of the specific BN layers for different samples and inhibit the correlation among samples in the generation process, to diversify samples from the statistical and spatial perspectives, respectively. Comprehensive experiments show that for large-scale image classification tasks, our DSG can consistently quantization performance on different neural architectures, especially under ultra-low bit-width. And data diversification caused by our DSG brings a general gain to various quantization-aware training and post-training quantization approaches, demonstrating its generality and effectiveness.
研究动机与目标
- 解决生成式数据免费量化中因合成数据同质化而导致的模型准确率下降这一关键问题。
- 从理论上和实证上证明,在不访问真实数据的前提下,样本多样性对有效量化至关重要。
- 提出一种通用的DSG框架,以在保持BN统计对齐的同时提升合成数据生成的多样性。
- 在多种网络架构和位宽设置下实现一致的性能提升,尤其在超低比特设置中表现优异。
- 确保与现有数据免费量化方法的兼容性与协同效应,涵盖后训练和量化感知训练两种方法。
提出的方法
- 放松特征图中BN统计的严格对齐,以减少分布过拟合,提升输入空间的多样性。
- 引入样本特定的损失加权机制,增强单个样本在生成过程中的影响,提升空间多样性。
- 应用相关性降低机制,最小化样本间的相似性,进一步促进生成数据分布的多样性。
- 通过作为即插即用模块的方式,与现有数据免费量化流程保持兼容。
- 结合标签先验和图像先验等额外数据生成技术,进一步提升性能。
- 通过基于BN统计和多样性促进目标的迭代优化,改进合成数据生成过程。
实验结果
研究问题
- RQ1为何现有生成式数据免费量化方法因合成数据同质化而出现性能下降?
- RQ2在无法访问真实数据的前提下,如何在理论上和实践中增强数据免费量化中的合成数据多样性?
- RQ3提升数据多样性在不同网络架构和位宽设置下对量化准确率的改善程度如何?
- RQ4所提出的DSG方案是否可普遍适用于后训练和量化感知训练两种设置?
- RQ5在超低比特位宽约束下,DSG相较于最先进数据免费量化方法表现如何?
主要发现
- DSG显著降低了在分布层面和样本层面的合成数据同质化现象,该结论得到激活分布和PCA可视化结果的验证。
- 在ImageNet数据集上,对于ResNet18模型,DSG在W4A4设置下相较ZeroQ将Top-1准确率提升6.46%,展现出在超低比特设置下的显著优势。
- 在MobileNetV2的W3A3设置下,DSG相较ZeroQ实现34.33%的准确率提升,凸显其在极端低比特场景下的有效性。
- 当结合标签先验和图像先验时,DSG在ResNet18的W5A32设置下达到69.16%的Top-1准确率,接近真实数据下的性能(69.21%)。
- DSG在多种量化方法(包括AdaRound)中均实现性能提升,证明其具备良好的泛化能力与兼容性。
- 即使在权重量化和激活量化均为8-bit的设置下,DSG仍保持强劲性能,在ResNet18上相较ZeroQ提升6.06%的准确率。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。