---
title: Zero-shot Image Classification
url: https://www.emergentmind.com/topics/zero-shot-image-classification
type: topic
---

# Zero-shot Image Classification

Zero-shot image classification is the paradigm in which a model is required to recognize classes at test time for which it has seen no visual training examples, relying instead on auxiliary class information such as attributes, descriptions, or semantic embeddings. This setting tests a system's ability to generalize to novel concepts beyond its training distribution and has motivated a suite of algorithmic frameworks grounded in compatibility learning, generative modeling, cross-modal alignment, and large-scale vision-language pretraining.

## 1. Foundations and Problem Definition

In zero-shot image classification, the dataset is split into disjoint sets of "seen" classes (with labeled training images) and "unseen" classes (with only side information, no images) [2401.16876]. The goal is to build a model that—given auxiliary information describing unseen classes—accurately predicts the correct label for images of those classes at test time.

Let $S$ and $U$ denote seen and unseen class sets, respectively. For each class $c$, an auxiliary descriptor is available (e.g., an attribute vector, semantic embedding, or textual description). The dominant architectures cast zero-shot classification as a compatibility problem: an image $x$ and a class embedding $\phi(c)$ receive a compatibility score $F(x, \phi(c))$, and the predicted label is $\hat{c} = \arg\max_{c \in U} F(x, \phi(c))$ [1611.09309]. In generalized zero-shot classification (GZSC), both seen and unseen classes are included at test time, further exposing models to domain shift and bias phenomena [1708.06975].

## 2. Cross-Modal Compatibility Models

An early and influential stream of methods learns a compatibility function between image features and auxiliary class representations. Approaches include:

- **Structured Joint Embedding (SJE)** and bilinear models: $F(x, \phi(c)) = \theta(x)^\top W \phi(c)$, where $W$ is optimized to assign higher scores to correct (image, class) pairs [1611.09309, 2209.10304].
- **Attribute-based encoders**: In HDC-ZSC, stationary binary codebooks for attribute groups/values are fixed, and class attributes are composed into high-dimensional hypervectors. A trainable image encoder projects images into this space, and classification proceeds by $K(\mathbf{x},\phi(\mathbf{A}_c))$ via temperature-scaled cosine similarity [2401.16876].
- **Relational and pairwise losses**: Some models incorporate explicit alignment of intra-class structure. A neural mapping from semantic descriptor space to image-feature space is trained to minimize both per-sample regression and pairwise inter-class distance matrices, e.g., $\mathcal{L}_\text{pair} = \| D_a - D_\phi \|_F^2$ [1903.11701].

Regularization against "hubness" and domain shift is critical in high-dimensional compatibility methods; entropic penalties and transductive approaches (e.g., label propagation on graphs of class prototypes) are used to mitigate these effects [1906.10509].

## 3. Generative and Synthetic Feature Approaches

Generative models address two main ZSL burdens: the inability to train discriminative visual classifiers on unseen classes and strong bias towards seen classes in the GZSC regime.

- **Conditional feature generation**: Generators $G(a, z)$ synthesize image features conditioned on class descriptors $a$ and noise $z$. These synthetic examples (for unseen classes) are then used to train a standard supervised classifier (e.g., softmax over seen + generated features) [1708.06975]. Several architectures are deployed: Generative Moment Matching Networks (GMMN), (Auxiliary-Classifer) GANs, Denoising Autoencoders, and Adversarial Autoencoders. Explicit moment matching (GMMN) is empirically most stable.
- **Text-to-model and hypernetworks**: Text2Model instantiates, at inference time, a task-specific classifier by mapping class textual descriptions via a permutation-equivariant hypernetwork to classifier parameters. This supports rich class descriptions, including negative constraints, and yields non-linear classifiers tailored to the current task's label set [2210.15182].
- **Domain-specific synthetic image generation**: The AttrSyn pipeline uses large language models to create diverse attributed prompts (e.g., background, pose, style), leveraged by text-to-image models (Stable Diffusion XL) to synthesize data. Logistics regression (linear-probe) classifiers trained on these synthetic CLIP features consistently outperform simple prompt or direct zero-shot CLIP methods [2504.04510].

## 4. Pretrained Vision-Language Models and Prompt-Based Retrieval

Large-scale vision-language pretraining—most notably CLIP—has dramatically advanced zero-shot classification:

- **Textual prompt retrieval**: CLIP encodes images and class descriptions into a joint embedding space. Zero-shot classification is performed by matching a query image's embedding against $K$ textual embeddings (e.g., "an image of a {class}"), and returning the class with the highest cosine similarity [2410.13016, 2405.15668].
- **Prompt engineering and multi-modal fusion**: Methods have investigated prompt manipulation (e.g., adding class attributes, mutual concepts, or data-driven prompts). Incorporation of multimodal LLMs (e.g., Gemini Pro) to produce detailed captions and initial predictions from the test image itself—fused in the CLIP space—yields substantial accuracy gains over vanilla CLIP [2405.15668].
- **Guided cropping and self-localization**: When target objects are small or backgrounds confound CLIP's global features, integrating object detectors (e.g., OWL-ViT) to crop and focus the input can boost zero-shot performance, particularly for small-object images [2309.06581].
- **Collaborative Self-Learning**: Methods combine VLMs for high-confidence semantic pseudo-labeling with strong visual encoders (e.g., ViT-G-14), initializing and iteratively improving a lightweight classifier on test data via a self-learning loop, without additional annotation or VLM fine-tuning [2509.18938].

## 5. Alternative Side Information and Real-World Extensions

Beyond attributes and pure text embeddings, zero-shot models have leveraged alternative class-side information, enabling applications in settings with weak supervision or non-standard modalities.

- **Gaze-based embeddings**: Human gaze data collected during discriminative tasks can be encoded into spatial and temporal embeddings that—when coupled with image features—yield competitive or superior performance to expert-annotated attributes on fine-grained datasets [1611.09309].
- **Document and web-text alignment**: I2DFormer jointly encodes images and entire class-level documents (e.g., Wikipedia articles), with cross-modal attention learning to align image patches to discriminative words, producing highly interpretable decisions without manual attribute annotation [2209.10304].
- **Image-free classifier injection**: ICIS learns mappings from semantic class descriptions to classifier weight vectors, enabling the "injection" of new zero-shot classes into arbitrary pre-trained models post-hoc, with no access to image data, by optimizing cross-reconstruction and alignment losses [2308.10599].
- **Hyperspectral and domain-specific scenarios**: Interpolation of hyperspectral data into pseudo-RGB permits CLIP-based pseudo-labeling, and subsequent spectral refinement via Gaussian Mixture Models enables fully zero-annotation classification pipelines in remote sensing [2501.16222]. Retrieval-based pipelines with foundation models (e.g., DINOv2+FAISS) allow generic species classification in camera trap images, matching large supervised models with no location-specific retraining [2410.12769].

## 6. Interpretation, Evaluation, and Emerging Directions

Interpretability and confidence estimation have become core aspects of modern zero-shot pipelines:

- **Mutual knowledge analysis**: The alignment ("mutual information") between concepts detected by vision and language encoders predicts zero-shot performance and robustness across CLIP architectures; AUC of MI-drop curves correlates tightly with accuracy. Injecting mutual concepts into prompts improves performance [2410.13016].
- **Predicting zero-shot performance**: Synthetic image generation—using models such as SDXL-Lightning—conditions on class descriptions to forecast how well a VLM is expected to perform on arbitrary class queries, providing class-level and dataset-wide predictive metrics for VLM selection and task planning [2601.17535].

Fine-grained zero-shot tasks have also received new attention, with LVLMs re-cast into iterative VQA frameworks combined with "attention intervention" techniques to compensate for reliance on language priors and shallow visual reasoning. These methods now achieve multi-decade improvements over prior SOTA on fine-grained bird, car, aircraft, and food benchmarks [2510.03903].

A notable trend is the transition from single-modality attribute or embedding matching to fully multimodal, generative, and collaborative architectures that exploit advances in conditioned generation, cross-modal large language models, and strong unsupervised visual backbones.

---

**Key References by arXiv ID:**  
[2401.16876], [1611.09309], [2209.10304], [1708.06975], [2210.15182], [2410.13016], [2405.02155], [2309.06581], [2501.16222], [2410.12769], [2510.03903], [1903.11701], [1906.10509], [2504.04510], [2405.15668], [2308.10599], [2509.18938], [2601.17535]

Source: https://www.emergentmind.com/topics/zero-shot-image-classification