arXiv:2604.11576cs.CV2026-04中稿 · CVPR被引 1

用预训练方式微调,让视觉语言模型更抗对抗攻击。

Finetune Like You Pretrain: Boosting Zero-shot Adversarial Robustness in Vision-language Models

  • 用网络收集的图文对生成对抗样本,按对比损失微调模型。
  • 在14个数据集上同时提升对抗鲁棒性和原始准确率。
  • 适合关注模型安全与跨域泛化的研究者使用。

尽管具备出色的零样本能力,如CLIP这样的视觉语言模型仍易受对抗攻击影响。现有方法通过在代理数据集(如ImageNet)上使用对抗样本来微调预训练视觉编码器,但忽略了训练数据分布和学习目标的重要性,导致零样本能力下降且鲁棒性迁移能力有限。本文提出简单有效的范式AdvFLYP,模仿CLIP预训练过程进行对抗微调:利用网络收集的图文对生成对抗图像,并通过对比损失将其与对应文本对齐。为缓解噪声网页图像对抗嵌入的失真,进一步引入正则化项,惩罚对抗图像特征的偏离。实验表明,逻辑层和特征层正则化分别提升鲁棒性和干净准确率。在14个涵盖不同领域的下游数据集上,该方法优于主流实践。代码与模型权重已公开于https://github.com/Sxing2/AdvFLYP。

原文摘要 · Abstract (English)

Despite their impressive zero-shot abilities, vision-language models such as CLIP have been shown to be susceptible to adversarial attacks. To enhance its adversarial robustness, recent studies finetune the pretrained vision encoder of CLIP with adversarial examples on a proxy dataset such as ImageNet by aligning adversarial images with correct class labels. However, these methods overlook the important roles of training data distributions and learning objectives, resulting in reduced zero-shot capabilities and limited transferability of robustness across domains and datasets. In this work, we propose a simple yet effective paradigm AdvFLYP, which follows the training recipe of CLIP's pretraining process when performing adversarial finetuning to the model. Specifically, AdvFLYP finetunes CLIP with adversarial images created based on image-text pairs collected from the web, and match them with their corresponding texts via a contrastive loss. To alleviate distortion of adversarial image embeddings of noisy web images, we further propose to regularise AdvFLYP by penalising deviation of adversarial image features. We show that logit- and feature-level regularisation terms benefit robustness and clean accuracy, respectively. Extensive experiments on 14 downstream datasets spanning various domains show the superiority of our paradigm over mainstream practices. Our code and model weights are released at https://github.com/Sxing2/AdvFLYP.

对抗鲁棒性视觉语言模型微调对比学习

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