Candidate Pseudolabel Learning: Enhancing Vision-Language Models by Prompt Tuning with Unlabeled Data

Jiahan Zhang, Qi Wei, Feng Liu, Lei Feng

TL;DR

Fine-tuning Vision-Language Models (VLMs) like CLIP on unlabeled data often fails when the model's initial zero-shot predictions are inaccurate, resulting in incorrect "hard" pseudolabels. This paper introduces Candidate Pseudolabel Learning (CPL), a method that generates a refined set of potential labels for each image rather than forcing a single choice. By treating fine-tuning as a partial-label learning problem, CPL significantly outperforms existing methods, especially on datasets where the VLM's initial zero-shot performance is weak.

Introduction: The Problem with Hard Pseudolabels

Large pre-trained VLMs exhibit impressive zero-shot capabilities, but they still require fine-tuning to achieve optimal performance on specific downstream tasks. To avoid the high cost of manual annotation, researchers often use the VLM's own zero-shot predictions to generate "pseudolabels" for abundant unlabeled data, and then train the model on those labels.

The standard approach uses hard pseudolabeling—simply taking the model's top-1 predicted class as the absolute truth. However, if the VLM is unfamiliar with the downstream domain (e.g., specialized satellite imagery or fine-grained textures), its top-1 predictions are frequently wrong. Worse, the model tends to over-predict a few dominant classes, leading to a highly imbalanced training set. Training a model on incorrect, imbalanced pseudolabels inevitably leads to poor downstream adaptation.

Comparison of hard vs. candidate pseudolabels.

As shown above, forcing the model to commit to a single hard label discards valuable uncertainty. If a VLM is 40% confident an image is Class A and 39% confident it is Class B, forcing a hard label of "100% Class A" is risky. Candidate sets preserve this nuance, allowing the model to defer strict categorization until it has learned more about the downstream domain.

Methodology: Candidate Pseudolabel Learning (CPL)

Instead of forcing a single choice, CPL generates a candidate set of labels for each instance (e.g., "This image is either a dog, a wolf, or a fox"). The core innovation is how this candidate set is constructed and refined using a two-pronged filtering strategy based on a confidence score matrix.

Overview of the intra- and inter-instance label selection process.
  1. Intra-instance Label Selection: For a single image, the method sorts the predicted classes by confidence. It adds classes to the candidate set until their cumulative confidence surpasses a dynamic threshold. This ensures that harder-to-classify images get larger candidate sets, while "easy" images get smaller ones.
  2. Inter-instance Label Selection: To prevent the VLM's inherent biases from flooding the dataset with a few dominant classes, CPL looks at the confidence scores for a single class across all images. A class is only kept in an image's candidate set if its confidence score falls within the top percentile for that specific class globally.
  3. Intersection and Training: The final candidate set is the intersection of the intra- and inter-instance selections. The problem is then framed as Partial-Label Learning (PLL). The authors directly apply existing, mathematically proven PLL loss functions to update the model's prompts.

The model and the candidate pseudolabels are updated iteratively, mutually improving each other as training progresses.

Datasets and Experimental Setup

The authors evaluated CPL across nine diverse image classification benchmarks:

  • Fine-grained: FGVC-Aircraft, CUB, Flowers102
  • Specialized/Textures: EuroSAT (satellite), DTD (textures)
  • General/Action: RESISC45, CALTECH-101, UCF-101, CIFAR-100

Experiments were conducted under three paradigms: Unsupervised Learning (UL), Semi-Supervised Learning (SSL), and Transductive Zero-Shot Learning (TRZSL). This variety ensures the method is tested across domains with varying levels of zero-shot difficulty.

Key Results and Insights

  • Massive gains on weak zero-shot tasks: On the EuroSAT dataset, where zero-shot CLIP struggles (30.54% accuracy), CPL achieves 67.26% in the Unsupervised Learning setting. This is a massive 10.05% absolute improvement over the previous state-of-the-art iterative method, GRIP (57.21%).
  • Consistent superiority: CPL consistently outperformed baselines across both textual prompt tuning (optimizing text inputs) and visual prompt tuning (optimizing visual inputs).
  • Plug-and-play versatility: CPL's pseudolabeling module can be dropped into other existing VLM fine-tuning frameworks. When integrated into the recent LaFTer baseline, CPL improved top-1 test accuracy on the DTD dataset by a staggering 10.2%.
  • Bridging two fields: By structuring the VLM pseudolabeling problem as a candidate set, the authors cleverly unlock the entire existing literature of Partial-Label Learning (PLL), allowing them to plug in established PLL algorithms without inventing new loss functions.

Limitations and Future Work

The authors acknowledge a fundamental limitation inherent to all pseudolabeling techniques: the "garbage in, garbage out" ceiling. If the true ground-truth label is completely missing from the generated candidate set, the model has no mathematical way to learn it. While CPL drastically increases the probability that the true label is somewhere in the candidate set compared to hard pseudolabeling, it isn't perfect. Future work will focus on refining the generation strategy to better handle instances where the true label is entirely excluded from the initial candidate sets.

Summary updated

BibTeX
@inproceedings{zhang2024candidate,
  author = {Jiahan Zhang and Qi Wei and Feng Liu and Lei Feng},
  title = {{Candidate Pseudolabel Learning: Enhancing Vision-Language Models by Prompt Tuning with Unlabeled Data}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=sBJNokmYuV},
}
Figure