One-shot learning
One-shot learning is a machine learning approach in which a model learns to recognise a new category from a single labelled example, by drawing on what it already learned from other categories.
Most classifiers need hundreds or thousands of examples of each category. People do not: shown one picture of an unfamiliar animal, most of us can pick out others. One-shot learning tries to give machines a version of that ability. Google's machine learning glossary describes it as an approach, often used for classifying objects, designed to learn an effective classifier from a single training example.
The idea grew up in computer vision. A central paper is One-Shot Learning of Object Categories by Li Fei-Fei, Rob Fergus and Pietro Perona, published in 2006 in IEEE Transactions on Pattern Analysis and Machine Intelligence. Their Bayesian method used knowledge from categories it had already learned, such as faces, aeroplanes and spotted cats, as a starting point for learning new ones from very few images. The core principle is transfer: reuse what was learned about earlier categories, such as useful features or model parameters, so that one new example is enough to fill in the rest.
Deep learning approached the problem by learning to compare. Rather than train a classifier for each category, a network learns a measure of similarity, then labels a new image by comparing it with the single stored example of each category. In 2016 Oriol Vinyals and colleagues' Matching Networks for One Shot Learning took this further, predicting labels from a small labelled support set and reporting one-shot accuracy gains over earlier methods on ImageNet and Omniglot, without retraining for new classes.
A typical use is verification. A building's entry system that must recognise a new employee from one ID photo cannot be retrained for every new hire. Instead it compares each face at the door with the stored photo using a similarity measure learned from many other faces.
In language models the phrase has taken on a second meaning. OpenAI's 2020 GPT-3 paper used one-shot to mean giving the model a single example in its prompt, with no training at all; that is now usually called one-shot prompting. In both senses one example is a thin basis for a decision, and accuracy is typically lower than with plenty of training data.
It is a machine learning approach in which a model learns to recognise a new category from a single example. It works by relying on what the model has already learned from many other categories, often by learning how to judge whether two inputs are similar. They differ in how many examples of the new category the model is given: one, a handful, or none. Zero-shot models have to rely on other information, such as a description of the new category. It does not start from nothing. It has already learned general features and a sense of similarity from many other categories, so a single example is enough to place the new category among what it knows. Methods such as matching networks compare a new input with stored examples rather than training a new classifier. No. One-shot learning is a family of training methods, mainly from computer vision. One-shot prompting means including a single worked example in a language model's prompt, with no training involved.Common questions
What is one-shot learning?
What is the difference between one-shot, few-shot and zero-shot learning?
How can a model learn from just one example?
Is one-shot learning the same as one-shot prompting?
Search for "one-shot learning", "siamese networks", "matching networks" or "metric learning" for the computer vision sense, and "one-shot prompting" for the language model sense. Original papers on arXiv and in journals such as IEEE TPAMI, together with university course notes on few-shot learning, are the most reliable sources. Check which sense an article means before comparing results.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.