mlsanityData to 7 Oct 2026

Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learning

arXiv 2605.20730 ↗First posted 20 May 2026cs.CL cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

In-context learning (ICL) allows large language models (LLMs) to adapt to new tasks through demonstrations, yet it suffers from escalating inference costs as context length increases. While task vectors offer a promising alternative by compressing demonstrations into compact hidden-state representations, their quality has been evaluated only through downstream task accuracy. This indirect criterion provides limited insight into how to design more effective task vector extraction methods. In this paper, we posit that inference using task vectors should align their predictive distribution with that of ICL. To quantify this, we introduce dNTP, a metric that measures the discrepancy in next-token probabilities between task vector-based and ICL-based inference. Our empirical analysis reveals that dNTP serves as a performance proxy, exhibiting a strong negative correlation with downstream accuracy. Motivated by this, we develop Linear Task Vector (LTV), a method designed to minimize dNTP via a closed-form linear mapping that estimates demonstration effects through regression. Across eight classification benchmarks and five LLMs, LTV consistently outperforms existing task vector baselines, improving average accuracy by 9.2% while reducing inference latency. We further show that LTV outperforms the baselines on regression tasks. Moreover, we investigate the transferability of LTV across different model scales; an aspect that has remained nascent in task vector research. Specifically, we empirically show that task vectors from a larger model can enhance a smaller model's performance by 6.4%, suggesting a new utility for extracted task representations.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 44 of its 54 references that are in the map. First posted on arXiv 20 May 2026.

Builds on

44 of 54 references.

References · 44

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2024The Llama 3 Herd of Modelscited by 14,192
  4. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  5. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  6. 2025Qwen3 Technical Reportcited by 8,195
  7. 2024Qwen2.5 Technical Reportcited by 4,713
  8. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
  9. 2022Emergent Abilities of Large Language Modelscited by 2,483
  10. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  11. 2022Editing Models with Task Arithmeticcited by 1,076
  12. 2022In-context Learning and Induction Headscited by 930
32 more
  1. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
  2. 2022Transformers learn in-context by gradient descentcited by 714
  3. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  4. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  5. 2023Learning to Compress Prompts with Gist Tokenscited by 379
  6. 2023In-Context Learning Creates Task Vectorscited by 302
  7. 2023Function Vectors in Large Language Modelscited by 292
  8. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
  9. 2023In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steeringcited by 240
  10. 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
  11. 2023Task Arithmetic in the Tangent Space: Improved Editing of Pre-Trained Modelscited by 218
  12. 2024Many-Shot In-Context Learningcited by 203
  13. 2018Hate Speech Dataset from a White Supremacy Forumcited by 196
  14. 2023What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalizationcited by 112
  15. 2023In-Context Learning through the Bayesian Prismcited by 78
  16. 2025Which Attention Heads Matter for In-Context Learning?cited by 61
  17. 2025When is Task Vector Provably Effective for Model Editing? A Generalization Analysis of Nonlinear Transformerscited by 38
  18. 2024Knowledge Composition using Task Vectors with Learned Anisotropic Scalingcited by 37
  19. 2023The Mystery of In-Context Learning: A Comprehensive Survey on Interpretation and Analysiscited by 34
  20. 2025Task Vectors in In-Context Learning: Emergence, Formation, and Benefitcited by 20
  21. 2024In-Context Learning State Vector with Inner and Momentum Optimizationcited by 15
  22. 2024Task Prompt Vectors: Effective Initialization through Multi-Task Soft-Prompt Transfercited by 13
  23. 2024Does learning the right latent variables necessarily improve in-context learning?cited by 12
  24. 2025Learning Task Representations from In-Context Learningcited by 11
  25. 2024Emergence and Effectiveness of Task Vectors in In-Context Learning: An Encoder Decoder Perspectivecited by 9
  26. 2025Understanding Task Vectors in In-Context Learning: Emergence, Functionality, and Limitationscited by 8
  27. 2025Train Once, Reuse Everywhere: Generalizable Implicit In-Context Learning by Routing Attentioncited by 8
  28. 2024ELICIT: LLM Augmentation via External In-Context Capabilitycited by 7
  29. 2025Adaptive Task Vectors for Large Language Modelscited by 4
  30. 2024Disentangling Latent Shifts of In-Context Learning with Weak Supervisioncited by 3
  31. 2025Optimization-Inspired Few-Shot Adaptation for Large Language Modelscited by 3
  32. 2025Towards Compute-Optimal Many-Shot In-Context Learningcited by 3

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2024Does In-Context Learning Really Learn? Rethinking How Large Language Models Respond and Solve Tasks via In-Context Learning
  2. 2025From Compression to Expression: A Layerwise Analysis of In-Context Learning
  3. 2023Beyond Output Matching: Bidirectional Alignment for Enhanced In-Context Learning
  4. 2024How Far Can In-Context Alignment Go? Exploring the State of In-Context Alignment
  5. 2024Bayesian scaling laws for in-context learning
  6. 2025On the Relationship Between the Choice of Representation and In-Context Learning
  7. 2025Rethinking Invariance in In-context Learning
  8. 2026Why Multimodal In-Context Learning Lags Behind? Unveiling the Inner Mechanisms and Bottlenecks