paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Explainable Fault Localization for Programming Assignments via LLM-Guided Annotation

面向编程作业的可解释故障定位:基于 LLM 引导标注
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 5/10 · 论文属于利用 LLM 改进程序分析(故障定位)的 AI→PL 方向,但故障定位并非用户核心关注的静态分析/形式化验证,也未涉及浮点或贝叶斯程序分析;教育作业场景与用户偏好的工业落地也有距离。引用 0 inbox
Fang Liu, Tianze Wang, Li Zhang, Zheyu Yang, Jing Jiang, Zian Sun
crossref: 2026-09-12

AI 速览

一句话:提出 FLAME,用 LLM 引导标注与多模型加权投票实现编程作业细粒度可解释故障定位。

该论文关注教育场景下编程作业的自动故障定位问题。现有方法多停留在方法级且缺乏解释,难以给学生可操作的反馈;部分行级方法又依赖直接预测行号,不适合 LLM。为此,作者提出 FLAME:利用编程作业特有的丰富上下文引导 LLM 标注故障代码行并生成解释,而不是直接输出行号;同时引入加权多模型投票策略,聚合多个 LLM 的结果以判断每行代码的可疑度,提高定位可靠性。实验表明,FLAME 在编程作业上优于最先进的故障定位基线,在 top-1 上比最佳基线多定位 207 个故障;在通用软件代码库 Defects4J 上也展现出良好泛化能力,并优于所有基线。

问题
教育场景中的自动故障定位往往粒度过粗、缺乏解释,而行级方法直接预测行号的方式又不适合 LLM,难以为学生提供细粒度可操作的反馈。
方法
提出 FLAME,利用编程作业上下文提示 LLM 以自然语言解释的方式标注故障代码行,并通过加权多模型投票聚合多个 LLM 的预测来计算每行可疑度。
评估
在编程作业数据集上对比最先进故障定位基线,并在通用软件 Defects4J 基准上测试泛化性;结果显示 FLAME 在 top-1 上多定位 207 个故障,且优于所有基线。
原文摘要(Abstract)

Providing timely and personalized guidance for students’ programming assignments, particularly by indicating fine-grained error locations with explanations, offers significant practical value for helping students complete assignments and enhance their learning outcomes. In recent years, various automated Fault Localization (FL) techniques, particularly those leveraging Large Language Models (LLMs), have demonstrated promising results in identifying errors in programs. However, existing fault localization techniques face challenges when applied to educational contexts. Most approaches operate at the method level without explanatory feedback, resulting in granularity too coarse for students who need actionable insights to identify and fix their errors. While some approaches attempt line-level fault localization, they often depend on predicting line numbers directly in numerical form, which is ill-suited to LLMs. To address these challenges, we propose FLAME, a fine-grained, explainable Fault Localization method tailored for programming assignments via LLM-guided Annotation and Model Ensemble. FLAME leverages rich contextual information specific to programming assignments to guide LLMs in identifying faulty code lines. Instead of directly predicting line numbers, we prompt the LLM to annotate faulty code lines with detailed explanations, enhancing both localization accuracy and educational value. To further improve reliability, we introduce a weighted multi-model voting strategy that aggregates results from multiple LLMs to determine the suspiciousness of each code line. Extensive experimental results demonstrate that FLAME outperforms state-of-the-art fault localization baselines on programming assignments, successfully localizing 207 more faults at top-1 over the best-performing baseline. Beyond educational contexts, FLAME also generalizes effectively to general-purpose software codebases, outperforming all baselines on the Defects4J benchmark.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9465,
  title = {Explainable Fault Localization for Programming Assignments via LLM-Guided Annotation},
  author = {Fang Liu and Tianze Wang and Li Zhang and Zheyu Yang and Jing Jiang and Zian Sun},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00167}
}