Long Range Arena: A Benchmark for Efficient Transformers

Transformers do not scale very well to long sequence lengths largely because of quadratic self-attention complexity. In the recent months, a wide spectrum of efficient, fast Transformers have been proposed to tackle this problem, more often than not claiming superior or comparable model quality to vanilla Transformer models. To this date, there is no well-established consensus on how to evaluate this class of models. Moreover, inconsistent benchmarking on a wide spectrum of tasks and datasets makes it difficult to assess relative model quality amongst many models. This paper proposes a systematic and unified benchmark, LRA, specifically focused on evaluating model quality under long-context scenarios. Our benchmark is a suite of tasks consisting of sequences ranging from $1K$ to $16K$ tokens, encompassing a wide range of data types and modalities such as text, natural, synthetic images, and mathematical expressions requiring similarity, structural, and visual-spatial reasoning. We systematically evaluate ten well-established long-range Transformer models (Reformers, Linformers, Linear Transformers, Sinkhorn Transformers, Performers, Synthesizers, Sparse Transformers, and Longformers) on our newly proposed benchmark suite. LRA paves the way towards better understanding this class of efficient Transformer models, facilitates more research in this direction, and presents new challenging tasks to tackle. Our benchmark code will be released at https://github.com/google-research/long-range-arena.

PDF Abstract

Datasets


Introduced in the Paper:

LRA

Used in the Paper:

IMDb Movie Reviews ListOps

Results from the Paper


Ranked #18 on Long-range modeling on LRA (Pathfinder metric)

     Get a GitHub badge
Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Long-range modeling LRA Linformer ListOps 35.7 # 24
Text 53.94 # 29
Retrieval 52.27 # 26
Image 38.56 # 28
Pathfinder 76.34 # 18
Long-range modeling LRA Performer ListOps 18.01 # 27
Text 65.4 # 20
Retrieval 53.82 # 23
Image 42.77 # 21
Pathfinder 77.05 # 17
Avg 51.41 # 24
Long-range modeling LRA Local Attention ListOps 37.27 # 20
Text 56.1 # 28
Retrieval 53.4 # 24
Image 38.07 # 29
Pathfinder 68.5 # 28
Avg 50.67 # 26
Long-range modeling LRA BigBird ListOps 36.05 # 23
Text 64.02 # 23
Retrieval 59.29 # 19
Image 40.83 # 27
Pathfinder 74.87 # 20
Avg 55.01 # 20
Long-range modeling LRA Linear Trans. ListOps 16.13 # 29
Text 65.9 # 19
Retrieval 53.09 # 25
Image 42.34 # 23
Pathfinder 75.3 # 19
Avg 50.55 # 27
Long-range modeling LRA Sparse Trans. ListOps 17.07 # 28
Text 63.58 # 24
Retrieval 59.59 # 18
Image 44.24 # 19
Pathfinder 71.71 # 22
Avg 51.24 # 25
Long-range modeling LRA Sinkhorn Trans. ListOps 33.67 # 26
Text 61.2 # 27
Image 41.23 # 26
Pathfinder 67.45 # 29
Long-range modeling LRA Synthesizer ListOps 36.99 # 21
Text 61.68 # 26
Retrieval 54.67 # 22
Image 41.61 # 25
Pathfinder 69.45 # 27
Avg 52.88 # 23
Long-range modeling LRA Longformer ListOps 35.63 # 25
Text 62.85 # 25
Retrieval 56.89 # 21
Image 42.22 # 24
Pathfinder 69.71 # 26
Avg 53.46 # 22
Long-range modeling LRA Transformer ListOps 36.37 # 22
Text 64.27 # 22
Retrieval 57.46 # 20
Image 42.44 # 22
Pathfinder 71.4 # 23
Avg 54.39 # 21

Methods