Research map / Large language models / Agents, code and math
SWE-RL: Advancing LLM Reasoning via Reinforcement Learning on Open Software Evolution
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes SWE-RL, applying GRPO with a rule-based difflib similarity reward on real-world GitHub pull-request data to train Llama-3.3-70B into SWE-bench-solving reasoning model Llama3-SWE-RL-70B, which reaches 41.0% on SWE-bench Verified and shows out-of-domain gains.
Problem
Improving LLM reasoning for real-world software engineering issue solving, where RL with execution feedback is hard to apply and prior training relied on distilled proprietary-model SFT data.
Approach
Use software evolution data (merged PRs with linked issues, code context, and oracle patches) as an RL seed set with a lightweight rule-based reward: -1 for bad format, otherwise difflib SequenceMatcher similarity between predicted and oracle patch, optimized with GRPO.
Key results
- Llama3-SWE-RL-70B resolves 41.0% of SWE-bench Verified with Agentless Mini, best among open models under 100B and comparable to GPT-4o (38.8% with Agentless).
- On out-of-domain benchmarks, the RL model improves over Llama-3.3-70B-Instruct on HumanEval+ (79.9 vs 76.2), CRUXEval-O (75.5 vs 61.9), and MATH strict (73.7 vs 63.2), while the SFT variant declines on average.
- Repair-only oracle setting: RL model reaches 34.8 vs 29.6 for the SFT baseline and 5.4 for base Llama-3.3-70B-Instruct under greedy decoding.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Apply SWE-RL reinforcement learning with software evolution data | Llama-3.3-70B-Instruct · SWE-bench Verified, oracle localized files | repair performance: 5.4 -> 34.8 | Helped |
| Replace supervised fine-tuning with SWE-RL | Llama-3.3-70B-Instruct · SWE-bench Verified | pass@1: 36.2 -> 41.0 | Helped |
| Train with SWE-RL rather than leaving the base model unchanged | Llama-3.3-70B-Instruct · HumanEval+ | pass@1: 76.2 -> 79.9 | Helped |
| Train with SWE-RL rather than leaving the base model unchanged | Llama-3.3-70B-Instruct · CRUXEval-I | accuracy: 60.5 -> 71.6 | Helped |
| Train with SWE-RL rather than leaving the base model unchanged | Llama-3.3-70B-Instruct · MATH (strict) | accuracy: 63.2 -> 73.7 | Helped |
| Train with SFT instead of leaving the base model unchanged | Llama-3.3-70B-Instruct · MATH (strict) | accuracy: 63.2 -> 54.0 | Hurt |
| Increase repair samples from 20 to 160 (ablation) | SWE-RL with Agentless Mini · SWE-bench Verified | pass@1: 33.6 to 40.0 | Helped |
| Increase repair samples from 160 to 500 (ablation) | SWE-RL with Agentless Mini · SWE-bench Verified | pass@1: 40.0 to 41.0 | Helped |
| Increase reproduction tests up to 20 (ablation) | SWE-RL with Agentless Mini · SWE-bench Verified | pass@1: 38.8 to 41.0 | Helped |
| Increase reproduction tests from 20 to 30 (ablation) | SWE-RL with Agentless Mini · SWE-bench Verified | pass@1 | No clear effect |
| Replace continuous patch-similarity reward with exact-match discrete reward (ablation) | SWE-RL · SWE-bench Verified, oracle-file repair | repair performance | Hurt |
| Use continuous patch-similarity reward instead of exact-match discrete reward (ablation) | SWE-RL · SWE-bench Verified, oracle-file repair | format accuracy | No clear effect |
Surprising findings
- RL trained solely on issue-solving data improves out-of-domain tasks such as math and code reasoning, while SFT on the same domain degrades average OOD performance.
- A discrete exact-match reward yields near-zero average reward at the end of training, whereas the continuous similarity reward drives learning.
Limitations
- Sequence-similarity reward does not capture semantic equivalence of alternative functional patches.
- Agentless Mini's localization is simplified to file-path mapping, lacking comprehensive context.
- Pipeline-based structure prevents the model from learning from interactive execution feedback.
Experimental setup
Datasets: GitHub pull requests (24M aggregated, 11M filtered, 273k RL seeds) SWE-bench Verified HumanEval+ BigCodeBench CRUXEval MATH MMLU
Benchmarks: SWE-bench Verified HumanEval+ BigCodeBench-Hard CRUXEval MATH MMLU
Metrics: pass@1 resolve rate correct format rate repair performance macro average accuracy
Baselines: Llama-3.3-70B-Instruct Llama3-SWE-SFT-70B GPT-4o Claude-3.5-Sonnet Lingma-SWE-GPT SWE-Gym SWE-Fixer Agentless
Builds on: GRPO DeepSeek-R1 Agentless Magicoder OSS-Instruct CodeT
Closest papers by meaning
- Revisiting Reinforcement Learning for LLM Reasoning from A Cross-Domain Perspective (NeurIPS 2025 · similarity 0.90)
- R1-Code-Interpreter: LLMs Reason with Code via Supervised and Multi-stage Reinforcement Learning (ICLR 2026 · similarity 0.90)
- ReTool: Reinforcement Learning for Strategic Tool Use in LLMs (ICLR 2026 · similarity 0.90)
- Diversity-Aware Policy Optimization for Large Language Model Reasoning (NeurIPS 2025 · similarity 0.89)
- RL Squeezes, SFT Expands: A Comparative Study of Reasoning LLMs (ICLR 2026 · similarity 0.89)
- RL Tango: Reinforcing Generator and Verifier Together for Language Reasoning (NeurIPS 2025 · similarity 0.89)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
