arXiv:2605.24137cs.SEcs.AI2026-05

发现并检测大模型生成的缺陷报告摘要中存在近半数信息缺失或虚构内容。

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

论文配图:Empirical Analysis and Detection of Hallucinations in LLM-Generated Bug Report Summaries
图 1 · 摘自论文原文
  • 按报告结构分段检测幻觉,提升定位精度
  • 在80个样本中发现47.9%缺信息、12.3%有虚构内容
  • 适用于提升自动化维护工具可信度的开发者

大型语言模型(LLMs)被广泛用于生成软件缺陷报告摘要,包括复现步骤(S2R)、实际行为(AB)和预期行为(EB)等部分。然而,这些模型常产生看似合理但无据可依的幻觉内容,误导开发者并降低对自动化工具的信任。现有检测方法多在整篇输出层面评估,未考虑技术文档的结构特性。一项针对80个结构化缺陷报告摘要的初步研究发现,约47.9%存在信息缺失,12.3%包含虚构内容,凸显了系统性幻觉分析的必要性。本文从分段视角实证研究了LLM生成摘要中的幻觉问题。基于Mozilla开源项目数据集BugsRepo,我们通过可控合成幻觉注入构建基准数据集,提出一种分段感知的幻觉检测方法,可联合预测是否存在幻觉、识别受影响段落并分类幻觉类型。在多个预训练模型上的实验表明,该方法在各项任务上表现优异,最优模型达到0.89的报告级宏平均F1、0.83的段落级宏平均F1和0.84的幻觉类型宏平均F1。进一步分析揭示常见幻觉模式与模型失效机制,强调分段感知分析对提升软件维护中LLM摘要可靠性的重要性。

原文摘要 · Abstract (English)

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.

幻觉检测缺陷报告LLM评估

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。