Large Multimodal Models as General In-Context Classifiers

Marco Garosi, Matteo Farina, Alessandro Conti, Massimiliano Mancini, Elisa Ricci · DOI

Abstract

Which multimodal model should we use for classification? Previous studies suggest that the answer lies in CLIP-like contrastive Vision-Language Models (VLMs), due to their remarkable performance in zero-shot classification. In contrast, Large Multimodal Models (LMM) are more suitable for complex tasks. In this work, we argue that this answer overlooks an important capability of LMMs: in-context learning. We benchmark state-of-the-art LMMs on diverse datasets for closed-world classification and find that, although their zero-shot performance is lower than CLIP's, LMMs with a few in-context examples can match or even surpass contrastive VLMs with cache-based adapters, their "in-context" equivalent. We extend this analysis to the open-world setting, where the generative nature of LMMs makes them more suitable for the task. In this challenging scenario, LMMs struggle whenever provided with imperfect context information. To address this issue, we propose CIRCLE, a simple training-free method that assigns pseudo-labels to in-context examples, iteratively refining them with the available context itself. Through extensive experiments, we show that CIRCLE establishes a robust baseline for open-world classification, surpassing VLM counterparts and highlighting the potential of LMMs to serve as unified classifiers, and a flexible alternative to specialized models.

Redefining Multimodal Classification

In computer vision, classification has long been dominated by two distinct paradigms. Vision-Language Models (VLMs), such as CLIP, utilize contrastive learning to measure the similarity between images and text labels, making them the gold standard for zero-shot classification. Conversely, Large Multimodal Models (LMMs), like Qwen or Phi, are generative powerhouses designed for complex reasoning and dialogue, yet they have historically lagged behind VLMs in straightforward classification tasks.

This paper challenges the notion that LMMs are inherently inferior classifiers. The authors argue that LMMs have simply been under-utilized in this domain because their capacity for In-Context Learning (ICL)—the ability to adapt to a task via a few examples in the prompt—has been overlooked. By correctly conditioning LMMs with context, they can be transformed into highly effective, unified classifiers.

The Power of Context

Comparison of zero-shot vs. in-context classification for CLIP and LMMs.

The fundamental shift occurs when moving from zero-shot to few-shot scenarios. While CLIP-style models are robust out of the box, their improvement curve with additional examples is relatively shallow. LMMs, however, exhibit remarkable sample efficiency. As illustrated in Figure 1, providing an LMM with a small set of image-label pairs allows it to bridge the performance gap, eventually matching or exceeding the accuracy of specialized contrastive models.

Methodology: Closed-World and Open-World Settings

The research explores two primary classification environments:

1. Closed-World Classification

In this setting, the model is provided with a fixed list of candidate labels. The study compares LMMs using "Vanilla ICL" (prompting with image-label pairs) against VLMs utilizing "Tip-Adapter," a state-of-the-art method that uses a cache of few-shot examples to refine contrastive predictions.

2. Open-World Classification & CIRCLE

Open-world classification is more challenging as no predefined labels exist. While LMMs are naturally suited for this due to their generative nature, they often suffer from inconsistent semantic granularity—for instance, labeling a specific breed of dog as just "animal."

To solve this, the authors introduce CIRCLE (CIRCLE Iteratively Refines Contextual Learning Examples). This training-free method works in three steps:

  1. Pseudo-labeling: The LMM generates initial labels for a set of unlabeled context images.
  2. Iterative Refinement: The model re-evaluates each image's label while considering the entire context set and their current pseudo-labels. This "circular" cross-referencing ensures the model adopts a consistent vocabulary and level of detail.
  3. Final Classification: The refined context is used to classify the target query image.

Empirical Performance Across Domains

The authors benchmarked their approach across 10 diverse datasets, ranging from prototypical objects (Caltech101) to fine-grained categories (Stanford Cars, Oxford Pets) and non-prototypical textures (DTD).

Performance gains of Qwen and Phi models relative to CLIP across 10 diverse datasets as the number of in-context shots increases.

As shown in Figure 2, LMMs demonstrate a much higher performance "ceiling" than VLMs. While CLIP-style models typically see a +25% relative boost with 16 shots, LMMs like Qwen2-VL-7B and Phi-3.5-Vision can see gains exceeding +50%. In many cases, a 16-shot LMM matches the performance of the high-end CLIP ViT-L/14 model. Notably, on very fine-grained tasks, Phi-3.5-Vision’s correctness score nearly doubled, jumping from 54.2% to 99.6% when using the CIRCLE method.

Conclusion

This work demonstrates that LMMs are not just for reasoning; they are powerful, general-purpose classifiers when equipped with context. The CIRCLE method provides a robust baseline for open-world tasks, effectively steering generative models toward consistency and precision. These findings suggest a future where a single LMM can serve as a unified architecture for classification, reasoning, and interaction, reducing the need for specialized discriminative models.

Summary updated

BibTeX
@misc{garosi2026large,
  author = {Marco Garosi and Matteo Farina and Alessandro Conti and Massimiliano Mancini and Elisa Ricci},
  title = {{Large Multimodal Models as General In-Context Classifiers}},
  year = {2026},
  eprint = {2602.23229},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.23229},
}
Figure