Self-Play SWE-RL
Free while signed in. Answers cite the passages they came from.

Self-Play SWE-RL (SSR) trains software engineering agents through self-play, requiring only access to sandboxed repositories with no human-labeled issues or tests. A single LLM learns to both inject and repair bugs of increasing complexity, achieving +10.4 points on SWE-bench Verified while consistently outperforming human-data baselines. - **Minimal data assumptions:** SSR requires only Docker images containing source code and dependencies. The agent discovers how to run tests, creates test parsers, and understands test suite structure entirely through environmental interaction - no prior knowledge of programming language or test framework needed. - **Dual-role self-play:** The same LLM policy plays two roles - a bug-injection agent that explores repositories and creates bug artifacts (including bug-inducing patches, test scripts, and test-weakening patches), and a bug-solving agent that repairs them. Both share parameters and train jointly with RL. - **Higher-order bugs for curriculum:** Failed repair attempts become new training data. These higher-order bugs mimic how developers unintentionally write buggy code, creating an evolving curriculum that naturally adapts to the agent's improving capabilities. - **Outperforms human-data training:** SSR achieves +10.4 points on SWE-bench Verified and +7.8 on SWE-Bench Pro, consistently beating baseline RL trained with human-curated issues and tests across the entire training trajectory. Improvements transfer to natural language issues absent from self-play training.
Minimal data assumptions: SSR requires only Docker images containing source code and dependencies. The agent discovers how to run tests, creates test parsers, and understands test suite structure entirely through environmental interaction - no prior knowledge of programming language or test framework needed.
Dual-role self-play: The same LLM policy plays two roles - a bug-injection agent that explores repositories and creates bug artifacts (including bug-inducing patches, test scripts, and test-weakening patches), and a bug-solving agent that repairs them. Both share parameters and train jointly with RL.
Higher-order bugs for curriculum: Failed repair attempts become new training data. These higher-order bugs mimic how developers unintentionally write buggy code, creating an evolving curriculum that naturally adapts to the agent’s improving capabilities.
Outperforms human-data training: SSR achieves +10.4 points on SWE-bench Verified and +7.8 on SWE-Bench Pro, consistently beating baseline RL trained with human-curated issues and tests across the entire training trajectory. Improvements transfer to natural language issues absent from self-play training.
Abstract
While current software agents powered by large language models (LLMs) and agentic reinforcement learning (RL) can boost programmer productivity, their training data (e.g., GitHub issues and pull requests) and environments (e.g., pass-to-pass and fail-to-pass tests) heavily depend on human knowledge or curation, posing a fundamental barrier to superintelligence. In this paper, we present Self-play SWE-RL (SSR), a first step toward training paradigms for superintelligent software agents. Our approach takes minimal data assumptions, only requiring access to sandboxed repositories with source code and installed dependencies, with no need for human-labeled issues or tests. Grounded in these real-world codebases, a single LLM agent is trained via reinforcement learning in a self-play setting to iteratively inject and repair software bugs of increasing complexity, with each bug formally specified by a test patch rather than a natural language issue description. On the SWE-bench Verified and SWE-Bench Pro benchmarks, SSR achieves notable self-improvement (+10.4 and +7.8 points, respectively) and consistently outperforms the human-data baseline over the entire training trajectory, despite being evaluated on natural language issues absent from self-play. Our results, albeit early, suggest a path where agents autonomously gather extensive learning experiences from real-world software repositories, ultimately enabling superintelligent systems that exceed human capabilities in understanding how systems are constructed, solving novel challenges, and autonomously creating new software from scratch.
Get next week’s papers.
The same picks and the same summaries, in your inbox. Free, and 176 issues deep.
Subscribe on Substack