Skip to content

Not Just Fighting Back, But Aiming Right: Direction-Aware Test-Time Counterattacks for Robust Vision-Language Models

Chunchun Chen, Li Gu, Weidong Zhang, Zhaokai Sun, Yuxing Zhang, Xiaofeng Cao, Yuanqiang Zhou, Rui Fan, Xin Sun, Tiantian He, Wei Ye

cs.CV

Abstract

This paper investigates zero-shot robustness in vision-language models. Although models such as CLIP exhibit strong zero-shot capabilities, they remain vulnerable to perturbations. Recent test-time counterattack (TTC) methods improve robustness by moving representations away from adversarial regions. Without a specified target direction, however, this movement may lead representations into incorrect class regions. We address this limitation with a direction-aware objective comprising complementary attraction and repulsion. The attraction term uses a stable semantic anchor, constructed from transformation-consistent visual and fine-grained textual features, to guide representations toward the target class. The repulsion term uses weighted class textual prototype features to push representations away from untargeted classes, assigning the greatest weight to the least similar class. Together, these components transform test-time counterattacking from undirected escape into semantically guided recovery. Extensive experiments across diverse datasets and different attack settings show that the proposed plug-and-play module consistently improves the adversarial robustness of existing TTC-based methods.

Create a lesson