Quantization has emerged as a promising direction for model compression. Recently, data-free quantization has been widely studied as a promising method to avoid privacy concerns, which synthesizes images as an alternative to real training data. Existing methods use classification loss to ensure the reliability of the synthesized images. Unfortunately, even if these images are well-classified by the pre-trained model, they still suffer from low semantics and homogenization issues. Intuitively, these low-semantic images are sensitive to perturbations, and the pre-trained model tends to have inconsistent output when the generator synthesizes an image with poor semantics. To this end, we propose Robustness-Guided Image Synthesis (RIS), a simple but effective method to enrich the semantics of synthetic images and improve image diversity, further boosting the performance of downstream data-free compression tasks. Concretely, we first introduce perturbations on input and model weight, then define the inconsistency metrics at feature and prediction levels before and after perturbations. On the basis of inconsistency on two levels, we design a robustness optimization objective to enhance the semantics of synthetic images. Moreover, we also make our approach diversity-aware by forcing the generator to synthesize images with small correlations in the label space. With RIS, we achieve state-of-the-art performance for various settings on data-free quantization and can be extended to other data-free compression tasks.
翻译:量化已成为模型压缩的重要方向。近年来,无数据量化作为避免隐私问题的有效方法被广泛研究,它通过合成图像替代真实训练数据。现有方法采用分类损失确保合成图像的可靠性,但即便这些图像能被预训练模型正确分类,仍存在语义层次低、同质化问题。直观而言,语义贫乏的图像对扰动敏感,当生成器合成低语义图像时,预训练模型的输出往往不一致。为此,我们提出鲁棒性引导图像合成方法(Robustness-Guided Image Synthesis, RIS),该简单而有效的方法能丰富合成图像语义并提升多样性,从而进一步促进下游无数据压缩任务的性能。具体而言,我们首先对输入和模型权重引入扰动,定义扰动前后特征层与预测层的不一致性指标。基于双层次不一致性,我们设计了鲁棒性优化目标以增强合成图像语义。此外,通过强制生成器在标签空间中合成相关性较低的图像,使方法具备多样性感知能力。采用RIS方法,我们在无数据量化的多种设置下取得最先进性能,并可扩展至其他无数据压缩任务。