SWE-Pruner Pro: The Coder LLM Already Knows What to Prune
- source_url: https://arxiv.org/abs/2607.18213
- source_type: paper
- platform: arxiv
- author: Yuhang Wang, Yuling Shi, Shaoqiu Zhang, Jialiang Liang, Shilin He, Siyu Ye, Yuting Chen, Kai Cai, Xiaodong Gu
- original_date: 2026-07-20
- added_date: 2026-07-22
- category: coding
- tags: coding-agents, context-pruning, tool-output, swe-bench, arxiv, swe-pruner
- quality_score: 4
- arxiv_id: 2607.18213
- arxiv_categories: cs.CL, cs.SE
- pdf_url: https://arxiv.org/pdf/2607.18213v1
- project: https://github.com/Ayanami1314/swe-pruner-pro
摘要(中文)
针对 coding agent 长上下文裁剪:发现模型在读工具输出时,内部表征已编码行级相关性,不必外挂独立代码分类器。SWE-Pruner Pro 在 agent 内部加小型 head,结合 length-aware embedding,对工具输出逐行 keep-or-prune。摘要称在两个开源权重骨干与四个多轮基准上最多节省约 39% prompt/completion token,任务质量保持;在 MiMo-V2-Flash 上 SWE-Bench Verified resolve rate +3.8%,长上下文 Oolong +2.2 点。工程意义:把上下文预算压回模型内表征,而不是再挂一层外部裁剪服务。
Summary (English)
Pruning long context for coding agents has been vital for efficient context management. While existing methods such as SWE-Pruner attach a separate code classifier, the authors find the agent itself encodes internal representations indicating code-context relevance when reading tool output. SWE-Pruner Pro prunes tool outputs inside the agent: a small head turns internal representations into per-line keep-or-prune labels, with a length-aware embedding keyed to each tool output's line count. Across two open-weight backbones and four multi-turn benchmarks, it saves up to 39% of prompt and completion tokens while preserving task quality, with bounded inference overhead. On MiMo-V2-Flash it also raises SWE-Bench Verified resolve rate by +3.8% and long-context Oolong accuracy by +2.2 points. Project: https://github.com/Ayanami1314/swe-pruner-pro
One-liner
用 agent 自身内部表征做工具输出行级裁剪,最多省约 39% token 且保持任务质量。
Source body / metadata
arXiv abstract grounded intake for 2607.18213. PDF: https://arxiv.org/pdf/2607.18213v1
Pruning long context for coding agents has been vital for efficient context management. While existing methods such as SWE-Pruner attach a separate code classifier, the authors find the agent itself encodes internal representations indicating code-context relevance when reading tool output. SWE-Pruner Pro prunes tool outputs inside the agent: a small head turns internal representations into per-line keep-or-prune labels, with a length-aware embedding keyed to each tool output's line count. Across two open-weight backbones and four multi-turn benchmarks, it saves up to 39% of prompt and completion tokens while preserving task quality, with bounded inference overhead. On MiMo-V2-Flash it also raises SWE-Bench Verified resolve rate by +3.8% and long-context Oolong accuracy by +2.2 points. Project: https://github.com/Ayanami1314/swe-pruner-pro
Obsidian evidence
- local_note: OpenClaw定时任务/论文流水线/2026-07-22-论文流水线.md
- intake_run: daily-intake-evening 2026-07-22