cs.LGOct 19, 2026

A Theoretical Analysis of Environment-Aware Out-of-Distribution Detection for Vision-Language Models

Authors: Salimeh Sekeh, Mary Wisell

Organizations: San Diego State University, San Diego, CA, USA

Abstract

Continual vision-language models (VLMs) encounter a stream of environments and must also reject inputs that do not belong to the environment at hand. Class information from earlier environments can aid out-of-distribution (OOD) detection, yet existing detectors score each environment in isolation, and when previous environments help or hurt is theoretically unclear. We develop a theory of environment-aware OOD detection built on contribution scores, pairwise cosine expectations measuring how the image and text features of one environment align with those of another. We propose a cross-environment maximum-concept-matching (MCM) score with two terms: a primary term matching the test image against the current class texts, and a secondary term matching it against the class texts of a previous environment, weighted by the intra-modal alignment between the two environments. We prove that, under a positive environment transition and a bounded class-matching margin for OOD inputs, this score attains a false-positive rate no larger than that of the standard MCM detector at an adjusted threshold. We then show that the score gap of an MCM detector between two environments equals the self-contribution of the in-distribution environment minus its cross-modal contribution into the OOD environment, which separates soft OOD environments, with explicit AUROC, true-positive, and false-positive guarantees, from hard ones, which no threshold that retains the in-distribution data can reliably reject. For cascaded detection, in which the text prototypes of all seen environments are pooled, the false-positive rate on every past environment is non-decreasing in time, and we characterize when detection provably fails. A contribution balance factor applied to the gradients of the classification loss and of a smoothed false-positive rate completes the framework.

Figures & tables

Explore similar work

CardsList
  1. Respecting Modality Gap in Post-hoc Out-of-distribution Detection with Pre-trained Vision-Language Models

    May 26, 2026Yuanwei Hu, Bo Peng, Yadan Luo +3Vision-Language ModelsTest-Time Adaptation

  2. NegAS: Negative Label Guided Attention and Scoring for Out-of-Distribution Object Detection with Vision-Language Models

    Jun 21, 2026Yingjie Zhang, Shuai Li, Peng WangVLM RobustnessObject Detection

  3. DynProto: Dynamic Prototype Evolution for Out-of-Distribution Detection

    Apr 26, 2026Yanqi Wu, Xinhua Lu, Runhe Lai +4Prototype-Based ClassificationOOD Detection