MKA: Memory-Keyed Attention for Efficient Long-Context Reasoning

Read full text
Authors: Dong Liu, Yang Yu, Benjamin J. Lengerich, Ying Nian Wu
Cited by: 1
References: 6

Abstract

As long-context language modeling becomes increasingly important, the cost of maintaining and attending to large Key/Value (KV) caches grows rapidly, becoming a major bottleneck in both training and inference. While prior works such as Multi-Query Attention (MQA) and Multi-Latent Attention (MLA) reduce memory by sharing or compressing KV features, they often trade off representation quality or incur runtime overhead. We propose Memory-Keyed Attention (MKA), a hierarchical attention mechanism that integrates multi-level KV caches—local, session, and long-term—and learns to route attention across them dynamically. We further introduce Route-Fused MKA (FastMKA), a broadcast-routed variant that fuses memory sources before attention computation for enhanced efficiency. Experiments on different sequence lengths show that FastMKA achieves a favorable accuracy-efficiency trade-off: comparable perplexity to MLA while achieving up to 5 × faster training throughput and 1.8 × lower evaluation latency. These results highlight MKA as a practical and extensible framework for efficient long-context attention.

Fields of Study & Subjects

Machine Learning in Healthcare Topic Modeling Natural Language Processing Techniques

Publication details

Journal / source
Proceedings of the 23rd ACM International Conference on Computing Frontiers
Publisher
ACM
Pages
280–289
Publication date
19 May 2026