arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.02134cs.SE
收藏

基于种群的语义进化用于LLM引导的自动程序修复

Semantic Evolution over Populations for LLM-Guided Automated Program Repair

University of Texas at Dallas(达拉斯德州大学);FPT Software AI Center(FPT软件人工智能中心);Hanoi University of Science and Technology(河内科技大学)

Cuong Chi Le, Minh Le-Anh, Cuong Duc Van, Tien N. Nguyen

AI总结:

本文提出EvolRepair框架,通过语义进化算法提升LLM引导的自动程序修复效果,解决修复假设多样性、语义相关修复家族识别等挑战。

摘要:

大型语言模型(LLM)近期在自动程序修复(APR)中展现出强大潜力,尤其通过迭代细化生成和改进候选补丁。然而,最先进的迭代细化LLM-based APR方法无法完全解决挑战,包括保持修复假设中的有用多样性、识别语义相关的修复家族、组合互补的局部修复、利用结构化失败信息以及逃离结构上错误的搜索区域。本文提出了一种基于种群的语义进化框架用于APR迭代细化,称为EvolRepair,将LLM-based APR视为语义进化算法。EvolRepair改组了经典遗传算法的搜索范式,但用由LLM和结构化执行反馈驱动的语义感知组件取代其语法基础运算符。候选修复被组织成行为上一致的群体,使算法能够保持多样性、推理解修家族,并通过重新组合互补的修复见解来合成更强的候选。通过利用结构化失败模式来引导搜索方向,EvolRepair可以在必要时细化有希望的修复策略并转向替代抽象。我们的实验表明,EvolRepair在现有LLM-based APR方法上显著提高了修复效果。

英文摘要:

Large language models (LLMs) have recently shown strong potential for automated program repair (APR), particularly through iterative refinement that generates and improves candidate patches. However, state-of-the-art iterative refinement LLM-based APR approaches cannot fully address challenges, including maintaining useful diversity among repair hypotheses, identifying semantically related repair families, composing complementary partial fixes, exploiting structured failure information, and escaping structurally flawed search regions. In this paper, we propose a Population-Based Semantic Evolution framework for APR iterative refinement, called EvolRepair, that formulates LLM-based APR as a semantic evolutionary algorithm. EvolRepair reformulates the search paradigm of classic genetic algorithm for APR, but replaces its syntax-based operators with semantics-aware components powered by LLMs and structured execution feedback. Candidate repairs are organized into behaviorally coherent groups, enabling the algorithm to preserve diversity, reason over repair families, and synthesize stronger candidates by recombining complementary repair insights across the population. By leveraging structured failure patterns to guide search direction, EvolRepair can both refine promising repair strategies and shift toward alternative abstractions when necessary. Our experiments show that EvolRepair substantially improves repair effectiveness over existing LLM-based APR approaches.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑