EvoRepair: Enhancing Vulnerability Repair Agents Through Experience-Based Self-Evolution
EvoRepair introduces the first experience-based self-evolving agent framework for automated vulnerability repair that accumulates and reuses cross-vulnerability knowledge to significantly outperform existing LLM-based baselines on multiple benchmarks.
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 fix a broken machine in a dark room. You have a very smart, but inexperienced, apprentice (the AI) who is trying to figure out how to fix it.
The Problem: The "Trial-and-Error" Trap
In the past, when we asked AI to fix software security holes (vulnerabilities), it worked like this: The AI would guess a fix, try it, see if it broke, and then guess again.
- The Issue: If the AI made a mistake, it often forgot about it. In the next attempt, it would make the exact same mistake again. It was like a student who fails a math test, doesn't study the errors, and then fails the next test with the same wrong answer.
- The Second Issue: Even if the AI learned how to fix a specific type of leak in a pipe, it wouldn't remember that lesson when it encountered a different pipe with a similar leak. It treated every new problem as if it were the very first time it had ever seen one.
The Solution: EVOREPAIR (The "Experienced Master" System)
The authors of this paper created a system called EVOREPAIR. Think of it as giving the apprentice a personal mentor and a massive library of past case studies.
Here is how it works, using a simple analogy:
1. The "Experience Bank" (The Library)
Instead of just guessing, EVOREPAIR keeps a detailed diary of every repair attempt.
- What's in the diary? It doesn't just write "I fixed it." It writes: "We tried using a hammer, but it cracked the glass. We learned that for glass, we must use a screwdriver. Also, we found that if the screw is rusty, we need to oil it first."
- The "Score": Not every lesson is good. Some lessons are wrong or only work in one specific situation. EVOREPAIR uses a "judge" to rate these lessons. Only the high-quality, useful lessons are kept in the library.
2. The "Search" (The Librarian)
When a new vulnerability appears (a new broken machine), EVOREPAIR doesn't start from scratch.
- It acts like a librarian. It looks at the new problem and says, "Hey, this looks a lot like that broken toaster we fixed last week!"
- It pulls out the specific lessons from the library that match the current problem. It tells the AI: "Don't use the hammer this time; use the screwdriver, and remember to oil the screw."
3. The "Self-Evolution" (Getting Smarter)
This is the magic part. The system is cyclic.
- Repair: The AI tries to fix the problem using the library's advice.
- Learn: After the attempt (whether it succeeded or failed), the system analyzes what happened.
- Update: It writes a new lesson into the library based on this new attempt. If the AI found a better way to use the screwdriver, that new method is added to the book.
- Repeat: The next time a similar problem comes up, the library is even better than before. The AI is literally "evolving" by learning from its own history.
The Results: How Well Did It Work?
The researchers tested this system against 12 other top methods for fixing software bugs.
- The Score: EVOREPAIR fixed 93.5% of the problems on one major test and 87% on another.
- The Comparison: It was significantly better than the previous best methods. For example, it fixed about 40% more problems than the next best AI system.
- The "Transfer" Test: They even took the lessons learned from fixing problems in one programming language (like JavaScript) and used them to fix problems in a completely different language (like Java). It still worked, proving that the "lessons" were general enough to be useful across different types of code.
In a Nutshell
Previous AI repair tools were like students who forgot their mistakes. EVOREPAIR is like a master craftsman who keeps a detailed journal of every job, learns from every failure, and uses that accumulated wisdom to fix new problems faster and more accurately than ever before. It turns "trial and error" into "trial, learn, and succeed."
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.