Demystification of Few-shot and One-shot Learning

Ivan Yu. Tyukin, Alexander N. Gorban, Muhammad H. Alkhudaydi, Qinghua Zhou

Abstract

This paper provides a mathematical foundation for the empirical success of few-shot and one-shot learning, attributing their effectiveness to the unique geometric properties of high-dimensional latent spaces. By leveraging Stochastic Separation Theorems, the authors prove that in sufficiently high dimensions, new classes can be separated from existing data using simple linear hyperplanes. The probability of successful learning and non-interference with prior knowledge is shown to approach unity exponentially fast as the dimensionality of the latent space increases.

Introduction

Classical statistical learning theory, particularly Vapnik-Chervonenkis (VC) theory, suggests that meaningful generalization requires large training datasets. However, modern deep learning systems frequently defy these conservative bounds by succeeding in "few-shot" (learning from a few examples) or "one-shot" (learning from a single example) regimes. This work addresses the theoretical gap between classical theory and the empirical "unreasonable effectiveness" of modern AI. The authors seek to answer a fundamental question: Why is it mathematically possible to learn a new concept from almost no data without ruining the model's previous knowledge?

Theoretical Framework and Methods

The authors move away from "fully agnostic" learning, proposing instead a framework based on the geometry of high-dimensional spaces. They model a classifier as a composition of two primary components: a feature extractor $f$ and a decision function $g$.

Figure 1: Model architecture mapping input to latent space.

As shown in Figure 1, the feature extractor maps inputs $u$ to a high-dimensional latent space $x \in \mathbb{R}^n$. The decision function then maps these latent representations to a label $\ell$. The core of their analysis relies on:

  1. Stochastic Separation Theorems: These theorems describe how, in high dimensions, random points are likely to be "linearly separable" from large sets of other points.
  2. Geometric Assumptions: The representations in the latent space are assumed to be "compact" (contained within $n$-dimensional balls) and "non-degenerate" (the probability density does not collapse into a lower-dimensional subspace).
  3. Linear Separators: The authors analyze a simple learning map—essentially a hyperplane separator based on the empirical mean of the few available samples.

Geometric Insights: The Blessing of Dimensionality

While the "curse of dimensionality" usually refers to the difficulty of filling a high-dimensional space with data, this paper highlights a corresponding "blessing." In high dimensions, vectors are almost certainly "quasi-orthogonal" (nearly perpendicular). This geometric property makes it incredibly easy to find a hyperplane that separates a new point (or a small cluster) from the rest of the data.

Figure 2: Geometric separation and centroid estimation in high-dimensional space.

A critical insight illustrated in Figure 2 is the accuracy of centroid estimation. The authors demonstrate that in high dimensions, the empirical mean $\bar{x}$ of even a very small sample (few-shot) is a remarkably good proxy for the actual center $c$ of the data cluster. The math suggests that complex non-linear boundaries are unnecessary; if the latent space is high-dimensional enough, a simple linear separator—like those used in Prototypical Networks—is theoretically optimal.

Key Results

The paper formalizes these insights through two primary theorems:

  • Theorem 1 (One-shot/Few-shot Memorization): For a finite set of $k$ new examples, a simple linear map can "memorize" them while maintaining a high probability ($p_e$) of not interfering with existing knowledge. This probability $p_e$ approaches 1 as the dimension $n$ grows.
  • Theorem 2 (Generalization to New Classes): When learning a new class from $k$ i.i.d. samples, the probability of correctly classifying new members of that class ($p_n$) and the probability of maintaining performance on old classes ($p_e$) both approach 1 exponentially fast as $n \to \infty$.

These results provide a formal justification for existing heuristic algorithms like Matching Networks and Prototypical Networks, showing that their success is a natural consequence of high-dimensional geometry.

Limitations and Future Work

The proofs rely on specific distributional assumptions, namely that data is supported on $n$-balls or ellipsoids. If latent representations are highly fragmented or if a deep network "collapses" the latent space into a very low-dimensional manifold, the "blessing of dimensionality" is lost. Future research directions include extending this work to "mixtures of models" and exploring training objectives that explicitly enforce the compactness and non-degeneracy conditions required to guarantee few-shot performance.

Summary updated

BibTeX
@inproceedings{tyukin2021demystification,
  author = {Ivan Yu. Tyukin and Alexander N. Gorban and Muhammad H. Alkhudaydi and Qinghua Zhou},
  title = {{Demystification of Few-shot and One-shot Learning}},
  booktitle = {IJCNN},
  year = {2021},
  doi = {10.1109/ijcnn52387.2021.9534395},
}
Figure