NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Self-Calibrated Consistency can Fight Back for Adversarial Robustness in Vision-Language Models

Jiaxiang Liu, Jiawei Du, Xiao Liu, Prayag Tiwari, Mingkun Xu

Abstract

Vision-Language Models (VLMs) such as CLIP have revolutionized zero-shot image classification but remain highly susceptible to adversarial attacks. Traditional defenses involving adversarial fine-tuning are computationally expensive and often degrade the model's general zero-shot capabilities. This paper introduces Self-Calibrated Consistency (SCC), a plug-and-play, test-time defense mechanism. By leveraging semantic and spatial consistency during inference, SCC significantly enhances adversarial robustness. Experimental results across 22 benchmarks show that SCC increases CLIP’s average robust accuracy from 2.7% to 51.68% with minimal impact on clean accuracy.

Introduction

Vision-Language Models (VLMs) are increasingly used as foundational components in AI systems due to their impressive zero-shot generalization. However, these models exhibit a "glass jaw" when faced with adversarial perturbations—imperceptible pixel-level changes that cause misclassification. For instance, a "dog" might be classified as a "wolf" or even an "airplane" due to minor noise.

The authors identify two primary vulnerabilities: semantic fragility and viewpoint fragility. Adversarial attacks exploit these by pushing image embeddings toward "hard negatives" (semantically similar but incorrect classes) and making predictions unstable across different views of the same image. Existing defenses, like adversarial training, are often impractical for large-scale VLMs because they require massive labeled datasets and can "break" the model's original zero-shot knowledge—a phenomenon known as the "generalization tax."

Methodology: Self-Calibrated Consistency (SCC)

SCC is a test-time defense strategy that modifies the inference process rather than the model weights. It operates through two main modules designed to stabilize the model's internal representations.

Conceptual overview of how Semantic and Spatial Consistency pull adversarial embeddings away from hard-negative traps back toward the correct class.

1. Semantic Consistency

This module addresses semantic fragility by establishing a "semantic anchor." It performs a brief "counterattack warm-up" to find a stable starting point and generates multiple augmented views to create a soft pseudo-label. The system then optimizes a margin objective to "pull" the image embedding toward this text-based anchor while "pushing" it away from the most likely confusable classes.

2. Spatial Consistency

To combat viewpoint fragility, SCC ensures that different spatial transformations of the perturbed image (e.g., flips, rotations, or slight noise) yield consistent predictions. This stabilization prevents the model from falling into local "hard-negative traps" created by the adversary.

Experimental Results

The researchers evaluated SCC on a comprehensive suite of 22 benchmarks, including generic object recognition (CIFAR, ImageNet), fine-grained recognition (OxfordPets, Flowers102), and specialized domains like satellite imagery (EuroSAT) and medical imaging (BioMedCLIP).

Accuracy comparison across various datasets showing the performance of multi-view and semantic consistency approaches.

The results demonstrate a dramatic improvement in robustness. Under standard 10-step PGD attacks, vanilla CLIP's robust accuracy was a mere 2.70%. SCC elevated this to 51.68% on average. Crucially, this gain came with a negligible "clean" penalty; accuracy on un-attacked images only dropped from 61.51% to 60.21%. In the medical domain, SCC outperformed previous state-of-the-art test-time defenses by over 23%, highlighting its utility in high-stakes applications.

Conclusion

Self-Calibrated Consistency represents a paradigm shift in securing VLMs. By adopting a "counterattack" philosophy and using cross-modal anchoring, SCC provides a robust defense that is both efficient and preserves the model's general knowledge. As a plug-and-play solution, it can be immediately deployed to secure existing CLIP-style models without the need for costly retraining. Future work will explore integrating these self-calibration principles directly into the training phase of next-generation foundation models.

Summary updated

BibTeX
@inproceedings{liu2026self,
  author = {Jiaxiang Liu and Jiawei Du and Xiao Liu and Prayag Tiwari and Mingkun Xu},
  title = {{Self-Calibrated Consistency can Fight Back for Adversarial Robustness in Vision-Language Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=TM7PjLDZTr},
}
Figure