[논문리뷰] Cache Engineering for Agents
링크: 논문 PDF로 바로 열기
The paper "Cache Engineering for Agents" by Tianyu Fu, Ruoxi Wang, Zihan Min, Zhongqi Ren, Zhihao Li, Tengxuan Liu, Shengxu Mu, Hanling Zhang, and Yu Wang proposes a novel approach to manage the Key-Value (KV) cache in Large Language Model (LLM) agents.
First, I need to extract the authors and suitable keywords.
Authors: Tianyu Fu, Ruoxi Wang, Zihan Min, Zhongqi Ren, Zhihao Li, Tengxuan Liu, Shengxu Mu, Hanling Zhang, Yu Wang. I will format this as requested.
Keywords: Looking for 5-8 academic terms.
LLM Agents, Cache Engineering, KV Cache, Serving Systems, Radix Tree, Segment-batch Attention, Recursive Self-Improvement, Inference Optimization.
Next, I'll go through each section of the summary.
Part 1: Summary Body
1. Key Terms & Definitions
- KV Cache: Key-Value Cache는 LLM inference 과정에서 이전에 계산된 token들의 key와 value state를 저장하여 재계산을 피하고 연산 효율을 높이는 메모리 구조입니다.
- Context Engineering: LLM agent의 긴 trajectory에서 cost를 줄이고 context length 제한을 피하기 위해 interaction history를 trimming하거나 summarization하는 기존 방법론입니다.
- Cache Engineering: Agent가 직접 active KV cache를 control할 수 있도록 하는 새로운 scheme으로, trajectory를 수정하지 않고도 selected KV entry를 future attention에서 제외하거나 retained key의 position encoding을 조정합니다.
- Drop Operation: Cache Engineering에서 selected KV entry를 future attention에서 제외하는 작업입니다.
- Repos Operation: Cache Engineering에서 retained key의 position encoding을 조정하는 작업입니다.
- AKV Serving System: Cache Engineering을 지원하기 위해 co-design된 시스템으로, stateless interface를 제공하면서 history-dependent cache reuse, eviction, restoration을 내부적으로 관리합니다.
- Segment-batch Attention: AKV Serving System에서 missing cache states를 single prefill pass로 효율적으로 restore하는 데 사용되는 attention 메커니즘입니다.
- Radix Tree: AKV Serving System에서 history-dependent cache states의 correct reuse와 timely eviction을 위해 확장된 prefix matching tree 구조입니다.
2. Motivation & Problem Statement
본 논문은 Large Language Model (LLM) agents가 긴 trajectory를 처리할 때 발생하는 Key-Value (KV) cache의 cost 증가 및 task accuracy 저하 문제를 해결하고자 한다. LLM agent의 trajectory가 길어질수록 KV cache I/O 및 storage가 지배적인 cost가 되며, trajectory가 LLM의 maximum context length를 초과하면 active cache growth에 대한 제어가 필수적이다. 기존 Context Engineering 방식은 history를 trimming하거나 summarization하여 cache size를 줄이지만, trajectory prefix를 수정하면 subsequent cached states를 invalidation하고 retained context의 re-prefilling이라는 비용이 많이 드는 작업을 유발한다. 또한, re-prefill cost를 줄이기 위해 너무 적은 context를 retention하면 task accuracy가 손상될 수 있는 trade-off 문제가 존재한다. 이러한 기존 접근 방식의 한계는 re-prefill cost와 task accuracy 사이의 딜레마를 야기하며, agent 실행의 효율성과 신뢰성을 위해 active KV cache에 대한 섬세한 제어가 필요함을 시사한다.
3. Method & Key Results
저자들은 LLM agent가 active KV cache를 직접 control할 수 있도록 Cache Engineering이라는 새로운 scheme을 제안한다. 이 방법론은 trajectory를 수정하거나 retained context를 re-prefilling하지 않고도 선택된 KV entry를 future attention에서 제외(drop)하고, retained key의 position encoding을 조정(repos)한다. Cache Engineering은 append, drop, repos 세 가지 cache operation을 통해 구현되며, agent는 이 operation들을 interleaved하여 active cache를 shaping한다. 이러한 history-dependent cache operation의 복잡성을 처리하기 위해, 저자들은 AKV serving system을 co-design했다. AKV는 stateless interface를 제공하면서 extended radix tree를 통해 history-dependent cache states의 correct reuse와 timely eviction을 관리하고, segment-batch attention을 사용하여 missing states를 single prefill pass로 효율적으로 restoration한다.
실험 결과, AKV는 기존 summarization 기반 Context Engineering 대비显著한 성능 향상을 보였다. GPT-OSS-120B, MiniMax-M2.7, MiroThinker-1.7-Mini 세 가지 LLM과 네 가지 agent benchmark (BCP, GAIA-Text, SWE-Verified, xbench-DS)에 걸쳐, tool-response rolling-drop cache policy는 평균 benchmark score를 1.7 points 향상시키고, 평균 cost를 27.7% 절감했다. AKV serving system을 활용했을 때, output throughput은 최대 1.2배 증가했으며, P95 request latency는 1.5배 빨라졌다. 특히, AKV는 기존 baseline의 summarization threshold를 넘어선 long-horizon task에서 accuracy를 더 잘 유지했다. 또한, Recursive Self-Improvement (RSI) 기반 cache policy는 expert design 대비 추가적으로 7.1%의 cost 절감을 달성하며, agent가 cache engineering strategy를 탐색하고 개선할 수 있음을 입증했다.
4. Conclusion & Impact
본 논문은 agent가 active KV state를 직접 관리하고 recomputation 없이 retained cache를 재사용할 수 있는 Cache Engineering을 도입했다. 저자들은 이를 지원하기 위해 stateless interface, extended radix tree, 그리고 segment-batch attention을 특징으로 하는 AKV serving system을 co-design하여 efficient cache reuse, eviction, restoration을 가능하게 했다. 이 연구는 agent benchmark에서 평균 task performance를 향상시키고 inference cost를 절감했으며, AKV를 통해 이러한 효율성 이득이 더 높은 serving throughput과 낮은 latency로 이어진다는 것을 보여주었다. Cache Engineering은 LLM agent의 long-horizon task 처리 능력을 향상시키고, inference cost를 최적화하며, 더 복잡하고 자율적인 agent 시스템 개발에 중요한 기반을 제공하는 학술적 및 산업적 시사점을 갖는다.
Now, for Part 2: Important Figure Information. I will parse the HTML content to find up to 3 suitable figures and their URLs.
Looking for images with src attributes.
- Figure 1: Full-context inference, context engineering, and cache engineering.
- Figure 2: Attention over history.
- Figure 3: GPT-OSS-120B accuracy and cost on 100 BCP tasks.
- Figure 4: Recursive self-improvement on cache engineering policy, evaluated on the BCP benchmark with MiniMax-M2.7 LLM.
- Figure 5: Cache operation trajectories and history-dependent KV states.
- Figure 6: Illustrative AKV request.
- Figure 7: BCP accuracy by length with GPT-OSS-120B.
- Figure 8: repos in the KV pool and radix tree.
- Figure 9: Task performance and serving throughput with GPT-OSS-120B on SWE-bench Verified.
- Figure 10: Restore with segment-batch attention.
- Figure 11: Encoding drop and reposition histories in the extended radix tree.
- Figure 12: Latency breakdown.
- Figure 13: Cost breakdown.
- Figure 14: Active context length by turn.
- Figure 15: Attention density across message history.
Good candidates:
- Figure 1: Full-context inference, context engineering, and cache engineering. (Conceptual overview)
src="2610.28577v1/x1.png"->https://arxiv.org/html/2610.28577v1/x1.png - Figure 5: Cache operation trajectories and history-dependent KV states. (Methodology detail, history-dependency)
src="2610.28577v1/x5.png"->https://arxiv.org/html/2610.28577v1/x5.png - Figure 9: Task performance and serving throughput with GPT-OSS-120B on SWE-bench Verified. (Key Results)
src="2610.28577v1/x9.png"->https://arxiv.org/html/2610.28577v1/x9.png
Let's verify the citations in the body.
- [Figure 1] referenced in Section 1 (Motivation) and Section 3.3.
- [Figure 4] is referenced in Section 3.2, but I selected Figure 9 for the results. I should reference Figure 9 and update the text related to Figure 4.
- I will replace references to Figure 4 in the Method & Key Results section with Figure 9 where quantitative results are mentioned. Figure 4 is about Recursive self-improvement, which is a key result but perhaps Figure 9 (overall performance and throughput) is more central.
- Let's double check Figure 4: "Figure 4: Recursive self-improvement on cache engineering policy, evaluated on the BCP benchmark with MiniMax-M2.7 LLM." This is a key result for RSI.
- Let's check Figure 3: "GPT-OSS-120B accuracy and cost on 100 BCP tasks." This is also a key result.
- Let's pick: Figure 1 (Overall Concept), Figure 5 (Core Problem/Methodology), Figure 9 (Overall Performance Results).
- Figure 4 is also a good result but Figure 9 provides a more comprehensive overview of performance and efficiency. I will make sure Figure 4 is correctly cited if it was to be used.
- Okay, let's re-evaluate figure citations:
- Figure 1 is in Introduction, explaining the concept of cache engineering. Used in Motivation, 3.3.
- Figure 5 illustrates history-dependent KV states, crucial for understanding AKV design. Used in Motivation, 4.2.2.
- Figure 9 showcases task performance and serving throughput. Used in Efficiency.
- The original text referred to Figure 4 multiple times in 3.2 ("Design Motivation") which supports "Why modify the cache directly" and "Which parts of the cache to retain". It's a key supporting figure for the design motivation. I should keep Figure 4 in the summary if it's referenced multiple times in the body.
Let's select:
- Figure 1: Full-context inference, context engineering, and cache engineering. (Conceptual Overview)
- Figure 5: Cache operation trajectories and history-dependent KV states. (Core Methodology)
- Figure 9: Task performance and serving throughput with GPT-OSS-120B on SWE-bench Verified. (Key Results)
I will ensure my text references these three figures appropriately and only these three figures. I'll check the current citations.
- Section 2 (Motivation): "As shown in Figure, KV cache reads take up 82.4% of the total API cost." This refers to Figure 14, not selected. I must remove this or find an alternative. I will remove specific percentage and generally refer to cost issues without figure citation if Figure 14 is not selected. Let's make it general.
- Section 2 (Motivation): "As shown in Figure, instead of modifying the text trajectory..." - OK, Figure 1 is selected.
- Section 2 (Motivation): "...As shown in Figure, trajectories ① and ② both retain KV entries for B and C..." - OK, Figure 5 is selected.
- Section 3 (Method): "...As shown in Table, AKV achieves the highest average success rates across three models, improving the average success rate by 1.3–2.1% and 0.9–8.7% compared with two baselines, respectively." - Table 1 is not a figure. I should cite the actual Table 1. Oh, the instruction says "Part 2에서 선별한 Figure/Table만 [Figure N] 또는 [Table N]으로 참조하세요. 선별하지 않은 것은 번호로 언급하지 마세요." I am only selecting figures, not tables. So, I need to remove
[Table 1]reference from the Method section and just mention the results in text without citing a specific table number. - Section 3 (Method): "...AKV (C=14C=14) achieves 1.36×1.36\times and 1.51×1.51\times speedups in mean and P95 request latency over Standard (C=12C=12), respectively. Input and output throughput are 1.53×1.53\times and 1.18×1.18\times those of Standard." This references Table 2, which I am not selecting. I need to remove the Table 2 reference.
- Section 3 (Method): "Figure(a) ... Figure(b) ... Figure(c) shows higher peak serving throughput..." - OK, Figure 9 is selected.
I will adjust the text to remove non-selected Figure/Table citations and make sure the selected figures are cited at least once.
Revised citation check for selected figures:
- Figure 1:
- "As shown in Figure, instead of modifying the text trajectory, it excludes only selected KV entries from future attention, and reuses all retained KV states without re-prefill." - Used in Motivation.
- Figure 5:
- "As shown in Figure, trajectories ① and ② both retain KV entries for B and C, but C’s KV is computed with attention to A only in ①, due to the different ordering of drop and append operations." - Used in Motivation.
- Figure 9:
- "As shown in Figure(a), AKV reaches the highest final pass rate in the least GPU time." - Used in Method & Key Results.
- "Figure(b) shows that AKV continues to improve its pass rate as cumulative logical input tokens increase, ultimately outperforming both baselines." - Used in Method & Key Results.
- "Figure(c) shows higher peak serving throughput, allowing AKV to process these trajectories faster." - Used in Method & Key Results.
This looks good. All 3 selected figures are referenced. I will now assemble the full response.저자: Tianyu Fu, Ruoxi Wang, Zihan Min, Zhongqi Ren, Zhihao Li, Tengxuan Liu, Shengxu Mu, Hanling Zhang, Yu Wang, et al.
1. Key Terms & Definitions
- KV Cache: Large Language Model (LLM) inference 시 이전에 계산된 토큰들의 Key 및 Value state를 저장하여 재계산을 방지하고 연산 효율을 높이는 메모리 구조입니다.
- Context Engineering: LLM Agent의 긴 trajectory에서 cost를 줄이고 context length 제한을 극복하기 위해 interaction history를 trimming하거나 summarization하는 기존 방법론입니다.
- Cache Engineering: Agent가 active KV cache를 직접 control할 수 있도록 하는 새로운 scheme으로, trajectory를 수정하지 않고도 selected KV entry를 future attention에서 제외하거나 retained key의 position encoding을 조정합니다.
- Drop Operation: Cache Engineering에서 selected KV entry를 future attention으로부터 명시적으로 제외하는 cache operation입니다.
- Repos Operation: Cache Engineering에서 retained key들의 position encoding을 재조정하는 cache operation으로, LLM의 position limit을 넘어선 탐색을 가능하게 합니다.
- AKV Serving System: Cache Engineering을 지원하기 위해 공동 설계된 serving system으로, stateless interface를 제공하면서 history-dependent cache reuse, eviction, restoration을 내부적으로 효율적으로 관리합니다.
- Segment-batch Attention: AKV Serving System에서 missing cache states를 single prefill pass로 효율적으로 restoration하기 위해 사용되는 attention 메커니즘입니다.
- Radix Tree: AKV Serving System에서 history-dependent cache states의 correct reuse 및 timely eviction을 위해 확장된 prefix matching tree 구조입니다.
2. Motivation & Problem Statement
본 논문은 Large Language Model (LLM) agents가 점점 더 복잡한 long trajectory tasks를 수행함에 따라 발생하는 Key-Value (KV) cache의 비효율성 및 task accuracy 저하 문제를 해결하고자 한다. Agent trajectory가 길어질수록 KV cache I/O 및 storage는 inference cost의 지배적인 요인이 되며, LLM의 maximum context length를 초과하는 trajectory는 active cache growth에 대한 세밀한 제어를 요구한다. 기존의 Context Engineering 방법론은 history를 trimming하거나 summarization하여 cache size를 줄이지만, 이는 trajectory prefix를 수정함으로써 subsequent cached states를 invalidation하고 retained context의 costly re-prefill을 유발한다. 이러한 재계산 비용을 줄이기 위해 과도하게 context를 줄이면 task accuracy가 심각하게 저하될 수 있는 딜레마가 발생하며, 이는 기존 접근 방식의 본질적인 한계로 작용한다. Figure은 기존 Context Engineering이 텍스트 트레젝토리를 수정하여 재계산이 필요한 반면, Cache Engineering은 텍스트는 유지하고 KV만 조작하는 개념을 보여준다. 또한, Figure에서 볼 수 있듯이, 동일한 토큰 시퀀스라도 drop 및 append operation의 순서에 따라 다른 cache state를 생성할 수 있어, 단순히 prefix matching만으로는 정확한 cache reuse가 불가능한 serving challenge를 야기한다. 따라서, agent 실행의 효율성과 신뢰성을 보장하기 위해 active KV cache에 대한 직접적이고 유연한 제어 메커니즘이 절실히 필요하다.
3. Method & Key Results
저자들은 LLM agent가 active KV cache를 직접 control하고, retained cache를 recomputation 없이 재사용할 수 있도록 Cache Engineering이라는 새로운 scheme을 제안한다. 이 방법론은 trajectory를 수정하지 않고도 drop operation을 통해 선택된 KV entry를 future attention에서 제외하고, repos operation을 통해 retained key의 position encoding을 조정한다. Cache Engineering은 append, drop, repos 세 가지 기본적인 cache operation으로 구성되며, agent는 이들을 실행 흐름에 따라 interleaving하여 active cache를 동적으로 shaping한다. 이러한 history-dependent cache operation의 복잡성을 효과적으로 관리하기 위해, 저자들은 AKV serving system을 공동 설계했다. AKV는 기존 serving API와 호환되는 stateless interface를 제공하며, 내부적으로는 extended radix tree를 활용하여 history-dependent cache states의 정확한 reuse와 timely eviction을 관리한다. 또한, segment-batch attention 메커니즘을 통해 missing cache states를 single prefill pass로 효율적으로 restoration할 수 있도록 한다.
실험 결과, AKV는 기존 summarization 기반 Context Engineering 대비 탁월한 성능과 효율성 향상을 입증했다. MiniMax-M2.7, GPT-OSS-120B, MiroThinker-1.7-Mini 세 가지 LLM과 BrowseComp-Plus (BCP), GAIA-Text, SWE-Verified, xbench-DeepSearch-2510 네 가지 agent benchmark에 걸쳐, 간단한 tool-response rolling-drop cache policy는 평균 benchmark score를 1.7 points 향상시키고, 평균 cost를 27.7% 절감했다. AKV serving system은 이러한 효율성 이득을 실제 시스템 성능으로 전환하여, output throughput을 최대 1.2배 증가시켰으며, P95 request latency를 1.5배 단축했다. Figure는 SWE-bench Verified 벤치마크에서 GPT-OSS-120B를 사용한 AKV가 가장 높은 pass rate를 달성하고 가장 적은 GPU 시간을 소비하며, 누적 logical input tokens 증가에 따라 pass rate가 지속적으로 향상되고 더 높은 peak serving throughput을 제공함을 보여준다. 또한, Recursive Self-Improvement (RSI) 기반 cache policy는 expert design 대비 추가적으로 7.1%의 cost 절감을 달성하며, agent가 스스로 cache engineering 전략을 탐색하고 정제할 수 있는 가능성을 제시했다.
4. Conclusion & Impact
본 논문은 agent가 active Key-Value (KV) state를 직접 관리하고 recomputation 없이 retained cache를 효율적으로 재사용할 수 있는 Cache Engineering이라는 혁신적인 패러다임을 제안한다. 이를 뒷받침하기 위해 저자들은 stateless interface, 확장된 radix tree, 그리고 segment-batch attention을 핵심 요소로 하는 AKV serving system을 공동 설계하여, history-dependent cache states의 효율적인 reuse, eviction, restoration을 가능하게 했다. Agent benchmark 전반에 걸친 실험은 Cache Engineering이 평균 task performance를 향상시키면서 inference cost를 크게 절감하며, AKV 시스템이 이러한 효율성 이점을 더 높은 serving throughput과 낮은 latency로 실제 환경에 적용할 수 있음을 입증했다. 이 연구는 LLM agent의 long-horizon task 처리 능력을 향상시키고, 컴퓨팅 자원 최적화를 통해 더욱 복잡하고 자율적인 agent 시스템의 개발을 가속화할 수 있는 중요한 학술적 및 산업적 시사점을 제공한다.
⚠️ 알림: 이 리뷰는 AI로 작성되었습니다.
관련 포스트
- [논문리뷰] Harness^2: Recursive Agent Harnessing for an Open World
- [논문리뷰] ReSAIL: Mitigating Collapse in Iterative Agent Self-Distillation
- [논문리뷰] The Handoff Tax: Continuing Non-Native Trajectories in LLM Agents
- [논문리뷰] TokenPilot: Cache-Efficient Context Management for LLM Agents
- [논문리뷰] Retrospective Harness Optimization: Improving LLM Agents via Self-Preference over Trajectory Rollouts
Review 의 다른글
- 이전글 [논문리뷰] Building AI Research Teams for Autonomous Discovery of Linear Attention Architectures
- 현재글 : [논문리뷰] Cache Engineering for Agents
- 다음글 [논문리뷰] CompactSplat: Spatially Adaptive Gaussian Distribution for Feedforward Scene Reconstruction
댓글