FocuSFT: Tweeledige Optimalisatie voor Verdunningsbewuste Lange-Context Fine-Tuning
FocuSFT: Bilevel Optimization for Dilution-Aware Long-Context Fine-Tuning
May 11, 2026
Auteurs: Zehua Pei, Hui-Ling Zhen, Xianzhi Yu, Sinno Jialin Pan, Mingxuan Yuan, Bei Yu
cs.AI
Samenvatting
Grote taalmodellen kunnen nu steeds langere invoer verwerken, maar hun vermogen om informatie die verspreid is over lange contexten effectief te gebruiken blijft beperkt. We schrijven deze kloof toe aan hoe het aandachtsbudget wordt besteed tijdens begeleid finetunen (SFT) op lange reeksen: positionele vooroordelen en aandachtsafgronden zorgen ervoor dat het model het grootste deel van zijn aandacht besteedt aan positioneel bevoorrechte tokens in plaats van semantisch relevante inhoud. Deze verdunning van de aandacht tijdens de training (het uithongeren van inhoudstokens in de aandachtsverdeling) verzwakt het gradientsignaal, waardoor het vermogen van het model om robuuste lange-contextcapaciteiten te leren wordt beperkt. We introduceren FocuSFT, een tweeledig optimalisatiekader dat dit probleem tijdens de training aanpakt. Een binnenlus past lichte snelgewichtparameters aan op de trainingscontext om een parametrisch geheugen te vormen dat de aandacht concentreert op relevante inhoud, en de buitenlus voert SFT uit op basis van deze verscherpte representatie. Beide lussen passen bidirectionele aandacht toe over contexttokens, terwijl causale masking voor antwoorden behouden blijft, waardoor de causale asymmetrie die aanleiding geeft tot aandachtsafgronden wordt verminderd en het gedrag van binnen- en buitenlus wordt afgestemd. Op BABILong verbetert FocuSFT de nauwkeurigheid met tot +14 procentpunten over contextlengtes van 4K tot 32K; op RULER verhoogt het de CWE-aggregatie van 72,9% naar 81,1% bij 16K; en op GPQA met agentisch toolgebruik levert het een relatieve winst van 24% in pass@1. Aandachtsanalyse toont aan dat FocuSFT de aandachtsafgrondmassa met 529 keer vermindert en de contextbetrokkenheid tijdens de training verdrievoudigt. Code: https://github.com/JarvisPei/FocuSFT
English
Large language models can now process increasingly long inputs, yet their ability to effectively use information spread across long contexts remains limited. We trace this gap to how attention budget is spent during supervised fine-tuning (SFT) on long sequences: positional biases and attention sinks cause the model to allocate most of its attention to positionally privileged tokens rather than semantically relevant content. This training-time attention dilution (the starvation of content tokens in the attention distribution) weakens the gradient signal, limiting the model's ability to learn robust long-context capabilities. We introduce FocuSFT, a bilevel optimization framework that addresses this problem at training time. An inner loop adapts lightweight fast-weight parameters on the training context to form a parametric memory that concentrates attention on relevant content, and the outer loop performs SFT conditioned on this sharpened representation. Both loops apply bidirectional attention over context tokens while preserving causal masking for responses, reducing the causal asymmetry that gives rise to attention sinks and aligning inner-outer behavior. On BABILong, FocuSFT improves accuracy by up to +14pp across 4K--32K context lengths; on RULER, it raises CWE aggregation from 72.9\% to 81.1\% at 16K; and on GPQA with agentic tool use, it yields a 24\% relative gain in pass@1. Attention analysis shows that FocuSFT reduces attention sink mass by 529times and triples context engagement during training. Code: https://github.com/JarvisPei/FocuSFT