paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Knowledge-Enhanced Program Repair for Data Science Code

面向数据科学代码的知识增强程序修复
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 6/10 · 该论文将知识图谱RAG与AST静态分析结合用于LLM程序修复,属于LLM作为工具改进代码修复,与用户关注的静态分析在ML/Agentic代码中的应用及LLM辅助程序分析有部分交叉,但核心并非静态分析理论或浮点/贝叶斯分析,更偏软件工程应用。引用 2 inbox
Shuyin Ouyang, Jie M. Zhang, Zeyu Sun, Albert Merono Penuela
crossref: 2026-09-12

AI 速览

一句话:提出DSrepair,用知识图谱RAG增强LLM修复数据科学代码缺陷,显著提升修复率并减少token消耗。

本文针对 LLM 生成的数据科学代码常含缺陷、现有修复方法缺乏领域知识的问题,提出知识增强修复方法 DSrepair。它利用知识图谱 RAG 检索 API 知识并增强缺陷知识,构建 DS-KG;同时用 AST 在节点级定位错误,为 LLM 生成修复提示。作者在 DS-1000 上以四个 LLM 和五个最优修复基线评测。结果表明,DSrepair 优于全部基线;相比次优基线,对四个 LLM 分别多修复 44.4%、14.2%、20.6%、32.1% 的缺陷片段,并减少每任务 token 消耗 17.49%、34.24%、24.71%、17.59%。

问题
LLM 生成的数据科学代码常含缺陷,而现有 LLM 修复方法缺乏数据科学 API 与缺陷知识。
方法
DSrepair 基于知识图谱 RAG 检索 API 知识并增强缺陷知识,构建 DS-KG;同时利用 AST 在节点级定位错误,构造修复提示供 LLM 使用。
评估
在 DS-1000 数据集上,以四个先进 LLM 与五个当前最优 LLM 修复基线进行比较,评估修复成功数与 token 效率。
原文摘要(Abstract)

This paper introduces DSrepair, a knowledge-enhanced program repair approach designed to repair the buggy code generated by LLMs in the data science domain. DSrepair uses knowledge graph based RAG for API knowledge retrieval and bug knowledge enrichment to construct repair prompts for LLMs. Specifically, to enable knowledge graph-based API retrieval, we construct DS-KG (Data Science Knowledge Graph) for widely used data science libraries. For bug knowledge enrichment, we employ an abstract syntax tree (AST) to localize errors at the AST node level. We evaluate DSrepair's effectiveness against five state-of-the-art LLM-based repair baselines using four advanced LLMs on the DS-1000 dataset. The results show that DSrepair outperforms all five baselines. Specifically, when compared to the second-best baseline, DSrepair achieves substantial improvements, fixing 44.4%, 14.2%, 20.6%, and 32.1% more buggy code snippets for each of the four evaluated LLMs, respectively. Additionally, it achieves greater efficiency, reducing the number of tokens required per code task by 17.49%, 34.24%, 24.71%, and 17.59%, respectively.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8746,
  title = {Knowledge-Enhanced Program Repair for Data Science Code},
  author = {Shuyin Ouyang and Jie M. Zhang and Zeyu Sun and Albert Merono Penuela},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00246}
}