[Paper Review] Robust fine-tuning of zero-shot models
This paper proposes WiSE-FT, a robust fine-tuning method that linearly interpolates between the weights of a zero-shot pre-trained model and a fine-tuned model, significantly improving performance under distribution shifts while maintaining or enhancing accuracy on the target distribution. The method achieves 4–6 percentage point gains in robustness across five ImageNet distribution shifts and 0.8–3.3 pp gains on transfer learning benchmarks, with no additional inference cost.
Large pre-trained models such as CLIP or ALIGN offer consistent accuracy across a range of data distributions when performing zero-shot inference (i.e., without fine-tuning on a specific dataset). Although existing fine-tuning methods substantially improve accuracy on a given target distribution, they often reduce robustness to distribution shifts. We address this tension by introducing a simple and effective method for improving robustness while fine-tuning: ensembling the weights of the zero-shot and fine-tuned models (WiSE-FT). Compared to standard fine-tuning, WiSE-FT provides large accuracy improvements under distribution shift, while preserving high accuracy on the target distribution. On ImageNet and five derived distribution shifts, WiSE-FT improves accuracy under distribution shift by 4 to 6 percentage points (pp) over prior work while increasing ImageNet accuracy by 1.6 pp. WiSE-FT achieves similarly large robustness gains (2 to 23 pp) on a diverse set of six further distribution shifts, and accuracy gains of 0.8 to 3.3 pp compared to standard fine-tuning on seven commonly used transfer learning datasets. These improvements come at no additional computational cost during fine-tuning or inference.
Motivation & Objective
- To address the trade-off between improved accuracy on a target distribution and reduced robustness to distribution shifts in standard fine-tuning.
- To develop a simple, effective method that preserves high accuracy on the target while enhancing robustness under distribution shifts.
- To reduce reliance on hyperparameter tuning by introducing a method that is robust to hyperparameter variations.
- To demonstrate that weight-space ensembling between zero-shot and fine-tuned models yields better generalization than standard fine-tuning.
Proposed method
- The method performs standard end-to-end or last-layer fine-tuning on the target distribution to obtain a fine-tuned model.
- It then constructs a weight-space ensemble by linearly interpolating the learned weights of the zero-shot and fine-tuned models using a mixing coefficient α ∈ [0,1].
- The final model is defined as θ_α = (1−α)θ_zero-shot + αθ_fine-tuned, where α is selected based on validation performance on the target distribution.
- The approach is computationally efficient, requiring no additional training or inference cost beyond standard fine-tuning.
- Diversity between the zero-shot and fine-tuned models is measured using multiple metrics, including KL divergence, Cohen’s Kappa complement, and Centered Kernel Alignment Complement (CKAC).
- Theoretical analysis shows that in the NTK regime, weight-space ensembling approximates output-space ensembling, justifying its effectiveness in non-convex settings.
Experimental results
Research questions
- RQ1Can fine-tuning be performed without sacrificing the robustness of zero-shot models to distribution shifts?
- RQ2How does the choice of hyperparameters in fine-tuning affect robustness, and can this be mitigated by a simple interpolation method?
- RQ3Does linear interpolation in weight space between zero-shot and fine-tuned models improve generalization across distribution shifts?
- RQ4To what extent does WiSE-FT outperform standard fine-tuning and prior robustness methods on diverse distribution shifts?
Key findings
- WiSE-FT improves average accuracy under five ImageNet distribution shifts (ImageNetV2, ImageNet-R, ImageNet-Sketch, ObjectNet, ImageNet-A) by 4 to 6 percentage points compared to prior work.
- On the ImageNet benchmark, WiSE-FT increases accuracy by 1.6 percentage points over standard fine-tuning while maintaining robustness gains.
- On six additional distribution shifts, WiSE-FT achieves robustness improvements ranging from 2 to 23 percentage points.
- On seven common transfer learning datasets, WiSE-FT achieves accuracy gains of 0.8 to 3.3 percentage points over standard fine-tuning.
- The method is robust to hyperparameter choices, as the best α can be selected based on target distribution performance alone.
- Weight-space ensembling approximates output-space ensembling in the NTK regime, providing theoretical justification for its empirical success.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.