Abstract
Automated Software Engineering (ASE) seeks to develop agents capable of autonomously resolving bugs and implementing features in complex codebases. However, the field is currently dominated by closed-source models and training paradigms that rely on static code snapshots. Lingma SWE-GPT addresses these challenges by focusing on the development process—the iterative reasoning and tool-use trajectory of expert programmers. By training on reconstructed historical GitHub Pull Requests, the Lingma SWE-GPT 72B variant achieves a 30.20% resolution rate on the SWE-bench Verified benchmark, effectively bridging the performance gap between open and closed-source models.
Introduction
Traditional code-centric large language models (LLMs) are often trained on final code products, missing the critical "how" and "why" behind software changes. This static approach limits an agent's ability to navigate large repositories, localize faults, and refine patches iteratively. Furthermore, the reliance on closed-source models like GPT-4o or Claude 3.5 creates barriers regarding data privacy and customization for proprietary environments. Lingma SWE-GPT is introduced as an open-source alternative designed to simulate the dynamic thought processes of human developers.
Methodology: Development-Process-Centric Training
The core innovation of Lingma SWE-GPT is its focus on the development trajectory. The model is trained to execute a three-stage workflow:
- Repository Understanding: Analyzing directory structures and using code compression to grasp global references.
- Fault Localization: Iteratively narrowing down bugs to specific code segments using specialized search APIs.
- Patch Generation: Generating, applying, and debugging fixes using git-like operations and linting tools.
To facilitate this, the authors developed SWESynInfer, an agent-based system that reconstructs these stages from approximately 90,000 high-quality GitHub Pull Requests. Every action in the training data is preceded by a Chain-of-Thought (CoT) reasoning step, ensuring the model learns the logic behind tool calls. Rejection sampling is then applied to filter for trajectories that successfully mirror human-authored fixes.
Agentic Inference Workflow
During inference, Lingma SWE-GPT operates as a multi-stage agent. This modular approach allows the model to handle the complexity of real-world repositories by breaking the problem into manageable sub-tasks: understanding, localization, and coding.
Key Results and Insights
Evaluation on the SWE-bench Verified benchmark demonstrates the efficacy of process-centric training:
- State-of-the-Art Open Performance: The 72B model resolved 30.20% of issues, nearly matching GPT-4o (31.80%) and significantly outperforming Llama 3.1 405B (24.60%) under the same framework.
- Efficiency at Scale: The 7B variant achieved an 18.20% success rate, surpassing the much larger Llama 3.1 70B (17.20%), suggesting that specialized training data is more impactful than raw parameter count in the ASE domain.
- The Localization Bottleneck: Fault localization remains the primary challenge. The 72B model's success is highly correlated with its ability to accurately identify bug locations, achieving 61.63% accuracy at the chunk level.
- Stability and Pass@k: The model showed high consistency across runs. When utilizing a pass@3 metric, the resolution rate for the 72B model climbed to 39.80%, exceeding the single-run performance of Claude 3.5 Sonnet.
Conclusion
Lingma SWE-GPT demonstrates that training on the development process—rather than just the resulting code—is a superior paradigm for automated software improvement. By open-sourcing these models, the authors provide a powerful tool for developers to build private, customized, and high-performing software agents. Future work will focus on improving localization precision and integrating automated unit testing into the training synthesis phase.
Summary updated