Probabilistic task modelling for meta-learning

Cuong Cao Nguyen, Thanh-Toan Do, Gustavo Carneiro

Meta-learning—the art of "learning to learn"—has revolutionized how we approach few-shot problems. However, most meta-learning algorithms treat the "task distribution" as a black box. A new paper from UAI 2021, Probabilistic Task Modelling for Meta-Learning, pulls back the curtain, offering a way to mathematically represent and reason about the tasks themselves.

Abstract

In standard meta-learning, tasks are typically assumed to be sampled i.i.d. from a latent distribution. This paper introduces Probabilistic Task Modelling (PTM), a generative framework that treats tasks as mixtures of latent "task-themes." By combining Variational Auto-Encoders (VAEs) with Gaussian Latent Dirichlet Allocation (LDA), PTM provides a principled way to quantify task uncertainty and similarity. These metrics enable active task selection, significantly improving performance in lifelong meta-learning scenarios compared to traditional baselines.

The Challenge of Task Structure

In practice, not all tasks are created equal. Some are "closer" to the training data than others, and some are inherently more difficult. Existing methods often ignore this structure, leading to high variance in performance. While tools like Task2Vec exist to embed tasks, they often require training a "probe" classifier for every new task, which is computationally expensive. The authors identify a need for a more efficient, probabilistic way to represent tasks that captures both their content and the uncertainty associated with them.

Methods: Tasks as Documents

The core innovation of PTM is an analogy: A task is a document, and a data point is a word.

  1. The Architecture: PTM combines two heavy hitters in probabilistic modeling: a VAE to compress high-dimensional data into a continuous latent embedding space, and a Gaussian LDA to model each task as a mixture of $K$ "task-themes" (represented as Gaussian distributions in the embedding space).
  2. Task-Theme Simplex: Every task is represented as a point on a simplex (a probability distribution over themes). If a task is "Animal-heavy" and "Furniture-light," its position on the simplex reflects that.
  3. Inference: To handle the massive number of tasks typical in meta-learning, the authors developed an Online Variational Inference (VI) technique. This allows the model to update its "meta-parameters" (the themes) incrementally without needing to see every task in the dataset at once.
The probabilistic graphical model for PTM, illustrating the relationship between task-themes (μ, Σ), task mixtures (π), and observed data (x).

Key Insights and Metrics

The authors derived two critical metrics from the PTM framework:

  • Task Uncertainty: Measured by the entropy of the task-theme mixture.
  • Task Distance: Measured using asymmetric Kullback-Leibler (KL) divergence between task distributions.

These metrics allow for intelligent task selection. In an Induction setting (learning to be generally good), the learner should prioritize tasks with high uncertainty (high entropy). In a Transduction setting (learning for a specific target), it should prioritize tasks closest to the target distribution.

Results and Performance

The authors evaluated PTM on the Omniglot and mini-ImageNet benchmarks. A key finding was the clear negative correlation between task entropy/distance and prediction accuracy: as task uncertainty or distance from the training set increases, MAML's accuracy drops. This proves PTM's metrics are meaningful proxies for task difficulty.

In lifelong learning experiments on mini-ImageNet, PTM-based task selection consistently outperformed random selection and Task2Vec. For example, in the "Induction" setting, PTM helped the meta-learner reach higher accuracy faster by prioritizing the most informative tasks.

Performance comparison in Induction and Transduction settings on mini-ImageNet, showing PTM outperforming random and Task2Vec baselines.

Conclusion and Future Directions

PTM provides a robust mathematical foundation for reasoning about task distributions. Unlike previous methods, it requires only a single forward pass through an encoder to generate a task representation, making it highly efficient. While the authors noted potential overfitting in active selection if the task pool becomes uninformative, PTM opens the door for "model-aware" task selection—picking tasks based on what a specific learner struggles with—which could be a powerful next step in meta-learning research.

Summary updated

BibTeX
@inproceedings{nguyen2021probabilistic,
  author = {Cuong Cao Nguyen and Thanh-Toan Do and Gustavo Carneiro},
  title = {{Probabilistic task modelling for meta-learning}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2021},
  url = {https://openreview.net/forum?id=xlut_6a6IRz},
}
Figure