# SpecCompact: Accelerating LLM Agent Context Compaction with Slot-Parallel Semantic Speculative Verification

SpecCompact: 슬롯 병렬 의미 추측 검증으로 LLM 에이전트 컨텍스트 압축 가속

Yulu An, Yifei Feng, Xiangyang Yin · arXiv · 2026년 11월 4일

- **연구 문제** LLM 에이전트의 긴 상호작용 기록을 요약하는 컨텍스트 컴팩션은 지연이 크며, 기존 추측 방식은 요약의 의미적 유연성을 충분히 활용하지 못합니다.
- **연구 방법** SpecCompact는 요약 슬롯을 병렬 단위로 삼아 소형 드래프터가 줄을 제안하고 목표 모델이 의미 기준으로 검증·수정하도록 합니다.
- **주요 결과** Gemma4-31B-IT에서 SpecCompact는 Hermes 대비 4.28–5.63배, Qwen3.5-122B-A10B에서는 2.04–2.41배의 지연 감소를 보였으며 작업 성능의 변화는 모델과 과제에 따라 달랐습니다.

## 컴팩션의 지연 문제

LLM 에이전트는 상호작용 기록이 길어지면 컨텍스트 컴팩션으로 기록을 짧은 작업 컨텍스트로 요약합니다. 그러나 긴 컨텍스트를 읽고 요약을 한 토큰씩 디코딩하는 과정은 사용자 경험을 크게 떨어뜨릴 수 있는 지연을 만듭니다. 따라서 요약에 필요한 정보를 보존하면서 지연을 줄이는 것이 이 연구의 출발점입니다.

토큰 단위 speculative decoding은 작은 모델이 여러 토큰을 제안하고 목표 모델이 검증하여 목표 모델의 출력 분포를 보존하는 방법입니다. 하지만 요약은 표현이 달라도 이후 행동에 같은 정보를 줄 수 있으므로, 토큰 일치를 요구하는 방식은 이 유연성을 충분히 활용하지 못합니다. 의미 단위로 초안을 평가하는 semantic speculation은 이 점에서 컴팩션에 더 잘 맞는다고 논문은 설명합니다.

## 슬롯 단위 독립 생성의 근거

이 연구는 요약의 구조적 필드인 슬롯을 병렬 생성의 단위로 삼습니다. OpenClaw와 Hermes의 템플릿은 목표, 제약, 진행 상황, 결정, 다음 단계 같은 필드로 요약을 구성합니다. 예비 실험에서 다른 슬롯의 출력을 보지 않고 생성한 슬롯도 필요한 정보를 상당 부분 유지했습니다.

100개 궤적에서 단일 순차 생성의 평균 점수는 4.44였고, 독립 슬롯 생성은 4.73이었습니다. 점수가 4 이상인 슬롯의 비율은 각각 85%와 93%입니다. 이 점수는 다섯 개의 이진 기준을 합산한 0에서 5점 척도입니다. 슬롯 순서를 바꾸면 평균 점수가 최대 0.03 변하는 수준이었으므로, 저자들은 필요한 정보가 다른 슬롯에 조건화하지 않고도 기록에서 복원될 수 있다고 해석합니다.

![Figure 2: Slot structure and independent generation. (a) Fields in OpenClaw and Hermes compaction templates. (b) Reference adequacy over 100 trajectories on Li…](https://refivu.com/papers/38ad4f22-a54a-4711-9220-a0310bb8cf15/figures/figure-38f3b0b670e8c2421f600ecfa12ca3e2.png?thumb=512)

**Figure 2** : Slot structure and independent generation. (a) Fields in OpenClaw and Hermes compaction templates. (b) Reference adequacy over 100 trajectories on LiveClawBench (Long et al., 2026), with six slots per trajectory.

[원문](https://arxiv.org/abs/2611.06876v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yulu An, Yifei Feng, Xiangyang Yin · SpecCompact: Accelerating LLM Agent Context Compaction with Slot-Parallel Semantic Speculative Verification · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

## 드래프터와 줄 단위 검증

SpecCompact는 Qwen3-0.6B 드래프터를 목표 모델이 생성한 슬롯 내용으로 슬롯 조건부 SFT를 수행합니다. 학습 손실은 드래프터가 목표 슬롯 내용의 토큰을 이전 토큰과 기록, 슬롯 지시에 조건화해 예측하는 교차 엔트로피입니다. 온라인 단계에서는 각 슬롯마다 별도의 초안 스트림이 같은 기록을 공유하면서 자신의 accepted prefix를 조건으로 다음 줄을 제안합니다.

![Figure 3: Overview of SpecCompact](https://refivu.com/papers/38ad4f22-a54a-4711-9220-a0310bb8cf15/figures/figure-70ebc967ef896964465e2a7911c4c278.png?thumb=512)

**Figure 3** : Overview of SpecCompact.

[원문](https://arxiv.org/abs/2611.06876v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yulu An, Yifei Feng, Xiangyang Yin · SpecCompact: Accelerating LLM Agent Context Compaction with Slot-Parallel Semantic Speculative Verification · 원문 그림 인용 · 원본 PDF 3쪽에서 그림 영역을 추출했습니다.

목표 모델은 제안 줄이 기록에 근거하고 accepted prefix와 일관되는지를 긍정 또는 부정으로 판정합니다. 긍정 토큰의 정규화 점수 r을 계산하고 r이 η 이상이면 줄을 수락합니다. 거부된 경우 목표 모델이 같은 조건에서 대체 줄을 생성하며, 수락된 줄 또는 대체 줄이 accepted prefix에 이어 붙습니다. 실험에서 η는 0.7로 설정되었습니다.

## 공유 접두부와 실행 최적화

슬롯별 병렬 실행은 반복적인 긴 입력 처리와 모델 호출 비용을 함께 키웁니다. 이를 줄이기 위해 SpecCompact는 여섯 슬롯 스트림을 동시에 실행하고, 기록과 모든 슬롯 계약을 공통 접두부로 묶어 공유 접두부 캐싱을 사용합니다.

![Figure 4: Execution optimizations in SpecCompact: independent slot scheduling, shared-prefix caching, draft buffering, line-aware stopping, and lightweight che…](https://refivu.com/papers/38ad4f22-a54a-4711-9220-a0310bb8cf15/figures/figure-62d03fb4e51712387b356172ad7390a4.png?thumb=512)

**Figure 4** : Execution optimizations in SpecCompact: independent slot scheduling, shared-prefix caching, draft buffering, line-aware stopping, and lightweight checks with termination rules.

[원문](https://arxiv.org/abs/2611.06876v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yulu An, Yifei Feng, Xiangyang Yin · SpecCompact: Accelerating LLM Agent Context Compaction with Slot-Parallel Semantic Speculative Verification · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.

초안 버퍼링은 드래프터가 여러 줄을 한 번에 생성하도록 하여 줄마다 초안 호출을 반복하지 않게 합니다. 버퍼의 줄은 그 줄을 만든 접두부가 현재 accepted prefix와 정확히 일치할 때만 재사용되며, 목표 수정이 접두부를 바꾸면 남은 버퍼를 버립니다. 또한 줄 단위 중지 설정으로 사용되지 않을 줄을 디코딩하지 않도록 하고, 중복되거나 지나치게 긴 줄은 의미 검증 없이 목표 수정으로 보냅니다.

## 에이전트 작업 성능과 장문 컨텍스트 결과

에이전트 작업에서 SpecCompact의 효과는 목표 모델에 따라 달랐습니다. Gemma4-31B-IT에서 SpecCompact는 Hermes와 비교해 AppWorld Normal의 TGC를 2.98포인트, Challenge의 TGC를 4.07포인트 낮추었고, τ3 성공률은 2.50포인트 낮았습니다. Qwen3.5-122B-A10B에서는 AppWorld 두 분할의 TGC가 각각 4.76포인트와 1.68포인트 높았고, τ3 성공률은 0.83포인트 높았습니다. 다만 Challenge의 SGC는 0.72포인트 낮았습니다.

![Table 1: Agent task performance (%). Full History is a reference without compaction. Bold marks the best compaction result. Gray subscripts show 95% confidence…](https://refivu.com/papers/38ad4f22-a54a-4711-9220-a0310bb8cf15/figures/figure-59e5a9eda7f6d091067a6fcc2f27b966.png?thumb=512)

**Table 1** : Agent task performance (%). Full History is a reference without compaction. Bold marks the best compaction result. Gray subscripts show 95% confidence intervals.

[원문](https://arxiv.org/abs/2611.06876v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yulu An, Yifei Feng, Xiangyang Yin · SpecCompact: Accelerating LLM Agent Context Compaction with Slot-Parallel Semantic Speculative Verification · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

장문 컨텍스트 평가에서 Qwen3.5에서는 SpecCompact가 LongBench 두 데이터셋에서 Target-self와 0.6포인트 이내였고 RULER 두 길이에서는 더 높았습니다. Gemma4에서는 네 설정 모두에서 Target-self보다 0.83–4.50포인트 낮았습니다. 이 결과는 각 모델과 과제에서 얻은 것이며, 모든 설정에서 정확도 우위가 있다는 뜻은 아닙니다.

![Table 2: Long-context performance on LongBench (ROUGE-L) and RULER at 8k and 16k (official matching scores), scaled to 100. Execution failures are scored as ze…](https://refivu.com/papers/38ad4f22-a54a-4711-9220-a0310bb8cf15/figures/figure-d103ba990d23b12f47e513c7e87ce93d.png?thumb=512)

**Table 2** : Long-context performance on LongBench (ROUGE-L) and RULER at 8k and 16k (official matching scores), scaled to 100. Execution failures are scored as zero. Bold marks the best compaction result.

[원문](https://arxiv.org/abs/2611.06876v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yulu An, Yifei Feng, Xiangyang Yin · SpecCompact: Accelerating LLM Agent Context Compaction with Slot-Parallel Semantic Speculative Verification · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

## 컴팩션 지연 시간과 속도 향상

지연 실험은 AppWorld, τ3, LongBench 16k 입력에서 짝지은 입력 20개를 사용하고 Hermes를 기준으로 속도를 계산했습니다. Gemma4에서 SpecCompact는 Hermes 대비 4.28–5.63배의 속도를 보였고, Qwen3.5에서는 2.04–2.41배였습니다. 저자들은 Qwen3.5의 향상이 작은 이유로 기준 요약이 이미 빠른 점, 0.6B 드래프터가 더 큰 목표 모델의 행동과 맞추기 어려운 점, 그리고 vLLM 배포에서 Qwen3.5 하이브리드 어텐션의 접두부 캐시 재사용이 제한적인 점을 듭니다.

![Table 3: Compaction latency and speedup on 20 matched inputs per workload. Speedup is relative to Hermes. Bold marks the best result within each target. SpecCo…](https://refivu.com/papers/38ad4f22-a54a-4711-9220-a0310bb8cf15/figures/figure-3b214b971c9b34b112d56845fa46cc6c.png?thumb=512)

**Table 3** : Compaction latency and speedup on 20 matched inputs per workload. Speedup is relative to Hermes. Bold marks the best result within each target. SpecCompact uses an additional drafter GPU.

[원문](https://arxiv.org/abs/2611.06876v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yulu An, Yifei Feng, Xiangyang Yin · SpecCompact: Accelerating LLM Agent Context Compaction with Slot-Parallel Semantic Speculative Verification · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

시스템 최적화의 효과는 별도로 측정되었습니다. Gemma4의 AppWorld Normal 지연은 20.17초에서 8.26초로 줄었고, 전체 최적화는 Gemma4에서 1.88–2.44배, Qwen3.5에서 1.19–1.51배의 감소를 보였습니다. 이 수치는 최적화 구성요소를 따로 분리한 값이 아니라 결합된 효과입니다.

## 한계와 적용 범위

저자들은 SpecCompact가 정확도와 압축 속도의 절충에 초점을 둔다고 밝히며, 목표 모델 요약에 대해 일관된 정확도 우위를 보이지 않는다고 설명합니다. 더 나은 드래프터와 목표 모델의 정렬이 정확도와 절충을 개선할 수 있다는 가능성은 DREAM-R의 강화학습 접근을 근거로 제시된 향후 방향입니다.

또한 슬롯마다 정보를 얻는 위치가 다르다는 관찰은 슬라이딩 윈도 어텐션으로 초안 속도를 더 높일 수 있다는 가설로 제시되며, 이는 이 논문에서 검증되지 않았습니다. 사용자 연구는 Hermes 코드베이스의 세 시나리오와 28개의 요약 선호 응답에서 얻은 결과이므로 일반적인 사용자 만족도를 보장하지 않습니다.

## 논문 정보

- **저자**: Yulu An, Yifei Feng, Xiangyang Yin
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2026년 11월 4일
- **등록일**: 2026년 11월 6일
- **수정일**: 2026년 11월 4일
- **버전**: v1
- **arXiv**: 2611.06876
- **분류**: cs.CL
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2611.06876v1) · [원문 PDF ↗](https://arxiv.org/pdf/2611.06876v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

LLM agents use context compaction to manage growing interaction histories, but summarizing long histories with large models can introduce substantial delays. Compaction therefore requires balancing information retention against latency. We observe that structured summary slots can retain information when generated independently. Based on this observation, we present SpecCompact, a framework that accelerates compaction through slot-parallel semantic speculation. SpecCompact fine-tunes a small drafter and generates slots in parallel. The target model verifies each proposed line and repairs rejected content, while subsequent drafting uses the updated slot prefix. System optimizations further reduce repeated context processing and model calls. Across AppWorld and $τ^3$ benchmarks with two target models, SpecCompact achieves $2.04$--$5.63\\times$ compaction speedups over Hermes-style summarization. Separate downstream evaluations reveal model- and task-dependent performance trade-offs. A user study within Hermes further shows an $8.68\\times$ median compaction speedup.

## 원문 인용

Yulu An, Yifei Feng, Xiangyang Yin (2026). SpecCompact: Accelerating LLM Agent Context Compaction with Slot-Parallel Semantic Speculative Verification. arXiv:2611.06876v1. https://arxiv.org/abs/2611.06876v1

**BibTeX**

```
@misc{an2026speccompact,
  title = {{SpecCompact: Accelerating LLM Agent Context Compaction with Slot-Parallel Semantic Speculative Verification}},
  author = {Yulu An and Yifei Feng and Xiangyang Yin},
  year = {2026},
  eprint = {2611.06876},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.06876v1}
}
```

## 이 논문의 용어

- [ROUGE-L](https://refivu.com/terms/b00e147f8ed4-rouge-l)
- [Speculative decoding](https://refivu.com/terms/2496d9bbec40-speculative-decoding)
- [LongBench](https://refivu.com/terms/ff37fb1a4d82-longbench)
- [RULER](https://refivu.com/terms/5b6224fe4e4c-ruler)
- [AppWorld](https://refivu.com/terms/3d77af475ade-appworld)
- [Qwen3-0.6B](https://refivu.com/terms/28ea9064c855-qwen3-0-6b)
- [SGC](https://refivu.com/terms/35cec5cf5e28-sgc)
- [target model](https://refivu.com/terms/5cd677dece4a-target-model)
- [OpenClaw](https://refivu.com/terms/f3be13989809-openclaw)
- [Qwen3.5-122B-A10B](https://refivu.com/terms/e98e897b8576-qwen3-5-122b-a10b)
- [TGC](https://refivu.com/terms/b568072e59f4-tgc)
- [추측 디코딩](https://refivu.com/terms/d95a5e2977f5)

## 다른 논문 해설

- [FrontierPhysics: Evaluating Agents for End-to-End Physics Research](https://refivu.com/papers/1ce4f126-66ec-4969-9dbe-f7e90f1e4e61-frontierphysics-evaluating-agents-for-end-to-end-physics.md)
- [Cooperative Multi-Agent Reinforcement Learning with Submodular Trajectory Rewards](https://refivu.com/papers/4a7e5a04-8712-4e37-b76c-97925c65d311-cooperative-multi-agent-reinforcement-learning-with.md)
- [ScamWorld: An Interactive Environment for Evaluating Web Agents Against Online Fraud](https://refivu.com/papers/1a76f7bb-3d3d-46af-8fe4-17d7f3c5fd37-scamworld-an-interactive-environment-for-evaluating-web.md)
- [Where Is the Truth When AI Agents Disagree? Dependence-Aware Belief Propagation for Unsupervised Truth Discovery (Extended Version)](https://refivu.com/papers/ff649851-9a14-4591-a094-59a064709a42-where-is-the-truth-when-ai-agents-disagree.md)
- [When Debate Amplifies Risk: Social-Bias Vulnerabilities in Multi-Agent Safety Deliberation](https://refivu.com/papers/10899ad2-e09b-4961-bb68-bd2cd15ff40f-when-debate-amplifies-risk-social-bias-vulnerabilities-in.md)
- [Why Pay for Long Reasoning When Rewrite Do Trick? Causal Effects of Reasoning History Compaction on Future Generation and Agent Cost](https://refivu.com/papers/37729fca-fc0f-4694-aeca-a6b7e5ad26f0-why-pay-for-long-reasoning-when-rewrite-do.md)
- [CounterFactual Retrieval for Evidence-Aware Individual Animal Identification](https://refivu.com/papers/3cf8f3a0-3ddd-4d12-8317-757a81b8ce8e-counterfactual-retrieval-for-evidence-aware-individual.md)
- [CompressionBench: How can your coding agents compress LLMs?](https://refivu.com/papers/943d8a97-633d-4d07-9efd-15168ede4d74-compressionbench-how-can-your-coding-agents-compress-llms.md)
- [ServerBench: How can your coding agents design specialized LLM serving systems?](https://refivu.com/papers/08bfcdf2-e2ef-4a8a-a94e-0ae43f956fef-serverbench-how-can-your-coding-agents-design-specialized.md)
- [Coupled Scene Graph Anticipation: When With-Constraint Recall Hides Structural Inconsistency](https://refivu.com/papers/8686c531-e30d-4438-85a3-fc894f652fe2-coupled-scene-graph-anticipation-when-with-constraint-recall.md)
- [Trick-or-Treat: Adversarial Evaluation of Multimodal Medical Reasoning with Synthetic Images](https://refivu.com/papers/9c717167-598f-4352-940f-4ac3e1884dfa-trick-or-treat-adversarial-evaluation-of-multimodal-medical.md)
- [From Certified Pairs to a Certified Hub: Reasoner-Checked Crosswalks for the Information Exchange Standard](https://refivu.com/papers/2223debf-80ef-4fb4-9106-ea557331d908-from-certified-pairs-to-a-certified-hub-reasoner.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/38ad4f22-a54a-4711-9220-a0310bb8cf15-speccompact-accelerating-llm-agent-context-compaction-with)
