ChatPaper.aiChatPaper

SWE-Pruner Pro: コード生成LLMは既に何を刈り込むべきかを知っている

SWE-Pruner Pro: The Coder LLM Already Knows What to Prune

July 20, 2026
著者: Yuhang Wang, Yuling Shi, Shaoqiu Zhang, Jialiang Liang, Shilin He, Siyu Ye, Yuting Chen, Kai Cai, Xiaodong Gu
cs.AI

要旨

コーディングエージェントにおける長いコンテキストの刈り込みは、効率的なコンテキスト管理に不可欠な技術である。既存の文脈刈り込み手法(SWE-Prunerなど)は、これとは別のコード分類器を付加することで実現しているが、我々はエージェント自体がツール出力を読み取る際に、コードコンテキストの関連性を示す内部表現を符号化していることを発見した。この発見に基づき、エージェント内部で直接ツール出力を刈り込むSWE-Pruner Proを提案する。具体的には、小型のヘッドがエージェント自身の内部表現を行ごとに保持または刈り込みのラベルに変換し、各ツール出力の行数に応じた長さ認識型埋め込みを付与する。2つのオープンウェイトのバックボーンと4つのマルチターンベンチマークにおいて、SWE-Pruner Proはタスク品質を維持しつつ、プロンプトトークンと完了トークンを最大39%削減し、推論のオーバーヘッドも限定的である。特筆すべきは、MiMo-V2-FlashにおいてSWE-Pruner ProがSWE-Bench Verifiedの解決率を+3.8%上昇させ、長文脈のOolong精度を+2.2ポイント向上させたことである。
English
Pruning long context for coding agents has been a vital technology for efficient context management. While existing context pruning methods such as SWE-Pruner realize this by attaching a separate code classifier, we find the agent itself encodes internal representations indicating the relevance of code context when reading tool output. Based on this finding, we propose SWE-Pruner Pro, which prunes tool outputs directly inside the agent. Concretely, a small head turns the agent's own internal representations into a keep-or-prune label for each line, with a length-aware embedding keyed to each tool output's line count. Across two open-weight backbones and four multi-turn benchmarks, SWE-Pruner Pro saves up to 39% of prompt and completion tokens while preserving task quality, with bounded inference overhead. Notably, on MiMo-V2-Flash SWE-Pruner Pro additionally raises the SWE-Bench Verified resolve rate by +3.8% and the long-context Oolong accuracy by +2.2 points.