[论文解读] Beyond ChatGPT: Enhancing Software Quality Assurance Tasks with Diverse LLMs and Validation Techniques
本文评估了多种大语言模型(GPT-3.5、GPT-4o、LLaMA-3-70B、LLaMA-3-8B、Gemma-7B 和 Mixtral-8x7B)在软件质量保证中的故障定位与漏洞检测表现。研究提出了一种投票机制与基于验证提示的交叉验证方法,相较于 GPT-3.5,故障定位准确率提升超过 10%,最高提升达 16%。
With the advancement of Large Language Models (LLMs), their application in Software Quality Assurance (SQA) has increased. However, the current focus of these applications is predominantly on ChatGPT. There remains a gap in understanding the performance of various LLMs in this critical domain. This paper aims to address this gap by conducting a comprehensive investigation into the capabilities of several LLMs across two SQA tasks: fault localization and vulnerability detection. We conducted comparative studies using GPT-3.5, GPT-4o, and four other publicly available LLMs (LLaMA-3-70B, LLaMA-3-8B, Gemma-7B, and Mixtral-8x7B), to evaluate their effectiveness in these tasks. Our findings reveal that several LLMs can outperform GPT-3.5 in both tasks. Additionally, even the lower-performing LLMs provided unique correct predictions, suggesting the potential of combining different LLMs' results to enhance overall performance. By implementing a voting mechanism to combine the LLMs' results, we achieved more than a 10% improvement over the GPT-3.5 in both tasks. Furthermore, we introduced a cross-validation approach to refine the LLM answer by validating one LLM answer against another using a validation prompt. This approach led to performance improvements of 16% in fault localization and 12% in vulnerability detection compared to the GPT-3.5, with a 4% improvement compared to the best-performed LLMs. Our analysis also indicates that the inclusion of explanations in the LLMs' results affects the effectiveness of the cross-validation technique.
研究动机与目标
- 探究除 GPT-3.5 之外的多种大语言模型在故障定位与漏洞检测等关键 SQA 任务中的表现。
- 基于模型规模、架构与任务复杂度,识别不同大语言模型之间的性能差异。
- 探索集成技术——投票与基于验证提示的交叉验证——以提升基于大语言模型的 SQA 结果。
- 评估解释质量对交叉验证优化效果的影响。
- 为 SQA 工作流中大语言模型的选择与组合提供基准参考,减少对单一模型(如 GPT-3.5)的依赖。
提出的方法
- 基于先前研究的标准化数据集,对比六种大语言模型(GPT-3.5、GPT-4o、LLaMA-3-70B、LLaMA-3-8B、Gemma-7B 和 Mixtral-8x7B)在两项 SQA 任务中的表现。
- 采用投票机制,通过多数共识确定最终预测结果,以整合各模型的互补优势。
- 设计了一种交叉验证方法,利用专用验证提示将一个大语言模型的输出通过另一个大语言模型的响应进行验证与优化。
- 在故障定位任务中,以 GPT-4o 和 LLaMA-3-70B 作为主要优化配对;在漏洞检测任务中,以 GPT-4o 和 Gemma-7B 作为主要优化配对。
- 采用标准指标评估性能:故障定位使用 Top-1 准确率,漏洞检测使用 F1 分数。
- 每种大语言模型独立运行三次,以确保结果稳定性并减少评估中的随机性。

实验结果
研究问题
- RQ1与当前 SQA 研究中的基准模型 GPT-3.5 相比,不同大语言模型在故障定位与漏洞检测任务中的表现如何?
- RQ2通过投票机制整合多个大语言模型的预测结果,是否能显著提升 SQA 任务的性能?
- RQ3使用验证提示的交叉验证是否能显著提升大语言模型在 SQA 任务中的预测准确率?
- RQ4在大语言模型输出中包含解释信息,是否会影响交叉验证优化过程的有效性?
- RQ5尽管参数量较少,Gemma-7B 等小型大语言模型在某些 SQA 任务中是否仍具备竞争力?
主要发现
- GPT-4o 在故障定位任务中表现最佳,相比 GPT-3.5,Top-1 准确率提升 16.24%。
- 尽管参数量最小,Gemma-7B 在漏洞检测任务中仍比 GPT-3.5 高出 7.8% 的准确率。
- 投票机制使故障定位性能提升 13.7%,漏洞检测性能提升 11.2%,相较 GPT-3.5。
- 使用 GPT-4o 作为输入、LLaMA-3-70B 进行验证的交叉验证方法,使故障定位性能相比 GPT-3.5 提升 16%,相比 LLaMA-3-70B 单独使用提升 4.1%。
- 在漏洞检测任务中,GPT-4o 经 Gemma-7B 验证后,性能相比 GPT-3.5 提升 12%,相比 GPT-4o 单独使用提升 7.1%。
- 交叉验证的效果受大语言模型输出解释质量的影响,解释能力较弱的模型(如 Gemma-7B)在优化过程中表现有限。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。