mlsanityData to 7 Oct 2026

Towards Better Understanding of In-Context Learning Ability from In-Context Uncertainty Quantification

arXiv 2405.15115 ↗First posted 24 May 2024cs.LG cs.CL stat.MLcited by 2

Not on the map. Why?

Abstract (arXiv)

Predicting simple function classes has been widely used as a testbed for developing theory and understanding of the trained Transformer's in-context learning (ICL) ability. In this paper, we revisit the training of Transformers on linear regression tasks, and different from all the existing literature, we consider a bi-objective prediction task of predicting both the conditional expectation mathbbE[Y|X] and the conditional variance Var(Y|X). This additional uncertainty quantification objective provides a handle to (i) better design out-of-distribution experiments to distinguish ICL from in-weight learning (IWL) and (ii) make a better separation between the algorithms with and without using the prior information of the training distribution. Theoretically, we show that the trained Transformer reaches near Bayes-optimum, suggesting the usage of the information of the training distribution. Our method can be extended to other cases. Specifically, with the Transformer's context window S, we prove a generalization bound of tildeO(√minS, T/(n T)) on n tasks with sequences of length T, providing sharper analysis compared to previous results of tildeO(√1/n). Empirically, we illustrate that while the trained Transformer behaves as the Bayes-optimal solution as a natural consequence of supervised training in distribution, it does not necessarily perform a Bayesian inference when facing task shifts, in contrast to the textitequivalence between these two proposed in many existing literature. We also demonstrate the trained Transformer's ICL ability over covariates shift and prompt-length shift and interpret them as a generalization over a meta distribution.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 39 of its 53 references that are in the map. First posted on arXiv 24 May 2024.

Builds on

39 of 53 references.

References · 39

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
  3. 2021Decision Transformer: Reinforcement Learning via Sequence Modelingcited by 1,528
  4. 2022In-context Learning and Induction Headscited by 930
  5. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
  6. 2020A Review of Uncertainty Quantification in Deep Learning: Techniques, Applications and Challengescited by 813
  7. 2023Semantic Uncertainty: Linguistic Invariances for Uncertainty Estimation in Natural Language Generationcited by 795
  8. 2023SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Modelscited by 787
  9. 2022Transformers learn in-context by gradient descentcited by 714
  10. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  11. 2021A Survey of Uncertainty in Deep Neural Networkscited by 675
  12. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
27 more
  1. 2023Larger language models do in-context learning differentlycited by 386
  2. 2023Trained Transformers Learn Linear Models In-Contextcited by 331
  3. 2024INSIDE: LLMs' Internal States Retain the Power of Hallucination Detectioncited by 317
  4. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
  5. 2023Generating with Confidence: Uncertainty Quantification for Black-box Large Language Modelscited by 286
  6. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
  7. 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
  8. 2022Exploring Length Generalization in Large Language Modelscited by 204
  9. 2020Benign overfitting in ridge regressioncited by 152
  10. 2023Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressioncited by 138
  11. 2022Quantifying Aleatoric and Epistemic Uncertainty in Machine Learning: Are Conditional Entropy and Mutual Information Appropriate Measures?cited by 124
  12. 2023The mechanistic basis of data dependence and abrupt learning in an in-context classification taskcited by 115
  13. 2023What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalizationcited by 112
  14. 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?cited by 93
  15. 2023Transformers as Decision Makers: Provable In-Context Reinforcement Learning via Supervised Pretrainingcited by 82
  16. 2023In-Context Learning through the Bayesian Prismcited by 78
  17. 2023How Do Transformers Learn In-Context Beyond Simple Functions? A Case Study on Learning with Representationscited by 72
  18. 2023The Transient Nature of Emergent In-Context Learning in Transformerscited by 72
  19. 2023Large Language Models for Supply Chain Optimizationcited by 61
  20. 2023The Curious Case of Hallucinatory (Un)answerability: Finding Truths in the Hidden States of Over-Confident Large Language Modelscited by 54
  21. 2023Credal Bayesian Deep Learningcited by 45
  22. 2024Distinguishing the Knowable from the Unknowable with Language Modelscited by 45
  23. 2023Prompting AI Art: An Investigation into the Creative Skill of Prompt Engineeringcited by 40
  24. 2023Is the Volume of a Credal Set a Good Measure for Epistemic Uncertainty?cited by 40
  25. 2024An Information-Theoretic Analysis of In-Context Learningcited by 39
  26. 2024Credal Learning Theorycited by 30
  27. 2022Relational Reasoning via Set Transformers: Provable Efficiency and Applications to MARLcited by 12

Built on by

Cited by year

Citing papers per year: 2024: 1; 2025: 1.

2 papers.