# One-shot learning

One-shot learning is a machine learning paradigm where a model learns to recognize or classify new categories from a single training example, often applied in computer vision and few-shot learning contexts.

One-shot learning is a subfield of [machine-learning](https://www.wikiprompt.org/wiki/machine-learning) concerned with training models to perform tasks, typically classification or recognition, using only a single example per class. It represents the extreme case of [few-shot learning](https://www.wikiprompt.org/wiki/few-shot-learning), a broader problem setup where models must generalize from a limited number of labeled instances. In contrast to conventional approaches that require large datasets, one-shot learning aims to emulate human-like ability to learn new concepts from minimal exposure, making it a key challenge in [artificial-intelligence](https://www.wikiprompt.org/wiki/artificial-intelligence) research.

The concept gained prominence in the 2000s and 2010s, driven by advances in [deep-learning](https://www.wikiprompt.org/wiki/deep-learning) and [neural-network](https://www.wikiprompt.org/wiki/neural-network) architectures. Researchers such as [fei-fei-li](https://www.wikiprompt.org/wiki/fei-fei-li) and russ-salakhutdinov contributed foundational work on Bayesian and probabilistic models for one-shot learning, while later developments leveraged [generative-ai](https://www.wikiprompt.org/wiki/generative-ai) and [transformer](https://www.wikiprompt.org/wiki/transformer) models to improve generalization. One-shot learning is particularly relevant in domains where data is scarce, such as medical imaging, rare species identification, and personalized user interfaces.

## Problem Formulation

In a typical one-shot learning setup, a model is trained on a base dataset with many classes and then evaluated on a novel set of classes, each represented by a single labeled example. The objective is to correctly classify new instances from these unseen classes. This is often formalized as an N-way, K-shot task, where N is the number of classes and K is the number of examples per class; one-shot learning corresponds to K=1. Evaluation metrics include accuracy on the novel classes and the ability to generalize across different task distributions.

## Approaches and Techniques

Several methodological families address one-shot learning. Metric-based methods learn an embedding space where examples from the same class are closer than those from different classes; popular algorithms include siamese networks and prototypical networks. Model-based methods use external memory or fast parameter adaptation, such as memory-augmented neural networks and meta-learning approaches like model-agnostic meta-learning (MAML). Generative methods synthesize additional training data or learn to compare examples directly, often using [neural-network](https://www.wikiprompt.org/wiki/neural-network) components like attention mechanisms. Recent work has explored using [large-language-model](https://www.wikiprompt.org/wiki/large-language-model)s and [transformer](https://www.wikiprompt.org/wiki/transformer) architectures to perform one-shot learning in natural language and multimodal settings, where a single prompt or example guides the model's response.

## Applications

One-shot learning has practical applications across various fields. In [computer-vision](https://www.wikiprompt.org/wiki/computer-vision), it enables object recognition with minimal labeled images, useful for surveillance, robotics, and augmented reality. In medical imaging, it helps diagnose rare diseases where annotated scans are scarce. In natural language processing, one-shot learning powers few-shot prompting in [large-language-model](https://www.wikiprompt.org/wiki/large-language-model)s, allowing models to perform new tasks from a single instruction or example. Additionally, it supports personalization in consumer devices, such as [apple](https://www.wikiprompt.org/wiki/apple) and [samsung-electronics](https://www.wikiprompt.org/wiki/samsung-electronics) products, where user-specific recognition (e.g., face or voice) must work with limited enrollment data.

## Challenges and Limitations

Despite progress, one-shot learning remains difficult. Models often struggle with high intra-class variability and low inter-class distinguishability, leading to overfitting or poor generalization. The lack of sufficient data makes it hard to learn robust representations, and many approaches require careful hyperparameter tuning or large pre-training corpora. Moreover, evaluation protocols vary, making comparisons across studies challenging. Ethical considerations arise when one-shot learning is applied to sensitive domains, such as surveillance or biometric identification, where errors can have significant consequences.

## Future Directions

Ongoing research focuses on improving sample efficiency, robustness, and interpretability. Integration with [generative-ai](https://www.wikiprompt.org/wiki/generative-ai) and [transformer](https://www.wikiprompt.org/wiki/transformer) models is expected to enhance one-shot capabilities, particularly in multimodal tasks. Collaboration between academic institutions like [mit-csail](https://www.wikiprompt.org/wiki/mit-csail), [stanford-ai-lab](https://www.wikiprompt.org/wiki/stanford-ai-lab), and [berkeley-ai-research](https://www.wikiprompt.org/wiki/berkeley-ai-research) and industry labs such as [openai](https://www.wikiprompt.org/wiki/openai), [google-deepmind](https://www.wikiprompt.org/wiki/google-deepmind), and [anthropic](https://www.wikiprompt.org/wiki/anthropic) continues to drive innovation. As [artificial-intelligence](https://www.wikiprompt.org/wiki/artificial-intelligence) systems become more pervasive, one-shot learning will play a crucial role in enabling adaptive, personalized, and data-efficient intelligence.

---
Source: https://www.wikiprompt.org/wiki/one-shot-learning
License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/)
Last updated: 2026-09-07T02:34:06.763282+00:00
