mlsanityData to 14 Oct 2026

Simple Local Attentions Remain Competitive for Long-Context Tasks

arXiv 2112.07210 ↗First posted 14 Dec 2021cs.CLcited by 25

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

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  3. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
  4. 2020Longformer: The Long-Document Transformercited by 3,413
  5. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  6. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
  7. 2020Big Bird: Transformers for Longer Sequencescited by 1,684
  8. 2020Reformer: The Efficient Transformercited by 1,668
  9. 2020Rethinking Attention with Performerscited by 1,601
  10. 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
  11. 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,043
  12. 2020On Layer Normalization in the Transformer Architecturecited by 922
17 more
  1. 2020Efficient Transformers: A Surveycited by 790
  2. 2019Compressive Transformers for Long-Range Sequence Modellingcited by 726
  3. 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 700
  4. 2019Latent Retrieval for Weakly Supervised Open Domain Question Answeringcited by 695
  5. 2019Defending Against Neural Fake Newscited by 559
  6. 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 502
  7. 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 471
  8. 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 471
  9. 2021Random Feature Attentioncited by 354
  10. 2020Sparse Sinkhorn Attentioncited by 251
  11. 2018A Simple Method for Commonsense Reasoningcited by 223
  12. 2018Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Contextcited by 113
  13. 2021Long-Short Transformer: Efficient Transformers for Language and Visioncited by 102
  14. 2020Shortformer: Better Language Modeling using Shorter Inputscited by 76
  15. 2021Domain-matched Pre-training Tasks for Dense Retrievalcited by 53
  16. 2021What Context Features Can Transformer Language Models Use?cited by 50
  17. 2021When Attention Meets Fast Recurrence: Training Language Models with Reduced Computecited by 34

Built on by

Cited by year

Citing papers per year: 2022: 10; 2023: 9; 2024: 6.

25 papers.

Sort:

By area:

  1. 2022A Length-Extrapolatable Transformercited by 127
  2. 2022Efficient Long-Text Understanding with Short-Text Modelscited by 71
  3. 2023Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesiscited by 56
  4. 2022Revisiting Transformer-based Models for Long Document Classificationcited by 49
  5. 2022Investigating Efficiently Extending Transformers for Long Input Summarizationcited by 43
  6. 2022An Exploration of Hierarchical Attention Transformers for Efficient Long Document Classificationcited by 38
  7. 2024Foundation Models for Music: A Surveycited by 37
  8. 2024The What, Why, and How of Context Length Extension Techniques in Large Language Models -- A Detailed Surveycited by 33
  9. 2022Fine-Tuning Pre-trained Transformers into Decaying Fast Weightscited by 26
  10. 2024Context Parallelism for Scalable Million-Token Inferencecited by 26
  11. 2022How Far are We from Robust Long Abstractive Summarization?cited by 25
  12. 2023Efficient Attention via Control Variatescited by 23
13 more
  1. 2022Adapting Pretrained Text-to-Text Models for Long Text Sequencescited by 21
  2. 2024TrafficGPT: Breaking the Token Barrier for Efficient Long Traffic Analysis and Generationcited by 15
  3. 2023Focus Your Attention (with Adaptive IIR Filters)cited by 12
  4. 2022CAB: Comprehensive Attention Benchmarking on Long Sequence Modelingcited by 10
  5. 2023On the Long Range Abilities of Transformerscited by 10
  6. 2023DAPR: A Benchmark on Document-Aware Passage Retrievalcited by 9
  7. 2023Chunk, Align, Select: A Simple Long-sequence Processing Method for Transformerscited by 9
  8. 2022LaMemo: Language Modeling with Look-Ahead Memorycited by 4
  9. 2023The Information Pathways Hypothesis: Transformers are Dynamic Self-Ensemblescited by 4
  10. 2023Linear Attention via Orthogonal Memorycited by 4
  11. 2024Downscaling Extreme Precipitation with Wasserstein Regularized Diffusioncited by 4
  12. 2024Attendre: Wait To Attend By Retrieval With Evicted Queries in Memory-Based Transformers for Long Context Processingcited by 3
  13. 2023Extending Input Contexts of Language Models through Training on Segmented Sequencescited by 0