Self-Calibrated Tuning of Vision-Language Models for Out-of-Distribution Detection

Out-of-distribution (OOD) detection is crucial for deploying reliable machine learning models in open-world applications. Recent advances in CLIP-based OOD detection have shown promising results via regularizing prompt tuning with OOD features extracted from ID data. However, the irrelevant context mined from ID data can be spurious due to the inaccurate foreground-background decomposition, thus limiting the OOD detection performance. In this work, we propose a novel framework, namely, Self-Calibrated Tuning (SCT), to mitigate this problem for effective OOD detection with only the given few-shot ID data. Specifically, SCT introduces modulating factors respectively on the two components of the original learning objective. It adaptively directs the optimization process between the two tasks during training on data with different prediction uncertainty to calibrate the influence of OOD regularization, which is compatible with many prompt tuning based OOD detection methods. Extensive experiments and analyses have been conducted to characterize and demonstrate the effectiveness of the proposed SCT. The code is publicly available.

Paper

References (54)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer pBeU3/10 · confidence 5/52024-07-10

Summary

This paper first reveals the relationship between the quality of out-of-distribution (OOD) features and the prediction uncertainty of in-distribution (ID) data. Then, the paper introduces modulating factors to weight the ID loss and OOD loss, with the weights being related to the ID data prediction confidence. The experiments are carried out on standard datasets.

Strengths

1. The analysis of the relationship between OOD feature quality and ID prediction confidence is well-reasoned; lower ID confidence indeed affects the accuracy of foreground-background separation. 2. Weighting the loss components is a straightforward approach, making it easier to understand. 3. The writing is clear and easy to comprehend.

Weaknesses

1. Overall, the technical contribution of this paper is relatively incremental, primarily focusing on how to weight the two loss components. 2. The effectiveness of the proposed method is quite limited. For example, as shown in Table 2, the improvement in averaged AUROC under the 16-shot scenario is minimal, only around 0.3%, and there is even a slight decrease in results on ID-like data. 3. There is a lack of comparison with existing state-of-the-art (SOTA) methods. For instance, the results reported in this paper are not as good as those of NegLabel[1] (AUROC 94.21 > 93.37), which is a zero-shot method that does not require training and training samples. The results for ID-like method reported in this paper are also lower; the official paper reports 94.36 AUROC under 4-shot, while this paper reports 92.14 AUROC under 16-shot. 4. More exploration is needed regarding the settings of function $\phi$ and $\psi$ in Equation 4. 5. The statement in lines 158-159 is somewhat unclear. Should it be that inaccurate OOD features hinder the effective learning of better OOD detection? [1] Jiang, Xue, et al. "Negative label guided ood detection with pretrained vision-language models." ICLR (2024).

Questions

See weaknesses

Rating

3

Confidence

5

Soundness

2

Presentation

3

Contribution

2

Limitations

NA

Reviewer pUkR5/10 · confidence 4/52024-07-12

Summary

This paper presents a novel few-shot approach to regularizing prompt tuning-based OOD detection methods called Self-Calibrated Tuning (SCT). SCT is specifically built to address the problems of incorrect OOD features being used in prompt tuning-based OOD detection methods. More specifically, by weighting regions of the image based on model confidence, SCT can better alleviate these issues in prompt tuning-based OOD detection methods. The resulting SCT method shows strong empirical improvements across a wide range of OOD detection methods.

Strengths

Strengths: - The paper is well written and the authors provide a clear and concise motivation justifying the use of SCT. - The author provides a timely analysis of the problem of incorrect OOD features extracted from ID data. - SCT shows strong empirical performance across a wide range of traditional OOD detection methods and prompt tuning-based OOD detection methods. - Additionally, given the nature of prompt tuning-based OOD detection methods, SCT can act in the more relevant few-shot setting.

Weaknesses

Weakness: - A primary concern of the reviewer is the lack of evaluations against the more traditional CIFAR set of benchmarks for OOD detection. - Additionally, the empirical performance gain of SCT (table 2) in combination with other prompt-tuning-based methods, seems minimal.

Questions

The reviewer would like to see some additional evaluations of SCT in the traditional CIFAR setting of OOD detection. The reviewer would also like to point out some small inconsistencies in the bolding for Table 2 (IDLike+SCT).

Rating

5

Confidence

4

Soundness

3

Presentation

4

Contribution

3

Limitations

The author provides adequate discussions on any limitations and broader impacts. Additionally, the reviewer does not forsee any potential negative social impacts from the work.

Reviewer fpY74/10 · confidence 4/52024-07-13

Summary

Based on the observation that CLIP undercalibration will affect the existing prompt-tuning-based method's OOD regularization, i.e. samples with uncertain True-Class Probability (referred to as ID uncertainty in this paper) may provide false OOD features and harm to negative training used in the existing methods; therefore, the author proposes a simple training strategy Self-Calibrated Tuning (SCT) weighted with the ID uncertainty, which can help improve FPR95 through experimental verification.

Strengths

- The author also observed and attempted to study the important CLIP calibration problem. - The paper is relatively easy to understand overall.

Weaknesses

My main concerns about this work are that the work is relatively incremental and empirical; there is insufficient discussion on the pros and cons of field-related methods (including other paradigms); the experiments are not sufficient, rigorous, and analyzed; and the method's effect on improving common benchmarks is rather one-sided, etc. The details are as follows: [Method] - (Inaccurate motivation verifications) If I understand correctly, the misclassified ratio on the horizontal axis in the right panel of Fig. 2 refers to $p(pred\neq gt), pred=\arg\max_yp(y|x)$ while your ID uncertainty refers to sth like True-Class Probability, marginal softmax $p(y=gt|x)$. These are not two identical things, though there is a certain correlation: only within some ranges, TCP could indicate accuracy [1]. Therefore, I think the author may have a biased understanding here, and the experimental results cannot fully reflect the motivation of the work: when "uncertain" ID samples are used as OOD regularization, some ID data are misdetected as OOD (FPR). If I have misunderstood, could the author clarify? Or maybe additional correct experiments are needed? - (No calibration verifications) The claim and results in the work show that SCT helps with CLIP calibration, but there is no visualization of the calibration after training to illustrate the point (e.g. could add the before and after calibration comparison like in Fig. 2). - (Lack of discussion of weighted training; modulating function rationale) The idea of ​​weighted loss is very direct and easy to think of. Previous work should also be mentioned and discussed. For example, [2] is based on the feature representation paradigm and uses activation scale as the ID-ness (similar to ID uncertainty in the context) indicator for weighted training to improve OOD detection. In comparison, I do not quite understand why $\phi$ must be monotonically decreasing w.r.t. $p$ (e.g. $1-p$) and not monotonically increasing (e.g. $p$), because the weighting method in [2] is monotonically increasing, and the result is also improved. Could the authors elaborate on this? - (How about post-hoc CLIP calibration?) Usually, calibration is divided into two types: training and post-hoc [3] (calibration related works are lacked in the paper). The former is used in this paper. The latter may be explored in OOD feature extraction methods, e.g. changing the rank operation (Eq. (6) & Fig. 3(d)). The author may lack discussion in this aspect. [Experiments] - (No much AUROC improvement) I understand that the method in this work is mainly to improve FPR95, but unilaterally only improving FPR95 does not seem to be comprehensive enough, because AUROC is also an equally important indicator and methods need to be proposed to improve it. - (Lack of CIFAR results) Although the comparison method LoCoOp has not been experimented on CIFAR, CIFAR is indeed another important benchmarks in the field of OOD detection, and I think it is necessary to supplement it. - (Discussions with simpler yet more effective pre-trained features + post-hoc?) I just would like to know what the author thinks about the (potential) advantages of the prompt-tuning-based method studied in the paper compared to the post-hoc method. After all, post-hoc does not require additional training and uses the basic ResNet backbone; the FPR95 and AUROC on the main task of Tab. 1 on ImageNet-1k have reached **20.05** and **95.71** respectively, which are much better than the results reported in the paper (26.47, 93.37). - Could the authors clarify on what validation set are the hyperparameters tuned? - (Interpretations of the ablations.) Figure 3(b) shows that the results of selecting other regularization functions are very different, and the paper (L294-298) does not provide any analysis. I am curious about how the author could try to interprete these ablation study experiment results. Similarly, the quality of OOD features extracted by different extraction methods also varies greatly, which seems very empirical (Fig. 3(d)). - Table 1 is suggested to include results of combining more newer post-hoc methods (e.g. ASH (Djurisic et al., 2022), Scale [2]) and fine-tuned methods, which will give readers a more comprehensive sense. [Presentation] - The paragraph introducing the OOD features (L189) should be moved forward, or at least before refer to Fig. 1, which will give readers a clearer background. - Why is the left panel in Fig. 2 not arranged in ascending order of softmax output? The arrangement of 0.02, 0.89, 0.04, and 0.67 affects reading. What is it trying to say? It would be better to display the classes and images together for clarity. References: [1] Corbière, Charles, et al. "Addressing failure prediction by learning model confidence." NeurIPS, 2019. [2] Xu, Kai, et al. "Scaling for Training-Time and Post-hoc Out-of-distribution Detection Enhancement." ICLR, 2024. [3] Guo, Chuan, et al. "On calibration of modern neural networks." ICML, 2017.

Questions

Please see the weaknesses.

Rating

4

Confidence

4

Soundness

2

Presentation

2

Contribution

2

Limitations

Limitations of lack of theoretical analysis (L571-574)'d better be put in the manuscript.

Reviewer fpY72024-08-13

I have carefully read the reviews of the reviewers and the author's detailed rebuttal, and I am sincerely grateful. In particular, the author corrected the experimental verification of TCP motivation and provided the benchmark result of CIFAR. However, in general, I am still worried about: - If we refer to related methods such as feature representation-based ones, 90 AUROC is not saturated, and their FPR is also relatively low ~20, so the AUROC performance should be improved further. - The method is a bit incremental and empirical, lacking theory as the author also acknowledges. If I understand correctly, the author wants to achieve the balance and relative weighting of OOD and ID items by modulating the function. Even so, the ablation OOD/ID ratios in the last three rows of Tab. 4 all increase monotonically with p, so either the hyperparameters may not be tuned well or there would be a deeper understanding of the exact reasons that matter. - For calibration verification, in addition to the recommended qualitative OOD region visualization comparison, you can also consider adding quantitative metrics such as ECE [4]. (Minor) - Post-hoc studies can be more comprehensive in research, and choosing different K is heuristic and not a very good calibration strategy. The authors could consider temporal scaling [4], etc. Based on the above reasons and careful consideration, I tend to keep the original score. [4] A Closer Look at the Robustness of Contrastive Language-Image Pre-Training (CLIP)

Authorsrebuttal2024-08-14

Thanks for your constructive suggestions!

Thank you very much for all the constructive feedback after reading our response! We will make sure to incorporate all suggestions in the revision.

Reviewer 34fm7/10 · confidence 5/52024-07-14

Summary

In response to challenges in OOD detection using CLIP-based methods, this paper introduces Self-Calibrated Tuning (SCT), a novel framework that addresses issues with unreliable OOD features extracted from ID data. SCT dynamically adjusts the influence of OOD regularization during model training based on the prediction uncertainty of ID samples. By introducing modulating factors into the learning objective, SCT directs the model's attention more effectively towards classification tasks, especially when training with low-confidence data. This adaptive approach improves the calibration of OOD features extracted from high-confidence ID data, enhancing the overall OOD detection performance of prompt tuning methods. Empirical evaluations on ImageNet-1k demonstrate SCT's effectiveness.

Strengths

1. This paper is well-motivated and well-written. In particular, authors propose to adaptively adjust the importance of OOD features and introduce SCT, which are motivated by the following finding: performance of prompt tuning based methods is significantly affected by the uncertainty of the given ID data. 2. Authors have a comprehensive review of the whole research literature. 3. Authors conduct a large amount of experiments and the experimental results demonstrate the effectiveness of SCT on both official benchmarks and hard OOD detection tasks. 4. In summary, I think SCT could become a great contribution towards OOD detection community.

Weaknesses

None in particular

Questions

1. My concern is mainly about the computational cost and training cost of SCT, since it involves operations on dense/local features. 2. My second concern is about the rationality of using pre-trained models (CLIPs .etc) to perform OOD detection tasks, because the concepts in both ID and OOD datasets are probably seen during pre-training stage. I want to know the authors' opinions towards the benchmarking and research paradigm.

Rating

7

Confidence

5

Soundness

4

Presentation

4

Contribution

4

Limitations

Please refer to weaknesses.

Reviewer wD2g4/10 · confidence 2/52024-07-16

Summary

This paper focuses open-set detection method based on CLIP. The authors propose an additional weighting mechanism based on the LoCoOp method to alleviate the problem that the outlier related regions extracted by the LoCoOp method are not trustworthy in some cases.

Strengths

Outlier detection with VLM is an interesting research direction.

Weaknesses

The contribution over LoCoOp is incremental. The only difference is an extra reweighting term based on the current prediction score. And the reweighting mechanism is purely based on heuristics - for example, $1-p(y|x)$ for $L_{ce}$ implicitly enforce hard sample mining. Minor: The intuition in Figure 1/4 is not clear to me. The shown examples validate that LoCoOp can detect and mask-out the inlier-related regions well. Also, the GT label should be annotated.

Questions

Please clarify the novelty and new insights.

Rating

4

Confidence

2

Soundness

2

Presentation

2

Contribution

2

Limitations

N/A

Authorsrebuttal2024-08-09

[Invitation to rolling discussion] Need further clarification?

Thanks for your time and comments on our work. We have tried our best to address the concerns and provided detailed responses to all your comments and questions. Are there any unclear points that we should/could further clarify?

Authorsrebuttal2024-08-09

[Invitation to rolling discussion] Need further clarification?

Thanks for your time and comments on our work. We have tried our best to address the concerns and provided detailed responses to all your comments and questions. Are there any unclear points that we should/could further clarify?

Authorsrebuttal2024-08-09

[Invitation to rolling discussion] Need further clarification?

Thanks for your time and comments on our work. We have tried our best to address the concerns and provided detailed responses to all your comments and questions. Are there any unclear points that we should/could further clarify?

Reviewer pBeU2024-08-12

Thanks for your responses. Some of my concerns have been addressed; however, I still have concerns about the incremental technical contribution and the limited improvement on AUROC. In my experiments, the FPR95 fluctuates greatly, while the AUROC results are relatively stable, so I consider the AUROC results more reliable. I will maintain my current score.

Authorsrebuttal2024-08-14

Thanks for your response!

Many thanks for your response and we will consider your suggestions in the revision.

Reviewer wD2g2024-08-12

Many thanks for the response. I carefully checked the author's response and revisited the relevant parts of the paper. I would like to firstly note *I'm not very familiar with the relevant area and its evaluation standard of relevant works*; in this background, the proposed method is *slightly* insufficient for me in terms of technical novelty and empirical contribution. The author may either: - empirically conduct more experiments to show solid improvement. As I noticed in the paper and the updated table here, the difference is not significant. If current benchamrks tend to saturate, the authors may convert to other more challenging datasets. - carry out some theoretical analysis. Current method is mainly built on heuristics, for example, the general uncertainty-based idea can also result in other variants like the one proposed, why and how the proposed idea be the optimal? I sincerely hope this can help make the submission better.

Authorsrebuttal2024-08-14

Thanks for your response!

Many thanks for your feedback and we will consider your suggestions in the revision.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC