Simple Local Attentions Remain Competitive for Long-Context Tasks
Not on the map. Why?
Abstract (arXiv)
Many NLP tasks require processing long contexts beyond the length limit of pretrained models. In order to scale these models to longer text sequences, many efficient long-range attention variants have been proposed. Despite the abundance of research along this direction, it is still difficult to gauge the relative effectiveness of these models in practical use cases, e.g., if we apply these models following the pretrain-and-finetune paradigm. In this work, we aim to conduct a thorough analysis of these emerging models with large-scale and controlled experiments. For each attention variant, we pretrain large-size models using the same long-doc corpus and then finetune these models for real-world long-context tasks. Our findings reveal pitfalls of an existing widely-used long-range benchmark and show none of the tested efficient attentions can beat a simple local window attention under standard pretraining paradigms. Further analysis on local attention variants suggests that even the commonly used attention-window overlap is not necessary to achieve good downstream results -- using disjoint local attentions, we are able to build a simpler and more efficient long-doc QA model that matches the performance of Longformer~citeplongformer with half of its pretraining compute. The code to replicate our experiments can be found at https://github.com/pytorch/fairseq/tree/main/examples/xformers
Key facts. Cited by 25 papers in the map (data through 14 Oct 2026). Builds on 29 of its 33 references that are in the map. First posted on arXiv 14 Dec 2021.
Builds on
29 of 33 references.
References · 29
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2020Reformer: The Efficient Transformercited by 1,668
- 2020Rethinking Attention with Performerscited by 1,601
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
- 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,043
- 2020On Layer Normalization in the Transformer Architecturecited by 922
17 more
- 2020Efficient Transformers: A Surveycited by 790
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 726
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 700
- 2019Latent Retrieval for Weakly Supervised Open Domain Question Answeringcited by 695
- 2019Defending Against Neural Fake Newscited by 559
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 502
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 471
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 471
- 2021Random Feature Attentioncited by 354
- 2020Sparse Sinkhorn Attentioncited by 251
- 2018A Simple Method for Commonsense Reasoningcited by 223
- 2018Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Contextcited by 113
- 2021Long-Short Transformer: Efficient Transformers for Language and Visioncited by 102
- 2020Shortformer: Better Language Modeling using Shorter Inputscited by 76
- 2021Domain-matched Pre-training Tasks for Dense Retrievalcited by 53
- 2021What Context Features Can Transformer Language Models Use?cited by 50
- 2021When Attention Meets Fast Recurrence: Training Language Models with Reduced Computecited by 34
Built on by
Citing papers per year: 2022: 10; 2023: 9; 2024: 6.
25 papers.
Sort:
By area:
- 2022A Length-Extrapolatable Transformercited by 127
- 2022Efficient Long-Text Understanding with Short-Text Modelscited by 71
- 2023Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesiscited by 56
- 2022Revisiting Transformer-based Models for Long Document Classificationcited by 49
- 2022Investigating Efficiently Extending Transformers for Long Input Summarizationcited by 43
- 2022An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classificationcited by 38
- 2024Foundation Models for Music: A Surveycited by 37
- 2024The What, Why, and How of Context Length Extension Techniques in Large Language Models -- A Detailed Surveycited by 33
- 2022Fine-Tuning Pre-trained Transformers into Decaying Fast Weightscited by 26
- 2024Context Parallelism for Scalable Million-Token Inferencecited by 26
- 2022How Far are We from Robust Long Abstractive Summarization?cited by 25
- 2023Efficient Attention via Control Variatescited by 23
13 more
- 2022Adapting Pretrained Text-to-Text Models for Long Text Sequencescited by 21
- 2024TrafficGPT: Breaking the Token Barrier for Efficient Long Traffic Analysis and Generationcited by 15
- 2023Focus Your Attention (with Adaptive IIR Filters)cited by 12
- 2022CAB: Comprehensive Attention Benchmarking on Long Sequence Modelingcited by 10
- 2023On the Long Range Abilities of Transformerscited by 10
- 2023DAPR: A Benchmark on Document-Aware Passage Retrievalcited by 9
- 2023Chunk, Align, Select: A Simple Long-sequence Processing Method for Transformerscited by 9
- 2022LaMemo: Language Modeling with Look-Ahead Memorycited by 4
- 2023The Information Pathways Hypothesis: Transformers are Dynamic Self-Ensemblescited by 4
- 2023Linear Attention via Orthogonal Memorycited by 4
- 2024Downscaling Extreme Precipitation with Wasserstein Regularized Diffusioncited by 4
- 2024Attendre: Wait To Attend By Retrieval With Evicted Queries in Memory-Based Transformers for Long Context Processingcited by 3
- 2023Extending Input Contexts of Language Models through Training on Segmented Sequencescited by 0
- 2024Context Parallelism for Scalable Million-Token Inference4 Nov 2024
- 2024Downscaling Extreme Precipitation with Wasserstein Regularized Diffusion1 Oct 2024
- 2024Foundation Models for Music: A Survey26 Aug 2024
- 2024TrafficGPT: Breaking the Token Barrier for Efficient Long Traffic Analysis and Generation9 Mar 2024
- 2024The What, Why, and How of Context Length Extension Techniques in Large Language Models -- A Detailed Survey15 Jan 2024
- 2024Attendre: Wait To Attend By Retrieval With Evicted Queries in Memory-Based Transformers for Long Context Processing10 Jan 2024
- 2023Linear Attention via Orthogonal Memory18 Dec 2023
- 2023On the Long Range Abilities of Transformers28 Nov 2023
- 2023Extending Input Contexts of Language Models through Training on Segmented Sequences23 Oct 2023
- 2023Chunk, Align, Select: A Simple Long-sequence Processing Method for Transformers25 Aug 2023
- 2023Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesis14 Jun 2023
- 2023The Information Pathways Hypothesis: Transformers are Dynamic Self-Ensembles2 Jun 2023
13 more
- 2023Focus Your Attention (with Adaptive IIR Filters)24 May 2023
- 2023DAPR: A Benchmark on Document-Aware Passage Retrieval23 May 2023
- 2023Efficient Attention via Control Variates9 Feb 2023
- 2022A Length-Extrapolatable Transformer20 Dec 2022
- 2022How Far are We from Robust Long Abstractive Summarization?30 Oct 2022
- 2022CAB: Comprehensive Attention Benchmarking on Long Sequence Modeling14 Oct 2022
- 2022An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classification11 Oct 2022
- 2022Fine-Tuning Pre-trained Transformers into Decaying Fast Weights9 Oct 2022
- 2022Adapting Pretrained Text-to-Text Models for Long Text Sequences21 Sep 2022
- 2022Investigating Efficiently Extending Transformers for Long Input Summarization8 Aug 2022
- 2022Efficient Long-Text Understanding with Short-Text Models1 Aug 2022
- 2022LaMemo: Language Modeling with Look-Ahead Memory15 Apr 2022
- 2022Revisiting Transformer-based Models for Long Document Classification14 Apr 2022
- 2023Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesiscited by 56
- 2024Foundation Models for Music: A Surveycited by 37
- 2024Foundation Models for Music: A Survey26 Aug 2024
- 2023Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesis14 Jun 2023
- 2022A Length-Extrapolatable Transformercited by 127
- 2022Efficient Long-Text Understanding with Short-Text Modelscited by 71
- 2022Revisiting Transformer-based Models for Long Document Classificationcited by 49
- 2022Investigating Efficiently Extending Transformers for Long Input Summarizationcited by 43
- 2022An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classificationcited by 38
- 2024The What, Why, and How of Context Length Extension Techniques in Large Language Models -- A Detailed Surveycited by 33
- 2022Fine-Tuning Pre-trained Transformers into Decaying Fast Weightscited by 26
- 2024Context Parallelism for Scalable Million-Token Inferencecited by 26
- 2022How Far are We from Robust Long Abstractive Summarization?cited by 25
- 2023Efficient Attention via Control Variatescited by 23
- 2022Adapting Pretrained Text-to-Text Models for Long Text Sequencescited by 21
- 2024TrafficGPT: Breaking the Token Barrier for Efficient Long Traffic Analysis and Generationcited by 15
12 most cited of 23 All 23 (JSON)
- 2024Context Parallelism for Scalable Million-Token Inference4 Nov 2024
- 2024Downscaling Extreme Precipitation with Wasserstein Regularized Diffusion1 Oct 2024
- 2024TrafficGPT: Breaking the Token Barrier for Efficient Long Traffic Analysis and Generation9 Mar 2024
- 2024The What, Why, and How of Context Length Extension Techniques in Large Language Models -- A Detailed Survey15 Jan 2024
- 2024Attendre: Wait To Attend By Retrieval With Evicted Queries in Memory-Based Transformers for Long Context Processing10 Jan 2024
- 2023Linear Attention via Orthogonal Memory18 Dec 2023
- 2023On the Long Range Abilities of Transformers28 Nov 2023
- 2023Extending Input Contexts of Language Models through Training on Segmented Sequences23 Oct 2023
- 2023Chunk, Align, Select: A Simple Long-sequence Processing Method for Transformers25 Aug 2023
- 2023The Information Pathways Hypothesis: Transformers are Dynamic Self-Ensembles2 Jun 2023
- 2023Focus Your Attention (with Adaptive IIR Filters)24 May 2023
- 2023DAPR: A Benchmark on Document-Aware Passage Retrieval23 May 2023
12 newest of 23 All 23 (JSON)