Skip to main content
QUICK REVIEW

[Paper Review] General-Purpose In-Context Learning by Meta-Learning Transformers

Louis Kirsch, J. Harrison|arXiv (Cornell University)|Dec 8, 2022
Machine Learning and Data ClassificationComputer Science6 citations
TL;DR

This paper proposes a general-purpose in-context learning framework, GPICL, where Transformers are meta-trained to learn diverse tasks without explicit loss functions or optimization algorithms. By scaling model size and task diversity, the method transitions from memorization to generalization, with performance bottlenecked by accessible memory size rather than parameter count, enabling zero-shot generalization across datasets like MNIST, Fashion-MNIST, and CIFAR10.

ABSTRACT

Modern machine learning requires system designers to specify aspects of the learning pipeline, such as losses, architectures, and optimizers. Meta-learning, or learning-to-learn, instead aims to learn those aspects, and promises to unlock greater capabilities with less manual effort. One particularly ambitious goal of meta-learning is to train general-purpose in-context learning algorithms from scratch, using only black-box models with minimal inductive bias. Such a model takes in training data, and produces test-set predictions across a wide range of problems, without any explicit definition of an inference model, training loss, or optimization algorithm. In this paper we show that Transformers and other black-box models can be meta-trained to act as general-purpose in-context learners. We characterize transitions between algorithms that generalize, algorithms that memorize, and algorithms that fail to meta-train at all, induced by changes in model size, number of tasks, and meta-optimization. We further show that the capabilities of meta-trained algorithms are bottlenecked by the accessible state size (memory) determining the next prediction, unlike standard models which are thought to be bottlenecked by parameter count. Finally, we propose practical interventions such as biasing the training distribution that improve the meta-training and meta-generalization of general-purpose in-context learning algorithms.

Motivation & Objective

  • To develop a general-purpose in-context learning system that learns from demonstrations without explicit architectural or optimization design.
  • To investigate the conditions under which black-box models like Transformers can meta-train generalizable learning algorithms.
  • To identify the key factors—such as model size, task count, and meta-optimization—that govern the transition from memorization to generalization in in-context learning.
  • To explore how memory capacity (state size) limits the capability of meta-trained in-context learners, compared to parameter count.
  • To propose practical interventions, such as curriculum learning via biased data distributions, to improve meta-generalization.

Proposed method

  • A Transformer-based architecture is trained end-to-end to map input demonstrations (support sets) to test predictions, without explicit loss or optimizer definitions.
  • Meta-training is performed on a diverse distribution of tasks sampled from real datasets (e.g., MNIST, CIFAR10), with each task defined as a few-shot classification problem.
  • The model learns to generalize across tasks by attending to input sequences of (x_i, y_i) pairs and predicting y' for a query x', mimicking in-context learning.
  • The method uses a black-box, sequence-to-sequence learning paradigm where the model's internal state acts as a dynamic memory for learning.
  • Meta-optimization is performed using standard backpropagation on the meta-training distribution, with hyperparameters tuned to improve generalization.
  • Practical interventions include curriculum learning via biased data distributions and careful selection of optimizers and learning rates to stabilize meta-training.

Experimental results

Research questions

  • RQ1Under what conditions do black-box Transformers transition from memorizing tasks to generalizing across diverse datasets during meta-training?
  • RQ2How does model size influence the emergence of general-purpose in-context learning capabilities in meta-trained models?
  • RQ3To what extent is the performance of meta-trained in-context learning algorithms limited by accessible memory (state size) rather than parameter count?
  • RQ4Can interventions such as biased data distributions or optimized meta-optimization improve meta-generalization in general-purpose in-context learning?
  • RQ5How do the capabilities of meta-trained in-context learning algorithms scale across different neural network architectures and input/output sizes?

Key findings

  • The transition from task memorization to generalization occurs in a regime of large model size and large numbers of meta-training tasks, with distinct algorithmic phases observed.
  • Meta-trained in-context learning algorithms are bottlenecked by accessible memory (hidden state size) rather than total parameter count, indicating memory capacity is the key constraint.
  • With sufficient scale and diversity in meta-training, the model achieves zero-shot generalization across datasets such as MNIST, Fashion-MNIST, and CIFAR10.
  • The use of a biased data distribution during meta-training acts as a curriculum, significantly improving meta-generalization performance.
  • Meta-optimization stability is critical: suboptimal hyperparameters or optimizers lead to failure in meta-training or poor generalization.
  • The method enables the discovery of general-purpose learning algorithms that can combine domain-specific and general-purpose learning within a single black-box model.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.