Gated Slot Attention for Efficient Linear-Time Sequence Modeling

Yu Zhang, Songlin Yang, Ruijie Zhu, Yue Zhang, Leyang Cui +7 more
2/3/2026

No official code found. Best implementation: fla-org/flash-linear-attention (5,257 stars, MIT, last commit 2026-04-29). 1 more below.

Abstract

Linear attention Transformers and their gated variants, celebrated for enabling parallel training and efficient recurrent inference, still fall short in recall-intensive tasks compared to traditional Transformers and demand significant resources for training from scratch. This paper introduces Gated Slot Attention (GSA), which enhances Attention with Bounded-memory-Control (ABC) by incorporating a gating mechanism inspired by Gated Linear Attention (GLA). Essentially, GSA comprises a two-layer GLA linked via $\operatorname{softmax}$, utilizing context-aware memory reading and adaptive forgetting to improve memory capacity while maintaining compact recurrent state size. This design greatly enhances both training and inference efficiency through GLA's hardware-efficient training algorithm and reduced state size. Additionally, retaining the $\operatorname{softmax}$ operation is particularly beneficial in"finetuning pretrained Transformers to RNNs"(T2R) settings, reducing the need for extensive training from scratch. Extensive experiments confirm GSA's superior performance in scenarios requiring in-context recall and in T2R settings.

View on arXivView PDF

Code Implementations(2)

MIT

๐Ÿš€ Efficient implementations for emerging model architectures

5,257563Shell, PythonDec 20, 20235 months agoMIT
large-language-modelsmachine-learning-systemsnatural-language-processingsequence-modeling
PyTorchMIT

An implementation of the paper: "Gated Slot Attention for Efficient Linear-Time Sequence Modeling" in PyTorch

90Shell, PythonSep 13, 20246 months agoMIT
aiattentionsdeep-neural-networksdeeplearningmachinelearnin+5 more

Similar Papers

Cite this paper

@article{zhang2026gated,
  title  = {Gated Slot Attention for Efficient Linear-Time Sequence Modeling},
  author = {Yu Zhang and Songlin Yang and Ruijie Zhu and Yue Zhang and Leyang Cui and Yiqiao Wang and Bolun Wang and Freda Shi and Bailin Wang and Wei Bi and Peng Zhou and Guohong Fu},
  year   = {2026},
  eprint = {2409.07146},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2409.07146},
  url    = {https://arxiv.org/abs/2409.07146},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.07146.svg)](https://codeofpaper.com/paper/2409.07146)

Discussion