Test-Time Adaptation of Vision-Language Models for Open-Vocabulary Semantic Segmentation

Mehrdad Noori, David Osowiechi, Gustavo Adolfo Vargas Hakim, Ali Bahri, Moslem Yazdanpanah, Sahar Dastani, Farzad Beizaee, Ismail Ben Ayed, Christian Desrosiers · DOI

Abstract

Open-Vocabulary Semantic Segmentation (OVSS) leverages Vision-Language Models (VLMs) like CLIP to perform dense prediction tasks on unseen classes. Despite their versatility, these models exhibit significant fragility under domain shifts such as adverse weather or digital corruptions. We introduce Multi-Level Multi-Prompt (MLMP), a novel test-time adaptation (TTA) framework designed specifically for OVSS. MLMP leverages entropy minimization across multiple encoder layers and diverse text prompts to dynamically adjust to new environments. Our approach achieves substantial performance gains across a comprehensive benchmark of 87 scenarios, demonstrating enhanced robustness and efficiency without requiring additional training data.

Introduction

Open-Vocabulary Semantic Segmentation (OVSS) represents a significant advancement in computer vision, allowing models to segment objects based on arbitrary text descriptions. However, the reliance on VLMs introduces a vulnerability to "domain shifts"—changes in environmental conditions or image quality that occur at test time. While Test-Time Adaptation (TTA) has been successfully applied to image classification, its application to dense, pixel-level tasks like OVSS remains under-explored.

The MLMP framework addresses this gap by identifying two key signals for adaptation: the varying resilience of intermediate vision encoder layers to domain shifts and the inherent sensitivity of VLMs to prompt phrasing. By optimizing for consistency across these dimensions, MLMP enables models to adapt on-the-fly to unlabeled test images.

The MLMP Framework

The core of MLMP is a multi-level, multi-prompt entropy minimization strategy that updates only the LayerNorm parameters of the vision encoder, ensuring computational efficiency.

Uncertainty-Aware Multi-Level Fusion

Standard OVSS models typically utilize only the final layer of the vision encoder. MLMP instead harvests features from multiple intermediate layers. Earlier layers often retain fine-grained spatial details resilient to certain corruptions, while deeper layers provide semantic context. An entropy-based weighting mechanism dynamically favors the most confident layers for each specific input.

Multi-Prompt Local-Global Optimization

Rather than relying on a single prompt, MLMP minimizes prediction entropy across several prompt templates simultaneously. This optimization is applied both globally (via the CLS token) and locally (at the pixel level), ensuring semantic coherence and sharp object boundaries.

The MLMP pipeline: During the adaptation phase, the model updates LayerNorm parameters by minimizing entropy across multiple prompts and layers. In the evaluation phase, it uses weighted averaging to produce the final segmentation.

Experimental Results

To evaluate MLMP, we established a benchmark suite of 87 test scenarios, including standard datasets (Pascal VOC, COCO), synthetic corruptions (ImageNet-C), and real-world adverse conditions (ACDC).

Performance and Robustness

MLMP consistently outperforms non-adapted baselines. On the Pascal VOC 20 dataset, it achieved an absolute mIoU improvement of approximately 8-9 points under domain-shifted conditions. It also provided a +6 mIoU gain on average across the challenging ACDC weather dataset, which features actual adverse conditions like fog, rain, and night.

Left: Motivation for multi-level adaptation, showing higher prompt-induced entropy in intermediate layers. Right: mIoU gains of MLMP over the non-adapted baseline across various image corruptions.

Efficiency

The method is highly efficient, requiring only 0.58ms per sample for adaptation and evaluation on an NVIDIA V100 GPU, making it suitable for real-time applications.

Conclusion

MLMP is the first TTA framework tailored for open-vocabulary semantic segmentation. By turning the sensitivity of VLMs into a strength and adaptively fusing multi-level features, it significantly enhances model robustness. Future research may explore dedicated projection modules for intermediate layers and strategies to mitigate potential model drift during continuous online adaptation.

Summary updated

BibTeX
@inproceedings{noori2025test,
  author = {Mehrdad Noori and David Osowiechi and Gustavo Adolfo Vargas Hakim and Ali Bahri and Moslem Yazdanpanah and Sahar Dastani and Farzad Beizaee and Ismail Ben Ayed and Christian Desrosiers},
  title = {{Test-Time Adaptation of Vision-Language Models for Open-Vocabulary Semantic Segmentation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=CH76rSKWZr},
}
Figure