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.
翻译:量化已成为模型压缩的重要方向。近来,无数据量化作为一种避免隐私问题的有效方法被广泛研究,该方法通过合成图像替代真实训练数据。现有方法利用分类损失确保合成图像的可靠性。然而,即便这些图像能被预训练模型正确分类,仍存在语义层次低及同质化问题。直观而言,低语义图像对扰动敏感,当生成器合成语义较差的图像时,预训练模型容易产生不一致的输出。为此,我们提出鲁棒性引导图像合成(RIS)——一种简单高效的方法,通过丰富合成图像语义、提升图像多样性,进而增强下游无数据压缩任务的性能。具体而言,我们首先在输入和模型权重上引入扰动,然后定义扰动前后特征层与预测层的不一致性指标。基于双层不一致性,我们设计鲁棒性优化目标以提升合成图像的语义性。此外,我们通过强制生成器合成标签空间相关性较小的图像,进一步赋予方法多样性感知能力。采用RIS方法,我们在多种无数据量化场景下取得了最先进的性能,且该方法可推广至其他无数据压缩任务。