What is zero-shot learning?
Zero-shot learning is a machine learning technique where a model can recognise, classify, or respond to categories it has never seen during training — without needing a single example of them first. Instead, the model generalises from concepts it already knows, using a description of the new task or a relationship map between ideas. A model trained on images of cats and dogs, for example, might identify a horse it has never seen if told “a horse is a large animal with four legs and a mane.” Zero-shot learning is what allows a large language model to answer questions in a language it was never explicitly taught, or to translate between language pairs it was not trained on.
How zero-shot learning works
At its core, zero-shot learning depends on a shared representation space. The model learns to map both the training data (like images of known animals) and the descriptions of new categories (like “a creature with feathers and a beak”) into the same mathematical space. During inference, the model compares the input — say, a photo of a bird it has never seen — against the description of “bird” and if the vectors match closely enough, it classifies it correctly. The trick is that the description of the new category (often called a “semantic embedding”) is available at test time but never appeared in the training examples. The model has to have learned a higher-level rule: “if something has feathers and a beak, it is a bird.”
Zero-shot, few-shot, and one-shot learning
The name reveals the difference: “zero” training examples of the target class. Few-shot learning gives the model a small number of examples before it must classify. One-shot learning gives exactly one. These three sit on a spectrum of how much new information the model needs before it can perform. In practice, many large language models combine all three: they can handle a completely novel instruction with zero examples, but also improve rapidly when you give them a few. This flexibility is a key reason behind their usefulness for tasks like translation, text classification, and question answering across languages.
Real-world example: cross-lingual understanding
A language model trained primarily on English can often understand French, German, or Japanese without ever seeing a single sentence in those languages during its training. How? The model learns the structure of language — grammar, semantics, the relationship between words — and encodes that in a shared space. When given a French sentence, it maps the meaning into that space and can respond in English. That is zero-shot cross-lingual transfer. The same principle works for tasks like sentiment analysis: a model trained on English reviews can classify a Chinese review as positive or negative without a Chinese training example, as long as it has a semantic description of the sentiment categories.
Why zero-shot matters in practice
Zero-shot learning is not just a research curiosity. It allows systems to adapt to new scenarios without retraining, which is crucial when labelled data is scarce, expensive, or impossible to collect. For example, a medical image model can be told about a rare disease it has never seen, using a clinical description, and make a reasonable diagnosis. It also makes large language models far more useful out of the box: you can ask them to perform a completely new task, and they will often get it right. The limitation is that zero-shot accuracy is usually lower than fine-tuned performance — but the ability to work without examples at all makes it a powerful building block in modern AI.