Brewing Knowledge in Context: Distillation Perspectives on In-Context Learning
Not on the map. Why?
Abstract (arXiv)
In-context learning (ICL) allows large language models (LLMs) to solve novel tasks without weight updates. Despite its empirical success, the mechanism behind ICL remains poorly understood, limiting our ability to interpret, improve, and reliably apply it. In this paper, we propose a new theoretical perspective that interprets ICL as an implicit form of knowledge distillation (KD), where prompt demonstrations guide the model to form a task-specific reference model during inference. Under this view, we derive a Rademacher complexity-based generalization bound and prove that the bias of the distilled weights grows linearly with the Maximum Mean Discrepancy (MMD) between the prompt and target distributions. This theoretical framework explains several empirical phenomena and unifies prior gradient-based and distributional analyses. To the best of our knowledge, this is the first to formalize inference-time attention as a distillation process, which provides theoretical insights for future prompt engineering and automated demonstration selection.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 39 of its 52 references that are in the map. First posted on arXiv 13 Jun 2025.
Builds on
39 of 52 references.
References · 39
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2021On the Opportunities and Risks of Foundation Modelscited by 3,961
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
- 2014FitNets: Hints for Thin Deep Netscited by 1,619
27 more
- 2019Root Mean Square Layer Normalizationcited by 1,425
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2022In-context Learning and Induction Headscited by 930
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 599
- 2021MetaICL: Learning to Learn In Contextcited by 450
- 2023Function Vectors in Large Language Modelscited by 292
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
- 2023Can We Edit Factual Knowledge by In-Context Learning?cited by 284
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
- 2023The Learnability of In-Context Learningcited by 126
- 2023What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalizationcited by 112
- 2023Uncovering mesa-optimization algorithms in Transformerscited by 94
- 2023A Theory of Emergent In-Context Learning as Implicit Structure Inductioncited by 86
- 2023In-Context Learning through the Bayesian Prismcited by 78
- 2023How Do Transformers Learn In-Context Beyond Simple Functions? A Case Study on Learning with Representationscited by 72
- 2023Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regressioncited by 47
- 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regressioncited by 41
- 2024An Information-Theoretic Analysis of In-Context Learningcited by 39
- 2023The Mystery of In-Context Learning: A Comprehensive Survey on Interpretation and Analysiscited by 34
- 2023In-context Learning and Gradient Descent Revisitedcited by 20
- 2023Towards Understanding How Transformers Learn In-context Through a Representation Learning Lenscited by 15
- 2023Schema-learning and rebinding as mechanisms of in-context learning and emergencecited by 14
- 2025Effects of Prompt Length on Domain-specific Tasks for Large Language Modelscited by 10
Built on by
Citing papers per year: 2026: 1.
1 paper.