Beyond Simple Meta-Learning: Multi-Purpose Models for Multi-Domain, Active and Continual Few-Shot Learning

Peyman Bateni, Jarred Barber, Raghav Goyal, Vaden Masrani, Jan-Willem van de Meent, Leonid Sigal, Frank Wood

TL;DR

The authors introduce Simple CNAPS and Transductive CNAPS, two powerful few-shot learning models that replace standard Euclidean distance with a variance-sensitive Mahalanobis-based classifier. By accounting for the "shape" of data clusters and leveraging unlabeled query data, these models achieve state-of-the-art performance across diverse domains and prove remarkably versatile, handling active and continual learning tasks "out of the box."

What Problem Does This Paper Address?

Few-shot learning (FSL) is the challenge of training a model to recognize new categories from just a handful of examples. Most existing FSL methods, like Prototypical Networks, make a major simplifying assumption: they treat the feature space as if every dimension has equal variance and no correlation, typically using Euclidean or Cosine distance to classify new images.

In reality, high-dimensional feature spaces are messy. Clusters for different classes have different shapes and orientations. Furthermore, most FSL research focuses on static, single-domain benchmarks. This paper tackles two main gaps:

  1. The Metric Gap: Moving beyond simple distance metrics to account for class-specific variance.
  2. The Versatility Gap: Creating a single architecture capable of handling multi-domain data, Active Learning (deciding which unlabeled images are most useful to label), and Continual Learning (learning new tasks over time without forgetting old ones).

Methods

The researchers build upon the CNAPS (Conditional Neural Adaptive Processes) framework, which uses a ResNet-18 backbone modified with FiLM layers (Feature-wise Linear Modulation). These layers allow the model to "shift and scale" its internal features based on the specific task at hand.

Simple CNAPS

The core innovation here is the Regularized Mahalanobis Classifier. Instead of just finding the nearest class mean, the model estimates a covariance matrix for each class. Because you can't get a good covariance estimate from only 1 or 5 images, they use a hierarchical regularization strategy: they blend the class-specific covariance with the broader task-level covariance.

Transductive CNAPS

This version extends the model to the transductive setting, where the model can "look" at all the unlabeled query images at once before making a final decision. It uses:

  • A Two-Step Task Encoder: An LSTM-based encoder that processes both the labeled support set and the unlabeled query set to better adapt the feature extractor.
  • Soft K-Means Refinement: An iterative Expectation-Maximization (EM) inspired procedure. It treats the query images as "soft-labeled" data to refine the estimates of class means and covariances, effectively "sharpening" the decision boundaries.

Datasets

The models were primarily evaluated on Meta-Dataset, a massive and challenging benchmark that aggregates 10 different datasets (including ImageNet, Omniglot, Aircraft, and Birds).

To test "out-of-domain" performance, they evaluated on datasets the model never saw during training, such as MNIST, CIFAR-10, and CIFAR-100. They also reported results on the standard mini-ImageNet and tiered-ImageNet benchmarks.

Key Insights and Ideas

  • Variance is a Signal: The "aha moment" is that knowing how a class spreads is just as important as knowing its center. Switching from Euclidean to Mahalanobis distance provides a massive performance boost because it allows the model to ignore "noisy" feature dimensions.
  • Transduction as a Power-Up: Using unlabeled query data isn't just a minor tweak; it's a significant advantage. In 1-shot scenarios, where information is scarcest, the iterative refinement in Transductive CNAPS provides the largest gains.
  • Versatility is Free: Perhaps the most surprising finding is that a well-calibrated probabilistic model doesn't need special training for active or continual learning. Because the Mahalanobis distance provides a better measure of uncertainty, the model can naturally identify which samples it is "confused" about (Active Learning) and how to blend new task parameters with old ones (Continual Learning).
  • Riemannian Connection: The authors provide a theoretical bridge, showing that their Mahalanobis approach is essentially a local approximation of the geodesic distance on a Riemannian manifold.

Key Results

  • State-of-the-Art: At the time of publication, Transductive CNAPS achieved the #1 overall rank on Meta-Dataset, while Simple CNAPS ranked #4.
  • Efficiency: Simple CNAPS actually removed nearly 800,000 parameters from the original CNAPS architecture while improving accuracy by 6.1%.
  • Active Learning: Using "predictive entropy" (a measure of model confusion) to select which images to label consistently outperformed random selection, proving the model's uncertainty estimates are well-calibrated.
  • Continual Learning: On the MNIST continual learning task, their "Averaging Encoding" strategy allowed the model to maintain high accuracy on early tasks even as it learned new ones, striking a balance between plasticity and stability.

Limitations and Future Work

  • Computational Overhead: The transductive refinement is iterative. While it improves accuracy, it adds computational cost at inference time compared to the "one-shot" pass of Simple CNAPS.
  • Continual Learning Ceiling: While the "out of the box" performance is impressive, it still trails behind specialized state-of-the-art continual learning methods that use complex memory replay or architectural growth.
  • Geometric Refinement: The authors suggest that future work could move beyond Mahalanobis distance toward even more principled geometric algorithms, such as manifold-regularized SVMs, to further exploit the local geometry of the feature space.

Summary updated

BibTeX
@misc{bateni2022beyond,
  author = {Peyman Bateni and Jarred Barber and Raghav Goyal and Vaden Masrani and Jan-Willem van de Meent and Leonid Sigal and Frank Wood},
  title = {{Beyond Simple Meta-Learning: Multi-Purpose Models for Multi-Domain, Active and Continual Few-Shot Learning}},
  year = {2022},
  eprint = {2201.05151},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.05151},
}

Loading related content...

Figure