Rethinking Few-Shot Adaptation of Vision-Language Models in Two Stages

Matteo Farina, Massimiliano Mancini, Giovanni Iacca, Elisa Ricci

Introduction

Adapting large-scale Vision-Language Models (VLMs) like CLIP to specific tasks with minimal data—known as few-shot adaptation—presents a significant challenge. Models must balance learning task-specific nuances (base classes) without sacrificing the general knowledge required to recognize unseen categories (novel classes). Current state-of-the-art methods, such as prompt tuning or specialized adapters, often struggle to maintain high performance across both "all-to-all" (seen classes) and "base-to-novel" (unseen classes) scenarios.

The Discovery of the Training "Breakpoint"

A critical contribution of this research is the identification of a natural "breakpoint" during the fine-tuning of VLMs. By analyzing training trajectories across various methods like LoRA, BitFit, and LayerNorm tuning, the authors observed a consistent pattern: an initial phase where accuracy improves for both base and novel classes, followed by a point where novel class performance begins to degrade while base class accuracy continues to climb. This degradation marks the onset of overfitting to the specific training categories at the expense of general task features.

Training trajectories showing the breakpoint (pink line) where novel class accuracy (dashed) starts to decline while base accuracy (solid) continues to rise.

The 2SFS Framework

To exploit this insight, the researchers developed 2SFS (Two-Stage Few-Shot Adaptation). This method simplifies the adaptation process into two distinct stages:

  1. Stage 1: Task-Level Feature Learning. The model fine-tunes only its LayerNorm parameters, which are found to be remarkably robust. Training is intentionally halted at the identified "breakpoint" to preserve the model's ability to generalize to novel classes.
  2. Stage 2: Simple Classifier Tuning. After the feature extractor is optimized for the general task, it is frozen. A simple linear classifier is then trained on top using the available few-shot samples for the base categories.

At inference time, 2SFS employs Selective Inference. It utilizes the fast linear classifier for recognized base categories and reverts to the text encoder to generate embeddings on the fly for novel categories, ensuring the most appropriate mechanism is used for each input.

Key Results and Performance

2SFS was evaluated across 11 diverse benchmarks, including ImageNet and various fine-grained classification datasets. The results demonstrate that 2SFS consistently outperforms complex state-of-the-art techniques.

Notably, in the "base-to-novel" setup, 2SFS achieved the highest Harmonic Mean (HM) score in 8 out of 11 datasets. On specialized tasks like Stanford Cars and FGVC Aircraft, the two-stage approach yielded absolute accuracy improvements of over 10% compared to single-stage adaptation. Unlike previous methods that often trade off performance in one scenario for another, 2SFS maintains stability and top-tier performance in both all-to-all and base-to-novel settings.

Comparison of 2SFS against state-of-the-art methods, showing superior performance in both All-to-all Mean and Base-to-novel Harmonic Mean.

Conclusion

By rethinking few-shot adaptation as a two-stage process centered around a training breakpoint, 2SFS proves that simplicity can outperform complexity. The method's reliance on robust LayerNorm tuning and a well-timed transition to linear classification provides a powerful, efficient, and stable framework for adapting VLMs to new domains without losing their inherent zero-shot capabilities.

Summary updated

BibTeX
@inproceedings{farina2025rethinking,
  author = {Matteo Farina and Massimiliano Mancini and Giovanni Iacca and Elisa Ricci},
  title = {{Rethinking Few-Shot Adaptation of Vision-Language Models in Two Stages}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02791},
}
Figure