Papers › Do Transformers Need Deep Long-Range Memory

Do Transformers Need Deep Long-Range Memory

7 Jul 2020arXiv:2007.03356archive 2025-07-28

Jack W. Rae, Ali Razavi

Deep attention models have advanced the modelling of sequential data across many domains. For language modelling in particular, the Transformer-XL -- a Transformer augmented with a long-range memory of past activations -- has been shown to be state-of-the-art across a variety of well-studied benchmarks. The Transformer-XL incorporates a long-range memory at every layer of the network, which renders its state to be thousands of times larger than RNN predecessors. However it is unclear whether this is necessary. We perform a set of interventions to show that comparable performance can be obtained with 6X fewer long range memories and better performance can be obtained by limiting the range of attention in lower layers of the network.

PaperPDFCode

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Deep AttentionLanguage Modelling

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAdaptive Input RepresentationsAdaptive SoftmaxAttentionBPECosine AnnealingDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionPosition-Wise Feed-Forward LayerReLUResidual ConnectionSoftmaxTransformerTransformer-XLVariational Dropout

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections