One-shot learning by inverting a compositional causal process

Brenden M. Lake, Ruslan Salakhutdinov, Joshua B. TenenbaumNeurIPS 2013

This seminal paper by Lake, Salakhutdinov, and Tenenbaum introduces a framework for "one-shot learning"—the ability to learn a new concept from a single example. By modeling images as the result of a compositional, causal process (specifically, how a character is drawn), the authors developed a system that matches human performance on handwritten character recognition and generation, significantly outperforming the deep learning models of its era.

The Challenge of One-Shot Learning

While deep learning has revolutionized computer vision, it typically requires thousands of labeled examples to learn a new category. For instance, the classic MNIST dataset uses 6,000 examples per digit. In contrast, humans can see a single "Segway" or a foreign character once and immediately recognize other instances, or even draw a new version themselves.

Humans learn new concepts, like a Segway or a novel character, from a single example by understanding their compositional parts.

The gap lies in how concepts are represented. Standard machine learning often treats images as static patterns of pixels. This paper addresses the challenge of building a model that captures the compositional nature (parts made of sub-parts) and causal structure (the action that created the object) of concepts to enable human-like learning from sparse data.

Methods: Hierarchical Bayesian Program Learning (HBPL)

To bridge this gap, the authors present Hierarchical Bayesian Program Learning (HBPL). Instead of learning a discriminative boundary between classes, HBPL represents a character as a stochastic "program" that generates strokes.

The HBPL generative model, showing how primitives combine into abstract types, which generate specific token instances.

The model is built on four key pillars:

  1. Compositionality: Characters are broken down into strokes, which are further divided into "sub-strokes" or primitives.
  2. Causality: The model represents the process of drawing. It doesn't just look at pixels; it infers the motor actions (pen down, trajectory, pen up) that produced those pixels.
  3. Hierarchy: The model operates at two distinct levels:
  4. Type level: An abstract definition of a character (e.g., "the letter A has these three strokes in this specific relationship").
  5. Token level: The specific, noisy realization of that type (e.g., a specific person's unique handwriting of an 'A').
  6. Inference (Analysis by Synthesis): To recognize a new character, the model "inverts" the process. It uses a bottom-up search (image thinning and graph-based parsing) to find the most likely motor program that could have generated the observed pixels.

The Omniglot Dataset

To test their model, the authors introduced the Omniglot dataset, often called the "transpose of MNIST." * Scale & Diversity: It contains over 1,600 different characters from 50 alphabets (including scripts like Sanskrit, Korean, and fictional ones like Futurama’s "Alien Language"). While MNIST has 10 categories with thousands of examples, Omniglot has thousands of categories with only 20 examples each. * Motor Data: Crucially, the dataset includes [x, y, time] coordinates, allowing the model to learn the "priors" of how humans naturally move their hands to draw.

Key Results and the Visual Turing Test

The paper champions the idea of perception as inverse graphics—to understand an image, a model must infer the causal story of how that image came to be. By training on a "background set" of alphabets, the model learns a library of universal primitives. When it sees a brand-new character, it composes the new concept using these pre-learned building blocks.

  • One-Shot Classification: On a 20-way one-shot task, HBPL achieved an error rate of 4.8%, nearly identical to the human error rate of 4.5%. For comparison, deep learning models of the time had error rates between 18% and 38%.
  • Visual Turing Test: To evaluate the generative side, the authors asked humans to distinguish between a grid of characters drawn by people and a grid generated by the model. Human judges were only 56% accurate at identifying which characters were machine-generated—barely better than a random guess. This suggests the model's "creativity" is indistinguishable from human behavior in this domain.

Limitations and Future Work

While groundbreaking, the approach has limitations. The model is highly tailored to "line-based" visual concepts like handwriting. It is not immediately clear how to scale this to natural images (like photos of dogs or cars) where the causal process (3D growth, lighting, occlusion) is far more complex than a 2D pen stroke. Furthermore, inference in HBPL involves complex MCMC sampling and optimization, which is significantly slower than the simple forward pass of a neural network.

Future directions suggested by the authors include extending this programmatic approach to other domains, such as speech (where phonemes act as compositional primitives) or object manipulation in robotics.

Summary updated

BibTeX
@inproceedings{lake2013one,
  author = {Brenden M. Lake and Ruslan Salakhutdinov and Joshua B. Tenenbaum},
  title = {{One-shot learning by inverting a compositional causal process}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2013},
  url = {https://openreview.net/forum?id=B1W7gOZu-H},
}
Figure