Lune

NeurIPS2025Top-tier venue

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

Xiuying Wei, Anunay Yadav, Razvan Pascanu, Caglar Gulcehre

Abstract

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×\times improvement in training speed for 100K sequence length and 9timestimes 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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites Efficiently Modeling Long Sequences with Structured State Spaces
  • Efficiently Modeling Long Sequences with Structured State Spaces cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality cites Efficiently Modeling Long Sequences with Structured State Spaces
  • RAT+: Train Dense, Infer Sparse - Recurrence Augmented Attention for Dilated Inference cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • RAT+: Train Dense, Infer Sparse - Recurrence Augmented Attention for Dilated Inference cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • RAT+: Train Dense, Infer Sparse - Recurrence Augmented Attention for Dilated Inference cites Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. RAT+: Train Dense, Infer Sparse - Recurrence Augmented Attention for Dilated InferenceXiuying Wei, Caglar GulcehreICML 2026 · 1 citation

Builds on24

  1. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
  2. Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 citations
  3. PIQA: Reasoning about Physical Commonsense in Natural LanguageYonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao et al.AAAI 2020 · 2,916 citations
  4. Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 citations
  5. Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space DualityTri Dao, Albert GuICML 2024 · 1,407 citations

Related papers

  1. Smooth Reading: Bridging the Gap of Recurrent LLM to Self-Attention LLM on Long-Context UnderstandingKai Liu, Zhan Su, Peijie Dong, Fengran Mo et al.ICLR 2026 · 3 citations
  2. Hardware-aligned Hierarchical Sparse Attention for Efficient Long-term Memory AccessXiang Hu, Jiaqi Leng, Jun Zhao, Kewei Tu et al.NeurIPS 2025 · 7 citations
  3. ReHyAt: Recurrent Hybrid Attention for Video Diffusion TransformersMohsen Ghafoorian, Amirhossein HabibianCVPR 2026 · 5 citations
  4. Random Feature AttentionHao Peng, Nikolaos Pappas, Dani Yogatama, Roy Schwartz et al.ICLR 2021 · 425 citations
  5. Memory Caching: RNNs with Growing MemoryAli Behrouz, Zeman Li, Yuan Deng, Peilin Zhong et al.ICML 2026 · 10 citations
Dusk over the sea between two cliffs drawn in fine vertical lines