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를 통해 재사용 가능한 취약점 재현 전략을 학습하며, 경험 루프는 후속 시도를 안내하는 작업-로컬 전략 기록을 유지한다. 플래너는 실행기와 독립적으로 훈련되므로, 전략 학습은 실행기의 행동 생성 능력을 수정하지 않고 여러 고정 실행기를 개선할 수 있다. 우리는 CyberGym에서 260개의 훈련 작업과 200개의 평가용 미공개 작업을 사용하여 Mastermind를 평가한다. 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.