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

GALA: 多模态图对齐用于自动化程序修复中的缺陷定位

GALA: Multimodal Graph Alignment for Bug Localization in Automated Program Repair

Sichuan University(四川大学);Peking University(北京大学)

Zhuoyao Liu, Zhengran Zeng, Shu-Dong Huang, Yang Liu, Shikun Zhang, Wei Ye

AI总结:

GALA通过多模态图对齐方法,解决GUI截图场景下自动化程序修复的缺陷定位问题,通过结构化推理提升视觉与代码的映射精度。

摘要:

基于大语言模型的自动化程序修复(APR)在文本基准上表现优异,但在包含GUI截图的多模态场景中表现不佳。现有方法将图像转换为纯文本,丢失了关键的空间关系,导致视觉观察与代码组件之间脱节,使缺陷定位退化为不准确的关键词匹配。为弥合这一差距,我们提出了GALA(用于APR中的缺陷定位的图对齐框架),将多模态APR从隐含语义猜测转向显式结构推理。GALA分为四个阶段:首先构建图像UI图以捕捉视觉元素及其结构关系;然后通过交叉参考此UI图与仓库级结构(如文件引用)来定位候选文件;接着通过推理细粒度代码依赖(如调用图)进行函数级对齐,将视觉元素精确映射到相应代码组件;最后基于对齐的文件和函数生成补丁。通过系统地在模态间施加语义和关系一致性,GALA建立了高度准确的视觉到代码映射。在SWE-bench多模态基准上的评估表明,GALA实现了最先进的性能,突显了层次化结构对齐的有效性。

英文摘要:

Large Language Model (LLM)-based Automated Program Repair (APR) has shown strong potential on textual benchmarks, yet struggles in multimodal scenarios where bugs are reported with GUI screenshots. Existing methods typically convert images into plain text, which discards critical spatial relationships and causes a severe disconnect between visual observations and code components, leading localization to degrade into imprecise keyword matching. To bridge this gap, we propose GALA (Graph Alignment for Localization in APR), a framework that shifts multimodal APR from implicit semantic guessing to explicit structural reasoning. GALA operates in four stages: it first constructs an Image UI Graph to capture visual elements and their structural relationships; then performs file-level alignment by cross-referencing this UI graph with repository-level structures (e.g., file references) to locate candidate files; next conducts function-level alignment by reasoning over fine-grained code dependencies (e.g., call graphs) to precisely ground visual elements to corresponding code components; and finally performs patch generation within the grounded code context based on the aligned files and functions. By systematically enforcing both semantic and relational consistency across modalities, GALA establishes a highly accurate visual-to-code mapping. Evaluations on the SWE-bench Multimodal benchmark demonstrate that GALA achieves state-of-the-art performance, highlighting the effectiveness of hierarchical structural alignment.

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

↑