Abstract
This paper establishes a theoretical foundation for why "negative labels" enhance out-of-distribution (OOD) detection in Vision-Language Models (VLMs) like CLIP. By replacing standard Kullback–Leibler (KL) divergence-based weighting with Rényi divergence, the authors formulate a more robust "worst-case" energy function. The resulting method, Sours, achieves state-of-the-art performance while significantly reducing the model's sensitivity to outliers.
1. Introduction: The Open-World Challenge
In real-world, "open-world" deployments, machine learning models inevitably encounter data from classes absent from their training sets. Out-of-distribution (OOD) detection is the critical task of flagging these unknown inputs to ensure safety and reliability in high-stakes applications like autonomous driving and medical diagnosis.
With the advent of powerful Vision-Language Models (VLMs) such as CLIP, the field has shifted toward "zero-shot" OOD detection. A notable recent breakthrough, NegLabel, demonstrated that OOD detection can be significantly improved by expanding the label space with "negative labels"—words drawn from large databases (like WordNet) that are semantically dissimilar to known in-distribution (ID) labels.
Despite empirical success, a major gap remained: the theoretical mechanism behind negative labeling was poorly understood. Furthermore, existing methods suffered from "over-pessimism." If a negative label accidentally shared semantic similarity with an input (acting as a "false negative" outlier), the entire detection system could fail. This paper bridges the theoretical gap and introduces a practical solution to outlier sensitivity.
2. Methodology: From KL Divergence to Rényi Divergence
The authors reframe OOD detection as a density estimation problem utilizing Energy-Based Models (EBMs). Their theoretical and methodological contributions unfold in several key steps:
- The Energy Margin: The team defines a novel energy function based on the margin between an input's similarity to ID labels and its similarity to negative labels.
- The KL Ball Theory: They mathematically prove that current methods like NegLabel are equivalent to estimating a "worst-case" energy function within a set of potential distributions constrained by Kullback–Leibler (KL) divergence.
- The "Pessimism" Trap: Theoretical analysis reveals that using KL divergence to handle distribution shifts is a double-edged sword. Because KL divergence relies on an exponential weighting function, a single "bad" negative label (an outlier) can disproportionately dominate the score, leading to false OOD detection.
- Rényi Divergence Refinement: To counteract this hyper-sensitivity, the authors propose using the Cressie-Read family of Rényi divergence. Unlike the exponential weights of KL, Rényi divergence yields a "milder" polynomial weighting. This flattens the impact of outliers, rendering the model substantially more robust.
- The Sours Algorithm: To implement this theory, the authors introduce Sours. This method optimizes a scalar variable ($\beta_x$) for each specific input using a rapid 15-step Stochastic Gradient Descent (SGD) process at test time.
3. Experimental Setup
The proposed method was rigorously evaluated across a comprehensive suite of standard benchmarks:
- In-Distribution (ID): ImageNet-1K.
- Out-of-Distribution (OOD): iNaturalist, SUN, Places, and Textures.
- Domain-Generalization Sets: ImageNet-A, ImageNet-R, ImageNet-S, and ImageNetV2 (testing robustness to stylistic shifts in known classes).
- Near-OOD Benchmarks: SSB-hard and NINCO (where OOD classes closely resemble ID classes).
4. Key Results and Insights
The Sours method successfully links empirical OOD tricks to formal distributionally robust optimization, proving that massive VLM retraining is unnecessary for state-of-the-art results. A tiny, input-specific optimization of a single scalar is sufficient to refine the model's uncertainty boundary.
- State-of-the-Art Accuracy: On the ImageNet-1K benchmark, Sours achieved an average AUROC of 94.51% and reduced the FPR95 to 23.17%, marking a significant improvement over NegLabel's 25.40% FPR95.
- Enhanced Robustness: In domain-generalization tasks (e.g., ImageNet-R), Sours outperformed previous methods, demonstrating resilience against style shifts in the data.
- High Efficiency: Despite requiring test-time optimization, Sours adds only about 1.5ms of latency per image on an NVIDIA A100 GPU, making it highly practical for real-time applications.
5. Limitations and Future Work
While Sours marks a significant step forward, the authors note a few limitations. First, the theoretical framework currently only explains methods utilizing negative labels; it does not yet encompass other successful OOD strategies like prompt tuning or negative prompts. Second, although Rényi divergence mitigates the impact of mismatched negative labels, the method still relies on a static, pre-computed corpus (WordNet). Future research could explore adaptive ways to generate or select these labels dynamically, as well as investigate alternative distribution discrepancy measures, such as Wasserstein metrics, to further enhance robustness.
Summary updated