# SWE-RL (2025)

> Trained an open model to fix GitHub issues with reinforcement learning on public pull requests, rewarding patches by how closely they match the real fix.

Page: https://mralbu.github.io/ai-datasets/p/swe-rl

## Key facts

- Title: SWE-RL: Advancing LLM Reasoning via Reinforcement Learning on Open Software Evolution
- Authors: Yuxiang Wei, Olivier Duchenne, Jade Copet, Quentin Carbonneaux, Lingming Zhang, Daniel Fried, Gabriel Synnaeve, Rishabh Singh, Sida I. Wang
- Venue: NeurIPS 2025
- Category: LLMs
- Paper: https://www.alphaxiv.org/abs/2502.18449

## Why it matters

Earlier open coding models were mostly trained to imitate GPT-4o or Claude. SWE-RL showed that the history of open-source software is itself a reward signal, and that reinforcement learning on real engineering work teaches reasoning that transfers, which is how frontier coding agents are now trained.

## The idea

Collect 273,000 GitHub pull requests that fix a reported bug. Show the model the issue and the full files involved, let it think and then write search-and-replace edits, and reward it by how similar its patch is to the one the developers merged (−1 for a malformed answer). Optimize with GRPO, the reinforcement-learning method used for DeepSeek-R1. No execution and no outputs from stronger proprietary models are needed.

## The result

Llama3-SWE-RL-70B resolved 41.0% of SWE-bench Verified with a simplified Agentless pipeline, the best for any model under 100B parameters, against 36.2% for the same model fine-tuned on synthetic data. Trained only on bug fixing, it also improved on math (MATH 63.2 to 73.7), HumanEval+ and MMLU, while the fine-tuned model got worse on average.

## The data

- [SWE-bench (2023)](https://mralbu.github.io/ai-datasets/d/swe-bench.md): 2,294 GitHub issues from 12 Python projects; a fix counts only if the project's tests pass.
- [HumanEval (2021)](https://mralbu.github.io/ai-datasets/d/humaneval.md): 164 hand-written Python problems graded by unit tests.
- [MATH (2021)](https://mralbu.github.io/ai-datasets/d/math.md): 12,500 competition problems (AMC, AIME and others) in 7 subjects and 5 difficulty levels.
- [MMLU (2020)](https://mralbu.github.io/ai-datasets/d/mmlu.md): 15,908 four-option exam questions, from high-school math to law and medicine.

## Builds on

- [Agentless (2024)](https://mralbu.github.io/ai-datasets/p/agentless.md)
- [DeepSeek-R1 (2025)](https://mralbu.github.io/ai-datasets/p/deepseek-r1.md)

## Part of

- [Coding agents](https://mralbu.github.io/ai-datasets/t/coding-agents.md) (step 6 of 8)
