Jump to Content

MELODI: Exploring Memory Compression for Long Contexts

Published
View publication

Abstract

We present MELODI, a novel memory architecture designed to efficiently process long documents using short context windows. The central concept behind MELODI is to represent short-term and long-term memory as a hierarchical compression scheme across both network layers and context windows. Specifically, short-term memory is achieved through recurrent compression of context window 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, thereby 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 reducing the memory footprint by a factor of 8.

Authors

Yinpeng Chen, DeLesley Hutchins, Aren Jansen, Andrey Zhmoginov, David Racz, Jesper Andersen

Venue

ICLR 2025