Vision-Language Model Fine-Tuning via Simple Parameter-Efficient Modification

Ming Li, Jike Zhong, Chenxin Li, Liuzhuozheng Li, Nie Lin, Masashi Sugiyama

Abstract

Recent advances in fine-tuning Vision-Language Models (VLMs) have witnessed the success of prompt tuning and adapter tuning, while the classic model fine-tuning on inherent parameters seems to be overlooked. It is believed that fine-tuning the parameters of VLMs with few-shot samples corrupts the pre-trained knowledge since fine-tuning the CLIP model even degrades performance. In this paper, we revisit this viewpoint, and propose a new perspective: fine-tuning the specific parameters instead of all will uncover the power of classic model fine-tuning on VLMs. Through our meticulous study, we propose ClipFit, a simple yet effective method to fine-tune CLIP without introducing any overhead of extra parameters. We demonstrate that by only fine-tuning the specific bias terms and normalization layers, ClipFit can improve the performance of zero-shot CLIP by 7.27% average harmonic mean accuracy. Lastly, to understand how fine-tuning in CLIPFit affects the pre-trained models, we conducted extensive experimental analyses w.r.t. changes in internal parameters and representations. We found that low-level text bias layers and the first layer normalization layer change much more than other layers.

Introduction: Rethinking VLM Fine-Tuning

Fine-tuning massive models like CLIP for specific downstream tasks typically involves adding learnable components. Prompt Tuning adds learnable vectors to the input, while Adapter Tuning inserts extra bottleneck layers. These methods are preferred because "full fine-tuning" is widely believed to destroy the model's general-purpose "zero-shot" capabilities.

Comparison of CLIPFit with traditional Parameter-Efficient Fine-Tuning (PEFT) strategies like Prompt Tuning and Adapter Tuning.

CLIPFit challenges this prevailing wisdom by asking: Is it the act of fine-tuning internal parameters that is problematic, or simply that we are tuning the wrong ones? The authors propose a minimalist strategy that modifies inherent weights without adding architectural overhead, maintaining generalization while boosting task-specific performance.

Methodology: The CLIPFit Approach

CLIPFit focuses on two specific, parameter-light components of the CLIP architecture to achieve state-of-the-art results with zero inference-time overhead.

The CLIPFit architecture: selective tuning of bias terms in the Text Encoder's FFN and LayerNorm parameters in the Image Encoder.
  1. Selective Bias Tuning (Text Encoder): CLIPFit updates only the bias terms of the projection linear layers within the Feed-Forward Networks (FFNs). This is more restrictive than standard bias-tuning methods like BitFit, resulting in extreme efficiency.
  2. LayerNorm Tuning (Image Encoder): To address distribution shifts between pre-training and downstream data, CLIPFit fine-tunes only the Layer Normalization (LayerNorm) parameters. These learnable gains and biases are ideal for re-centering and re-scaling feature distributions.
  3. Knowledge Distillation (KD) Regularization: To prevent "catastrophic forgetting" of pre-trained knowledge, a KD loss is employed. This encourages the fine-tuned features to remain aligned with the original zero-shot CLIP features.

Key Insights and Analysis

A core finding of this study is the "Low-Level Priority". Analysis of gradient sums and parameter changes showed that layers closer to the input (low-level) change significantly more than high-level layers. Specifically, the first LayerNorm layer in the image encoder and early text bias layers exhibited the most movement during adaptation.

Furthermore, LayerNorm acts as a "distribution bridge," allowing the model to adapt to the specific statistics of a new dataset without needing to relearn fundamental visual features. This efficiency is remarkable: CLIPFit tunes only ~46K parameters per task, making it 77x more efficient than multi-modal prompt tuning methods like MaPLe (~3.55M parameters).

Experimental Results

The researchers evaluated CLIPFit across 11 diverse classification datasets, including ImageNet, OxfordPets, and EuroSAT.

  • Base-to-New Generalization: CLIPFit achieved a 7.33% improvement in average harmonic mean accuracy over zero-shot CLIP, outperforming leading methods like MaPLe and CoOp on most benchmarks.
  • Few-Shot Robustness: In 1, 2, and 4-shot settings, CLIPFit maintained a significant lead over competitors, demonstrating high data efficiency.
  • Distribution Shift: On ImageNet-V2 and ImageNet-Sketch, CLIPFit showed superior robustness, proving that its surgical fine-tuning does not lead to overfitting on the source distribution.

Conclusion

CLIPFit demonstrates that internal fine-tuning of VLMs is not inherently destructive. By focusing on specific bias and normalization parameters and employing proper regularization, one can achieve superior performance and efficiency without adding any extra parameters to the model architecture. Future work will explore the application of this method to broader VLM tasks such as image retrieval and generative modeling.

Summary updated

BibTeX
@inproceedings{li2024vision,
  author = {Ming Li and Jike Zhong and Chenxin Li and Liuzhuozheng Li and Nie Lin and Masashi Sugiyama},
  title = {{Vision-Language Model Fine-Tuning via Simple Parameter-Efficient Modification}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=pFUZkAOq4q},
}
Figure