An Effective Levelling Paradigm for Unlabeled Scenarios

Fangming Cui, Zhou Yu, Di Yang, Yuqiang Ren, Liang Xiao, Xinmei TianNeurIPS 2025

TL;DR

Fine-tuning Vision-Language Models (VLMs) like CLIP often forces a tug-of-war between learning specific tasks and maintaining general robustness. This paper introduces the Levelling Paradigm (LePa), a plug-and-play module that dynamically coordinates competing objective functions to significantly boost a model's ability to generalize to new datasets and domains—without adding a single extra parameter.

The Challenge: Uncoordinated Learning

Vision-Language Models (VLMs) such as CLIP are renowned for their "zero-shot" capabilities, allowing them to recognize unseen objects using only text prompts. However, achieving peak performance on specific tasks usually requires fine-tuning.

The primary challenge during fine-tuning is a phenomenon the authors term uncoordinated learning. Models typically rely on two conflicting types of loss functions:

  1. Cross-Entropy (CE) Loss: Pushes the model to achieve high accuracy on specific training labels (e.g., identifying a specific breed in the OxfordPets dataset).
  2. Visual Loss: Acts as a regularizer, attempting to prevent the model from "forgetting" its broad, pre-trained knowledge by anchoring its visual features close to the original CLIP features.

These goals are naturally at odds. CE loss warps the feature space to fit new data, while Visual loss resists this change. This conflict often results in poor performance in "unlabeled scenarios," such as when the model encounters novel classes within the same dataset or is tested on an entirely different dataset (cross-dataset generalization).

The Solution: Levelling Paradigm (LePa)

To resolve this conflict, the authors propose LePa, a module designed to act as a mediator between these competing losses. Importantly, LePa is not a new model architecture; it is a training objective structure that can be seamlessly added to existing state-of-the-art fine-tuning methods like MaPLe or PromptSRC.

Architecture of the LePa plug-in module

How LePa Works

  • Hand-crafted CE (HCE): The system utilizes a set of traditional, hand-crafted prompts (e.g., "a photo of a...", "a bad photo of a...") to establish a baseline of general knowledge. It specifically identifies the "worst-case" scenarios among these prompts to represent the most difficult cases, building a more resilient feature space.
  • Dynamic Coordination: Instead of simply summing the losses, LePa calculates the absolute difference between the Hand-crafted CE loss and the Visual loss: $| \mathcal{L}_{HCE} - \mathcal{L}_{Visual} |$.
  • The Goal: By minimizing this difference, LePa forces the task-specific alignment and the visual regularization to stay "in sync." This prevents one objective from dominating the other, treating the process as a coordination problem rather than a simple addition problem.

Because LePa only modifies the loss function during training, the final model retains the exact same number of parameters as the baseline. This yields better generalization "for free" regarding inference speed and memory.

Key Results Across Diverse Datasets

The researchers evaluated LePa across 11 diverse real-world datasets, ranging from generic objects (ImageNet, Caltech101) to fine-grained categories (OxfordPets, StanfordCars) and specialized imagery (EuroSAT, UCF101).

Radar chart comparing LePa performance across 11 datasets

LePa consistently outperformed baseline methods across three major generalization tasks:

  1. Base-to-Novel Generalization: When trained on "base" classes and tested on "novel" ones, LePa improved the Harmonic Mean (balancing base and novel accuracy) across all 11 datasets. For instance, integrating LePa with PromptSRC raised the average score from 79.97% to 81.33%.
  2. Cross-Dataset Generalization: Models trained solely on ImageNet were tested on the other 10 datasets. The LePa + PromptSRC combination achieved an average accuracy of 66.93%, surpassing the baseline and other plug-ins like DePT.
  3. Domain Generalization: On challenging robustness benchmarks like ImageNet-A (adversarial) and ImageNet-R (rendition), LePa demonstrated significant gains, proving it helps the model maintain accuracy despite style shifts or image tampering.

Limitations and Future Directions

While LePa offers substantial benefits without adding parameters, it does introduce a computational cost during training. Calculating multiple cosine similarities for the hand-crafted prompts increases training time (e.g., training on SUN397 increased from ~13 to ~15 minutes). Additionally, focusing heavily on generalization can sometimes lead to a very slight dip in performance on the original source dataset compared to methods that overfit more aggressively.

Future work will explore ways to reduce this training time overhead and test the paradigm in extreme "low-data" scenarios, such as 1-shot or 2-shot learning.

Summary updated

BibTeX
@inproceedings{cui2025effective,
  author = {Fangming Cui and Zhou Yu and Di Yang and Yuqiang Ren and Liang Xiao and Xinmei Tian},
  title = {{An Effective Levelling Paradigm for Unlabeled Scenarios}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=nhIJe0dgRs},
}
Figure