An Evolved Universal Transformer Memory

Edoardo Cetin, Qi Sun, Tianyu Zhao, Yujin Tang
2/12/2026

No official code found. Best implementation: SakanaAI/evo-memory (361 stars, last commit 2024-10-22). 1 more below.

Abstract

Prior methods propose to offset the escalating costs of modern foundation models by dropping specific parts of their contexts with hand-designed rules, while attempting to preserve their original performance. We overcome this trade-off with Neural Attention Memory Models (NAMMs), introducing a learned network for memory management that improves both the performance and efficiency of transformers. We evolve NAMMs atop pre-trained transformers to provide different latent contexts focusing on the most relevant information for individual layers and attention heads. NAMMs are universally applicable to any model using self-attention as they condition exclusively on the values in the produced attention matrices. Learning NAMMs on a small set of problems, we achieve substantial performance improvements across multiple long-context benchmarks while cutting the model's input contexts up to a fraction of the original sizes. We show the generality of our conditioning enables zero-shot transfer of NAMMs trained only on language to entirely new transformer architectures even across input modalities, with their benefits carrying over to vision and reinforcement learning.

View on arXivView PDF

Code Implementations(2)

SakanaAI/evo-memoryCommunity100%

Code to train and evaluate Neural Attention Memory Models to obtain universally-applicable memory systems for transformers.

36139PythonOct 17, 20241 years ago
evolutionary-algorithmslarge-language-modelsmachine-learningtransformers
kyegomez/Open-NAMMCommunity72%
MIT

An open source implementation of the paper: "AN EVOLVED UNIVERSAL TRANSFORMER MEMORY"

71PythonDec 10, 20241 years agoMIT
agoraagoralabaiarxvivattention+10 more

Similar Papers

Cite this paper

@article{cetin2026evolved,
  title  = {An Evolved Universal Transformer Memory},
  author = {Edoardo Cetin and Qi Sun and Tianyu Zhao and Yujin Tang},
  year   = {2026},
  eprint = {2410.13166},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.13166},
  journal = {ICLR 2024 2024}
}

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/2410.13166.svg)](https://codeofpaper.com/paper/2410.13166)

Discussion