Long Range Arena : A Benchmark for Efficient Transformers

Yi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen, Dara Bahri, Philip Pham, Jinfeng Rao, Liu Yang, Sebastian Ruder, Donald Metzler

Introduction

The original Transformer's $O(N^2)$ self-attention mechanism has long been a major computational bottleneck, making it prohibitive to process long sequences like entire books or high-resolution images. This limitation sparked a "Cambrian explosion" of efficient Transformer variants—such as the Reformer, Linformer, and BigBird—each claiming superior performance and reduced complexity.

However, the field has lacked a standard "apples-to-apples" comparison. Researchers often evaluated their models on different tasks, used varying sequence lengths, or conflated architectural benefits with the power of massive pretraining. To address this, researchers introduced the Long Range Arena (LRA), a unified benchmark designed to systematically evaluate these "xformers" on their ability to handle long-context sequences ranging from 1K to 16K tokens.

The LRA Benchmark and Datasets

The LRA benchmark was built on a set of strict desiderata: it must be general, challenging, focused on long inputs, and accessible without industrial-scale compute. Crucially, the authors decoupled architecture from pretraining, evaluating ten well-established models from scratch to observe their pure inductive biases.

The benchmark consists of six diverse tasks spanning different modalities and reasoning types:

  1. Long ListOps: A hierarchical reasoning task involving nested operations (MAX, MEAN, etc.) with sequences up to 2K tokens.
  2. Byte-level Text Classification: Sentiment analysis on IMDb reviews processed at the character level (4K tokens).
  3. Byte-level Document Retrieval: A "two-tower" setup finding citation links between long documents (8K total tokens).
  4. Image Classification (Pixels): CIFAR-10 images flattened into a 1D sequence of 1,024 pixels, forcing the model to learn 2D spatial relations from a 1D input.
  5. Pathfinder: A synthetic visual task where the model must determine if two points are connected by a dashed line (1K tokens).
  6. Pathfinder-X: An extreme version of Pathfinder with 16K tokens, designed as a "litmus test" for extreme long-range dependencies.
Example of the Pathfinder task, where models must determine if two points are connected by a dashed path.

Key Insights and Performance Trade-offs

The LRA benchmark reveals that while many models successfully reduce the quadratic complexity of self-attention, there is no "one-size-fits-all" winner.

  • The Pareto Frontier: There is a clear trade-off between quality, speed, and memory. BigBird achieved the highest average score across all tasks (55.01), showing strong performance on both text and spatial reasoning. Meanwhile, the Performer was the fastest (achieving a 5.7x speedup over the vanilla Transformer at 4K lengths), and the Linformer was the most memory-efficient (reducing footprint by roughly 10x).
Scatter plots illustrating the trade-offs between LRA Score, processing speed, and memory footprint across different Transformer variants.
  • The Achilles' Heel of Kernels: Kernel-based and low-rank models (like Performer and Linformer) are incredibly fast but struggle significantly on the ListOps task. This suggests these models have difficulty capturing hierarchical data structures compared to models with more structured attention patterns. ListOps proved to be the most discriminative task overall, with scores ranging from ~16% to ~37%.
  • The "Path-X" Wall: Every single model tested failed the Pathfinder-X task, scoring no better than random chance. This starkly indicates that simply achieving $O(N)$ complexity does not guarantee a model can actually learn dependencies across 16,000 tokens.
  • Pretraining Obfuscation: By training from scratch, the authors demonstrated that some models that appear highly capable when pretrained (like Longformer) perform quite differently in a pure architectural comparison.

Limitations and Future Directions

The authors acknowledge that LRA currently focuses primarily on encoding tasks. Many of these efficient models are also intended for autoregressive decoding (generation), which LRA does not measure. Furthermore, the universal failure on Pathfinder-X suggests that "efficient attention" is only half the battle; the field still needs better optimization techniques or inductive biases to truly conquer extreme sequence lengths. Future iterations of the benchmark may expand to include diverse tasks like long-form summarization or multi-modal reasoning.

Summary updated

BibTeX
@inproceedings{tay2021long,
  author = {Yi Tay and Mostafa Dehghani and Samira Abnar and Yikang Shen and Dara Bahri and Philip Pham and Jinfeng Rao and Liu Yang and Sebastian Ruder and Donald Metzler},
  title = {{Long Range Arena : A Benchmark for Efficient Transformers}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
}
Figure