Dual Risk Minimization: Towards Next-Level Robustness in Fine-tuning Zero-Shot Models

Fine-tuning foundation models often compromises their robustness to distribution shifts. To remedy this, most robust fine-tuning methods aim to preserve the pre-trained features. However, not all pre-trained features are robust and those methods are largely indifferent to which ones to preserve. We propose dual risk minimization (DRM), which combines empirical risk minimization with worst-case risk minimization, to better preserve the core features of downstream tasks. In particular, we utilize core-feature descriptions generated by LLMs to induce core-based zero-shot predictions which then serve as proxies to estimate the worst-case risk. DRM balances two crucial aspects of model robustness: expected performance and worst-case performance, establishing a new state of the art on various real-world benchmarks. DRM significantly improves the out-of-distribution performance of CLIP ViT-L/14@336 on ImageNet (75.9 to 77.1), WILDS-iWildCam (47.1 to 51.8), and WILDS-FMoW (50.7 to 53.1); opening up new avenues for robust fine-tuning. Our code is available at https://github.com/vaynexie/DRM .

Paper

Similar papers

Peer review

Reviewer gi7f6/10 · confidence 3/52024-07-05

Summary

To address the robustness of foundational models under distribution shift conditions, this paper proposes a dual risk minimization approach. Specifically, the authors combine Empirical Risk Minimization (ERM) and Worst-Case Risk Minimization (WCRM) to optimize the model fine-tuning process. To achieve accurate distribution estimation, the authors use class descriptions generated by GPT-4 as prompts inputted into the model and apply max-min normalization to the classification probabilities to address certain items that should be zero. Experiments demonstrate that the dual risk minimization method significantly enhances robustness in zero-shot fine-tuning.

Strengths

1. The authors propose dual risk minimization through rigorous mathematical proofs. 2. Experiments show that dual risk minimization can effectively enhance the robustness of the model.

Weaknesses

1. To accurately estimate $p_c(y|c) $, the authors use prompts generated by GPT-4 to initialize the classifier parameters. Nevertheless, this classifier may still not be the optimal choice. 2. Given that better prompts have been used to initialize the classifier cd, why not directly fine-tune cd instead of using cd to assist in fine-tuning df? Moreover, why is the performance of cd inferior to df when comparing row 2 and row 3 in Table 3? 3. In Table 7, if the models trained with df and cd (row d1 and d2) are directly used for inference with (13), how will the performance be?

Questions

See Weakness.

Rating

6

Confidence

3

Soundness

2

Presentation

2

Contribution

2

Limitations

Yes

Reviewer zSx85/10 · confidence 4/52024-07-14

Summary

This paper proposes a method for robust fine-tuning by combining empirical risk minimization with worst-case risk minimization to better preserve core features. The approach uses descriptions of core features obtained from large language models (LLMs) like GPT-4 and employs these descriptions to estimate worst-case risk. This method aims to enhance robustness by minimizing empirical risk on the training set of downstream tasks while improving the understanding of core features. As a result, the proposed method demonstrates significant performance improvements over existing methods on datasets such as ImageNet, iWildCam, and FMoW.

Strengths

- The paper introduces a novel approach by combining empirical risk minimization with worst-case risk minimization, particularly when no other domain is provided. The use of LLMs to obtain core-feature descriptions is innovative and allows for practical implementation without human annotations. Additionally, integrating this method with techniques like weight ensemble can lead to synergistic performance improvements. - The method is well-supported by theoretical foundations and empirical results. The significant performance improvements on challenging datasets like iWildCam and FMoW highlight the robustness and effectiveness of the approach. - The paper clearly explains the motivation behind combining empirical and worst-case risk minimization, and the experimental results support the claimed performance improvements. Table 3 effectively highlights the necessity of redefining the new proxy oracle due to artifact terms.

Weaknesses

- The main weakness of the proposed method lies in the sensitivity to the hyperparameter $\lambda$ . As shown in Table 6, slight deviations from the optimal $\lambda$ value can lead to significant performance drops. Finding the optimal $\lambda$ for different datasets could be impractical, and this issue needs to be addressed by reporting ablation studies on additional datasets beyond iWildCam. - The results in Table 6 show no trade-off between in-distribution (ID) and out-of-distribution (OOD) performance, which is counterintuitive. The authors should provide an explanation for this observation. - While the overall quality of writing is high, certain sections and figures need improvement. For example: - Line 159 and Eq. 3 need a clearer explanation of the DRM formulation relaxation process. - Figure 1 should explicitly state the meaning of the first and second bars. - Figure 2 could be misleading as it shows the original image having higher affinity with the class concept description than the background-free image without showing affinities with other images. - The method relies heavily on the quality of the class concept descriptions generated by GPT-4. An analysis and ablation study on the quality of these descriptions are necessary. Additionally, the impact of using different LLMs should be explored.

Questions

- The proposed method has only been tested with full fine-tuning. I think this method also can be combined with methods like LP-FT or FLYP. I am curious about the results when they are combined with the proposed method. - Why is there no observed trade-off between ID and OOD performance in Table 6? An explanation for this phenomenon is needed. - How robust is the method to the quality of class concept descriptions? What happens when a different LLM is used?

Rating

5

Confidence

4

Soundness

4

Presentation

3

Contribution

4

Limitations

The authors have addressed some limitations of their work but have not sufficiently discussed the critical issue of hyperparameter sensitivity and its impact on performance. There are no identified negative societal impacts.

Reviewer eddC6/10 · confidence 2/52024-07-22

Summary

This paper introduces dual risk minimization (DRM), a novel approach that combines empirical risk minimization (ERM) with worst-case risk minimization (WRM) to enhance the robustness of fine-tuning zero-shot foundation models. The authors address the limitations of existing methods that fail to effectively preserve robust features during fine-tuning by utilizing concept descriptions from LLMs to create soft labels for estimating worst-case risk, focusing on core features that define target classes. Empirical results demonstrate that DRM significantly improves out-of-distribution performance on benchmarks such as ImageNet and WILDS, establishing new state-of-the-art results.

Strengths

- The main idea of dual risk minimization (DRM), which combines ERM and WRM, is novel and interesting. Also, DRM effectively balances expected and worst-case performance. - Experimental results show that DRM achieves state-of-the-art results on various benchmarks.

Weaknesses

- The dependence on the lambda seems to be quite significant, and there is no ablation study addressing this in the main paper. It would be good to see results regarding the impact of lambda. - It would be helpful if the paper included details on the computational time and cost for each experiment to understand the efficiency and scalability of the proposed methods.

Questions

Please refer to the weaknesses.

Rating

6

Confidence

2

Soundness

3

Presentation

3

Contribution

3

Limitations

Yes. They address the limitations of their work.

Reviewer D5j15/10 · confidence 3/52024-07-25

Summary

This paper presents Dual Risk Minimization (DRM), a novel approach that combines empirical risk minimization (ERM) and worst-case risk minimization (WRM) for fine-tuning the CLIP model while maintaining its out-of-distribution robustness. The idea is to create a classifier that utilizes concept descriptions of each class generated by large language models (LLMs). This classifier helps “pull out” core features from the image embeddings, serving as a regularizer to enhance the robustness of CLIP fine-tuning. Moreover, the paper introduces a min-max normalization technique to address a caveat in the regularization. Experimental results demonstrate the effectiveness of the proposed DRM, yielding promising in-distribution and out-of-distribution accuracy.

Strengths

- The paper is well-written and generally easy to follow. - The paper brings an interesting viewpoint for CLIP fine-tuning that separates the image features into core (content) and non-core (style) features. - The experimental results look promising, especially on the two specialized datasets, iWILDCam and FMoW.

Weaknesses

- At Line 199, the paper claims that the LLM-generated concept descriptions can “pull out” the core features from the image embeddings. However, this claim is only demonstrated by the few examples shown in Figure 2, which is insufficient. Moreover, the stochastic nature of LLM generation can further complicate the matter. The paper lacks a thorough analysis of the reliability and robustness of the core features obtained through this proposed method. - At Line 217, the paper mentions that the affinity between $x$ and any other class $y'$ should ideally be zero, thereby motivating the modification of the second term in Eq. 10. However, this might ignore the fact that the ground-truth class $y$ exhibits varying degrees of similarity with different $y’$. It remains unclear how the proposed method can achieve better performance, as shown in Table 3, while disregarding the learning of such inter-class similarities. - The second term in Eq. 10. is similar to knowledge distillation, as acknowledged by the paper at Line 207. However, the paper neglects to discuss or compare this term with other robust fine-tuning methods, such as [1], which also incorporate knowledge distillation. [1] DELTA: Deep Learning Transfer using Feature Map with Attention for Convolutional Networks, ICLR 2019.

Questions

Besides the weakness shown in the above section, please also see the following questions: - Given that the paper suggests that the classifiers built with LLM-generated concept descriptions have the ability to extract core features, could we simply fine-tune the CLIP model utilizing these concept descriptions instead of using the one with default descriptions? If we do so, could standard fine-tuning with ERM already maintain its robustness? - What would be the in-distribution and out-of-distribution accuracy for the concept description classifiers? Given that these classifiers aim to extract more core features, would they be more robust to distribution changes, even without fine-tuning? - How does the min-max normalization affect the training on long-tailed datasets, like iWILDCam? Specifically, since the min-max normalization computes $x$ with all images in a class $y$, could tailed classes result in less stable normalization because they have much fewer samples?

Rating

5

Confidence

3

Soundness

2

Presentation

3

Contribution

2

Limitations

The paper acknowledges that a potential limitation of the proposed method lies in the potential limited domain knowledge of LLMs in specific domains. To better illustrate this limitation, it would be beneficial for the paper to provide concrete examples, such as failure cases, that show how the method behaves when it reaches its limits.

Reviewer gi7f2024-08-07

The author have addressed my concern, and I will change my score from 5 to 6.

Authorsrebuttal2024-08-09

Thank you for taking the time to read our response and increasing your score! We are glad to hear that the response addressed your concerns.

Authorsrebuttal2024-08-13

Message to Reviewers: We look forward to hearing from you

Dear Reviewers, Thank you again for reviewing our paper. We are more than happy to address any further questions or concerns you may have before the conclusion of the author-reviewer discussion period (in 30 hours). Please feel free to reach out with any further feedback. We look forward to hearing from you. Best regards, Authors

Reviewer zSx82024-08-14

Thank you for your thorough response. I have carefully reviewed all the rebuttals and your clarifications, which have addressed many of my concerns. However, some issues still remain. First, the observation that increasing $\lambda$ leads to improvements in both ID and OOD performance appears to be specific to the iWildCam dataset. The results on ImageNet show a different trend. Although it is true that $\lambda$ values between 2 and 5 generally result in good ID and OOD performance, the consistent improvement in OOD performance as ID performance increases does not seem to hold universally. Moreover, all ablation studies have been conducted solely on iWildCam, whereas the qualitative examples are shown on different datasets. This narrow focus on a single dataset for ablation and analysis makes it difficult to fully understand and validate the proposed method. I believe it is necessary to provide experimental results and analyses across a wider variety of datasets to ensure a comprehensive understanding of the proposed approach. The concept of combining ERM and WRM is intriguing, and the approach is interesting. However, the need to generate concept descriptions for all classes, along with the fact that the effectiveness of this approach varies depending on the quality of the generated descriptions, the $\lambda$ hyperparameter reduces the practical utility of this method. For these reasons, I intend to maintain my current score.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC