mlsanityData to 14 Oct 2026

When Long Helps Short: How Context Length in Supervised Fine-tuning Affects Behavior of Large Language Models

arXiv 2509.18762 ↗First posted 23 Sep 2025cs.CL cs.AIcited by 1

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) have achieved impressive performance across natural language processing (NLP) tasks. As real-world applications increasingly demand longer context windows, continued pretraining and supervised fine-tuning (SFT) on long-context data has become a common approach. While the effects of data length in continued pretraining have been extensively studied, their implications for SFT remain unclear. In this work, we systematically investigate how SFT data length influences LLM behavior on short-context tasks. Counterintuitively, we find that long-context SFT improves short-context performance, contrary to the commonly observed degradation from long-context pretraining. To uncover the underlying mechanisms of this phenomenon, we first decouple and analyze two key components, Multi-Head Attention (MHA) and Feed-Forward Network (FFN), and show that both independently benefit from long-context SFT. We further study their interaction and reveal a knowledge preference bias: long-context SFT promotes contextual knowledge, while short-context SFT favors parametric knowledge, making exclusive reliance on long-context SFT suboptimal. Finally, we demonstrate that hybrid training mitigates this bias, offering explainable guidance for fine-tuning LLMs.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 35 of its 43 references that are in the map. First posted on arXiv 23 Sep 2025.

Builds on

35 of 43 references.

References · 35

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2020Measuring Massive Multitask Language Understandingcited by 7,963
  5. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
  6. 2021Program Synthesis with Large Language Modelscited by 3,637
  7. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
  8. 2020Longformer: The Long-Document Transformercited by 3,413
  9. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
  10. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  11. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
  12. 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
23 more
  1. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
  2. 2019PubMedQA: A Dataset for Biomedical Research Question Answeringcited by 1,288
  3. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 1,003
  4. 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 992
  5. 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 839
  6. 2019Attention is not not Explanationcited by 636
  7. 2020Transformer Interpretability Beyond Attention Visualizationcited by 627
  8. 2017The NarrativeQA Reading Comprehension Challengecited by 597
  9. 2021QMSum: A New Benchmark for Query-based Multi-domain Meeting Summarizationcited by 365
  10. 2024Knowledge Conflicts for LLMs: A Surveycited by 283
  11. 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 232
  12. 2023Localizing Model Behavior with Path Patchingcited by 195
  13. 2024Data Engineering for Scaling Language Models to 128K Contextcited by 186
  14. 2024How to Train Long-Context Language Models (Effectively)cited by 146
  15. 2023Focused Transformer: Contrastive Training for Context Scalingcited by 133
  16. 2020Self-Attention Attribution: Interpreting Information Interactions Inside Transformercited by 125
  17. 2020BERT-of-Theseus: Compressing BERT by Progressive Module Replacingcited by 113
  18. 2024Cutting Off the Head Ends the Conflict: A Mechanism for Interpreting and Mitigating Knowledge Conflicts in Language Modelscited by 91
  19. 2024Knowledge Circuits in Pretrained Transformerscited by 60
  20. 2024ChatQA 2: Bridging the Gap to Proprietary LLMs in Long Context and RAG Capabilitiescited by 53
  21. 2025Massive Values in Self-Attention Modules are the Key to Contextual Knowledge Understandingcited by 47
  22. 2024Differentiation and Specialization of Attention Heads via the Refined Local Learning Coefficientcited by 40
  23. 2024From Artificial Needles to Real Haystacks: Improving Retrieval Capabilities in LLMs by Finetuning on Synthetic Datacited by 18

Built on by

Cited by year

Citing papers per year: 2025: 1.

1 paper.