Learn the Effects, Not the Examples: Implicit ICL via Attention Patching
Not on the map. Why?
Abstract (arXiv)
In-context learning (ICL) enables language models to adapt to new tasks from demonstrations, but repeatedly including multiple examples increases context length and inference cost. Many existing implicit ICL methods encode demonstrations as fixed vectors, limiting adaptation of the intervention to individual queries and token positions. We propose Attention-Patching, an implicit ICL method that models contextual changes in self-attention outputs through task-specific updates to attention output projections. Using query-answer pairs processed with and without a fixed demonstration set, Attention-Patching fits layer-wise affine transformations from non-contextual attention representations to the demonstration-induced output changes. Across 12 classification benchmarks and four model families, Attention-Patching achieves higher average accuracy than the evaluated implicit ICL baselines while maintaining performance comparable to explicit ICL at near zero-shot inference cost. Further experiments on diverse generation tasks demonstrate its applicability to autoregressive multi-token generation.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 32 of its 46 references that are in the map. Submitted 23 Nov 2026, announced 24 Nov 2026.
Builds on
32 of 46 references.
References · 32
- 2020Language Models are Few-Shot Learnerscited by 33,113
- 2024The Llama 3 Herd of Modelscited by 16,113
- 2021Training Verifiers to Solve Math Word Problemscited by 11,055
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 5,336
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 3,052
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,406
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,893
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,487
- 2017Get To The Point: Summarization with Pointer-Generator Networkscited by 1,319
- 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,270
- 2020COMET: A Neural Framework for MT Evaluationcited by 1,073
- 2022Transformers learn in-context by gradient descentcited by 763
20 more
- 2021The FLORES-101 Evaluation Benchmark for Low-Resource and Multilingual Machine Translationcited by 579
- 2023Function Vectors in Large Language Modelscited by 353
- 2023In-Context Learning Creates Task Vectorscited by 337
- 2024Long-context LLMs Struggle with Long In-context Learningcited by 318
- 2023In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steeringcited by 263
- 2023The Learnability of In-Context Learningcited by 131
- 2021CREAK: A Dataset for Commonsense Reasoning over Entity Knowledgecited by 91
- 2022Structured Prompting: Scaling In-Context Learning to 1,000 Examplescited by 86
- 2025Which Attention Heads Matter for In-Context Learning?cited by 68
- 2025Learning without training: The implicit dynamics of in-context learningcited by 49
- 2024Batch-ICL: Effective, Efficient, and Order-Agnostic In-Context Learningcited by 24
- 2024How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear Regressioncited by 16
- 2024Implicit In-context Learningcited by 14
- 2025The Atlas of In-Context Learning: How Attention Heads Shape In-Context Retrieval Augmentationcited by 14
- 2025Learning Task Representations from In-Context Learningcited by 12
- 2025Transmuting prompts into weightscited by 7
- 2025Beyond Demonstrations: Dynamic Vector Construction from Latent Representationscited by 6
- 2024On Understanding Attention-Based In-Context Learning for Categorical Datacited by 4
- 2025Soft Head Selection for Injecting ICL-Derived Task Embeddingscited by 2
- 2026Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learningcited by 1
Built on by
Not cited yet.