mlsanityData to 14 Oct 2026

Mechanistic Fine-tuning for In-context Learning

arXiv 2505.14233 ↗First posted 20 May 2025cs.CL cs.AI cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

In-context Learning (ICL) utilizes structured demonstration-query inputs to induce few-shot learning on Language Models (LMs), which are not originally pre-trained on ICL-style data. To bridge the gap between ICL and pre-training, some approaches fine-tune LMs on large ICL-style datasets by an end-to-end paradigm with massive computational costs. To reduce such costs, in this paper, we propose Attention Behavior Fine-Tuning (ABFT), utilizing the previous findings on the inner mechanism of ICL, building training objectives on the attention scores instead of the final outputs, to force the attention scores to focus on the correct label tokens presented in the context and mitigate attention scores from the wrong label tokens. Our experiments on 9 modern LMs and 8 datasets empirically find that ABFT outperforms in performance, robustness, unbiasedness, and efficiency, with only around 0.01% data cost compared to the previous methods. Moreover, our subsequent analysis finds that the end-to-end training objective contains the ABFT objective, suggesting the implicit bias of ICL-style data to the emergence of induction heads. Our work demonstrates the possibility of controlling specific module sequences within LMs to improve their behavior, opening up the future application of mechanistic interpretability.

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

Builds on

20 of 37 references.

References · 20

  1. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  2. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
  3. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  4. 2022Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Taskscited by 868
  5. 2022A Survey on In-context Learningcited by 721
  6. 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 699
  7. 2021MetaICL: Learning to Learn In Contextcited by 454
  8. 2020What is being transferred in transfer learning?cited by 368
  9. 2013Good Debt or Bad Debt: Detecting Semantic Orientations in Economic Textscited by 310
  10. 2023The mechanistic basis of data dependence and abrupt learning in an in-context classification taskcited by 118
  11. 2023Batch Calibration: Rethinking Calibration for In-Context Learning and Prompt Engineeringcited by 94
  12. 2023Mitigating Label Biases for In-context Learningcited by 89
8 more
  1. 2024What needs to go right for an induction head? A mechanistic study of in-context learning circuits and their formationcited by 89
  2. 2023Symbol tuning improves in-context learning in language modelscited by 75
  3. 2022Prototypical Calibration for Few-shot Learning of Language Modelscited by 58
  4. 2022Improving In-Context Few-Shot Learning via Self-Supervised Trainingcited by 57
  5. 2023Pre-Training to Learn in Contextcited by 42
  6. 2023Generative Calibration for In-context Learningcited by 20
  7. 2024Token-based Decision Criteria Are Suboptimal in In-context Learningcited by 9
  8. 2025StaICC: Standardized Evaluation for Classification Task in In-context Learningcited by 2

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2024Deeper Insights Without Updates: The Power of In-Context Learning Over Fine-Tuning
  2. 2024Does In-Context Learning Really Learn? Rethinking How Large Language Models Respond and Solve Tasks via In-Context Learning
  3. 2026FocuSFT: Bilevel Optimization for Dilution-Aware Long-Context Fine-Tuning
  4. 2024Efficient LLM Context Distillation
  5. 2024Instruction Tuning Vs. In-Context Learning: Revisiting Large Language Models in Few-Shot Computational Social Science
  6. 2024Focused Large Language Models are Stable Many-Shot Learners
  7. 2024TAIA: Large Language Models are Out-of-Distribution Data Learners
  8. 2023MMICT: Boosting Multi-Modal Fine-Tuning with In-Context Examples