arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2605.24137cs.SEcs.AI
收藏

LLM生成的错误报告摘要中幻觉的经验分析与检测

Empirical Analysis and Detection of Hallucinations in LLM-Generated Bug Report Summaries

Electrical and Software Engineering(电气与软件工程学院)

Hinduja Nirujan, Shreyas Patil, Abdallah Ayoub, Ahmad Abdel Latif, Gouri Ginde

AI总结:

本研究从章节感知角度经验性地调查了LLM生成的错误报告摘要中的幻觉,提出了联合预测幻觉内容、识别受影响章节和分类幻觉类型的检测方法,并在BugsRepo数据集上取得了良好性能。

摘要:

大型语言模型(LLMs)越来越多地被用于生成软件错误报告的摘要,包括诸如重现步骤(S2R)、实际行为(AB)和预期行为(EB)等章节。然而,这些模型经常产生看似可信但缺乏源报告支持的幻觉,这可能会误导开发者并降低对自动化维护工具的信任。现有的幻觉检测方法通常在完整响应级别评估输出,并未考虑技术文档的结构。一项对80个结构化错误报告摘要的初步探索性研究发现,约47.9%包含缺失信息,而12.3%包含捏造内容,凸显了在错误报告摘要中进行系统性幻觉分析的必要性。在这项工作中,我们从章节感知的角度经验性地调查了LLM生成的错误报告摘要中的幻觉。利用源自Mozilla OSS项目的BugsRepo数据集,我们引入了受控的合成幻觉注入,以构建用于训练和评估的基准。我们提出了一种章节感知的幻觉检测方法,该方法联合预测摘要是否包含幻觉内容、识别受影响的章节,并对幻觉类型进行分类。在多个预训练语言模型上的实验结果表明,所提出的方法在所有任务上均取得了强劲性能,最佳模型在报告级别上获得了0.89的Macro-F1,在章节级别上获得了0.83的Macro-F1,在幻觉类型上获得了0.84的Macro-F1。我们进一步分析了常见的幻觉模式和模型失败模式,以更好地理解当前LLM生成的错误报告摘要的局限性。研究结果强调了章节感知的幻觉分析对于提高软件维护工作流中LLM辅助错误报告摘要可靠性的重要性。

英文摘要:

Large Language Models (LLMs) are increasingly used to generate summaries of software bug reports, including sections such as Steps-to-Reproduce (S2R), Actual Behavior (AB), and Expected Behavior (EB). However, these models frequently produce hallucinations that can be convincing but unsupported by the source report. This can mislead developers and reduce trust in automated maintenance tools. Existing hallucination detection approaches typically evaluate outputs at the full-response level and do not consider the structure of technical documents. An initial exploratory study on 80 structured bug report summaries found that approximately 47.9% contained missing information, while 12.3% included fabricated content, highlighting the need for systematic hallucination analysis in bug report summarization. In this work, we empirically investigate hallucinations in LLM-generated bug report summaries from a section-aware perspective. Using the BugsRepo dataset, derived from Mozilla OSS projects, we introduce controlled synthetic hallucination injection to construct a benchmark for training and evaluation. We propose a section-aware hallucination detection approach that jointly predicts whether a summary contains hallucinated content, identifies affected sections, and classifies hallucination types. Experimental results across multiple pretrained language models show that the proposed approach achieves strong performance across all tasks, with the best model obtaining 0.89 report-level Macro-F1, 0.83 section-level Macro-F1, and 0.84 hallucination-type Macro-F1. We further analyze common hallucination patterns and model failure modes to better understand limitations of current LLM-generated bug report summaries. The findings highlight the importance of section-aware hallucination analysis for improving the reliability of LLM-assisted bug report summarization in software maintenance workflows.

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

↑