Pith. sign in

REVIEW 7 cited by

In-Context Learning through the Bayesian Prism

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2306.04891 v2 pith:3SQBPUYW submitted 2023-06-08 cs.LG cs.CL

classification cs.LGcs.CL
keywords bayesiantransformersfunctionclassfindgeneralizepredictorsetup
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
abstract

In-context learning (ICL) is one of the surprising and useful features of large language models and subject of intense research. Recently, stylized meta-learning-like ICL setups have been devised that train transformers on sequences of input-output pairs $(x, f(x))$. The function $f$ comes from a function class and generalization is checked by evaluating on sequences generated from unseen functions from the same class. One of the main discoveries in this line of research has been that for several function classes, such as linear regression, transformers successfully generalize to new functions in the class. However, the inductive biases of these models resulting in this behavior are not clearly understood. A model with unlimited training data and compute is a Bayesian predictor: it learns the pretraining distribution. In this paper we empirically examine how far this Bayesian perspective can help us understand ICL. To this end, we generalize the previous meta-ICL setup to hierarchical meta-ICL setup which involve unions of multiple task families. We instantiate this setup on a diverse range of linear and nonlinear function families and find that transformers can do ICL in this setting as well. Where Bayesian inference is tractable, we find evidence that high-capacity transformers mimic the Bayesian predictor. The Bayesian perspective provides insights into the inductive bias of ICL and how transformers perform a particular task when they are trained on multiple tasks. We also find that transformers can learn to generalize to new function classes that were not seen during pretraining. This involves deviation from the Bayesian predictor. We examine these deviations in more depth offering new insights and hypotheses.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 7 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Competition Dynamics Shape Algorithmic Phases of In-Context Learning

    cs.LG 2024-12 conditional novelty 8.0 of 10

    A transformer on Markov-chain mixtures is well described as a changing weighted mix of four retrieval and inference algorithms, and that mix predicts when in-context learning is transient.

  2. Next-Token Prediction Should be Ambiguity-Sensitive: A Meta-Learning Perspective

    cs.LG 2025-06 conditional novelty 6.0 of 10

    Transformers systematically deviate from the Bayes-optimal predictor under high-ambiguity contexts on a new HMM benchmark, and a Monte Carlo predictor that decouples task inference from token prediction partly closes ...

  3. Transformers Meet In-Context Learning: A Universal Approximation Theory

    cs.LG 2025-06 accept novelty 6.0 of 10

    A constructive theorem shows that transformers can perform in-context learning for any Barron-type function class by combining universal features with an emulated Lasso solver.

  4. Solving Empirical Bayes via Transformers

    cs.LG 2025-02 conditional novelty 6.0 of 10

    A transformer pre-trained on synthetic Poisson data can beat the classical NPMLE estimator on several empirical Bayes tasks and run about 100x faster.

  5. Can Transformers Learn Full Bayesian Inference in Context?

    cs.LG 2025-01 conditional novelty 6.0 of 10

    A transformer trained on synthetic data can output posterior samples for GLMs, factor analysis, and Gaussian mixtures in context, matching HMC quality and beating several VI baselines.

  6. Re-examining learning linear functions in context

    cs.LG 2024-11 conditional novelty 6.0 of 10

    Transformer models trained from scratch on in-context linear function prediction learn boundary-limited interpolation, not general linear regression.

  7. In-Context Deep Learning via Transformer Models

    cs.LG 2024-11 conditional novelty 5.0 of 10

    An explicit construction shows a transformer-like network with an element-wise multiplication layer can simulate L gradient descent steps of an N-layer ReLU network via in-context learning.

Pith tools