Efficient Test-Time Adaptation of Vision-Language Models
Adilbek Karmanov, Dayan Guan, Shijian Lu, Abdulmotaleb El Saddik, Eric Xing
TL;DR
This work tackles distribution shifts in vision-language models by proposing TDA, a training-free dynamic adapter that uses two non-parametric caches (positive and negative) to progressively refine test-time predictions without backpropagation. By storing few-shot test features as keys and pseudo labels as values, the positive cache enhances correct predictions, while the negative cache mitigates noise via negative pseudo labeling on uncertain samples. Across two benchmarks (OOD and Cross-Domain) and multiple CLIP backbones, TDA achieves state-of-the-art accuracy with substantial speedups (reducing test-time from hours to minutes) compared to prompts-based and other cache-based methods. The approach is robust, scalable, and practical for real-world deployment, with carefully tuned thresholds and demonstrated robustness through extensive ablations and analyses.
Abstract
Test-time adaptation with pre-trained vision-language models has attracted increasing attention for tackling distribution shifts during the test time. Though prior studies have achieved very promising performance, they involve intensive computation which is severely unaligned with test-time adaptation. We design TDA, a training-free dynamic adapter that enables effective and efficient test-time adaptation with vision-language models. TDA works with a lightweight key-value cache that maintains a dynamic queue with few-shot pseudo labels as values and the corresponding test-sample features as keys. Leveraging the key-value cache, TDA allows adapting to test data gradually via progressive pseudo label refinement which is super-efficient without incurring any backpropagation. In addition, we introduce negative pseudo labeling that alleviates the adverse impact of pseudo label noises by assigning pseudo labels to certain negative classes when the model is uncertain about its pseudo label predictions. Extensive experiments over two benchmarks demonstrate TDA's superior effectiveness and efficiency as compared with the state-of-the-art. The code has been released in \url{https://kdiaaa.github.io/tda/}.
