mlsanityData to 7 Oct 2026

Fine-Tuning Without Forgetting In-Context Learning: A Theoretical Analysis of Linear Attention Models

arXiv 2602.23197 ↗First posted 26 Feb 2026cs.CL cs.LG stat.MLcited by 1

Not on the map. Why?

Abstract (arXiv)

Transformer-based large language models exhibit in-context learning, enabling adaptation to downstream tasks via few-shot prompting with demonstrations. In practice, such models are often fine-tuned to improve zero-shot performance on downstream tasks, allowing them to solve tasks without examples and thereby reducing inference costs. However, fine-tuning can degrade in-context learning, limiting the performance of fine-tuned models on tasks not seen during fine-tuning. Using linear attention models, we provide a theoretical analysis that characterizes how fine-tuning objectives modify attention parameters and identifies conditions under which this leads to degraded few-shot performance. We show that fine-tuning all attention parameters can harm in-context learning, whereas restricting updates to the value matrix improves zero-shot performance while preserving in-context learning. We further show that incorporating an auxiliary few-shot loss enhances in-context learning primarily on the target task, at the expense of degraded in-context learning ability on tasks not seen during fine-tuning. We provide empirical evidence from synthetic and real-world datasets consistent with the qualitative predictions of our theory.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 40 of its 52 references that are in the map. First posted on arXiv 26 Feb 2026.

Builds on

40 of 52 references.

References · 40

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2023GPT-4 Technical Reportcited by 18,132
  5. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  6. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  7. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  8. 2024Qwen2.5 Technical Reportcited by 4,713
  9. 2023A Survey of Large Language Modelscited by 2,537
  10. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  11. 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,442
  12. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
28 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. 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
  5. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  6. 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 471
  7. 2023Trained Transformers Learn Linear Models In-Contextcited by 331
  8. 2021Pre-Trained Models: Past, Present and Futurecited by 319
  9. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
  10. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
  11. 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
  12. 2022Why Can GPT Learn In-Context? Language Models Implicitly Perform Gradient Descent as Meta-Optimizerscited by 204
  13. 2024Many-Shot In-Context Learningcited by 203
  14. 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 168
  15. 2023Few-shot Fine-tuning vs. In-context Learning: A Fair Comparison and Evaluationcited by 134
  16. 2023In-Context Convergence of Transformerscited by 112
  17. 2023Linear attention is (maybe) all you need (to understand transformer optimization)cited by 97
  18. 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?cited by 93
  19. 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 44
  20. 2024Transformers Learn Nonlinear Features In Context: Nonconvex Mean-field Dynamics on the Attention Landscapecited by 43
  21. 2024Dual Operating Modes of In-Context Learningcited by 42
  22. 2022Two-stage LLM Fine-tuning with Less Specialization and More Generalizationcited by 39
  23. 2025On the generalization of language models from in-context learning and finetuning: a controlled studycited by 39
  24. 2024Fine-grained Analysis of In-context Linear Estimation: Data, Architecture, and Beyondcited by 22
  25. 2025Test-Time Training Provably Improves Transformers as In-context Learnerscited by 15
  26. 2024On the Loss of Context-awareness in General Instruction Fine-tuningcited by 10
  27. 2024Theoretical Insights into Fine-Tuning Attention Mechanism: Generalization and Optimizationcited by 9
  28. 2022Expected Value of Matrix Quadratic Forms with Wishart distributed Random Matricescited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.