在量子软件中自动化检测和根本原因分析故障测试
Automating Detection and Root-Cause Analysis of Flaky Tests in Quantum Software
AI总结:
本文提出利用LLMs自动化检测量子软件中的故障测试并识别其根本原因,通过扩展数据集和评估模型性能,展示了LLMs在提升量子软件测试可靠性方面的潜力。
摘要:
与经典软件类似,量子软件系统依赖于自动化测试。然而,其本质上概率性输出使其容易出现量子不稳定性——即在没有代码更改的情况下测试结果不一致。此类量子不稳定的测试可能掩盖真实缺陷并降低开发人员生产力,但系统性的工具用于检测和诊断此类问题仍有限。本文提出了一种自动化流程,用于检测量子软件仓库中与故障测试相关的问题和拉取请求,并支持其根本原因的识别。我们旨在扩展一个现有的量子不稳定性测试数据集,并评估大型语言模型(LLMs)在不稳定性分类和根本原因识别方面的能力。基于对14个量子软件仓库的先前手动分析,我们利用LLMs和余弦相似性自动化发现额外的不稳定性测试用例。我们进一步评估了来自OpenAI GPT、Meta LLaMA、Google Gemini和Anthropic Claude系列的各种LLMs,以对不稳定性进行分类并从问题描述和代码上下文中识别根本原因。分类性能使用标准性能指标进行评估,包括F1分数。使用我们的流程,我们识别了25个之前未知的不稳定性测试用例,将原始数据集的大小增加了54%。表现最佳的模型,Google Gemini,在不稳定性检测上的F1分数为0.9420,在根本原因识别上的F1分数为0.9643,证明了LLMs可以为筛选不稳定性报告和理解其根本原因提供实用支持。扩展的数据集和自动化流程为量子软件工程社区提供了可重用的成果。未来的工作将专注于提高检测的鲁棒性,并探索自动化修复量子不稳定性测试。
英文摘要:
Like classical software, quantum software systems rely on automated testing. However, their inherently probabilistic outputs make them susceptible to quantum flakiness -- tests that pass or fail inconsistently without code changes. Such quantum flaky tests can mask real defects and reduce developer productivity, yet systematic tooling for their detection and diagnosis remains limited. This paper presents an automated pipeline to detect flaky-test-related issues and pull requests in quantum software repositories and to support the identification of their root causes. We aim to expand an existing quantum flaky test dataset and evaluate the capability of Large Language Models (LLMs) for flakiness classification and root-cause identification. Building on a prior manual analysis of 14 quantum software repositories, we automate the discovery of additional flaky test cases using LLMs and cosine similarity. We further evaluate a variety of LLMs from OpenAI GPT, Meta LLaMA, Google Gemini, and Anthropic Claude suites for classifying flakiness and identifying root causes from issue descriptions and code context. Classification performance is assessed using standard performance metrics, including F1-score. Using our pipeline, we identify 25 previously unknown flaky tests, increasing the original dataset size by 54%. The best-performing model, Google Gemini, achieves an F1-score of 0.9420 for flakiness detection and 0.9643 for root-cause identification, demonstrating that LLMs can provide practical support for triaging flaky reports and understanding their underlying causes in quantum software. The expanded dataset and automated pipeline provide reusable artifacts for the quantum software engineering community. Future work will focus on improving detection robustness and exploring automated repair of quantum flaky tests.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。