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