ChatPaper.aiChatPaper

Mastermind: 戦略に基づくリポジトリ規模の脆弱性再現のための学習

Mastermind: Strategy-grounded Learning for Repository-Scale Vulnerability Reproduction

July 2, 2026
著者: Mingzhe Du, Luu Anh Tuan, Tianyi Wu, Renyang Liu, Zhijiang Guo, Dong Huang, See-Kiong Ng
cs.AI

要旨

リポジトリレベルの脆弱性再現は、ソフトウェア工学(SE)における高度なタスクである。エージェントはコードベースを調査し、脆弱なパスに到達する入力の文法を推測し、概念実証(PoC)を構築し、修正版ビルドでクラッシュが消失することを検証しなければならない。最近のLLMエージェントは、アプローチが正しければこうしたステップを実行できることが多いが、戦略の選択を誤ることで失敗するケースが依然として存在する。本論文は、SEエージェントにとって、完全な行動の軌跡ではなく戦略こそが適切な学習単位であると主張する。すなわち、戦略は最適化に十分コンパクトであり、実行を導くのに十分具体的であり、試行を超えて保存・再利用するのに十分安定している。本稿では、転移可能な戦略学習とタスク固有の経験を分離する二重ループフレームワークMastermindを提案する。学習可能なプランナーは、SFTとマイルストンベースのGRPOを通じて再利用可能な脆弱性再現戦略を学習し、経験ループはタスクローカルな戦略記録を保持してその後の試行を導く。プランナーは実行器とは独立に訓練されるため、実行器のアクション生成能力を変更することなく、複数の固定された実行器に対して戦略学習を改善できる。我々はMastermindを、260の訓練タスクと200の未学習評価タスクを用いてCyberGym上で評価した。固定実行器としてGPT-5.5を用いた場合、Mastermindは84.5%の成功率を達成し、オープンブックPoCコンテキスト(60.0%)、Best-of-8サンプリング(63.0%)、反復改善(77.0%)を上回った。同一のプランナーは、GPT-5.4 miniとGLM-5.1においても、それぞれ45.0%と58.5%から60.0%と71.0%へと改善した。これらの結果は、高レベルの戦略を学習することが、リポジトリ規模のSEエージェントを改善するための効果的かつ転移可能なメカニズムであることを示している。
English
Repository-level vulnerability reproduction is a demanding software engineering (SE) task: an agent must inspect a codebase, infer the input grammar that reaches a vulnerable path, construct a proof-of-conceptv(PoC), and verify that the crash disappears on the patched build. Recent LLM agents can often execute these steps when the approach is correct, yet they still fail by choosing the wrong strategy. This paper argues that strategy, rather than the full action trajectory, is the right learning unit for such SE agents: it is compact enough to optimize, concrete enough to guide execution, and stable enough to store and reuse across attempts. We present Mastermind, a dual-loop framework that separates transferable strategy learning from task-specific experience. A trainable planner learns reusable vulnerability-reproduction strategies through SFT and milestone-based GRPO, while an experience loop maintains task-local strategy records that guide subsequent attempts. The planner is trained independently of the executor, allowing strategy learning to improve multiple frozen executors without modifying their action-generation capability. We evaluate Mastermind on CyberGym using 260 training tasks and 200 held-out evaluation tasks. With GPT-5.5 as the frozen executor, Mastermind achieves an 84.5% pass rate, outperforming open-book PoC context (60.0%), Best-of-8 sampling (63.0%), and iterative improvement (77.0%). The same planner also improves GPT-5.4 mini and GLM~5.1 from 45.0% and 58.5% to 60.0% and 71.0%. These results demonstrate that learning high-level strategies is an effective and transferable mechanism for improving repository-scale SE agents.