Contrastive vision-language models (VLMs), exemplified by CLIP, enable strong zero-shot visual recognition but remain highly vulnerable to adversarial perturbations. Recent test-time adaptation methods improve robustness without retraining. Prompt-based methods adapt learnable text prompts, while input-space methods optimize pixels or padding at test time. These approaches can improve predictions, but they do so through an indirect and expensive optimization path. We propose \textbf{Test-time Visual Subspace Steering (T-VSS)}, a lightweight defense that performs test-time adaptation directly in the visual feature space. T-VSS first builds a sample-specific low-rank subspace from multi-view feature residuals anchored at the attacked image. It then learns a shared feature correction within this subspace using reliability-weighted entropy minimization. By constraining adaptation to a compact visual geometry, T-VSS steers attacked features toward more stable and discriminative predictions while avoiding noisy full-space updates. Experiments on fine-grained, ImageNet, and ImageNet-OOD benchmarks show that T-VSS improves adversarial robustness while maintaining competitive clean accuracy and better efficiency than prior test-time adaptation methods. Code is available at \href{https://github.com/jhyukjang/T-VSS}{here}.
翻译:暂无翻译