arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.24930cs.CL
收藏

H$^{2}$MT: 语义层次感知的层次记忆Transformer

H$^{2}$MT: Semantic Hierarchy-Aware Hierarchical Memory Transformer

University of California, Los Angeles(加州大学洛杉矶分校)

Maryam Haghifam, Zifan He, Jason Cong, Yizhou Sun

AI总结:

提出H$^{2}$MT模型,通过离线构建语义层次结构并利用自底向上的后序聚合计算记忆嵌入,在推理时实现从粗到细的查询路由,从而在长上下文推理中实现质量与效率的权衡。

摘要:

基于Transformer的LLM在许多语言任务上取得了强劲的结果;然而,长输入仍然具有挑战性,因为上下文窗口是有限的,并且预填充延迟和内存随提示长度快速增长。因此,平坦的令牌流处理和基于块的检索可能会在与查询无关的文本上花费大量计算和上下文预算。离线索引的RAG额外引入了外部存储和索引管理开销,并且通常将检索到的证据作为原始文本附加,增加了预填充成本和延迟。H^{2}MT使长上下文推理具有结构感知性:它离线构建语义层次结构,通过自底向上的后序聚合为每个节点计算记忆嵌入,并在推理时从粗到细地路由查询,以早期修剪不相关的分支。在LongBench QA(NarrativeQA、HotpotQA、QASPER)和两个结构化技术文档设置上,H^{2}MT实现了有利的质量效率权衡,与提示压缩、记忆令牌方法和检索增强生成基线相比,在更低的峰值GPU内存和首令牌时间(TTFT)下取得了具有竞争力的ROUGE-L和F1(在适用情况下)。

英文摘要:

Transformer-based LLMs achieve strong results on many language tasks; however, long inputs remain challenging because context windows are finite, and prefill latency and memory grow rapidly with prompt length. Flat token-stream processing and chunk-based retrieval can therefore spend substantial computation and context budget on text unrelated to the query. Offline-indexed RAG additionally introduces external storage and index management overhead, and typically appends retrieved evidence as raw text, increasing prefill cost and latency. H^{2}MT makes long-context inference structure-aware: it builds a semantic hierarchy offline, computes a memory embedding for each node via bottom-up post-order aggregation, and routes queries coarse-to-fine at inference to prune irrelevant branches early. On LongBench QA (NarrativeQA, HotpotQA, QASPER) and two structured technical-document settings, H MT achieves favorable quality efficiency trade-offs, delivering competitive ROUGE-L and F1 (where applicable) with lower peak GPU memory and time-to-first-token (TTFT) than prompt compression, memory-token methods, and retrieval-augmented generation baselines.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑