Lune

ICML2021Top-tier venue

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

Sainbayar Sukhbaatar, Da Ju, Spencer Poff, Stephen Roller, Arthur Szlam, Jason Weston, Angela Fan

Abstract

Attention mechanisms have shown promising results in sequence modeling tasks that require longterm memory. Recent work investigated mechanisms to reduce the computational cost of preserving and storing memories (Rae et al., 2020) . 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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

13 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention cites Reformer: The Efficient Transformer
  • Long Range Arena : A Benchmark for Efficient Transformers cites Reformer: The Efficient Transformer
  • Block-Recurrent Transformers cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Block-Recurrent Transformers cites Long Range Arena : A Benchmark for Efficient Transformers
  • Block-Recurrent Transformers cites Reformer: The Efficient Transformer
  • Block-Recurrent Transformers cites Memorizing Transformers
  • Block-Recurrent Transformers cites Language Models are Few-Shot Learners
  • Block-Recurrent Transformers cites Compressive Transformers for Long-Range Sequence Modelling
  • History Compression via Language Models in Reinforcement Learning cites Language Models are Few-Shot Learners
  • History Compression via Language Models in Reinforcement Learning cites Compressive Transformers for Long-Range Sequence Modelling
  • Memorizing Transformers cites Long Range Arena : A Benchmark for Efficient Transformers
  • Memorizing Transformers cites Reformer: The Efficient Transformer
  • Memorizing Transformers cites Language Models are Few-Shot Learners
  • Memorizing Transformers cites Compressive Transformers for Long-Range Sequence Modelling
  • MeMViT: Memory-Augmented Multiscale Vision Transformer for Efficient Long-Term Video Recognition cites Compressive Transformers for Long-Range Sequence Modelling
  • Exposing Attention Glitches with Flip-Flop Language Modeling cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Exposing Attention Glitches with Flip-Flop Language Modeling cites Long Range Arena : A Benchmark for Efficient Transformers
  • Exposing Attention Glitches with Flip-Flop Language Modeling cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers13

  1. Memorizing TransformersYuhuai Wu, Markus Norman Rabe, DeLesley Hutchins, Christian SzegedyICLR 2022 · 231 citations
  2. Block-Recurrent TransformersDeLesley Hutchins, Imanol Schlag, Yuhuai Wu, Ethan Dyer et al.NeurIPS 2022 · 163 citations
  3. MeMViT: Memory-Augmented Multiscale Vision Transformer for Efficient Long-Term Video RecognitionChao-Yuan Wu, Yanghao Li, Karttikeya Mangalam, Haoqi Fan et al.CVPR 2022 · 158 citations
  4. Exposing Attention Glitches with Flip-Flop Language ModelingBingbin Liu, Jordan T. Ash, Surbhi Goel, Akshay Krishnamurthy et al.NeurIPS 2023 · 90 citations
  5. History Compression via Language Models in Reinforcement LearningFabian Paischer, Thomas Adler, Vihang Patil, Angela Bitto-Nemling et al.ICML 2022 · 53 citations

Builds on7

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
  3. Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 citations
  4. Long Range Arena : A Benchmark for Efficient TransformersYi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen et al.ICLR 2021 · 881 citations
  5. Compressive Transformers for Long-Range Sequence ModellingJack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier et al.ICLR 2020 · 833 citations

Related papers

  1. An Evolved Universal Transformer MemoryEdoardo Cetin, Qi Sun, Tianyu Zhao, Yujin TangICLR 2025 · 1 citation
  2. Learning What to Remember: Adaptive Probabilistic Memory Retention for Memory-Efficient Language ModelsS. M. Rafiuddin, Muntaha Nujat KhanEMNLP Findings 2025 · 1 citation
  3. Memo: Training Memory-Efficient Embodied Agents with Reinforcement LearningGunshi Gupta, Karmesh Yadav, Zsolt Kira, Yarin Gal et al.NeurIPS 2025 · 9 citations
  4. Towards mental time travel: a hierarchical memory for reinforcement learning agentsAndrew K. Lampinen, Stephanie C. Y. Chan, Andrea Banino, Felix HillNeurIPS 2021 · 63 citations
  5. ∞-former: Infinite Memory TransformerPedro Henrique Martins, Zita Marinho, André F. T. MartinsACL 2022 · 12 citations
Dusk over the sea between two cliffs drawn in fine vertical lines