From SWE-ZERO to SWE-HERO: Execution-free to Execution-based Fine-tuning for Software Engineering Agents
The paper introduces SWE-ZERO to SWE-HERO, a two-stage fine-tuning framework that distills open-weight frontier LLMs into state-of-the-art software engineering agents by combining large-scale execution-free semantic training with targeted execution-backed refinement, achieving a 62.2% resolution rate on SWE-bench Verified and demonstrating robust multilingual transferability.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to teach a brilliant but inexperienced apprentice how to fix complex problems in a massive, ancient library (the software codebase).
For a long time, the only way to teach this apprentice was to give them a physical key to the library, a full set of tools, and a strict rule: "You cannot fix anything until you have tried it, seen if it broke, and fixed the breakage."
This is how most AI software engineers work today. They try a fix, run the code, see if it crashes, and try again. While effective, this is incredibly slow, expensive, and requires a massive amount of computer power (like renting a whole new library building just to test one book). If the library has weird, old rules, the apprentice can't even get in to start.
The authors of this paper, NVIDIA, decided to try a different, smarter approach. They created a two-step training program called SWE-ZERO to SWE-HERO.
Here is the simple breakdown:
Step 1: SWE-ZERO (The "Mental Gym")
The Analogy: Imagine a chess grandmaster who has never played a real game on a board but has studied millions of game books and can visualize every possible move in their head.
- What it is: The AI is trained on a huge amount of data (300,000 examples) where it is forbidden from actually running the code. It can only read the code and think.
- The Goal: This forces the AI to build a deep "mental model" of how software works. It learns to understand the logic and structure of the code without wasting time and money on trial-and-error.
- The Benefit: It's like the apprentice learning the theory of architecture without needing to build a house first. It's fast, cheap, and allows the AI to learn from millions of examples that would be too difficult to set up physically.
Step 2: SWE-HERO (The "Construction Site")
The Analogy: Now that the apprentice is a master theorist, we take them to a real construction site with a full set of tools and a safety inspector.
- What it is: The AI takes its "mental model" from Step 1 and applies it to a smaller, high-quality set of problems (13,000 examples) where it is allowed to run the code, test it, and see if it actually works.
- The Goal: This refines the AI's intuition. It learns to double-check its work, handle the messy reality of software bugs, and ensure the fix is solid.
- The Benefit: It turns the "gut feeling" from Step 1 into a rigorous, verified engineering skill.
Why is this a Big Deal?
1. It's a "Hero" Upgrade:
The paper shows that this two-step method creates AI agents that are significantly better than previous ones. Their best model, SWE-HERO-32B, solved 62.2% of real-world software bugs on a famous test called SWE-bench. This is a new record for open-source models of that size.
2. It's Like Learning a Language:
The most surprising part is that they trained the AI almost entirely on Python code. Yet, when they tested it on other languages (like JavaScript or Go), it still performed amazingly well (44.1% success rate).
- The Metaphor: It's like teaching someone the grammar and logic of English so well that they can suddenly read and write in French or Spanish without ever studying those specific languages. The AI learned the universal language of logic, not just the specific words.
3. It Saves the World (and the Cloud):
Traditional methods require setting up thousands of virtual computers (Docker containers) just to test code. This is like building a new house just to test a single brick.
- SWE-ZERO removes the need for these expensive "houses" during the learning phase. It allows researchers to train much larger AI models much faster and cheaper.
The Bottom Line
The authors realized that you don't need to physically break things to learn how to fix them. By first teaching the AI to think like an engineer (SWE-ZERO) and then letting it practice like one (SWE-HERO), they created a system that is faster, cheaper, and smarter than anything else currently available in the open-source world.
They are essentially saying: "Don't just run the code; understand the story behind the code first."
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.