Not All Memories are Created Equal: Learning to Forget by Expiring
Not on the map. Why?
Abstract (arXiv)
Attention mechanisms have shown promising results in sequence modeling tasks that require long-term memory. Recent work investigated mechanisms to reduce the computational cost of preserving and storing memories. However, not all content in the past is equally important to remember. We propose Expire-Span, a method that learns to retain the most important information and expire the irrelevant information. This forgetting of memories enables Transformers to scale to attend over tens of thousands of previous timesteps efficiently, as not all states from previous timesteps are preserved. We demonstrate that Expire-Span can help models identify and retain critical information and show it can achieve strong performance on reinforcement learning tasks specifically designed to challenge this functionality. Next, we show that Expire-Span can scale to memories that are tens of thousands in size, setting a new state of the art on incredibly long context tasks such as character-level language modeling and a frame-by-frame moving objects task. Finally, we analyze the efficiency of Expire-Span compared to existing approaches and demonstrate that it trains faster and uses less memory.
Key facts. Cited by 32 papers in the map (data through 7 Oct 2026). Builds on 39 of its 53 references that are in the map. First posted on arXiv 13 May 2021.
Builds on
39 of 53 references.
References · 39
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 4,993
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2020Reformer: The Efficient Transformercited by 1,658
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
27 more
- 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,203
- 2018Self-Attention with Relative Position Representationscited by 1,112
- 2020Efficient Transformers: A Surveycited by 784
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
- 2014Neural Turing Machinescited by 630
- 2019Deep Equilibrium Modelscited by 603
- 2020Recipes for building an open-domain chatbotcited by 593
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
- 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 434
- 2021Random Feature Attentioncited by 350
- 2019Stabilizing Transformers for Reinforcement Learningcited by 262
- 2018Long-Term Feature Banks for Detailed Video Understandingcited by 239
- 2018Adaptive Input Representations for Neural Language Modelingcited by 226
- 2019Pay Less Attention with Lightweight and Dynamic Convolutionscited by 211
- 2019Adaptively Sparse Transformerscited by 154
- 2019Adaptive Attention Span in Transformerscited by 148
- 2019Strategies for Structuring Story Generationcited by 124
- 2019Learning to Speak and Act in a Fantasy Text Adventure Gamecited by 122
- 2019Large Memory Layers with Product Keyscited by 120
- 2019Augmenting Self-attention with Persistent Memorycited by 92
- 2018Improving the Transformer Translation Model with Document-Level Contextcited by 74
- 2016Efficient softmax approximation for GPUscited by 67
- 2020Masked Language Modeling for Proteins via Linearly Scalable Long-Context Transformerscited by 49
- 2019Using Local Knowledge Graph Construction to Scale Seq2Seq Models to Multi-Document Inputscited by 38
- 2019BP-Transformer: Modelling Long-Range Context via Binary Partitioningcited by 38
- 2015MazeBase: A Sandbox for Learning from Gamescited by 4
Built on by
Citing papers per year: 2021: 4; 2022: 8; 2023: 9; 2024: 5; 2025: 3; 2026: 3.
32 papers.
Sort:
By area:
- 2022Memorizing Transformerscited by 219
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 194
- 2022MeMViT: Memory-Augmented Multiscale Vision Transformer for Efficient Long-Term Video Recognitioncited by 189
- 2022Training Language Models with Memory Augmentationcited by 112
- 2022Block-Recurrent Transformerscited by 107
- 2021Hierarchical Transformers Are More Efficient Language Modelscited by 99
- 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 74
- 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Surveycited by 71
- 2021BERTnesia: Investigating the capture and forgetting of knowledge in BERTcited by 40
- 2022History Compression via Language Models in Reinforcement Learningcited by 39
- 2021ABC: Attention with Bounded-memory Controlcited by 36
- 2023Transformer-VQ: Linear-Time Transformers via Vector Quantizationcited by 26
20 more
- 2023Sparse Modular Activation for Efficient Sequence Modelingcited by 20
- 2023Retrieval-Pretrained Transformer: Long-range Language Modeling with Self-retrievalcited by 20
- 2024MemoNav: Working Memory Model for Visual Navigationcited by 13
- 2025Multi-Token Attentioncited by 10
- 2023TRAMS: Training-free Memory Selection for Long-range Language Modelingcited by 5
- 2026TempoFit: Plug-and-Play Layer-Wise Temporal KV Memory for Long-Horizon Vision-Language-Action Manipulationcited by 5
- 2021Discourse-Aware Soft Prompting for Text Generationcited by 4
- 2023Linear Attention via Orthogonal Memorycited by 4
- 2024Attendre: Wait To Attend By Retrieval With Evicted Queries in Memory-Based Transformers for Long Context Processingcited by 3
- 2023Cached Transformers: Improving Transformers with Differentiable Memory Cachecited by 2
- 2024"Forgetting" in Machine Learning and Beyond: A Surveycited by 2
- 2022MemoNav: Selecting Informative Memories for Visual Navigationcited by 1
- 2022Memory in humans and deep language models: Linking hypotheses for model augmentationcited by 1
- 2023A Data Source for Reasoning Embodied Agentscited by 1
- 2025Memory as Resonance: A Biomimetic Architecture for Infinite Context Memory on Ergodic Phonetic Manifoldscited by 1
- 2026Language Model Memory and Memory Models for Languagecited by 1
- 2022Learning what to remembercited by 0
- 2024Temporal Graph Memory Networks For Knowledge Tracingcited by 0
- 2025Lifting Data-Tracing Machine Unlearning to Knowledge-Tracing for Foundation Modelscited by 0
- 2026CAMeR: Keyword-Gated Hybrid Activation for Adaptive Memory Retention in LLM Agentscited by 0
- 2026CAMeR: Keyword-Gated Hybrid Activation for Adaptive Memory Retention in LLM Agents15 May 2026
- 2026TempoFit: Plug-and-Play Layer-Wise Temporal KV Memory for Long-Horizon Vision-Language-Action Manipulation8 Mar 2026
- 2026Language Model Memory and Memory Models for Language13 Feb 2026
- 2025Memory as Resonance: A Biomimetic Architecture for Infinite Context Memory on Ergodic Phonetic Manifolds23 Dec 2025
- 2025Lifting Data-Tracing Machine Unlearning to Knowledge-Tracing for Foundation Models12 Jun 2025
- 2025Multi-Token Attention1 Apr 2025
- 2024Temporal Graph Memory Networks For Knowledge Tracing23 Sep 2024
- 2024"Forgetting" in Machine Learning and Beyond: A Survey31 May 2024
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention10 Apr 2024
- 2024MemoNav: Working Memory Model for Visual Navigation29 Feb 2024
- 2024Attendre: Wait To Attend By Retrieval With Evicted Queries in Memory-Based Transformers for Long Context Processing10 Jan 2024
- 2023Cached Transformers: Improving Transformers with Differentiable Memory Cache20 Dec 2023
20 more
- 2023Linear Attention via Orthogonal Memory18 Dec 2023
- 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Survey21 Nov 2023
- 2023TRAMS: Training-free Memory Selection for Long-range Language Modeling24 Oct 2023
- 2023Transformer-VQ: Linear-Time Transformers via Vector Quantization28 Sep 2023
- 2023A Data Source for Reasoning Embodied Agents14 Sep 2023
- 2023Retrieval-Pretrained Transformer: Long-range Language Modeling with Self-retrieval23 Jun 2023
- 2023Sparse Modular Activation for Efficient Sequence Modeling19 Jun 2023
- 2023Exposing Attention Glitches with Flip-Flop Language Modeling1 Jun 2023
- 2022Memory in humans and deep language models: Linking hypotheses for model augmentation4 Oct 2022
- 2022MemoNav: Selecting Informative Memories for Visual Navigation20 Aug 2022
- 2022Training Language Models with Memory Augmentation25 May 2022
- 2022History Compression via Language Models in Reinforcement Learning24 May 2022
- 2022Memorizing Transformers16 Mar 2022
- 2022Block-Recurrent Transformers11 Mar 2022
- 2022MeMViT: Memory-Augmented Multiscale Vision Transformer for Efficient Long-Term Video Recognition20 Jan 2022
- 2022Learning what to remember11 Jan 2022
- 2021Discourse-Aware Soft Prompting for Text Generation10 Dec 2021
- 2021Hierarchical Transformers Are More Efficient Language Models26 Oct 2021
- 2021ABC: Attention with Bounded-memory Control6 Oct 2021
- 2021BERTnesia: Investigating the capture and forgetting of knowledge in BERT5 Jun 2021
- 2023A Data Source for Reasoning Embodied Agentscited by 1
- 2023A Data Source for Reasoning Embodied Agents14 Sep 2023
- 2022Memorizing Transformerscited by 219
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 194
- 2022MeMViT: Memory-Augmented Multiscale Vision Transformer for Efficient Long-Term Video Recognitioncited by 189
- 2022Training Language Models with Memory Augmentationcited by 112
- 2022Block-Recurrent Transformerscited by 107
- 2021Hierarchical Transformers Are More Efficient Language Modelscited by 99
- 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 74
- 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Surveycited by 71
- 2021BERTnesia: Investigating the capture and forgetting of knowledge in BERTcited by 40
- 2022History Compression via Language Models in Reinforcement Learningcited by 39
- 2021ABC: Attention with Bounded-memory Controlcited by 36
- 2023Transformer-VQ: Linear-Time Transformers via Vector Quantizationcited by 26
12 most cited of 27 All 27 (JSON)
- 2026Language Model Memory and Memory Models for Language13 Feb 2026
- 2025Memory as Resonance: A Biomimetic Architecture for Infinite Context Memory on Ergodic Phonetic Manifolds23 Dec 2025
- 2025Multi-Token Attention1 Apr 2025
- 2024Temporal Graph Memory Networks For Knowledge Tracing23 Sep 2024
- 2024"Forgetting" in Machine Learning and Beyond: A Survey31 May 2024
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention10 Apr 2024
- 2024MemoNav: Working Memory Model for Visual Navigation29 Feb 2024
- 2024Attendre: Wait To Attend By Retrieval With Evicted Queries in Memory-Based Transformers for Long Context Processing10 Jan 2024
- 2023Cached Transformers: Improving Transformers with Differentiable Memory Cache20 Dec 2023
- 2023Linear Attention via Orthogonal Memory18 Dec 2023
- 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Survey21 Nov 2023
- 2023TRAMS: Training-free Memory Selection for Long-range Language Modeling24 Oct 2023
12 newest of 27 All 27 (JSON)