cs.LGMar 21, 2026

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

Authors: Dong Liu, Yanxuan Yu, Ben Lengerich, Ying Nian Wu

Organizations: University of California, Los Angeles, Los Angeles, California, USA · Columbia University, New York, New York, USA · University of Wisconsin-Madison, Madison, Wisconsin, USA

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 improved efficiency. Experiments on different sequence lengths show that FastMKA achieves a favorable accuracy-efficiency trade-off: comparable perplexity to MLA while achieving up to 5x faster training throughput and 1.8x lower evaluation latency. These results highlight MKA as a practical and extensible framework for efficient long-context attention.

Figures & tables

Explore similar work

CardsList
  1. Fast KV Compaction via Attention Matching

    Feb 18, 2026Adam Zweiger, Xinghong Fu, Han Guo +1KV-Cache ManagementKV-Cache Compression

  2. MAC-Attention: a Match-Amend-Complete Scheme for Fast and Accurate Attention Computation

    Mar 31, 2026Jinghan Yao, Sam Adé Jacobs, Walid Krichene +2LLM Inference AccelerationEfficient Attention

  3. Latent-Condensed Transformer for Efficient Long Context Modeling

    Apr 14, 2026Zeng You, Yaofo Chen, Qiuwu Chen +5Long-Context Language ModelingLLM Inference Acceleration