One Token, Many Lessons: Sliding-Window Attention within Gated Delta Networks
Abstract
Linear attention compresses historical context into a fixed-size recurrent state, reducing the computational and memory costs of long-sequence modeling. From the perspective of test-time regression (TTR), the state matrix can be viewed as an online-learned regression model, where keys and values serve as inputs and targets respectively, and queries are used to read from the model. From this perspective, the effectiveness of state learning depends not only on the update rule but also on how the key-value learning pairs used for state updates are constructed. While existing work has largely focused on how the state is updated and organized, we investigate how the learning pairs used for state updates are constructed. To this end, we propose Sliding-Window Gated DeltaNet (SWGDN), which replaces short convolutions in Delta-Rule linear attention with sliding-window attention to perform content-dependent local aggregation of projected queries, keys, and values. Our experiments show that SWGDN makes the key-value pairs used in consecutive updates more similar in both GDN2 and KDA. In SWGDN, carrying information from the same token across updates can help the recurrent state reinforce a previously learned association. The local mixing strategy can be incorporated into any Delta-Rule-based linear attention architecture without changing its state update equations or chunkwise parallel algorithms. We apply this strategy to two Delta-Rule variants, GDN2 and KDA, and experimental results demonstrate that SWGDN outperforms the original Delta-Rule baseline across multiple benchmarks.
Create a lesson
Metadata
- Categories
- cs.LG, cs.AI
Related papers
When Exact Token Importance Is Not Enough: Limits of Top-K Selection in LLM Attention
Shared title terminologycs.LGIrmaan Mirzanejad
Looped Models are Fast Multi-Token Predictors
Shared title terminologycs.LGAyhan Suleymanzade, Sean McLeish, Sehoon Kim et al.
State Space Attention: Learning Context-Dependent Memory Retention
Shared title terminologycs.LGEge Çakar, Cengiz Pehlevan
KiRA: Kronecker Input-Gated Rank Adaptation for Parameter-Efficient Fine-Tuning of Pretrained Models
Shared title terminologycs.LGAkil Ahmad Taki, Shaikh Anowarul Fattah
AVQ-Attention-2: Adaptive Vector-Quantized Attention with Exact Local Blocks and Linear-Cost Training
Shared title terminologycs.LGWinfried van den Dool, Patrick Forré, Amir Habibian et al.
Eliciting the Recall Capacity of Linear Attention
Shared title terminologycs.LGJohan Lindqvist, Antonio Orvieto