arXiv cs.CL· Leon Lufkin, Cutter Dawes, Alexander Speicher, Kamesh Krishnamurthy, Tom\'as Figliolia, Beren Millidge·· 11 小时前AI 评分58
ZHA:基于分层树状索引器的次二次注意力方法
Subquadratic Attention with a Hierarchical Tree-Structured Indexer
AI 导读
论文提出 Zyphra Hierarchical Attention(ZHA),一种基于分层树状索引器的渐近次二次稀疏注意力方法。ZHA 在 KV cache 上构建递归压缩的 key 摘要树,查询自顶向下遍历以检索稀疏 key 子集,通过迭代增加树深度使路由与最终注意力的总成本随序列长度次线性增长。
正文 · 原文
Abstract:The quadratic scaling of attention is a fundamental bottleneck limiting the long-context capabilities of large language models (LLMs). A variety of approaches have attempted to circumvent this, but they either fail to match attention's expressiveness (e.g., sliding-window or linear attention variants with fixed-size state) or only achieve constant-factor speedups (e.g., sparse attention methods whose indexers themselves scale quadratically). In this paper, we derive an asymptotically subquadratic sparse attention method based on a hierarchical, tree-structured indexer, which we call Zyphra Hierarchical Attention (ZHA). ZHA constructs a tree of recursively compressed key summaries over the KV cache, which future queries traverse from the top down to retrieve a sparse subset of keys. Crucially, by iteratively growing the tree's depth, the total cost including routing and final attention grows sublinearly in sequence length, resulting in overall subquadratic (but superlinear) scaling for attention. We demonstrate that ZHA can be cheaply applied to existing pretrained models with only a short KL distillation training stage over a few billion tokens, and maintains performance on long-context retrieval and challenging reasoning, mathematical, and agentic coding evaluation tasks. Moreover, we show that our method is highly robust to tree geometry including very deep trees of up to 6 levels. Finally, we develop a detailed performance model and show that our approach scales subquadratically, dramatically outperforms competing methods beyond 1 million context, and ultimately has the potential to extend effective context windows to the hundreds of millions or billions of tokens.
| Comments: | 43 pages |
| Subjects: | Computation and Language (cs.CL); Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2610.42112 [cs.CL] |
| (or arXiv:2610.42112v1 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2610.42112 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Leon Lufkin [view email]
[v1]
Fri, 30 Oct 2026 17:48:37 UTC (18,646 KB)
来源:arXiv cs.CL · arxiv.org