AI Glossary / Prompting and human-AI interaction / Advanced
Zero-shot learning
Definition
Zero-shot learning is a learning setting in which a model recognizes target classes without labeled training examples of those classes, using transferable knowledge and information such as class descriptions or attributes. This entry focuses on class recognition; zero-shot language-model prompting uses a related but distinct meaning centered on absent demonstrations.
What it means
Ordinary supervised classification learns from labeled examples of the categories it will predict. Zero-shot classification instead needs a bridge from classes observed during training to target classes for which such examples are unavailable.
Semantic descriptions can provide that bridge. A system may learn to recognize attributes from known categories, then combine them according to a description of an unseen category. Modern approaches can also relate input and text representations in a shared space.
Unseen must be defined carefully. A target class absent from one task's labeled training set may still have appeared in a pretrained feature extractor's data. A credible evaluation documents those data sources and does not use zero-shot as a blanket claim of complete novelty.
How it works
During training, the system learns relationships between inputs and semantic information from available classes. At inference, it receives descriptions of candidate target classes and compares the new input with those descriptions using the learned relationship.
One simple family of methods predicts an attribute representation and matches it with class signatures. Other methods learn compatibility functions or generate class-conditioned features. The learning problem does not require one particular architecture.
Classical evaluation often restricts predictions to unseen classes. Generalized zero-shot evaluation includes both previously seen and unseen classes, which introduces a different balance problem. Some protocols also permit unlabeled target data; these are transductive settings and should be distinguished from settings without such access. Document these assumptions.
Three practical examples
- A visual catalog system attempts to recognize newly introduced categories from written descriptions before labeled examples are available.
- A document classifier maps records to new category descriptions using a representation learned from other categories.
- A research system recognizes an unseen combination of attributes, provided the relevant attributes and their relationship to observations were learned elsewhere.
Think of it this way
Think of identifying an unfamiliar object from a description that combines familiar properties. You have not seen that exact category before, but the description connects it to things you can recognize.
The analogy reveals the dependency on useful descriptions. If the description omits the feature that distinguishes two categories, or the observer cannot detect that feature, naming the category does not solve the recognition problem.
Worked example
Consider an original two-attribute toy classifier. The attributes are red body and side handle. Two hypothetical unseen categories have supplied signatures A = (1, 0) and B = (0, 1). The system has learned attribute representations from other categories, but has no labeled training images of A or B.
For a new image, suppose its predicted attribute vector is v = (0.8, 0.3). Use squared Euclidean distance as a simple matching rule. The distance to A is (0.8 - 1)^2 + (0.3 - 0)^2 = 0.04 + 0.09 = 0.13. The distance to B is (0.8 - 0)^2 + (0.3 - 1)^2 = 0.64 + 0.49 = 1.13.
The toy rule selects A because 0.13 is smaller. These coordinates are assumed representation values, not calibrated class probabilities. The result depends on the chosen distance and on how well the attribute predictions transfer.
If the image instead yields (0.5, 0.5), both distances are 0.5. The descriptions do not resolve the tie under this rule. A system needs a stated tie or uncertainty policy rather than claiming a confident distinction.
This example illustrates semantic transfer and matching, not the exact algorithm of the cited papers. It also assumes the object belongs to A or B. An unrelated object might still be forced into one of those categories unless rejection is handled separately.
Illustrative case study
Fictional case: Pine Collections wants to classify new archive categories before collecting many labeled records. Analysts write category descriptions and test a zero-shot classifier on a manually reviewed evaluation sample.
They find that two categories share nearly identical descriptions. The team revises the taxonomy and descriptions before assuming that a more complex model is needed. It also tests records from older categories because the production system must recognize both established and new labels.
Results are reported separately for the two groups, with the allowed training and reference data documented. This fictional case claims no measured benefit.
Common misconceptions and mistakes
- Zero-shot means no training at all: the system depends on knowledge learned from other data.
- Class names alone always provide enough information: ambiguous or arbitrary labels may offer little semantic bridge.
- Withholding labels proves a fully inductive setting: access to unlabeled target examples also matters.
- Classical unseen-only accuracy represents mixed production traffic: generalized evaluation asks a different question.
- Recognizing unseen named classes is the same as detecting every unknown object: open-set rejection is a separate capability.
Business use
Zero-shot learning can support expanding taxonomies and early experiments when labeled target examples are scarce. Its usefulness depends on whether semantic descriptions distinguish the categories and whether the representation transfers to the actual inputs.
Compare against simpler description matching and against few-shot adaptation when small labeled samples become available. Keep track of pretrained data, category definitions and evaluation splits. Report performance on seen and unseen categories separately when both occur in operation. Report the data and expert work behind the representation and descriptions.
People also ask
How is it different from few-shot learning?
Few-shot learning supplies a small number of labeled target examples; zero-shot class learning supplies none under its stated protocol.
Does it require language?
No. Semantic attributes or other class-level information can provide the transfer mechanism.
Can a model use descriptions of target classes during training?
Some methods do. The timing and type of semantic information should be documented, because protocols differ.
Check your understanding
A classifier is tested only on unseen classes but will be deployed among both old and new classes. Is that test sufficient?
Answer: No. It does not measure the competition between seen and unseen labels. A suitable generalized evaluation is also needed.
Related terms
- Transfer learning
- Few-shot learning
- Open set recognition
- Semantic attribute
- class signature
- generalised zero-shot learning
- transductive learning
- vision-language model
- dataset leakage
Learn next
Define seen and unseen classes, the available descriptions and the permitted data. Verify that the evaluation split matches the intended claim. Inspect confusions between semantically similar categories and compare unseen-only results with a mixed seen-and-unseen test when relevant.
More in Prompting and human-AI interaction
- Soft prompt tuning - Soft prompt tuning adapts a pretrained model by learning a small set of continuous prompt vectors while keeping the base model's weights fixed.
- System prompt - A system prompt is an application-level instruction supplied to a language model to establish its role, task, behavior or response conventions.
- Tree-of-thought prompting - Tree-of-thought prompting organizes language-model problem solving as a search over alternative intermediate steps.
- Zero-shot - Zero-shot describes using a model on a target task or category without supplying task-specific demonstrations or labeled training examples under the stated...
- Zero-shot prompting - Zero-shot prompting asks a model to perform a task without including a completed example of that task in the prompt.
- Zero-shot TTS - Zero-shot TTS is text-to-speech synthesis that generates speech for a target speaker without separately fine-tuning the synthesis model on that speaker.
Sources
Romera-Paredes and Torr, An Embarrassingly Simple Approach to Zero-Shot Learning, ICML 2015: https://proceedings.mlr.press/v37/romera-paredes15.pdf
Xian, Schiele and Akata, Zero-Shot Learning: The Good, the Bad and the Ugly, CVPR 2017, evaluation and data-split concerns: https://openaccess.thecvf.com/content_cvpr_2017/html/Xian_Zero-Shot_Learning_-_CVPR_2017_paper.html
The attribute-distance example and Pine Collections case are original hypothetical illustrations.
Previous: Zero-shot Next: Zero-shot prompting