Boosting Vision-Language Models with Transduction

Maxime Zanella, Benoît Gérin, Ismail Ben Ayed

TL;DR

TransCLIP is a plug-and-play transductive module that boosts Vision-Language Model (VLM) performance by leveraging the inherent structure of unlabeled test data. By incorporating a novel text-guided KL divergence penalty and an efficient optimization strategy, it significantly improves zero-shot and few-shot accuracy across diverse datasets without requiring model retraining or expensive gradient computations.

What Problem Does This Paper Address?

Most current methods for adapting Vision-Language Models (VLMs) like CLIP—such as prompt tuning or adapters—follow the inductive paradigm. This means that during inference, the model predicts the label for each test sample independently, ignoring the other samples in the batch.

In contrast, transduction performs joint inference on all test samples of a task, leveraging the statistical structure of the unlabeled data to improve accuracy. While transduction has been successful in traditional vision-only classifiers, the authors point out that existing transductive methods perform poorly when applied to VLMs. The gap lies in the fact that these older methods ignore the rich textual knowledge provided by VLM class prompts.

The authors aim to bridge this gap by creating a transductive framework specifically designed for the multi-modal nature of VLMs, ensuring it is both high-performing and computationally efficient enough to scale to large datasets like ImageNet.

Methods

The authors introduce TransCLIP, which operates as a "black-box" module on top of the output embeddings of a VLM. Its core is a new objective function that combines three key components:

  1. GMM-based Clustering: It models the visual features of the test data as a Gaussian Mixture Model, essentially trying to find natural clusters in the image embeddings.
  2. Laplacian Regularization: This term encourages "nearby" samples in the visual embedding space to be assigned to the same class, enforcing spatial consistency.
  3. Text-guided KL Divergence Penalty: This is the critical innovation. It uses a Kullback-Leibler (KL) divergence term to ensure the transductive predictions don't stray too far from the initial text-based zero-shot predictions. This effectively uses the VLM's language encoder to supervise the unsupervised clustering process.

To solve this objective efficiently, the authors derive a Block Majorize-Minimize (BMM) optimization procedure. Unlike standard gradient descent, BMM provides guaranteed convergence with decoupled updates, allowing the method to process large-scale datasets in seconds rather than hours.

Datasets

The researchers evaluated TransCLIP across a wide array of benchmarks:

  • General Classification: ImageNet.
  • Fine-grained Classification: 10 datasets including SUN397 (scenes), Oxford Pets, Flowers102, Stanford Cars, EuroSAT (satellite imagery), and UCF101 (human actions).
  • Domain Generalization: Four ImageNet variants (Adversarial, ImageNetV2, Rendition, and Sketch) to test robustness against distribution shifts.

Key Insights and Ideas

  • Language is the "Secret Sauce": The paper demonstrates that transduction for VLMs must incorporate textual information. Without the KL-based language constraint, transductive performance often drops below simple zero-shot baselines.
  • Structural Awareness: By looking at the whole test set at once, TransCLIP can correct errors that an inductive model (which sees only one image at a time) would make, especially when the test data distribution differs from the training data.
  • Efficiency Matters: Because TransCLIP doesn't require backpropagation through the massive vision or text encoders, it is incredibly fast. It can be applied to multi-billion parameter models like EVA-CLIP-8B on consumer-grade hardware.
  • Universal Compatibility: TransCLIP is "orthogonal" to other adaptation methods. It can be layered on top of zero-shot CLIP, prompt-tuned models (CoOp), or adapter-based models (TaskRes) to provide an additive performance boost.
Figure 1: TransCLIP improves significantly the averaged top-1 accuracy on 11 datasets when used on top of inductive zero-shot CLIP, 2-shot CoOp prompt tuning and 2-shot TaskRes adapter for various encoder sizes.

Key Results

  • Zero-Shot Boost: On average, TransCLIP-ZS improves the top-1 accuracy of CLIP-ViT-B/16 by +5.1% across 11 datasets.
  • Few-Shot Gains: When used on top of 1-shot inductive methods, it provides an average boost of roughly +4%.
  • State-of-the-Art Transduction: TransCLIP significantly outperforms traditional transductive few-shot methods (like TIM or LaplacianShot) which rely solely on visual features.
  • Speedup: Compared to other unsupervised adaptation methods like UPL, TransCLIP is two to three orders of magnitude faster. For example, on ImageNet, TransCLIP takes ~14 seconds, while UPL takes over 150 minutes.
  • Scalability: The method scales effectively to massive models. On the 8-billion parameter EVA-CLIP, it achieved a +23% relative improvement in error reduction.
Table 1: TransCLIP atop inductive vision-language zero-shot and popular few-shot methods.

Limitations and Future Work

  • High-Shot Saturation: The authors noted that the benefits of transduction tend to decrease as the number of labeled shots increases (e.g., at 16 shots). This is likely because the labeled data already provides enough information to capture the class distributions.
  • Prompt Bias: Since the method relies on the text-guided KL penalty, it is sensitive to the quality of the initial prompts. If a prompt is poorly descriptive or biased, TransCLIP may propagate that bias.
  • Future Directions: The authors suggest exploring adaptive class-wise weighting for the text penalty, which could make the model more resilient when certain text prompts are known to be less reliable.

Summary updated

BibTeX
@inproceedings{zanella2024boosting,
  author = {Maxime Zanella and Benoît Gérin and Ismail Ben Ayed},
  title = {{Boosting Vision-Language Models with Transduction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=go4zzXBWVs},
}
Figure