Train Once, Reuse Everywhere: Generalizable Implicit In-Context Learning by Routing Attention
Not on the map. Why?
Abstract (arXiv)
Implicit in-context learning (ICL) has newly emerged as a promising paradigm that simulates ICL behaviors in the representation space of large language models (LLMs), aiming to attain few-shot performance at zero-shot cost. However, existing approaches largely rely on injecting shift vectors into residual flows, which are typically constructed from labeled demonstrations or task-specific alignment. Such designs fall short of utilizing the structural mechanisms underlying ICL and suffer from limited generalizability. To address this, we propose In-Context Routing (ICR), a novel implicit ICL method that captures and utilizes generalizable ICL patterns at the attention logits level. It extracts reusable structural directions that emerge during ICL and employs a learnable input-conditioned router to modulate attention logits accordingly, enabling an efficient train-once-and-reuse framework. We evaluate ICR on 12 real-world datasets spanning diverse domains and multiple LLMs. The results show that ICR consistently outperforms existing implicit ICL methods that require task-specific retrieval or training, while demonstrating robust generalization to out-of-domain tasks where they struggle. These findings position ICR to push the boundary of the practical value of ICL. The code is available at https://github.com/Lijiaqian1/In-Context-Routing.git.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Builds on 32 of its 49 references that are in the map. First posted on arXiv 26 Sep 2025.
Builds on
32 of 49 references.
References · 32
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
- 2022Emergent Abilities of Large Language Modelscited by 2,512
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
- 2020MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformerscited by 1,463
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
- 2022In-context Learning and Induction Headscited by 964
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2022Transformers learn in-context by gradient descentcited by 732
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
20 more
- 2021MetaICL: Learning to Learn In Contextcited by 454
- 2023In-Context Learning Creates Task Vectorscited by 312
- 2023Function Vectors in Large Language Modelscited by 308
- 2023In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steeringcited by 245
- 2022Self-Adaptive In-Context Learning: An Information Compression Perspective for In-Context Example Selection and Orderingcited by 161
- 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 152
- 2023The Learnability of In-Context Learningcited by 127
- 2023Language Models Implement Simple Word2Vec-style Vector Arithmeticcited by 98
- 2021CREAK: A Dataset for Commonsense Reasoning over Entity Knowledgecited by 88
- 2024Training Dynamics of Multi-Head Softmax Attention for In-Context Learning: Emergence, Convergence, and Optimalitycited by 74
- 2022On the Relation between Sensitivity and Accuracy in In-context Learningcited by 72
- 2025Which Attention Heads Matter for In-Context Learning?cited by 61
- 2023Pretraining Data Mixtures Enable Narrow Model Selection Capabilities in Transformer Modelscited by 45
- 2025M2IV: Towards Efficient and Fine-grained Multimodal In-Context Learning via Representation Engineeringcited by 35
- 2024Can In-context Learning Really Generalize to Out-of-distribution Tasks?cited by 23
- 2025Make LVLMs Focus: Context-Aware Attention Modulation for Better Multimodal In-Context Learningcited by 19
- 2023Is attention required for ICL? Exploring the Relationship Between Model Architecture and In-Context Learning Abilitycited by 17
- 2024Revisiting In-context Learning Inference Circuit in Large Language Modelscited by 17
- 2024Addressing Order Sensitivity of In-Context Demonstration Examples in Causal Language Modelscited by 12
- 2024Implicit In-context Learningcited by 11
Built on by
Citing papers per year: 2025: 2; 2026: 6.
8 papers.
- 2025CentaurEval: Benchmarking Human-in-the-Loop Value in Agentic Codingcited by 12
- 2025Reward Auditor: Inference on Reward Modeling Suitability in Real-World Perturbed Scenarioscited by 8
- 2026AtelierEval: Agentic Evaluation of Humans & LLMs as Text-to-Image Prompterscited by 8
- 2026Stable-RAG: Mitigating Retrieval-Permutation-Induced Hallucinations in Retrieval-Augmented Generationcited by 5
- 2026HIFICL: High-Fidelity In-Context Learning for Multimodal Taskscited by 1
- 2026Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learningcited by 0
- 2026When Is a Task Vector Enough? An Empirical Theory of Implicit Multimodal ICLcited by 0
- 2026Efficient Task Adaptation in Large Language Models: A Survey of Weight-Based, Prompt-Based, and Embedding-Based Adaptationscited by 0
- 2026Efficient Task Adaptation in Large Language Models: A Survey of Weight-Based, Prompt-Based, and Embedding-Based Adaptations1 Oct 2026
- 2026When Is a Task Vector Enough? An Empirical Theory of Implicit Multimodal ICL13 Aug 2026
- 2026AtelierEval: Agentic Evaluation of Humans & LLMs as Text-to-Image Prompters21 May 2026
- 2026Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learning20 May 2026
- 2026HIFICL: High-Fidelity In-Context Learning for Multimodal Tasks13 Mar 2026
- 2026Stable-RAG: Mitigating Retrieval-Permutation-Induced Hallucinations in Retrieval-Augmented Generation6 Jan 2026
- 2025CentaurEval: Benchmarking Human-in-the-Loop Value in Agentic Coding30 Nov 2025
- 2025Reward Auditor: Inference on Reward Modeling Suitability in Real-World Perturbed Scenarios30 Nov 2025