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.
翻译:生成无数据的量化是一个实际的压缩方法,将深度神经网络量化为低位位宽,而没有实际数据。这种方法利用全精度网络的批量正常化(BN)统计数据生成数据,对网络进行量化;然而,它总是面临实际中准确度退化的严重挑战。我们首先从理论角度分析合成样本的多样性对于数据无量化至关重要,而在现有方法中,受BN统计数据完全限制的合成数据在分布和抽样层面表现出严重的均匀性。本文展示了一个通用的无基因数据量化多样性抽样生成(DSG)计划,以缓解有害的同质化。我们首先放松BN层的特征统计一致性,以缓解分布限制。然后,我们强化特定BN层对不同样本的损失影响,抑制生成过程中样本之间的相关性,分别从统计和空间角度使样本多样化。全面实验表明,对于大型图像分类任务,我们的DSG可持续地在无基因多样化数据采样生成(DSG)模型,从而通过对不同层化进行总体的量化和升级,特别通过超度培训,将数据进行总体的量化和升级,从而获得不同神经结构结构化。