NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Meta-Learning with Latent Embedding Optimization

Andrei A. Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, Raia Hadsell

TL;DR

Latent Embedding Optimization (LEO) is a meta-learning framework designed to overcome the challenges of high-dimensional optimization in few-shot learning. By performing gradient-based adaptation in a low-dimensional latent space rather than directly on raw model parameters, LEO achieves state-of-the-art performance while effectively capturing task-specific uncertainty.

What Problem Does This Paper Address?

Traditional deep learning requires massive amounts of data to learn new concepts. Few-shot learning aims to bridge this gap, requiring models to adapt to new tasks with only a handful of examples (e.g., 1 or 5 images).

A popular approach to this problem is Model-Agnostic Meta-Learning (MAML), which tries to find a "meta-initialization" of model parameters that can be quickly adapted to any new task with a few steps of gradient descent. However, MAML faces two major hurdles:

  1. High Dimensionality: Modern neural networks have millions of parameters. Trying to find a single starting point that works for everything while avoiding overfitting on just five images is incredibly difficult.
  2. Shared Starting Point: MAML starts every task from the exact same parameter values, which might not be ideal for highly diverse tasks.

Methods

The authors introduce Latent Embedding Optimization (LEO). The core idea is to learn a generative distribution of model parameters in a low-dimensional latent space, decoupling the adaptation process from the high-dimensional raw parameters.

The Architecture

LEO Architecture

LEO consists of three main components:

  • Encoder & Relation Network: Instead of relying on a fixed starting point, LEO looks at the few available training examples for a specific task. It uses an encoder and a "Relation Net" (which considers the relationships between all input examples) to produce a task-specific latent code $z$.
  • Latent Space ($Z$): This acts as a low-dimensional bottleneck. Instead of optimizing millions of parameters, the "inner loop" of meta-learning happens entirely within this space.
  • Decoder (Parameter Generator): A differentiable function that maps the latent code $z$ to the high-dimensional weights $\theta$ of the actual classifier.

The "Inner Loop" in Latent Space

When faced with a new task, LEO doesn't update the model weights directly. Instead, it performs gradient descent on the latent code $z$. Because $z$ is low-dimensional, the optimization is more robust and less prone to the "noise" of a high-dimensional parameter space. Once $z$ is optimized to $z'$, the decoder generates the final adapted weights $\theta'$.

Meta-Training (The "Outer Loop")

The entire system—the encoder, relation net, and decoder—is trained end-to-end. The objective includes the classification loss, a KL-divergence term (to keep the latent space organized), and a "closeness" penalty to ensure the initial $z$ is already a good starting point for the optimized $z'$.

Datasets

The authors evaluated LEO on three main benchmarks:

  1. 1D Regression: A synthetic task involving sines and lines used to visualize how the model handles multimodal distributions and uncertainty.
  2. miniImageNet: A standard few-shot benchmark consisting of 100 classes from ImageNet, split into training, validation, and test sets.
  3. tieredImageNet: A larger, more challenging version of ImageNet where the splits are based on higher-level categories (e.g., "dogs" vs. "cats"), ensuring that the test tasks are significantly different from training tasks.

Key Insights and Ideas

  • The Power of the Bottleneck: The low-dimensional latent space acts as a natural regularizer. It prevents the model from "memorizing" the few-shot examples and forces it to learn meaningful, generalizable adaptations.
  • Data-Dependent Initialization: By using an encoder, LEO gives each task a "head start" based on its specific data, rather than forcing a one-size-fits-all initialization.
  • Transporting Models Further: Curvature analysis showed that a small step in the latent space $z$ corresponds to a much larger, more effective move in the parameter space $\theta$. This allows LEO to "transport" the model to a better solution much faster than MAML could.
  • Handling Ambiguity: Because the process is stochastic (sampling $z$ from a distribution), LEO can represent uncertainty. If the five examples provided are ambiguous, the model can generate multiple plausible sets of parameters.

Key Results

Few-Shot Classification Results

LEO significantly outperformed previous gradient-based and metric-based meta-learning methods at the time of publication:

  • miniImageNet: Achieved 61.76% accuracy on 1-shot and 77.59% on 5-shot tasks.
  • tieredImageNet: Achieved 66.33% accuracy on 1-shot and 81.44% on 5-shot tasks.
  • Ablation Studies: The authors showed that the latent bottleneck was the single most important factor for success. Removing the latent optimization and updating parameters directly (similar to MAML) led to a significant drop in performance.

Limitations and Future Work

  • Output Layer Focus: In the classification experiments, LEO was primarily used to generate weights for the final linear layer of a network using pre-trained features. While the authors mention LEO can generate entire networks (as shown in the regression task), scaling this to generate all parameters of a deep ResNet remains computationally expensive.
  • Feature Extractor Reliance: The performance is heavily dependent on the quality of the pre-trained feature extractor. Future work could explore training the feature extractor and LEO jointly.
  • Task Complexity: While LEO handles "sines vs. lines," it remains to be seen how well it scales to even more complex, multi-modal task distributions in reinforcement learning or robotics.

Summary updated

BibTeX
@inproceedings{rusu2019meta,
  author = {Andrei A. Rusu and Dushyant Rao and Jakub Sygnowski and Oriol Vinyals and Razvan Pascanu and Simon Osindero and Raia Hadsell},
  title = {{Meta-Learning with Latent Embedding Optimization}},
  booktitle = {International Conference on Learning Representations},
  year = {2019},
  url = {https://openreview.net/forum?id=XBiDGcEvE1},
}
Figure