TL;DR
Current AI coding benchmarks predominantly focus on localized bug fixing or single-function completion, overlooking feature-driven development (FDD)—the process of engineering substantial new functionalities into existing codebases. To bridge this gap, the authors introduce SWE-Dev, a benchmark of 14,000 training and 500 test instances derived from real-world Python packages, each paired with Dockerized runtime environments and executable unit tests. Experiments show that FDD is an imposing challenge for state-of-the-art models (even Claude-3.7-Sonnet achieves just 22.45% Pass@3 on hard tasks), but fine-tuning on SWE-Dev allows a 7B open-source model to rival GPT-4o.
What Problem Does This Paper Address?
While models excel at function-level tasks (like HumanEval) and localized bug fixes (like SWE-Bench), real-world software engineering centers around Feature-Driven Development (FDD), which accounts for roughly 40% of developer effort. FDD requires understanding multi-file architectures, interpreting project requirement documents (PRDs), and implementing extensive cross-file changes (averaging ~190 lines of code across multiple files).
Prior benchmarks suffer from two major flaws:
- Limited scope or synthetic evaluation: Many evaluate short completions or rely on proxy metrics like CodeBLEU and string matching rather than functional correctness.
- Lack of scalable, verifiable training environments: SWE-Bench lacks a verified, executable training environment, limiting exploration into execution-based reinforcement learning (RL) and multi-agent training.
Methods
SWE-Dev builds an automated pipeline turning real-world Python libraries into verifiable FDD tasks:
- Repository & Test Harvesting: Curated 1,086 popular PyPI packages with fully passing test suites within containerized Docker environments.
- Dynamic Call Tree Generation: Executed tests using Python’s built-in
tracemodule to log call chains linking test cases to invoked source code, constructing hierarchical call trees that reflect execution depth, width, and cross-file dependencies. - Task & PRD Construction:
- Masked core implementation functions identified by call tree structures.
- Generated natural language Project Requirement Documents (PRDs) by combining high-level module descriptions synthesized by GPT-4o with clarified docstrings.
- Training Paradigms: Supported Supervised Fine-Tuning (SFT), offline/online Reinforcement Learning (DPO and PPO using test-execution rewards), and multi-agent role-wise training via rejection sampling (using the EvoMAC framework).
Datasets
- SWE-Dev (Introduced): Contains 14,000 training and 500 test instances (split into 250 Easy and 250 Hard). Derived from 1,033 training repos and 39 test repos across six major PyPI domains. Every instance includes a PRD, repository context, ground-truth code, and executable pytest/unittest suites.
- Evaluated & Compared Benchmarks: Compared against existing benchmarks including SWE-Bench, RepoBench, DevEval, CoderEval, ComplexCodeEval, and HumanEval.
Key Insights and Ideas
- FDD exposes frontier model limitations: Models struggle with structural complexity. As dynamic call-tree depth and node count increase, accuracy degrades sharply.
- Reasoning models struggle on repo-scale code generation: Unlike standard coding puzzles, reasoning/thinking models generally underperformed their standard base counterparts on SWE-Dev (with Claude-3.7-Sonnet being the notable exception), indicating that test-time "thinking" traces do not yet transfer well to repository-level feature synthesis.
- Simpler multi-agent systems (MAS) beat heavy workflows: Minimalist multi-agent architectures (like Self-Refine and Reflexion) outperformed complex, human-designed workflows (like ChatDev and MapCoder). Complex role-play agents racked up high API costs and call counts while compounding errors across agent dialogues.
- RL boosts precision at the expense of exploration: Applying PPO on unit-test feedback improved Pass@1 but stagnated Pass@3, showing that RL sharpened the model’s greedy generation efficiency but reduced output diversity.
Key Results
- Zero-Shot SOTA Performance: Claude-3.7-Sonnet achieved the highest single-model Pass@3, reaching 68.70% on the Easy split, but dropped to 22.45% on the Hard split.
- Multi-Agent Systems: Driven by GPT-4o-mini, Self-Refine achieved 40.02% Pass@1 on Easy and 20.03% on Hard (5 calls), outperforming ChatDev (35.13% Easy / 11.70% Hard with >26 calls) and single-agent GPT-4o-mini (34.47% Easy / 11.09% Hard).
- SFT Scaling: Fine-tuning Qwen2.5-7B-Instruct on SWE-Dev raised its Pass@1 on the Hard split from 6.68% to 18.89% (+183% relative gain), making it competitive with frontier proprietary models.
- RL Training: PPO fine-tuning on a 2k-sample subset raised Qwen2.5-7B's Hard Pass@1 to 12.25% (vs. 9.77% for SFT on the same data and 6.68% vanilla).
- MAS Role-Wise Training: Fine-tuning both the "organizer" and "coder" agents in EvoMAC elevated Pass@1 to 31.65% (Easy) and 12.70% (Hard), outperforming single-agent and base MAS baselines.
Limitations and Future Work
- Restricted Context Window: Due to token length constraints (average codebase has over 20,000 lines of code), inference experiments provided only task-relevant files rather than the entire repository. Future work must integrate full repository retrieval and long-context capabilities.
- Agent Coordination Overhead: Existing multi-agent frameworks suffer from hallucination propagation and redundant communication; more lightweight agent communication mechanisms are needed.
- Headroom in Repository RL: While initial RL experiments demonstrated Pass@1 improvements, significant room remains for exploration into long-context RL and multi-agent training dynamics.
Summary updated