EvoRepair : Enhancing Vulnerability Repair Agents Through Experience-Based Self-Evolution

Haichuan Hu, Guoqing Xie, Quanjun Zhang, Jiawei Liu, Shengcheng Yu, Chunrong Fang, Zhenyu Chen, Liang Xiao, Technical University of Munich · 2026

Read EvoRepair : Enhancing Vulnerability Repair Agents Through Experience-Based Self-Evolution by Haichuan Hu, Guoqing Xie, Quanjun Zhang, Jiawei Liu, Shengcheng Yu, Chunrong Fang, Zhenyu Chen, Liang Xiao, Technical University of Munich (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-30105.txt.

Introduction

Haichuan Hu and seven colleagues present EvoRepair, a self-evolving framework for repairing software flaws with language models. Current models repeat similar mistakes and waste past knowledge, lacking ways to bank experience within and across flaws. EvoRepair cycles between learning and repair, retrieving past cases, extracting fresh ones from repair runs, and updating an experience bank by quality scores. It tops 15 baselines on two benchmarks and transfers well to a third. This shows learning from experience strengthens agentic repair.

Catalog record

CREATORHaichuan Hu, Guoqing Xie, Quanjun Zhang, Jiawei Liu, Shengcheng Yu, Chunrong Fang, Zhenyu Chen, Liang Xiao, Technical University of Munich
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE78762
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2605.30105

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

EvoRepair : Enhancing Vulnerability Repair Agents Through Experience-Based Self-Evolution Haichuan Hu, Guoqing Xie, Quanjun Zhang, Jiawei Liu, Shengcheng Yu, Chunrong Fang, Zhenyu Chen, Liang Xiao, Technical University of Munich Abstract Large Language Models (LLMs) have shown promise for automated vulnerability repair (AVR), but they still face several limitations, including the lack of intra-vulnerability experience accumulation and the lack of cross-vulnerability experience reuse. As a result, LLMs may repeatedly make similar mistakes during iterative repair and underutilize valuable repair knowledge from historical vulnerabilities. To address these challenges, we propose EvoRepair , the first experience-based self-evolving AVR agent framework that enables LLMs to accumulate, refine, and leverage domain-specific knowledge across long-horizon vulnerability repairs. EvoRepair follows a cyclic learn-and-repair process that retrieves relevant past experiences to guide repair, extracts new experiences from repair trajectories, and updates an experience bank using quality-aware scoring. We evaluate EvoRepair against 12 representative vulnerability repair baselines on PATCHEVAL and SEC-bench using GPT-5-mini. Results show that EvoRepair achieves the best overall performance, reaching 93.47% on PATCHEVAL, 87.00% on SEC-bench, and 90.46% overall. In particular, EvoRepair outperforms latest LLM-based baseline LoopRepair by 39.56% and 33.50% on PATCHEVAL and SEC-bench, respectively, and surpasses IntentFix by 70.86% and 50.50%. Across both benchmarks, EvoRepair also exceeds the recent self-evolving agent Live-SWE-Agent by 6.98% overall. Additional transfer experiments on VUL4J further demonstrate the robustness of EvoRepair across models, programming languages, and datasets. These findings demonstrate that experience-based self-evolution substantially strengthens agentic AVR and goes beyond existing self-evolving techniques. 1 Introduction As software systems continue to grow in size and complexity, security vulnerabilities have increased steadily, posing a significant threat to modern software systems [ 55 , 7 ] . As shown in Figure 1 , the number of reported CVEs accelerated after 2019; in 2024 alone, 38,942 new CVEs were reported, representing a 25% year-over-year increase and the highest annual total on record. Figure 1: Yearly growth in reported CVEs. Given the growing number of disclosed vulnerabilities, Automated Vulnerability Repair (AVR) [ 76 , 54 ] has emerged as a promising approach for accelerating vulnerability fix and reducing security risks. Early work on AVR [ 24 , 25 , 28 , 33 ] , predominantly based on program analysis and search-based methods, has shown effectiveness in synthesizing patches for certain types of vulnerabilities, albeit typically within constrained domains. Subsequent learning-based AVR techniques [ 22 , 26 , 72 ] fine-tune pre-trained models on large-scale vulnerability datasets to capture diverse repair patterns. However, learning-based methods face an important evaluation challenge. Prior work generally adopts CodeBLEU [ 48 ] and Exact Match as evaluation metrics, such execution-agnostic measures are insufficient for assessing real-world repair effectiveness. Specifically, they primarily capture surface-level similarity to reference patches and may therefore overestimate a model’s ability to generalize across heterogeneous datasets. Recently, the rise of Large Language Models (LLMs) has opened new opportunities for AVR [ 82 ] . Compared with earlier learning-based methods, LLM-based approaches [ 16 , 4 , 52 , 53 , 38 , 3 ] can achieve strong repair performance under zero-shot or few-shot settings. Moreover, they make end-to-end repair feasible and use test feedback to iteratively revise incorrect patches, reducing reliance on the matching-based evaluation schemes commonly used in prior learning-based methods. Although LLM-based methods represent the state of the art in AVR, they still face several technical challenges. (1) Lack of intra-vulnerability repair experience accumulation. Existing AVR methods make limited use of the experience generated during the repair of a single vulnerability. Although multiple repair trajectories may be explored, intermediate successes, failures, and diagnostic signals are rarely distilled into reusable experience for subsequent attempts. Here, we define experience as structured repair knowledge abstracted from repair trajectories, rather than raw interaction logs or one-off patches. Without such experience accumulation, LLMs may repeatedly follow unproductive repair paths, make similar mistakes across trajectories, and miss opportunities to iteratively refine its repair strategy. This stateless repair behavior reduces efficiency and weakens LLMs’ ability to improve within the current task. (2) Lack of cross-vulnerability repair experience reuse. Existing AVR methods [ 70 , 20 , 34 ] largely treat each vulnerability as an isolated repair task and do not systematically reuse repair experience across different vulnerabilities. This limitation becomes increasingly critical as the number of reported vulnerabilities continues to rise, as shown in Figure 1 , making one-by-one isolated repair progressively less scalable. Because CWE and CVE provide structured taxonomies, vulnerabilities within the same or related categories often share similar causes, contexts, and repair patterns. However, although retrieval-augmented approaches [ 14 ] that retrieve reference patches or examples can provide useful guidance, they remain limited in AVR because the retrieved knowledge is typically static and instance-specific. In contrast, effective AVR requires repair experience that is reusable, generalizable, and continuously refined through a self-evolving repair process. Consequently, relying solely on static retrieval limits cross-case generalization and hinders the accumulation of transferable repair knowledge for large-scale vulnerability repair. Together these challenges indicate that effective AVR requires not only generating patches for the current vulnerability, but also accumulating, refining, and reusing repair experience both within and across vulnerabilities. This motivates the following research question: how can AVR systems effectively accumulate and reuse repair experience both across vulnerabilities and within a single vulnerability? To answer this question, we propose EvoRepair , an experience-based self-evolving framework for AVR. The core idea of EvoRepair is a cyclic two-stage learn-and-repair paradigm. In the learning stage, EvoRepair extracts domain-specific repair knowledge from historical vulnerability repair trajectories and stores it as long-term repair experience. In the repair stage, EvoRepair retrieves relevant experiences for similar vulnerabilities and uses them to guide the repair process toward more promising repair directions. By alternating between these two stages, EvoRepair continuously improves both repair effectiveness and the quality of the accumulated repair experience. We evaluate EvoRepair against 12 representative AVR baselines on PATCHEVAL [ 60 ] and SEC-bench [ 41 ] . Overall, the results show that EvoRepair achieves the best performance across both datasets, reaching 93.47% on PATCHEVAL, 87.00% on SEC-bench, and 90.46% overall. In particular, EvoRepair outperforms the strongest LLM-based baseline, LoopRepair, by 39.56% and 33.50% on PATCHEVAL and SEC-bench, respectively, and surpasses IntentFix by 70.86% and 50.50%. EvoRepair also exceeds the recent self-evolving SE agent Live-SWE-Agent by 6.98% overall. Furthermore, cross-dataset transfer experiments on VUL4J demonstrate that the experiences synthesized by EvoRepair generalize across different datasets, programming languages, and model backbones. In summary, we make the following contributions: • New Dimension. We introduce experience-based self-evolution as a new research dimension for automated vulnerability repair. To the best of our knowledge, this is the first work to study how AVR systems can continuously accumulate, refine, and reuse repair experience to improve future AVR processes. • Novel Method. We propose EvoRepair , an experience-based self-evolving framework for automated vulnerability repair. EvoRepair follows a cyclic learn-and-repair paradigm: it learns reusable repair knowledge from historical repair trajectories and retrieves relevant experiences to guide future repairs. This design enables both cross-vulnerability experience reuse and intra-vulnerability experience accumulation. • Extensive Experiments. We evaluate EvoRepair against 12 representative vulnerability repair baselines on PATCHEVAL and SEC-bench, and further assess the experience transfer ability of EvoRepair on VUL4J. The results demonstrate the strong effectiveness of EvoRepair , as well as

Read the complete text