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

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Liu, Dong, Yu, Yanxuan, Lengerich, Ben, Wu, Ying Nian
Format: Preprint
Publié: 2026
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866911540439941120
author Liu, Dong
Yu, Yanxuan
Lengerich, Ben
Wu, Ying Nian
author_facet Liu, Dong
Yu, Yanxuan
Lengerich, Ben
Wu, Ying Nian
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2603_20586
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle MKA: Memory-Keyed Attention for Efficient Long-Context Reasoning
Liu, Dong
Yu, Yanxuan
Lengerich, Ben
Wu, Ying Nian
Machine Learning
Artificial Intelligence
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.
title MKA: Memory-Keyed Attention for Efficient Long-Context Reasoning
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2603.20586