Skip to main content
XenonStack

XAI

XenonStack Blog Zero-Shot Learning for Visual Recognition Explained

| Published | Updated

Zero-Shot Learning for Visual Recognition Explained
9:29

Key takeaway

  • Zero-shot learning lets a vision model recognise classes it never saw labelled. See how attributes, embeddings and CLIP work, and where it still fails.

Zero-shot learning (ZSL) for visual recognition is a way of classifying images into categories for which the model has seen no labelled examples, by using auxiliary knowledge such as attributes, text descriptions or embeddings. The model is trained on some classes (the seen classes) and is then asked to recognise others (the unseen classes) by linking what an image looks like to what the new class means.

This guide is for ML engineers, product owners and technology leaders who need to know when ZSL is a sound choice within artificial intelligence projects. It covers how the main method families work, how ZSL compares with supervised, few-shot and one-shot learning, which problems limit it, and how machine learning teams and AI agents can use it safely.

What is zero-shot learning in visual recognition?

IBM describes zero-shot learning as a scenario in which a model must recognise categories it has never seen labelled examples of, and notes that it "refers not to any specific algorithm or neural network architecture, but to the nature of the learning problem itself" (IBM Think). That matters for planning: ZSL is a problem setting, and several different methods can solve it.

Most deep learning models for classification are supervised. They need many labelled examples of every class, and the labels define both the possible answers and the correct answer for each training image. Techniques such as Vision Transformers improve feature extraction and Neural Architecture Search helps design the network, but neither removes the need for labelled data on each class. ZSL addresses that gap.

How does zero-shot learning work?

Without labelled examples of an unseen class, every ZSL method relies on auxiliary knowledge, which IBM lists as text descriptions, attributes or embeddings. The three method families below differ in how they use it.

Two-column diagram comparing supervised recognition with zero-shot recognition: labelled images, fixed class list, accuracy and cost on one side; auxiliary knowledge, shared space, unseen classes and seen-class bias on the other.
Method familyHow it worksMain limit
Attribute-basedClassifiers learn labelled features such as colour or shape, then infer an unseen class from its combination of featuresCannot generalise to classes whose attributes are unknown or absent from the available samples (IBM Think)
Embedding-basedImages and class descriptions are mapped into a shared space, and classification measures similarity between themDepends on how well the shared space captures the new class
Generative-basedA generative model uses auxiliary information to synthesise samples for unseen classes, which then train a standard classifierIBM notes that VAEs tend to generate blurry images and GANs are prone to destabilisation

Embedding-based methods are the most visible today. CLIP, from OpenAI, trains image and text encoders on "a dataset of 400 million (image, text) pairs collected from the internet", and its abstract says natural language can then reference learned visual concepts, "enabling zero-shot transfer of the model to downstream tasks" (Radford et al., arXiv). The abstract also reports that the model matches the original ResNet-50 accuracy on ImageNet zero-shot, without using any of the 1.28 million training examples that ResNet-50 was trained on.

For the generative family, GANs for image synthesis and variational autoencoders are the usual building blocks; the generative adversarial network entry explains the generator and discriminator. Some research also uses graph neural networks to model relationships between classes, which is covered in our piece on GNNs in computer vision.

How has zero-shot learning developed?

Early methods used hand-defined semantic attributes to carry knowledge from seen to unseen classes, and some added text descriptions of objects. Deep learning then made it practical to map image features into semantic spaces. A well-known example is DeViSE, presented at NIPS 2013 by Frome and colleagues. Its abstract describes a model trained on labelled images plus semantic information from unannotated text, and reports that semantic knowledge improves zero-shot predictions "by up to 65%, achieving hit rates of up to 10%" across thousands of novel labels never seen by the visual model (Frome et al., NIPS 2013).

The figures show both promise and limit: prediction across thousands of unseen labels was possible, but a hit rate of up to 10% is modest. CLIP-style models later learned from far larger image and text collections.

How does zero-shot learning differ from few-shot and supervised learning?

ApproachLabelled examples of the new classTypical use
Supervised learningManyStable classes with plenty of labelled data
Few-shot learningA few (IBM: "only a few labeled training examples")New classes where a handful of labels can be collected
One-shot learningOneNew classes with a single reference image
Zero-shot learningNoneNew classes where only a description, attributes or a name exists

Adding a few labelled examples to a zero-shot model is a practical way to lift accuracy on a class that matters.

What are the main challenges of zero-shot learning?

  • Semantic gap. The link between visual features and semantic attributes is not always clear, so a description may fit several visual patterns.
  • Bias towards seen classes. IBM identifies "the tendency for classifiers to bias predictions towards classes it has seen in training" as a key challenge in generalised ZSL, where an input may belong to a seen or an unseen class.
  • Scarce or uneven data. Unseen classes have no training images by definition, so evaluation needs separate, carefully built test sets.
  • Robustness. Vision models can be fooled by crafted inputs; see robustness and adversarial attacks in computer vision.

Practical remedies include better attribute definitions, combining ZSL with few-shot examples and applying regularisation.

ZSL is attractive where labelled data is hard to collect, such as medical image analysis and wildlife monitoring, and it supports newer interfaces such as augmented and virtual reality.

How do AI agents change zero-shot visual recognition?

An AI agent can use a zero-shot model as one tool among several. When a camera feed shows an object the production classifier has never seen, the agent can query a zero-shot model with a text description, compare the answer with a confidence threshold and decide whether to act, ask a person or queue the image for labelling. Running and monitoring such models close to the camera needs NexaStack, XenonStack's inference infrastructure.

Define in advance which confidence level lets an agent act alone, which classes always go to a person, and what evidence is kept for audit.

What should you do first?

  1. List the classes your system must recognise, and mark which ones you can label today and which will appear later.
  2. Choose a ZSL method family that matches the auxiliary knowledge you have: attributes, text descriptions or a pre-trained image and text model.
  3. Build a test set of unseen classes and measure seen and unseen accuracy separately.
  4. Set confidence thresholds and a human review path for low-confidence predictions.
  5. Collect reviewed images and add them as few-shot examples to improve classes that matter most.

To map one decision your vision agents make, and the data and policy it depends on, book a Context Workshop. See what happens in the workshop.

Next Steps in Implementing Zero-Shot Learning in Your Strategy

Talk to our experts about implementing Zero-Shot Learning models. Learn how industries and different departments leverage visual recognition and AI-driven decision intelligence for accurate and automated insights. Utilize AI to enhance image classification, object detection, and IT operations, improving efficiency and responsiveness.

Frequently asked questions

What is zero-shot learning in simple terms?

It is a way of recognising categories a model was never shown labelled examples of, by using descriptions, attributes or embeddings that connect the new category to what the model already knows.

How is zero-shot learning different from few-shot learning?

Few-shot learning uses a small number of labelled examples of each new class, and one-shot learning uses a single example. Zero-shot learning uses none, and relies on auxiliary information instead.

How does CLIP perform zero-shot classification?

CLIP trains an image encoder and a text encoder together on image and text pairs from the internet. To classify an image, you describe the candidate classes in text and choose the class whose text embedding is most similar to the image embedding.

What is generalised zero-shot learning?

It is the harder setting in which an input may belong to either a seen or an unseen class. Classifiers tend to favour the classes they were trained on, so extra techniques are usually needed to correct that bias.

When should you not rely on zero-shot learning?

Avoid relying on it alone when errors are costly, when classes look very similar, or when a rule requires evidence of tested accuracy. In those cases collect labelled examples and evaluate a dedicated model.

Follow XenonStack on LinkedIn: XenonStack on LinkedIn for new guides on agentic AI, data and platform engineering.

Ready to put AI agents to work? Explore ElixirClaw, the agentic OS platform to build, orchestrate and govern AI agents.

Table of Contents

dr-jagreet-gill

Dr. Jagreet Kaur

Chief AI Officer, XenonStack

LinkedIn profile

Dr. Jagreet Kaur specializing in Generative AI for synthetic data, Conversational AI, and Intelligent Document Processing. With a focus on responsible AI frameworks, compliance, and data governance, she drives innovation and transparency in AI implementation

Get the latest articles in your inbox

Subscribe Now

Interested in solving your challenges with the XenonStack team?
Get Started

Tell us about you and your priorities so we can prepare the right conversation. It takes about 2 minutes.

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Continue