Transductive Zero-Shot and Few-Shot CLIP

Ségolène Martin, Yunshi Huang, Fereshteh Shakeri, J. Pesquet, Ismail Ben Ayed
2/9/2026

Official code: SegoleneMartin/transductive-CLIP (34 stars, last commit 2025-03-06).

Abstract

Transductive inference has been widely investigated in few-shot image classification, but completely overlooked in the recent, fast growing literature on adapting vision-langage models like CLIP. This paper addresses the transductive zero-shot and few-shot CLIP classification challenge, in which inference is performed jointly across a mini-batch of unlabeled query samples, rather than treating each instance independently. We initially construct informative vision-text probability features, leading to a classification problem on the unit simplex set. Inspired by Expectation-Maximization (EM), our optimization-based classification objective models the data probability distribution for each class using a Dirichlet law. The minimization problem is then tackled with a novel block Majorization-Minimization algorithm, which simultaneously estimates the distribution parameters and class assignments. Extensive numerical experiments on 11 datasets underscore the benefits and efficacy of our batch inference approach. On zero-shot tasks with test batches of 75 samples, our approach yields near 20% improvement in ImageNet accuracy over CLIP's zero-shot performance. Additionally, we outperform state-of-the-art methods in the few-shot setting. The code is available at: https://github.com/SegoleneMartin/transductive-CLIP.

View on arXivView PDF

Code Implementations(1)

344Shell, PythonOct 4, 20231 years ago

Similar Papers

Cite this paper

@article{martin2026transductive,
  title  = {Transductive Zero-Shot and Few-Shot CLIP},
  author = {Ségolène Martin and Yunshi Huang and Fereshteh Shakeri and J. Pesquet and Ismail Ben Ayed},
  year   = {2026},
  eprint = {2405.18437},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2405.18437},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.18437.svg)](https://codeofpaper.com/paper/2405.18437)

Discussion