SWE-growth: Teacher-Guided Adaptive Self-Play for Software Engineering Agents

Songshi Liang, Zixuan Huang, Mingxuan Song, Haoyu Tang, Shusheng Xu, Tongkai Yang, Zihe Wang, Rui YanarXiv 2026 · arXiv

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:

  1. Bug Injection: An "Injector" model creates synthetic bugs in a clean codebase.
  2. Dual Evaluation: Both the Student and a frozen Teacher attempt to repair the bug.
  3. Adaptive Scheduling: Tasks are routed based on the performance gap:
  4. 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.
  5. 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.
  6. Discard: Tasks that are too easy (Student > Teacher) or too hard (both fail) are filtered out.
  7. Injector Feedback: The Injector is rewarded for generating bugs that fall into the Student's "learning zone" (tasks eligible for SFT or GRPO).
Figure 2: Main Framework of our SWE-Growth

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.
Figure 1: Student-only self-play leaves sparse and concentrated learning signals, while a frozen Teacher expands the reachable signal. Left: Student outcomes by language on complete, groups; hatching marks reliable Teacher gaps within the Student-zero region. Right: source composition before and after adding reliable Teacher gaps.

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

Abstract

Self-play offers a scalable way to train software engineering agents by generating repository-level repair tasks. However, with binary repair rewards and finite rollout budgets, all-fail groups provide no reward-based group-relative advantage. Such tasks may still offer learning opportunities when a Teacher can provide verified repairs absent from the Student's own attempts. We introduce SWE-Growth, a teacher-guided adaptive self-play framework that uses verified Teacher outcomes to identify learning opportunities for the current Student. Tasks with all students failure but reliable Teacher success provide demonstrations for supervised fine-tuning (SFT), and post-SFT Student rollouts identify mixed-outcome tasks with a positive Teacher--Student gap for reinforcement learning. Task eligibility also guides Injector updates, connecting Student training with subsequent task generation. Starting from 101 seed issues, \textsc{SWE-Growth} improves Qwen3-Coder-30B-A3B-Instruct from 27.7% to 31.7% on SWE-bench Pro and from 11.0% to 17.2% on held-out TerminalBench 2.1 by Round~2. It exceeds Student-only self-play by 2.6 and 4.1 percentage points, respectively, and Teacher-augmented self-play by 1.8 and 2.5 points under approximately matched budgets. These results support adapting both supervision and task selection to the Student's evolving repair capability.
BibTeX
@misc{liang2026swe,
  author = {Songshi Liang and Zixuan Huang and Mingxuan Song and Haoyu Tang and Shusheng Xu and Tongkai Yang and Zihe Wang and Rui Yan},
  title = {{SWE-growth: Teacher-Guided Adaptive Self-Play for Software Engineering Agents}},
  year = {2026},
  eprint = {2611.23876},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.23876},
}
Figure