Luna: Linear Unified Nested Attention
Not on the map. Why?
Abstract (arXiv)
The quadratic computational and memory complexities of the Transformer's attention mechanism have limited its scalability for modeling long sequences. In this paper, we propose Luna, a linear unified nested attention mechanism that approximates softmax attention with two nested linear attention functions, yielding only linear (as opposed to quadratic) time and space complexity. Specifically, with the first attention function, Luna packs the input sequence into a sequence of fixed length. Then, the packed sequence is unpacked using the second attention function. As compared to a more traditional attention mechanism, Luna introduces an additional sequence with a fixed length as input and an additional corresponding output, which allows Luna to perform attention operation linearly, while also storing adequate contextual information. We perform extensive evaluations on three benchmarks of sequence modeling tasks: long-context sequence modeling, neural machine translation and masked language modeling for large-scale pretraining. Competitive or even better experimental results demonstrate both the effectiveness and efficiency of Luna compared to a variety
Key facts. Cited by 96 papers in the map (data through 7 Oct 2026). Builds on 45 of its 59 references that are in the map. First posted on arXiv 3 Jun 2021.
Builds on
45 of 59 references.
References · 45
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2016Layer Normalizationcited by 5,579
- 2015Rethinking the Inception Architecture for Computer Visioncited by 5,451
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
33 more
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,793
- 2020Reformer: The Efficient Transformercited by 1,658
- 2020Rethinking Attention with Performerscited by 1,584
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,486
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2015Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs)cited by 1,061
- 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,041
- 2020On Layer Normalization in the Transformer Architecturecited by 906
- 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 851
- 2020Efficient Transformers: A Surveycited by 784
- 2018Image Transformercited by 770
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
- 2018Universal Transformerscited by 613
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
- 2019Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTcited by 355
- 2021Random Feature Attentioncited by 350
- 2018Generating Wikipedia by Summarizing Long Sequencescited by 333
- 2019Learning Deep Transformer Models for Machine Translationcited by 309
- 2020Sparse Sinkhorn Attentioncited by 250
- 2018A Simple Method for Commonsense Reasoningcited by 223
- 2018Scaling Neural Machine Translationcited by 204
- 2019Blockwise Self-Attention for Long Document Understandingcited by 158
- 2018Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networkscited by 129
- 2018ListOps: A Diagnostic Dataset for Latent Tree Learningcited by 128
- 2020ProGen: Language Modeling for Protein Generationcited by 127
- 2018Learning long-range spatial dependencies with horizontal gated-recurrent unitscited by 98
- 2018Tensor2Tensor for Neural Machine Translationcited by 85
- 2021Coordination Among Neural Modules Through a Shared Global Workspacecited by 83
- 2020GMAT: Global Memory Augmentation for Transformerscited by 36
- 2020Apollo: An Adaptive Parameter-wise Diagonal Quasi-Newton Method for Nonconvex Stochastic Optimizationcited by 16
Built on by
Citing papers per year: 2021: 10; 2022: 20; 2023: 27; 2024: 25; 2025: 8; 2026: 6.
96 papers.
Sort:
By area:
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 814
- 2022Simplified State Space Layers for Sequence Modelingcited by 776
- 2021Perceiver IO: A General Architecture for Structured Inputs & Outputscited by 616
- 2023Harnessing the Power of LLMs in Practice: A Survey on ChatGPT and Beyondcited by 409
- 2021A Survey of Transformerscited by 399
- 2021LongT5: Efficient Text-To-Text Transformer for Long Sequencescited by 232
- 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 201
- 2024A Survey on Efficient Inference for Large Language Modelscited by 197
- 2022Pure Transformers are Powerful Graph Learnerscited by 188
- 2022Mega: Moving Average Equipped Gated Attentioncited by 178
- 2023FLatten Transformer: Vision Transformer using Focused Linear Attentioncited by 170
38 more
- 2021Self-attention Does Not Need O(n2) Memorycited by 152
- 2022Liquid Structural State-Space Modelscited by 134
- 2021Scatterbrain: Unifying Sparse and Low-rank Attention Approximationcited by 128
- 2024MiniCache: KV Cache Compression in Depth Dimension for Large Language Modelscited by 122
- 2024A Survey of Resource-efficient LLM and Multimodal Foundation Modelscited by 84
- 2023Diffusion Models Without Attentioncited by 75
- 2024Gated Slot Attention for Efficient Linear-Time Sequence Modelingcited by 73
- 2022Efficient Long-Text Understanding with Short-Text Modelscited by 71
- 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Surveycited by 71
- 2024Mamba-360: Survey of State Space Models as Transformer Alternative for Long Sequence Modelling: Methods, Applications, and Challengescited by 63
- 2022General-purpose, long-context autoregressive modeling with Perceiver ARcited by 60
- 2023BAMBOO: A Comprehensive Benchmark for Evaluating Long Text Modeling Capacities of Large Language Modelscited by 53
- 2021Joint Global and Local Hierarchical Priors for Learned Image Compressioncited by 52
- 2024Linearizing Large Language Modelscited by 51
- 2023A Survey on Long Text Modeling with Transformerscited by 47
- 2024Megalodon: Efficient LLM Pretraining and Inference with Unlimited Context Lengthcited by 46
- 2023Adaptive Frequency Filters As Efficient Global Token Mixerscited by 45
- 2024Diffusion-RWKV: Scaling RWKV-Like Architectures for Diffusion Modelscited by 41
- 2022Efficient Long Sequence Modeling via State Space Augmented Transformercited by 37
- 2021ABC: Attention with Bounded-memory Controlcited by 36
- 2023FlashFFTConv: Efficient Convolutions for Long Sequences with Tensor Corescited by 32
- 2021Anchor DETR: Query Design for Transformer-Based Object Detectioncited by 30
- 2022Attention Mechanism in Neural Networks: Where it Comes and Where it Goescited by 29
- 2023Making Vision Transformers Efficient from A Token Sparsification Viewcited by 28
- 2023On Efficient Training of Large-Scale Deep Learning Models: A Literature Reviewcited by 26
- 2023Transformer-VQ: Linear-Time Transformers via Vector Quantizationcited by 26
- 2023RECAP: Retrieval-Enhanced Context-Aware Prefix Encoder for Personalized Dialogue Response Generationcited by 25
- 2023Efficient Attention via Control Variatescited by 23
- 2023Object Detection with Transformers: A Reviewcited by 22
- 2025Efficient Attention Mechanisms for Large Language Models: A Surveycited by 21
- 2023Sparse Modular Activation for Efficient Sequence Modelingcited by 20
- 2024The Compute Divide in Machine Learning: A Threat to Academic Contribution and Scrutiny?cited by 20
- 2023Fourier Transformer: Fast Long Range Modeling by Removing Sequence Redundancy with FFT Operatorcited by 19
- 2024CascadedGaze: Efficiency in Global Context Extraction for Image Restorationcited by 16
- 2021On Learning the Transformer Kernelcited by 14
- 2022Attention-based Random Forest and Contamination Modelcited by 10
- 2022A Call for Clarity in Beam Search: How It Works and When It Stopscited by 10
- 2023On the Long Range Abilities of Transformerscited by 10
50 most cited of 96 All 96 (JSON)
- 2026FLARE++: Low-rank attention with dynamic attention routing12 Aug 2026
- 2026Boosting ECG Classification Performance by Pre-training with Synthesized Data9 Jun 2026
- 2026Do Vision Transformers Need All-to-All Attention? Global Communication Through Elastic Learned Cores12 May 2026
- 2026Switch Attention: Towards Dynamic and Fine-grained Hybrid Transformers27 Mar 2026
- 2026Gecko: An Efficient Neural Architecture Inherently Processing Sequences with Arbitrary Lengths10 Jan 2026
- 2026RMAAT: Astrocyte-Inspired Memory Compression and Replay for Efficient Long-Context Transformers1 Jan 2026
- 2025MS-SSM: A Multi-Scale State Space Model for Efficient Sequence Modeling29 Dec 2025
- 2025Transformer Based Linear Attention with Optimized GPU Kernel Implementation24 Oct 2025
- 2025ResFormer: All-Time Reservoir Memory for Long Sequence Classification28 Sep 2025
- 2025Multipole Semantic Attention: A Fast Approximation of Softmax Attention for Pretraining12 Sep 2025
- 2025Efficient Attention Mechanisms for Large Language Models: A Survey25 Jul 2025
- 2025Iwin Transformer: Hierarchical Vision Transformer using Interleaved Windows24 Jul 2025
38 more
- 2025Enhancing Layer Attention Efficiency through Pruning Redundant Retrievals9 Mar 2025
- 2025Converting Transformers into DGNNs Form1 Feb 2025
- 2024Breaking the Stage Barrier: A Novel Single-Stage Approach to Long Context Extension for Large Language Models10 Dec 2024
- 2024A Mamba Foundation Model for Time Series Forecasting5 Nov 2024
- 2024Towards Better Multi-head Attention via Channel-wise Sample Permutation14 Oct 2024
- 2024Gated Slot Attention for Efficient Linear-Time Sequence Modeling11 Sep 2024
- 2024Wavelet GPT: Wavelet Inspired Large Language Models4 Sep 2024
- 2024S3Attention: Improving Long Sequence Attention with Smoothed Skeleton Sketching16 Aug 2024
- 2024Sampling Foundational Transformer: A Theoretical Perspective11 Aug 2024
- 2024SAMSA: Efficient Transformer for Many Data Modalities10 Aug 2024
- 2024MiniCache: KV Cache Compression in Depth Dimension for Large Language Models23 May 2024
- 2024Linearizing Large Language Models10 May 2024
- 2024Mamba-360: Survey of State Space Models as Transformer Alternative for Long Sequence Modelling: Methods, Applications, and Challenges24 Apr 2024
- 2024A Survey on Efficient Inference for Large Language Models22 Apr 2024
- 2024LongVQ: Long Sequence Modeling with Vector Quantization on Structured Memory17 Apr 2024
- 2024Megalodon: Efficient LLM Pretraining and Inference with Unlimited Context Length12 Apr 2024
- 2024Diffusion-RWKV: Scaling RWKV-Like Architectures for Diffusion Models6 Apr 2024
- 2024On Difficulties of Attention Factorization through Shared Memory31 Mar 2024
- 2024Holographic Global Convolutional Networks for Long-Range Prediction Tasks in Malware Detection23 Mar 2024
- 2024Unifying Linear-Time Attention via Latent Probabilistic Modelling27 Feb 2024
- 2024Adaptation of Biomedical and Clinical Pretrained Models to French Long Documents: A Comparative Study26 Feb 2024
- 2024Efficient State Space Model via Fast Tensor Convolution and Block Diagonalization23 Feb 2024
- 2024CAST: Clustering Self-Attention using Surrogate Tokens for Efficient Transformers6 Feb 2024
- 2024CascadedGaze: Efficiency in Global Context Extraction for Image Restoration26 Jan 2024
- 2024Dynamic Layer Tying for Parameter-Efficient Transformers23 Jan 2024
- 2024A Survey of Resource-efficient LLM and Multimodal Foundation Models16 Jan 2024
- 2024The Compute Divide in Machine Learning: A Threat to Academic Contribution and Scrutiny?4 Jan 2024
- 2023Linear Attention via Orthogonal Memory18 Dec 2023
- 2023Diffusion Models Without Attention30 Nov 2023
- 2023On the Long Range Abilities of Transformers28 Nov 2023
- 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Survey21 Nov 2023
- 2023FlashFFTConv: Efficient Convolutions for Long Sequences with Tensor Cores10 Nov 2023
- 2023Transformer-VQ: Linear-Time Transformers via Vector Quantization28 Sep 2023
- 2023Only 5% Attention Is All You Need: Efficient Long-range Document-level Neural Machine Translation25 Sep 2023
- 2023BAMBOO: A Comprehensive Benchmark for Evaluating Long Text Modeling Capacities of Large Language Models23 Sep 2023
- 2023Chunk, Align, Select: A Simple Long-sequence Processing Method for Transformers25 Aug 2023
- 2023FLatten Transformer: Vision Transformer using Focused Linear Attention1 Aug 2023
- 2023Adaptive Frequency Filters As Efficient Global Token Mixers26 Jul 2023
50 newest of 96 All 96 (JSON)
- 2022Simplified State Space Layers for Sequence Modelingcited by 776
- 2024Mamba-360: Survey of State Space Models as Transformer Alternative for Long Sequence Modelling: Methods, Applications, and Challengescited by 63
- 2024A Mamba Foundation Model for Time Series Forecastingcited by 9
- 2024Efficient State Space Model via Fast Tensor Convolution and Block Diagonalizationcited by 0
- 2024A Mamba Foundation Model for Time Series Forecasting5 Nov 2024
- 2024Mamba-360: Survey of State Space Models as Transformer Alternative for Long Sequence Modelling: Methods, Applications, and Challenges24 Apr 2024
- 2024Efficient State Space Model via Fast Tensor Convolution and Block Diagonalization23 Feb 2024
- 2022Simplified State Space Layers for Sequence Modeling9 Aug 2022
- 2023Diffusion Models Without Attentioncited by 75
- 2024Diffusion-RWKV: Scaling RWKV-Like Architectures for Diffusion Modelscited by 41
- 2024Diffusion-RWKV: Scaling RWKV-Like Architectures for Diffusion Models6 Apr 2024
- 2023Diffusion Models Without Attention30 Nov 2023
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 814
- 2021Perceiver IO: A General Architecture for Structured Inputs & Outputscited by 616
- 2023Harnessing the Power of LLMs in Practice: A Survey on ChatGPT and Beyondcited by 409
- 2021A Survey of Transformerscited by 399
- 2021LongT5: Efficient Text-To-Text Transformer for Long Sequencescited by 232
- 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 201
- 2022Pure Transformers are Powerful Graph Learnerscited by 188
- 2022Mega: Moving Average Equipped Gated Attentioncited by 178
- 2023FLatten Transformer: Vision Transformer using Focused Linear Attentioncited by 170
- 2021Self-attention Does Not Need O(n2) Memorycited by 152
- 2022Liquid Structural State-Space Modelscited by 134
12 most cited of 88 All 88 (JSON)
- 2026FLARE++: Low-rank attention with dynamic attention routing12 Aug 2026
- 2026Boosting ECG Classification Performance by Pre-training with Synthesized Data9 Jun 2026
- 2026Do Vision Transformers Need All-to-All Attention? Global Communication Through Elastic Learned Cores12 May 2026
- 2026Switch Attention: Towards Dynamic and Fine-grained Hybrid Transformers27 Mar 2026
- 2026Gecko: An Efficient Neural Architecture Inherently Processing Sequences with Arbitrary Lengths10 Jan 2026
- 2026RMAAT: Astrocyte-Inspired Memory Compression and Replay for Efficient Long-Context Transformers1 Jan 2026
- 2025MS-SSM: A Multi-Scale State Space Model for Efficient Sequence Modeling29 Dec 2025
- 2025Transformer Based Linear Attention with Optimized GPU Kernel Implementation24 Oct 2025
- 2025ResFormer: All-Time Reservoir Memory for Long Sequence Classification28 Sep 2025
- 2025Multipole Semantic Attention: A Fast Approximation of Softmax Attention for Pretraining12 Sep 2025
- 2025Efficient Attention Mechanisms for Large Language Models: A Survey25 Jul 2025
- 2025Iwin Transformer: Hierarchical Vision Transformer using Interleaved Windows24 Jul 2025
12 newest of 88 All 88 (JSON)