Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

$\Delta \mathrm{Energy}$: Optimizing Energy Change During Vision-Language Alignment Improves both OOD Detection and OOD Generalization

About

Recent approaches for vision-language models (VLMs) have shown remarkable success in achieving fast downstream adaptation. When applied to real-world downstream tasks, VLMs inevitably encounter both the in-distribution (ID) data and out-of-distribution (OOD) data. The OOD datasets often include both covariate shifts (e.g., known classes with changes in image styles) and semantic shifts (e.g., test-time unseen classes). This highlights the importance of improving VLMs' generalization ability to covariate-shifted OOD data, while effectively detecting open-set semantic-shifted OOD classes. In this paper, inspired by the substantial energy change observed in closed-set data when re-aligning vision-language modalities (specifically by directly reducing the maximum cosine similarity to a low value), we introduce a novel OOD score, named {\Delta}Energy. {\Delta}Energy significantly outperforms the vanilla energy-based OOD score and provides a more reliable approach for OOD detection. Furthermore, {\Delta}Energy can simultaneously improve OOD generalization under covariate shifts, which is achieved by lower-bound maximization for {\Delta}Energy (termed EBM). EBM is theoretically proven to not only enhance OOD detection but also yields a domain-consistent Hessian, which serves as a strong indicator for OOD generalization. Based on this finding, we developed a unified fine-tuning framework that allows for improving VLMs' robustness in both OOD generalization and OOD detection. Extensive experiments on challenging OOD detection and generalization benchmarks demonstrate the superiority of our method, outperforming recent approaches by 10% to 25% in AUROC.

Lin Zhu, Yifeng Yang, Xinbing Wang, Qinying Gu, Nanyang Ye• 2025

Related benchmarks

TaskDatasetResultRank
ClassificationCars
Accuracy85.3
492
Image ClassificationImageNet
Top-1 Accuracy73.6
343
Image ClassificationOxfordPets
Accuracy94.4
298
Image ClassificationFood101
Accuracy87.6
177
Out-of-Distribution DetectionImageNet-1K
FPR@9535.6
156
Image ClassificationSUN397
Accuracy77.3
116
Out-of-Distribution DetectionImageNet
AUROC90.4
113
Out-of-Distribution DetectionCUB
AUC76.8
102
OOD DetectionImageNet-1k ID Average OOD
AUROC0.9737
92
Image ClassificationFlowers102
Accuracy98.2
88
Showing 10 of 34 rows

Other info

Follow for update