Lune

ACL2022Top-tier venue

∞-former: Infinite Memory Transformer

Pedro Henrique Martins, Zita Marinho, André F. T. Martins

Abstract

Transformers are unable to model long-term memories effectively, since the amount of computation they need to perform grows with the context length. While variations of efficient transformers have been proposed, they all have a finite memory capacity and are forced to drop old information. In this paper, we propose the ∞-former, which extends the vanilla transformer with an unbounded longterm memory. By making use of a continuousspace attention mechanism to attend over the long-term memory, the ∞-former's attention complexity becomes independent of the context length, trading off memory length with precision. In order to control where precision is more important, ∞-former maintains "sticky memories," being able to model arbitrarily long contexts while keeping the computation budget fixed. Experiments on a synthetic sorting task, language modeling, and document grounded dialogue generation demonstrate the ∞-former's ability to retain information from long sequences. 1

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.

17 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
  • MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agent cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Memory Consolidation Enables Long-Context Video Understanding cites Compressive Transformers for Long-Range Sequence Modelling
  • Recurrent Memory Transformer cites Compressive Transformers for Long-Range Sequence Modelling
  • LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding cites Compressive Transformers for Long-Range Sequence Modelling
  • Training Language Models with Memory Augmentation cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Training Language Models with Memory Augmentation cites Generalization through Memorization: Nearest Neighbor Language Models
  • Training Language Models with Memory Augmentation cites Language Models are Few-Shot Learners
  • Training Language Models with Memory Augmentation cites Compressive Transformers for Long-Range Sequence Modelling
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers17

  1. Recurrent Memory TransformerAydar Bulatov, Yuri Kuratov, Mikhail BurtsevNeurIPS 2022 · 252 citations
  2. MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory AgentHongli Yu, Tinghong Chen, Jiangtao Feng, Jiangjie Chen et al.ICLR 2026 · 231 citations
  3. LongBench: A Bilingual, Multitask Benchmark for Long Context UnderstandingYushi Bai, Xin Lv, Jiajie Zhang, Hongchang Lyu et al.ACL 2024 · 94 citations
  4. Memory Consolidation Enables Long-Context Video UnderstandingIvana Balazevic, Yuge Shi, Pinelopi Papalampidi, Rahma Chaabouni et al.ICML 2024 · 52 citations
  5. Training Language Models with Memory AugmentationZexuan Zhong, Tao Lei, Danqi ChenEMNLP 2022 · 52 citations

Builds on13

  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. Generalization through Memorization: Nearest Neighbor Language ModelsUrvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer et al.ICLR 2020 · 1,038 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. ∞-Video: A Training-Free Approach to Long Video Understanding via Continuous-Time Memory ConsolidationSaul José Rodrigues dos Santos, António Farinhas, Daniel C. McNamee, André F. T. MartinsICML 2025
  2. Unlimiformer: Long-Range Transformers with Unlimited Length InputAmanda Bertsch, Uri Alon, Graham Neubig, Matthew GormleyNeurIPS 2023 · 176 citations
  3. Efficient Long-Range Transformers: You Need to Attend More, but Not Necessarily at Every LayerQingru Zhang, Dhananjay Ram, Cole Hawkins, Sheng Zha et al.EMNLP Findings 2023 · 18 citations
  4. ABC: Attention with Bounded-memory ControlHao Peng, Jungo Kasai, Nikolaos Pappas, Dani Yogatama et al.ACL 2022 · 31 citations
  5. Nyströmformer: A Nyström-based Algorithm for Approximating Self-AttentionYunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan et al.AAAI 2021 · 675 citations
Dusk over the sea between two cliffs drawn in fine vertical lines