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

Matteo Farina, Massimiliano Mancini, Giovanni Iacca, Elisa Ricci · DOI

Introduction

Adapting large pre-trained Vision-Language Models (VLMs) like CLIP to specific downstream tasks with minimal data—known as Few-Shot Adaptation (FSA)—presents a significant challenge. While these models possess vast general knowledge, fine-tuning them on just a handful of examples (e.g., 16 images per class) often leads to severe overfitting. This is particularly problematic in the base-to-novel setting, where a model must learn specific "base" classes while retaining its ability to generalize to unseen "novel" classes.

Existing solutions often employ complex Parameter-Efficient Fine-Tuning (PEFT) techniques, such as prompt tuning or specialized adapters. However, these methods frequently struggle to balance the trade-off between specializing on base classes and maintaining zero-shot generalization.

The Breakpoint Phenomenon

A key contribution of this work is the discovery of a consistent "breakpoint" in the learning dynamics of standard PEFT methods like LoRA, BitFit, and LayerNorm tuning. Early in the training process, performance improves across both base and novel classes. However, after a certain point, the model begins to over-specialize: accuracy on base classes continues to climb, while performance on novel classes degrades rapidly.

Figure 2: Learning dynamics of various PEFT methods showing the 'breakpoint' (pink line) where novel class performance begins to degrade.

Analysis reveals that tuning LayerNorm parameters is particularly robust, reaching this overfitting breakpoint much later than other methods. This observation suggests that general task-level features are learned early, while class-specific overfitting occurs in the later stages of training.

The 2SFS Method

To exploit these dynamics, the authors propose Two-Stage Few-Shot Adaptation (2SFS). This approach simplifies the adaptation process into two distinct phases:

  1. Stage 1 (Task-level feature extraction): For the first 60% of the training budget, the model tunes only the LayerNorm parameters of the vision and text encoders. This captures general task features before the breakpoint is reached, enhancing representations for both base and novel classes.
  2. Stage 2 (Simple classifier tuning): The VLM backbone is then frozen to preserve these generalized features. A linear classifier is initialized using the text embeddings of the base classes and trained for the remainder of the budget to optimize separation between known categories.

This "back-to-basics" strategy also enables Category-Level Selective Inference. At test time, the model can use the efficient linear classifier for recognized base classes and only invoke the computationally expensive text encoder for novel, unseen classes.

Key Results

2SFS was evaluated across 11 diverse image classification benchmarks, including ImageNet, EuroSAT, and DTD. The results demonstrate that this simple two-stage approach consistently matches or outperforms state-of-the-art (SOTA) methods.

Figure 1: Performance comparison of 2SFS against SOTA methods, showing superior balance between base-to-novel generalization and all-to-all accuracy.

In the base-to-novel setting using a ViT-B/16 backbone, 2SFS achieved an average Harmonic Mean of 80.20%, surpassing complex methods like MMA (79.87%) and CLIP-LoRA (77.28%). The performance gap is even more pronounced in extreme low-data regimes (4-shot and 8-shot), where 2SFS outperformed competitors by up to +4.45% in Harmonic Mean. Furthermore, 2SFS proved highly stable across different backbones (ViT-B/32, ViT-L/14) without requiring dataset-specific hyperparameter tuning.

Conclusion and Future Work

By rethinking the few-shot adaptation process, 2SFS demonstrates that a well-timed transition from feature learning to classifier tuning can outperform highly engineered modern techniques. While the current method uses a fixed threshold to switch stages, future research may focus on dynamic stopping criteria to automatically detect the breakpoint. Additionally, extending this two-stage philosophy to dense prediction and temporal tasks remains a promising direction for the field.

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