KAP: LLM 시스템에서 지식 선택과 런타임 소비 간의 격차 해소
KAP: Bridging the Knowledge Selection-Runtime Consumption Gap in LLM Systems
최신 LLM(Large Language Model) 시스템은 순위 매기기 증거, 그래프 구조, 멀티모달 정렬 및 신뢰도 신호와 같은 고품질의 구조화된 사전 지식을 생성하는 지식 선택 프로세스에 점점 더 의존하고 있습니다. 그러나 LLM 서비스는 여전히 이러한 풍부한 구조를 완전히 활용하지 못합니다. 이러한 신호가 프롬프트로 직렬화되면, 백엔드는 단순히 평탄한 토큰 시퀀스를 관찰하며, 디코딩 과정에서 전체 키-값(KV) 상태를 밀집적이고 균일하게 소비해야 합니다. 우리는 이러한 아키텍처 불일치를 지식 선택-런타임 소비(KSRC) 격차라고 부릅니다. 풍부한 컨텍스트는 전체 프롬프트 KV 저장 공간과 디코딩 시간의 메모리 트래픽을 증가시켜, 추론이 컨텍스트의 작은 부분에만 의존하는 경우에도 지연 시간을 늘리고 처리량을 저하시킵니다. 이러한 격차를 해소하기 위해, 우리는 지식 접근 계획(KAP)이라는 새로운 실행 추상화를 제안합니다. KAP은 구조화된 지식 사전 정보를 수동적인 프롬프트 구성 힌트가 아닌, 중요한 물리적 실행 요소로 승격시킵니다. KAP은 범용 중간 표현(IR)인 런타임 액세스 계획을 정의하며, 이를 통해 구조화된 지식 신호를 컴파일하여 물리적인 KV 접근을 제어하면서도 논리적인 프롬프트 의미, 모델 가중치 또는 학습 절차를 변경하지 않습니다. 이러한 IR을 통해 KAP은 LLM 서비스를 토큰 기반 컨텍스트 소비에서 벗어나 계획 주도의, 지식 기반 런타임 소비로 전환합니다. 우리는 구조화된 지식 선택과 LLM 서비스 백엔드를 연결하는 컴파일러-실행기 구현인 GraphSpec으로 KAP을 구현했습니다. 또한, 계획 기반 실행의 성능 향상 단계를 분석하는 모델을 도출했습니다. 4K에서 128K 길이의 컨텍스트 질의 응답 작업에서, GraphSpec은 전체 컨텍스트 디코딩과 비교할 만한 답변 품질을 유지하면서 물리적인 KV 소비를 프롬프트 길이에 독립적으로 만들고, 128K에서 원본 KV 상태의 5.5% 수준으로 제안 시간 KV 접근을 줄이며, 장문 생성의 확장 경로를 근본적으로 변화시킵니다.
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.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.