通过分布对齐提升视觉语言模型对抗攻击下的鲁棒性
Robustifying Vision-Language Models via Test-Time Prompt Adaptation

- 用最优传输对齐增强视图特征分布与文本原型
- 在多个数据集上显著提升对抗鲁棒性,保持正常准确率
- 适合关注模型安全性的研究人员和应用开发者
预训练视觉语言模型(如CLIP)具备强大的零样本泛化能力,但在对抗扰动下性能急剧下降。现有测试时自适应方法多依赖样本级置信度启发式策略,忽略了数据内在的分布结构。这种以样本为中心的方法限制了鲁棒性,无法区分高置信度的对抗误判与真实的语义一致性。本文观察到对抗失真具有结构性脆弱性:整体表示被破坏,但增强视图的分布中往往保留语义完整性。受此启发,我们提出RITA框架——一种基于分布对齐的测试时提示自适应方法。RITA通过最优传输将增强后视觉特征分布与文本原型对齐,缓解对抗异常值并修正跨模态语义错位。此外,引入动态缓存机制,逐步积累测试流中的可靠线索以实现在线优化。大量实验表明,RITA在不牺牲干净准确率的前提下显著提升了对抗鲁棒性。
原文摘要 · Abstract (English)
Pre-trained Vision-Language Models (VLMs) such as CLIP achieve strong zero-shot generalization, but their performance degrades sharply under adversarial perturbations. Existing test-time adaptation methods typically rely on sample-level confidence heuristics, overlooking the intrinsic distributional structure of the data. This sample-centric approach limits robustness, as it fails to distinguish confident adversarial mispredictions from true semantic consistency. In this work, we observe that adversarial distortion is structurally brittle: while holistic representations are corrupted, semantic integrity is often preserved in the distribution of augmented views. Motivated by this insight, we propose RITA, a Robust test-tIme prompt-TAdaptation framework that shifts from sample-level estimates to distribution-level alignment. Specifically, RITA employs optimal transport to align the distribution of augmented visual features with textual prototypes, mitigating adversarial outliers and rectifying cross-modal semantic misalignment. Furthermore, we introduce a dynamic cache to progressively accumulate reliable cues from the test stream for online refinement. Extensive experiments demonstrate that RITA significantly improves adversarial robustness without compromising clean accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。