CommitKV: 커밋 전환을 통한 라이프사이클 인식 키-값 캐시 압축 - 다중 회전 에이전트용
CommitKV: Lifecycle-Aware KV Cache Compression via Commit Transitions for Multi-Turn Agents
다중 회전 추론 및 행동(ReAct) 에이전트는 추론 과정, 도구 호출 및 관찰 데이터의 방대한 트레이커리를 축적합니다. 이러한 트레이커리는 키-값(KV) 캐시를 증가시켜 모델 추론 시 메모리 사용량과 어텐션 비용을 높입니다. 기존의 KV 캐시 압축 방법은 낮은 어텐션 점수를 가진 상태를 제거하여 이러한 비용을 줄입니다. 그러나 현재 회전에서 낮은 어텐션을 받는다고 해서 미래에도 중요하지 않다는 것을 의미하지 않습니다. 일시적으로 비활성인 정보는 나중에 중요한 역할을 할 수 있기 때문입니다. 따라서 스냅샷 기반의 제거 방법은 일시적으로 비활성화된 정보와 역할이 완료된 것으로 보이는 정보를 명확하게 구분하지 못합니다. 본 논문에서는 커밋 전환을 통해 KV 라이프사이클을 식별하는 CommitKV를 제안합니다. 구체적으로, CommitKV는 먼저 완료된 에이전트 이벤트를 토큰 페이지로 나누고, 도구 호출 커밋 전과 커밋으로 반환된 관찰 데이터가 통합된 후의 각 페이지에 대한 삭제 효과를 비교합니다. 이러한 쌍을 이루는 측정값을 기반으로, CommitKV는 일시적으로 비활성화된 페이지와 역할 완료 가능성이 높은 페이지를 구별합니다. 그런 다음, CommitKV는 탐욕적인 방식으로 결합 테스트를 수행하여, 후보 페이지들의 커밋 후 영향이 특정 경계를 넘지 않는 경우에만 해당 페이지들을 제거 대상으로 선정합니다. 마지막으로, 이후의 압축 시점에서 선정된 페이지들은 제외되고, 커밋 후 측정 대기 중인 페이지 집합은 보호되며, 나머지 KV 상태는 동일한 토큰 인덱스를 사용하여 키, 값 및 절대 위치를 유지하면서 캐시 예산 내에 보관됩니다. 이러한 메커니즘을 통해 CommitKV는 일시적으로 비활성화된 정보와 역할이 완료되어 안전하게 제거될 수 있는 정보를 구분할 수 있습니다. 다양한 벤치마크 실험 결과, CommitKV는 에이전트의 메모리 사용량을 줄이고, 엔드-투-엔드 추론 속도를 가속화하며, 기존 KV 캐시 압축 방법보다 더 높은 정확도를 달성함을 보여줍니다.
Multi-turn Reasoning-and-Acting (ReAct) agents accumulate growing trajectories of reasoning, tool calls, and observations. Their key-value (KV) caches grow accordingly, increasing memory use and attention cost during model inference. Existing KV cache compression methods reduce these costs by evicting states with low attention scores. However, low attention in the current turn does not imply future irrelevance, as temporarily inactive information may become important later. Snapshot-based eviction methods therefore do not explicitly distinguish temporarily dormant information from information that appears to have completed its role. In this paper, we present CommitKV, which identifies KV lifecycles through commit transitions. Specifically, CommitKV first divides completed agent events into token pages and compares each eligible page's deletion effect before a tool-call commit and after the commit's returned observation has been incorporated. Based on these paired measurements, CommitKV distinguishes dormant pages from high-to-low completion candidates. It then applies a greedy joint test, accepting candidates for retirement only when their combined post-commit effect remains bounded. Finally, at a later compression checkpoint, accepted pages are excluded, a bounded set of pages awaiting post-commit measurement is protected, and the remaining KV states are retained within the cache budget using the same token indices for keys, values, and absolute positions. These mechanisms ensure that CommitKV can distinguish dormant information from information that has completed its observed role and can be safely removed. Experiments on various benchmarks show that CommitKV reduces agent memory use, accelerates end-to-end inference, and achieves higher accuracy than existing KV cache compression methods.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.