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.
翻译:无数据量化的目的是在不获取任何真实样本的情况下实现模型量化,这在数据保密性的应用导向背景下意义重大。通过生成器将噪声矢量转换成合成样品是一种流行的无数据量化方法,称为基因化数据无量化。然而,合成样品和真实样品之间的注意差别总是被忽视,限制了定量性能。首先,由于同一类合成样品容易引起同质关注,量化网络只能学习有限的关注方式。第二,以电子模式和培训模式合成样品表现出不同的关注方式。因此,批装规范化统计数据往往不准确。本文中建议使用ACQ来修正合成样品的注意度。对于合成样品的同质化,C的注意中心状态是固定的。受关注中心匹配损失,关注中心的位置被视为发电机对合成样品的注意程度投入,以获得不同程度的注意方式。此外,我们设计配对合成样品的配对式样品丢失了不同的准确性能。 到了同一条件下的合成样品的配对质性能统计往往不准确性。在合成样品B中提出了类似的关注方式,从而保证了对质性化网络的注意程度。