SSA: Sparse Sparse Attention door uitvoer van volledige en sparse aandacht in kenmerkruimte uit te lijnen
SSA: Sparse Sparse Attention by Aligning Full and Sparse Attention Outputs in Feature Space
November 25, 2025
Auteurs: Zhenyi Shen, Junru Lu, Lin Gui, Jiazheng Li, Yulan He, Di Yin, Xing Sun
cs.AI
Samenvatting
De kwadratische complexiteit van volledige aandacht beperkt de efficiënte verwerking van lange contexten in grote taalmodellen (LLM's). Sparse aandacht vermindert deze kosten door elke query te beperken tot een subset van vorige tokens; trainingsvrije benaderingen leiden echter vaak tot ernstige prestatievermindering. Inheemse sparse-attentiemethoden (bijv. NSA, MoBA) verlichten dit probleem, maar vertonen een kritieke paradox: ze produceren lagere attentiesparsheid dan modellen met volledige aandacht, ondanks dat ze volledige aandacht proberen te benaderen, wat hun effectiviteit kan beperken. Wij schrijven deze paradox toe aan een tekortkoming in gradientupdates: laaggeplaatste sleutel-waardeparen die tijdens sparse training worden uitgesloten, ontvangen noch een forward-bijdrage noch backward-gradients, en leren dus nooit een goede onderdrukking. Om deze beperking te overwinnen, stellen wij SSA (Sparse Sparse Attention) voor, een uniform trainingsraamwerk dat zowel sparse als volledige aandacht beschouwt en bidirectionele uitlijning afdwingt in elke laag. Dit ontwerp behoudt de gradientstroom naar alle tokens terwijl het sparse-attentie-uitvoeren expliciet aanmoedigt om zich te aligneren met hun tegenhangers met volledige aandacht, waardoor sterkere sparsheid wordt bevorderd. Hierdoor behaalt SSA state-of-the-art prestaties onder zowel sparse als volledige attentie-inferentie op meerdere common sense benchmarks. Bovendien stelt SSA modellen in staat zich soepel aan te passen aan variërende sparsiteitsbudgetten; de prestaties verbeteren consistent naarmate meer tokens mogen attenden, wat flexibele compute-prestatie-afwegingen ondersteunt tijdens inferentie. Ten slotte tonen we aan dat inheemse sparse-attentietraining verrassenderwijs de extrapolatie van lange contexten verbetert door de overtoewijzing van aandachtswaarden in sink-gebieden te verminderen, waarbij SSA de sterkste extrapolatiecapaciteit demonstreert.
English
The quadratic complexity of full attention limits efficient long-context processing in large language models (LLMs). Sparse attention mitigates this cost by restricting each query to attend to a subset of previous tokens; however, training-free approaches often lead to severe performance degradation. Native sparse-attention methods (e.g., NSA, MoBA) alleviate this issue, yet exhibit a critical paradox: they produce lower attention sparsity than full-attention models, despite aiming to approximate full attention, which may constrain their effectiveness. We attribute this paradox to gradient update deficiency: low-ranked key-value pairs excluded during sparse training receive neither forward contribution nor backward gradients, and thus never learn proper suppression. To overcome this limitation, we propose SSA (Sparse Sparse Attention), a unified training framework that considers both sparse and full attention and enforces bidirectional alignment at every layer. This design preserves gradient flow to all tokens while explicitly encouraging sparse-attention outputs to align with their full-attention counterparts, thereby promoting stronger sparsity. As a result, SSA achieves state-of-the-art performance under both sparse and full attention inference across multiple commonsense benchmarks. Furthermore, SSA enables models to adapt smoothly to varying sparsity budgets; performance improves consistently as more tokens are allowed to attend, supporting flexible compute-performance trade-offs at inference time. Finally, we show that native sparse-attention training surprisingly improves long-context extrapolation by mitigating the over-allocation of attention values in sink areas, with SSA demonstrating the strongest extrapolation capability.