mlsanityData to 7 Oct 2026

Not All Memories are Created Equal: Learning to Forget by Expiring

arXiv 2105.06548 ↗First posted 13 May 2021cs.LG cs.AIcited by 32

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

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 4,993
  5. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  6. 2020Longformer: The Long-Document Transformercited by 3,362
  7. 2016Pointer Sentinel Mixture Modelscited by 2,992
  8. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  9. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
  10. 2020Reformer: The Efficient Transformercited by 1,658
  11. 2019Generating Long Sequences with Sparse Transformerscited by 1,523
  12. 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
27 more
  1. 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,203
  2. 2018Self-Attention with Relative Position Representationscited by 1,112
  3. 2020Efficient Transformers: A Surveycited by 784
  4. 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
  5. 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
  6. 2014Neural Turing Machinescited by 630
  7. 2019Deep Equilibrium Modelscited by 603
  8. 2020Recipes for building an open-domain chatbotcited by 593
  9. 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
  10. 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 434
  11. 2021Random Feature Attentioncited by 350
  12. 2019Stabilizing Transformers for Reinforcement Learningcited by 262
  13. 2018Long-Term Feature Banks for Detailed Video Understandingcited by 239
  14. 2018Adaptive Input Representations for Neural Language Modelingcited by 226
  15. 2019Pay Less Attention with Lightweight and Dynamic Convolutionscited by 211
  16. 2019Adaptively Sparse Transformerscited by 154
  17. 2019Adaptive Attention Span in Transformerscited by 148
  18. 2019Strategies for Structuring Story Generationcited by 124
  19. 2019Learning to Speak and Act in a Fantasy Text Adventure Gamecited by 122
  20. 2019Large Memory Layers with Product Keyscited by 120
  21. 2019Augmenting Self-attention with Persistent Memorycited by 92
  22. 2018Improving the Transformer Translation Model with Document-Level Contextcited by 74
  23. 2016Efficient softmax approximation for GPUscited by 67
  24. 2020Masked Language Modeling for Proteins via Linearly Scalable Long-Context Transformerscited by 49
  25. 2019Using Local Knowledge Graph Construction to Scale Seq2Seq Models to Multi-Document Inputscited by 38
  26. 2019BP-Transformer: Modelling Long-Range Context via Binary Partitioningcited by 38
  27. 2015MazeBase: A Sandbox for Learning from Gamescited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 4; 2022: 8; 2023: 9; 2024: 5; 2025: 3; 2026: 3.

32 papers.

Sort:

By area:

  1. 2022Memorizing Transformerscited by 219
  2. 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 194
  3. 2022MeMViT: Memory-Augmented Multiscale Vision Transformer for Efficient Long-Term Video Recognitioncited by 189
  4. 2022Training Language Models with Memory Augmentationcited by 112
  5. 2022Block-Recurrent Transformerscited by 107
  6. 2021Hierarchical Transformers Are More Efficient Language Modelscited by 99
  7. 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 74
  8. 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Surveycited by 71
  9. 2021BERTnesia: Investigating the capture and forgetting of knowledge in BERTcited by 40
  10. 2022History Compression via Language Models in Reinforcement Learningcited by 39
  11. 2021ABC: Attention with Bounded-memory Controlcited by 36
  12. 2023Transformer-VQ: Linear-Time Transformers via Vector Quantizationcited by 26
20 more
  1. 2023Sparse Modular Activation for Efficient Sequence Modelingcited by 20
  2. 2023Retrieval-Pretrained Transformer: Long-range Language Modeling with Self-retrievalcited by 20
  3. 2024MemoNav: Working Memory Model for Visual Navigationcited by 13
  4. 2025Multi-Token Attentioncited by 10
  5. 2023TRAMS: Training-free Memory Selection for Long-range Language Modelingcited by 5
  6. 2026TempoFit: Plug-and-Play Layer-Wise Temporal KV Memory for Long-Horizon Vision-Language-Action Manipulationcited by 5
  7. 2021Discourse-Aware Soft Prompting for Text Generationcited by 4
  8. 2023Linear Attention via Orthogonal Memorycited by 4
  9. 2024Attendre: Wait To Attend By Retrieval With Evicted Queries in Memory-Based Transformers for Long Context Processingcited by 3
  10. 2023Cached Transformers: Improving Transformers with Differentiable Memory Cachecited by 2
  11. 2024"Forgetting" in Machine Learning and Beyond: A Surveycited by 2
  12. 2022MemoNav: Selecting Informative Memories for Visual Navigationcited by 1
  13. 2022Memory in humans and deep language models: Linking hypotheses for model augmentationcited by 1
  14. 2023A Data Source for Reasoning Embodied Agentscited by 1
  15. 2025Memory as Resonance: A Biomimetic Architecture for Infinite Context Memory on Ergodic Phonetic Manifoldscited by 1
  16. 2026Language Model Memory and Memory Models for Languagecited by 1
  17. 2022Learning what to remembercited by 0
  18. 2024Temporal Graph Memory Networks For Knowledge Tracingcited by 0
  19. 2025Lifting Data-Tracing Machine Unlearning to Knowledge-Tracing for Foundation Modelscited by 0
  20. 2026CAMeR: Keyword-Gated Hybrid Activation for Adaptive Memory Retention in LLM Agentscited by 0