Towards Fine-Grained Robustness: Attention-Guided Test-Time Prompt Tuning for Vision-Language Models

Jia-Wei Hai, Yijun Wang, Xiu-Shen Wei
5/19/2026
cs.CV

Official code: SEU-VIPGroup/A-TPT (2 stars, last commit 2026-05-19).

Abstract

Vision-Language Models (VLMs), such as CLIP, have achieved significant zero-shot performance on downstream tasks with various fine-tuning adaptation methods. However, recent studies have proven that adversarial attacks can significantly degrade the inference ability of VLMs, posing substantial risks to their practical applications. Prevalent test-time adaptation methods typically rely on multi-view augmentation to implement various fine-tuning strategies, which struggle to identify semantic information and are prone to destroying discriminative regions in fine-grained scenarios. To address these limitations, we propose Attention-Guided Test-Time Prompt Tuning (A-TPT), a semantics-preserving method designed for test-time adaptation. We first refine the gradient attention rollout mechanism to identify semantically meaningful regions surviving under adversarial attacks. Furthermore, we leverage them to guide the spatially varying augmentation intensities and multi-view ensemble for prompt tuning and inference. Extensive experiments demonstrate that A-TPT outperforms existing test-time adaptation methods on both adversarial and clean data. Codes are available at https://github.com/SEU-VIPGroup/A-TPT .

View on arXivView PDF

Code Implementations(1)

SEU-VIPGroup/A-TPTOfficial100%

Official Deployment for A-TPT (ICML 2026)

20PythonMay 18, 20265 months ago

Similar Papers

Cite this paper

@article{hai2026towards,
  title  = {Towards Fine-Grained Robustness: Attention-Guided Test-Time Prompt Tuning for Vision-Language Models},
  author = {Jia-Wei Hai and Yijun Wang and Xiu-Shen Wei},
  year   = {2026},
  eprint = {2605.19956},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.19956v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.19956.svg)](https://codeofpaper.com/paper/2605.19956)

Discussion