Papers › Compressive Transformers for Long-Range Sequence Modelling

Compressive Transformers for Long-Range Sequence Modelling

13 Nov 2019ICLR 2020 1arXiv:1911.05507archive 2025-07-28

Jack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Timothy P. Lillicrap

We present the Compressive Transformer, an attentive sequence model which compresses past memories for long-range sequence learning. We find the Compressive Transformer obtains state-of-the-art language modelling results in the WikiText-103 and Enwik8 benchmarks, achieving 17.1 ppl and 0.97 bpc respectively. We also find it can model high-frequency speech effectively and can be used as a memory mechanism for RL, demonstrated on an object matching task. To promote the domain of long-range sequence learning, we propose a new open-vocabulary language modelling benchmark derived from books, PG-19.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 11 code samples harvested from 2 repositories linked to this paper: 6 ran (of which 0 constructed an object rather than computing a result; 5 with no instrument failure: 0 honoured, 2 violated, 3 with no contract checked; 1 where Syntology's instrument failed) · 5 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 11 samples from 2 repositories, 6 ran (5 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 2 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

ViktorStagge/CompressiveTransformer mentioned on GitHubMITSyntology: 8 samples, 3 ran (0 instrument-failed) · 5 unverified report
deepmind/pg19 mentioned on GitHubApache-2.0Syntology: not harvested report
google-deepmind/pg19 mentioned on GitHubApache-2.0Syntology: not harvested report
lucidrains/block-recurrent-transformer-pytorch mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Block-Recurrent Transformers (arXiv:2203.07852; that paper's own run record: 18 ran (of which 2 constructed an object rather than computing a result; 9 with no instrument failure: 2 honoured, 3 violated, 4 with no contract checked; 9 where Syntology's instrument failed) · 5 unverified) and FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness (arXiv:2205.14135; that paper's own run record: 24 ran (of which 2 constructed an object rather than computing a result; 18 with no instrument failure: 0 honoured, 1 violated, 17 with no contract checked; 6 where Syntology's instrument failed) · 6 unverified); nothing checks that they implement this paper's method. report
labmlai/annotated_deep_learning_paper_implementations pytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Playing Atari with Deep Reinforcement Learning (arXiv:1312.5602; that paper's own run record: 64 ran (of which 24 constructed an object rather than computing a result; 46 with no instrument failure: 5 honoured, 0 violated, 41 with no contract checked; 18 where Syntology's instrument failed) · 53 unverified), Adam: A Method for Stochastic Optimization (arXiv:1412.6980; that paper's own run record: 27 ran (of which 7 constructed an object rather than computing a result; 23 with no instrument failure: 4 honoured, 2 violated, 17 with no contract checked; 4 where Syntology's instrument failed) · 10 unverified), Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift (arXiv:1502.03167; that paper's own run record: 19 ran (of which 5 constructed an object rather than computing a result; 14 with no instrument failure: 0 honoured, 0 violated, 14 with no contract checked; 5 where Syntology's instrument failed) · 2 unverified) and 12 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
lucidrains/compressive-transformer-pytorch pytorchSyntology: 3 samples, 3 ran (1 instrument-failed) · 0 unverified report

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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

11 samples harvested: 6 ran (of which 0 constructed an object rather than computing a result; 5 with no instrument failure: 0 honoured, 2 violated, 3 with no contract checked; 1 where Syntology's instrument failed) · 5 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · violated contract
1ran · our draft was wrong
3ran
5unverified

Licence: 0 of the 11 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

ViktorStagge/CompressiveTransformer community (archive-listed) 8 samples, 3 ran (0 instrument-failed) · 5 unverified
get_optimizer in 228 papers ct/model/optimizers.py ran MIT (permissive) · 2386968d2b386e18 · report fixture: signature method:str/0/str, learning_rate:float/0/float, beta_1:float/0/float, beta_2:float/0/float, clipnorm:float/0/float · returned Adam · level recorded 2026-09-24
treebank ct/load/treebank.py ran MIT (permissive) · 0a1ea081d7a22055 · report fixture: signature path_to_dir:str/0/str · returned DataFrame · level recorded 2026-09-24
wma ct/load/wma.py ran MIT (permissive) · ff138d8d7172a07a · report fixture: signature path_first_language:str/0/str, path_second_language:str/0/str, first_language:str/0/str, second_language:str/0/str, output_path:str/0/str · returned DataFrame · level recorded 2026-09-24
compression_layer ct/model/layers/compression.py unverified MIT (permissive) · 9935f8b67694d72e · report
content_based_attention ct/model/layers/attention.py unverified MIT (permissive) · 185debb5bed29c85 · report
content_based_attention_numpy ct/model/layers/attention.py unverified MIT (permissive) · ba5b86960e25b0d6 · report
euclidean_norm ct/model/utils.py unverified MIT (permissive) · da8e90a779ce9bc4 · report
lucidrains/compressive-transformer-pytorch community (archive-listed) 3 samples, 3 ran (1 instrument-failed) · 0 unverified
cast_tuple in 58 papers compressive_transformer_pytorch/compressive_transformer_pytorch.py ran · violated contract fingerprinted MIT (permissive) · 369eced62e96d690 · report fixture: signature el:int/0/int · returned tuple · level recorded 2026-09-22
default in 430 papers compressive_transformer_pytorch/compressive_transformer_pytorch.py ran · violated contract MIT (permissive) · a1bda7590dd9a4d2 · report fixture: signature x:NoneType/0/?, val:callable/0/? · returned str · level recorded 2026-09-22
to in 15 papers compressive_transformer_pytorch/compressive_transformer_pytorch.py ran · our draft was wrong fingerprinted MIT (permissive) · 7417c98099ec4e15 · report fixture: signature t:Tensor/2/float · returned dict · level recorded 2026-09-22

Tasks

Language Modelling

Datasets

Introduced by this paper, per the archive.

PG-19

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Language Modelling Hutter Prize Compressive Transformer Bit per Character (BPC) 0.97 #2 of 18 Archive leaderboard report
Language Modelling WikiText-103 Compressive Transformer (18L, M=1024) Test perplexity 17.1 #20 of 89 Archive leaderboard report
Language Modelling WikiText-103 Compressive Transformer (18L, M=1024) Validation perplexity 16.0 #20 of 89 Archive leaderboard report
Language Modelling enwik8 Compressive Transformer (24 layers) Bit per Character (BPC) 0.97 #8 of 42 Archive leaderboard report
Language Modelling enwik8 Compressive Transformer (24 layers) Number of params 277M #8 of 42 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: Compressed Memory, Compressive Transformer

AdamAdaptive Input RepresentationsAdaptive SoftmaxAttentionCompressed MemoryCompressive TransformerCosine AnnealingDense ConnectionsDropoutGradient ClippingLayer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionReLUResidual ConnectionSoftmaxTransformer-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