arXiv:2502.18176cs.CVcs.AI2025-02ICLR被引 14

用CLIP的多模态隐空间净化对抗样本,提升零样本分类鲁棒性。

CLIPure: Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification

  • 在CLIP隐空间中通过扩散模型或余弦相似度实现对抗样本净化
  • 在CIFAR-10上将鲁棒性从71.7%提升至91.1%,ImageNet从59.6%到72.6%
  • 首个非生成式净化方法,效率显著高于现有技术

本文旨在构建一个对抗鲁棒的零样本图像分类器。基于视觉语言预训练模型CLIP,其可通过文本提示“a photo of a <class-name>”实现零样本分类。我们选择净化路径,因其无需针对特定攻击进行对抗训练,可应对各类已知攻击。通过双向随机微分方程(SDEs),我们将净化风险建模为去噪过程与扰动添加过程的联合分布间KL散度。由此启发,我们探索在CLIP的多模态隐空间中进行净化。提出两种变体:CLIPure-Diff使用DaLLE-2中的DiffusionPrior模块建模图像隐向量的似然;CLIPure-Cos则使用图像与“a photo of a”嵌入间的余弦相似度。据我们所知,CLIPure是首个在多模态隐空间中的净化方法,而CLIPure-Cos是首个不依赖生成模型的净化方法,显著提升防御效率。在CIFAR-10、ImageNet及此前用于评估零样本分类鲁棒性的13个数据集上进行了大量实验。结果表明,CLIPure大幅提升了当前最优水平:如在CIFAR-10上从71.7%提升至91.1%,ImageNet上从59.6%到72.6%,13个数据集平均鲁棒性相对提升108%。代码已公开于https://github.com/TMLResearchGroup-CAS/CLIPure。

原文摘要 · Abstract (English)

In this paper, we aim to build an adversarially robust zero-shot image classifier. We ground our work on CLIP, a vision-language pre-trained encoder model that can perform zero-shot classification by matching an image with text prompts ``a photo of a <class-name>.''. Purification is the path we choose since it does not require adversarial training on specific attack types and thus can cope with any foreseen attacks. We then formulate purification risk as the KL divergence between the joint distributions of the purification process of denoising the adversarial samples and the attack process of adding perturbations to benign samples, through bidirectional Stochastic Differential Equations (SDEs). The final derived results inspire us to explore purification in the multi-modal latent space of CLIP. We propose two variants for our CLIPure approach: CLIPure-Diff which models the likelihood of images' latent vectors with the DiffusionPrior module in DaLLE-2 (modeling the generation process of CLIP's latent vectors), and CLIPure-Cos which models the likelihood with the cosine similarity between the embeddings of an image and ``a photo of a.''. As far as we know, CLIPure is the first purification method in multi-modal latent space and CLIPure-Cos is the first purification method that is not based on generative models, which substantially improves defense efficiency. We conducted extensive experiments on CIFAR-10, ImageNet, and 13 datasets that previous CLIP-based defense methods used for evaluating zero-shot classification robustness. Results show that CLIPure boosts the SOTA robustness by a large margin, e.g., from 71.7% to 91.1% on CIFAR10, from 59.6% to 72.6% on ImageNet, and 108% relative improvements of average robustness on the 13 datasets over previous SOTA. The code is available at https://github.com/TMLResearchGroup-CAS/CLIPure.

对抗鲁棒零样本分类CLIP隐空间净化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。