TL;DR
SWE-growth is a teacher-guided self-play framework that significantly improves software engineering (SWE) agents by focusing training on the "gap" between a student agent and a more capable teacher. By adaptively selecting tasks where the teacher succeeds but the student struggles, it provides high-quality demonstrations for fine-tuning and precise signals for reinforcement learning, outperforming standard self-play methods on benchmarks like SWE-bench Pro.
What Problem Does This Paper Address?
Large Language Model (LLM)-based agents are increasingly capable of solving complex, repository-level software issues. However, training these agents effectively is a major hurdle. While "self-play"—where an agent generates bugs and then tries to fix them—is a scalable way to create training data, it often hits a "signal bottleneck."
In many generated tasks, the agent either fails every attempt or succeeds every attempt. In reinforcement learning (RL) terms, these "all-fail" or "all-pass" groups provide zero "group-relative advantage"—there is no successful example to learn from or no failure to learn to avoid. As shown in the paper's motivation, nearly 80% of tasks generated in student-only self-play provide no useful learning signal.
Methods
The authors introduce SWE-growth, which uses a frozen Teacher model to guide a Student agent through an adaptive curriculum. The framework operates in an "Inject & Fix" loop:
- Bug Injection: An "Injector" model creates synthetic bugs in a clean codebase.
- Dual Evaluation: Both the Student and a frozen Teacher attempt to repair the bug.
- Adaptive Scheduling: Tasks are routed based on the performance gap:
- Supervised Fine-Tuning (SFT): If the Student fails all attempts but the Teacher succeeds reliably, the Teacher’s solution is used as a demonstration for SFT.
- Reinforcement Learning (GRPO): If the Student shows mixed results (some passes, some fails) but still lags behind the Teacher, the task is used for Group Relative Policy Optimization (GRPO) to bridge the remaining gap.
- Discard: Tasks that are too easy (Student > Teacher) or too hard (both fail) are filtered out.
- Injector Feedback: The Injector is rewarded for generating bugs that fall into the Student's "learning zone" (tasks eligible for SFT or GRPO).
Datasets
- Seed Issues: The process starts with 101 real-world resolved issues from 92 repositories across languages like Python, JavaScript, TypeScript, and Go.
- SWE-bench Pro: Used for primary evaluation, focusing on repository-level issue resolution.
- TerminalBench 2.1: A held-out benchmark used to test how well the agent's improvements generalize to different domains (command-line interface tasks).
Key Insights and Ideas
- Activating "Silent" Tasks: The Teacher acts as a compass. By providing verified repairs for tasks the Student initially found impossible, the Teacher "activates" those tasks, turning them into viable learning opportunities.
- The "Zone of Proximal Development": By training the Injector to find tasks with a positive Teacher-Student gap, the system automatically focuses on the agent's "frontier" of capability.
- Weak Teachers Still Help: Surprisingly, a Teacher doesn't need to be globally superior to be useful. The authors found that even a "weak" teacher (one with lower overall benchmark scores) can drive Student improvement if it possesses "local strengths"—specific tasks it can solve that the Student cannot.
- SFT and RL are Complementary: SFT helps the agent reach new capabilities, while GRPO helps it refine those capabilities and reduce variance.
Key Results
Using Qwen3-Coder-30B-A3B-Instruct as the backbone:
- SWE-bench Pro: Performance improved from 27.7% to 31.7% by Round 2.
- TerminalBench 2.1: Performance jumped from 11.0% to 17.2%, demonstrating strong cross-domain generalization.
- Efficiency: SWE-growth outperformed "Student-only" self-play by 2.6 and 4.1 percentage points on the two benchmarks, respectively.
- Superiority over Baselines: It also beat "Teacher-augmented" self-play (which uses teacher data but lacks the adaptive curriculum) by 1.8 and 2.5 points under similar resource budgets.
Limitations and Future Work
- Sampling Noise: The "gap" between Teacher and Student is estimated from a small number of rollouts (G=4 or 8), which can be sensitive to luck.
- Computational Cost: Iterative self-play with multiple models is computationally expensive, though the authors mitigated this with an asynchronous execution pipeline that yielded a 2.13x speedup.
- Scope: The study focused on code repair. Future work could explore whether this teacher-guided approach scales to other software engineering tasks like system design or documentation.
- Teacher Selection: While the paper shows weak teachers can help, the optimal criteria for selecting a teacher for a specific student remain an open question.
Summary updated