MELODI: Exploring Memory Compression for Long Contexts

Yinpeng Chen, DeLesley S. Hutchins, A. Jansen, Andrey Zhmoginov, David Racz +1 more
2/12/2026

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

We present MELODI, a novel memory architecture designed to efficiently process long documents using short context windows. The key principle behind MELODI is to represent short-term and long-term memory as a hierarchical compression scheme across both network layers and context windows. Specifically, the short-term memory is achieved through recurrent compression of context windows across multiple layers, ensuring smooth transitions between windows. In contrast, the long-term memory performs further compression within a single middle layer and aggregates information across context windows, effectively consolidating crucial information from the entire history. Compared to a strong baseline - the Memorizing Transformer employing dense attention over a large long-term memory (64K key-value pairs) - our method demonstrates superior performance on various long-context datasets while remarkably reducing the memory footprint by a factor of 8.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{chen2026melodi,
  title  = {MELODI: Exploring Memory Compression for Long Contexts},
  author = {Yinpeng Chen and DeLesley S. Hutchins and A. Jansen and Andrey Zhmoginov and David Racz and J. Andersen},
  year   = {2026},
  eprint = {2410.03156},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.03156},
  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.03156.svg)](https://codeofpaper.com/paper/2410.03156)

Discussion