mlsanityData to 7 Oct 2026

RAT: Bridging RNN Efficiency and Attention Accuracy via Chunk-based Sequence Modeling

arXiv 2507.04416 ↗First posted 6 Jul 2025cs.CLcited by 3

Not on the map. Why?

Abstract (arXiv)

Transformers have become the cornerstone of modern large-scale language models, but their reliance on softmax attention poses a computational bottleneck at both training and inference. Recurrent models offer high efficiency, but compressing the full sequence into a fixed-size and holistic representation can suffer from memory degradation in long contexts and limit fine-grained retrieval. To address this, we propose RAT, an intermediate design that bridges the efficiency of RNNs and capacity of attention. RAT partitions the input into chunks, applies recurrence within each chunk for local dependencies, and softmax-based attention across chunks for long-range interactions. This design mitigates memory degradation and enables direct access to distant tokens, while retaining computational efficiency. Empirically, with a chunk size of 16, the RAT block achieves a 7× improvement in training speed for 100K sequence length and 9times in generation at the 4K position, while maintaining similar performance compared to standard attention. We demonstrate this by training 1.3B parameter models from scratch and performing large-scale evaluations, including short- and long-context benchmarks, as well as supervised fine-tuning~(SFT). We further propose a hybrid architecture that interleaves RAT with local attention. By combining efficient long-range modeling with strong local interactions, this hybrid design not only improves inference speed and reduces cache memory usage, but also consistently enhances performance and shows the overall best results. Code is available at https://github.com/CLAIRE-Labo/RAT.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 46 of its 55 references that are in the map. First posted on arXiv 6 Jul 2025.

Builds on

46 of 55 references.

References · 46

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
  3. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
  4. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  5. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
  6. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
  7. 2020Longformer: The Long-Document Transformercited by 3,362
  8. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
  9. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,424
  10. 2014Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modelingcited by 2,341
  11. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  12. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
34 more
  1. 2019Root Mean Square Layer Normalizationcited by 1,425
  2. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
  3. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,283
  4. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
  5. 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,104
  6. 2023RWKV: Reinventing RNNs for the Transformer Eracited by 814
  7. 2022Simplified State Space Layers for Sequence Modelingcited by 776
  8. 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
  9. 2024DeepSeek LLM: Scaling Open-Source Language Models with Longtermismcited by 621
  10. 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 594
  11. 2017The NarrativeQA Reading Comprehension Challengecited by 590
  12. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
  13. 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 483
  14. 2023Resurrecting Recurrent Neural Networks for Long Sequencescited by 397
  15. 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 373
  16. 2021QMSum: A New Benchmark for Query-based Multi-domain Meeting Summarizationcited by 363
  17. 2024xLSTM: Extended Long Short-Term Memorycited by 320
  18. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
  19. 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 232
  20. 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 206
  21. 2022Transformer Quality in Linear Timecited by 189
  22. 2022Mega: Moving Average Equipped Gated Attentioncited by 178
  23. 2024Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modelingcited by 167
  24. 2018Online normalizer calculation for softmaxcited by 154
  25. 2017Parallelizing Linear Recurrent Neural Nets Over Sequence Lengthcited by 126
  26. 2022Block-Recurrent Transformerscited by 107
  27. 2024Hymba: A Hybrid-head Architecture for Small Language Modelscited by 95
  28. 2024Gated Slot Attention for Efficient Linear-Time Sequence Modelingcited by 73
  29. 2025Command A: An Enterprise-Ready Large Language Modelcited by 57
  30. 2024Megalodon: Efficient LLM Pretraining and Inference with Unlimited Context Lengthcited by 46
  31. 2024Length Generalization of Causal Transformers without Position Encodingcited by 46
  32. 2025Log-Linear Attentioncited by 39
  33. 2025Scalable-Softmax Is Superior for Attentioncited by 38
  34. 2024Were RNNs All We Needed?cited by 36

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 3.

3 papers.