LM2: Large Memory Models

Jikun Kang, Wenqi Wu, Filippos Christianos, Alex J. Chan, Fraser Greenlee +3 more
2/9/2025
15 citations
cs.CLcs.AI
transformer-attention

Official code: convergence-ai/lm2 (49 stars, Python, last commit 2025-02-13).

Abstract

This paper introduces the Large Memory Model (LM2), a decoder-only Transformer architecture enhanced with an auxiliary memory module that aims to address the limitations of standard Transformers in multi-step reasoning, relational argumentation, and synthesizing information distributed over long contexts. The proposed LM2 incorporates a memory module that acts as a contextual representation repository, interacting with input tokens via cross attention and updating through gating mechanisms.

Show full abstract

To preserve the Transformers general-purpose capabilities, LM2 maintains the original information flow while integrating a complementary memory pathway. Experimental results on the BABILong benchmark demonstrate that the LM2model outperforms both the memory-augmented RMT model by 37.1% and the baseline Llama-3.2 model by 86.3% on average across tasks. LM2 exhibits exceptional capabilities in multi-hop inference, numerical reasoning, and large-context question-answering. On the MMLU dataset, it achieves a 5.0% improvement over a pre-trained vanilla model, demonstrating that its memory module does not degrade performance on general tasks. Further, in our analysis, we explore the memory interpretability, effectiveness of memory modules, and test-time behavior. Our findings emphasize the importance of explicit memory in enhancing Transformer architectures.

View on arXivView PDF

Code Implementations(1)

convergence-ai/lm2Official100%

Official repo of paper LM2

4912Python, ShellFeb 13, 20251 years agoNOASSERTION

Similar Papers

Cite this paper

@article{kang2025lm,
  title  = {LM2: Large Memory Models},
  author = {Jikun Kang and Wenqi Wu and Filippos Christianos and Alex J. Chan and Fraser Greenlee and George Thomas and Marvin Purtorab and Andy Toulis},
  year   = {2025},
  eprint = {2502.06049},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.06049v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.06049.svg)](https://codeofpaper.com/paper/2502.06049)

Discussion