KAP: Bridging the Knowledge Selection-Runtime Consumption Gap in LLM Systems
作者: Shuo Wang, Fang Xi, Wenyuan Huang, Qing Wang, Junming Su
分类: cs.LG
发布日期: 2026-07-27
备注: 3 figures, 5 tables
💡 一句话要点
提出KAP以解决LLM系统中的知识选择与运行消耗差距问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 知识选择 运行时消耗 大规模语言模型 知识访问规划 长上下文问答 结构化知识 性能优化
📋 核心要点
- 现有LLM系统在知识选择与运行消耗之间存在明显差距,导致解码效率低下。
- 提出知识访问规划(KAP),将结构化知识信号转化为物理执行工件,优化KV访问。
- 实验表明,GraphSpec在长上下文问答任务中,KV访问量减少至5.5%,且保持了答案质量。
📝 摘要(中文)
现代大规模语言模型(LLM)系统越来越依赖于知识选择过程,以生成高价值的结构化先验信息。然而,LLM的服务在本质上对这些丰富的结构视而不见,导致在解码过程中必须密集且均匀地消耗完整的键值(KV)状态,从而增加延迟并降低吞吐量。为了解决这一问题,本文提出了知识访问规划(KAP),通过建立一个通用的中间表示(IR)——运行时访问计划,将结构化知识信号转化为物理执行工件,从而实现知识驱动的运行时消耗。通过GraphSpec的实例化,KAP在长上下文问答任务中显著提高了性能。
🔬 方法详解
问题定义:本文解决的是大规模语言模型(LLM)系统中知识选择与运行消耗之间的差距问题。现有方法在解码过程中对丰富的知识结构缺乏有效利用,导致延迟增加和吞吐量下降。
核心思路:论文提出知识访问规划(KAP),通过将结构化知识信号转化为物理执行工件,优化KV访问,进而提升解码效率。KAP通过建立通用的中间表示(IR),使得知识驱动的运行时消耗成为可能。
技术框架:KAP的整体架构包括知识选择模块、运行时访问计划生成模块和KV访问模块。知识选择模块负责提取结构化知识信号,生成IR;运行时访问计划生成模块则根据IR制定KV访问策略;KV访问模块执行实际的KV访问操作。
关键创新:KAP的主要创新在于将知识选择过程中的结构化信号转化为第一类物理执行工件,打破了传统方法对扁平化提示的依赖,显著提高了运行时的知识利用效率。
关键设计:在KAP中,设计了高效的IR生成算法,确保结构化知识信号能够有效编译为KV访问计划。此外,采用了优化的参数设置和损失函数,以提升模型在长上下文任务中的表现。
🖼️ 关键图片
📊 实验亮点
实验结果显示,GraphSpec在处理4K-128K长上下文问答任务时,答案质量与全上下文解码相当,同时将KV访问量减少至源KV状态的5.5%,显著提高了系统的运行效率。
🎯 应用场景
该研究的潜在应用领域包括智能问答系统、对话生成、信息检索等。通过优化LLM的知识访问方式,KAP能够显著提升系统的响应速度和准确性,具有重要的实际价值和广泛的应用前景。
📄 摘要(原文)
Modern LLM systems increasingly rely on knowledge-selection processes that produce high-value structured priors, such as ranked evidence, graph topology, multimodal alignment, and confidence signals. Yet LLM serving remains fundamentally oblivious to this rich structure: once such signals are serialized into a prompt, the backend observes only a flat token sequence, forcing dense and uniform consumption of the full key-value (KV) state during decoding. We term this architectural mismatch the Knowledge Selection-Runtime Consumption (KSRC) gap: richer contexts enlarge the full-prompt KV footprint and decode-time memory traffic, increasing latency and degrading throughput even when reasoning depends on only a small fraction of the context. To bridge the gap, we propose Knowledge Access Planning (KAP), a paradigm-shifting execution abstraction that elevates structured knowledge priors from passive prompt-construction hints into first-class physical execution artifacts. KAP establishes a universal intermediate representation (IR)-the runtime access plan-which compiles structured knowledge signals to govern physical KV access without altering logical prompt semantics, model weights, or training procedures. Through this IR, KAP shifts LLM serving from token-aware context consumption to plan-driven, knowledge-aware runtime consumption. We instantiate KAP with GraphSpec, a compiler-executor realization connecting structured knowledge selection to an LLM serving backend. We derive a phase-boundary model for the positive-speedup regime of plan-guided execution. Across 4K-128K long-context QA workloads, GraphSpec maintains answer quality comparable to full-context decoding while decoupling physical KV consumption from prompt length, reducing proposal-time KV access to 5.5% of source KV state at 128K, and fundamentally shifting the scaling trajectory of long-context generation.