量子支持向量机可有效预测软件缺陷,尤其在小数据场景下表现更优。
Comparative Analysis of Quantum and Classical Support Vector Classifiers for Software Bug Prediction: An Exploratory Study
- 将大数据集分块处理,用量子模型并行训练再聚合结果。
- 在14个开源项目上验证,准确率高于经典SVC,尤其在小数据时优势明显。
- 提出增量测试法,解决量子特征映射难题,适合早期缺陷检测场景。
目的:量子计算有望在多个领域提供快速实用的解决方案。在软件演化与维护中,量子机器学习(QML)仍属未充分探索领域,尤其在从代码仓库中检测存在缺陷的提交方面。方法:本研究探索量子支持向量分类器(QSVC)在14个开源项目上的应用,涵盖30,924个实例。对比了经典支持向量分类器(SVC)与两种量子算法:PQSVC(Pegasos QSVC)和QSVC。针对大样本问题,提出将数据分块处理,并设计聚合方法融合各子模型的预测结果以完成全集检测。同时引入增量测试方法,缓解测试阶段量子特征映射带来的挑战。结果:实验表明,QSVC与PQSVC在缺陷检测中表现有效;聚合策略显著提升整体检测精度;增量测试法有效应对量子特征映射难题。结论:本研究推动了QML在缺陷预测中的应用,揭示其进一步研究潜力。短时活动帧(STAF)场景凸显了在软件初期开发阶段、数据不足时实现缺陷早期发现的可行性。
原文摘要 · Abstract (English)
Purpose: Quantum computing promises to transform problem-solving across various domains with rapid and practical solutions. Within Software Evolution and Maintenance, Quantum Machine Learning (QML) remains mostly an underexplored domain, particularly in addressing challenges such as detecting buggy software commits from code repositories. Methods: In this study, we investigate the practical application of Quantum Support Vector Classifiers (QSVC) for detecting buggy software commits across 14 open-source software projects with diverse dataset sizes encompassing 30,924 data instances. We compare the QML algorithm PQSVC (Pegasos QSVC) and QSVC against the classical Support Vector Classifier (SVC). Our technique addresses large datasets in QSVC algorithms by dividing them into smaller subsets. We propose and evaluate an aggregation method to combine predictions from these models to detect the entire test dataset. We also introduce an incremental testing methodology to overcome the difficulties of quantum feature mapping during the testing approach. Results: The study shows the effectiveness of QSVC and PQSVC in detecting buggy software commits. The aggregation technique successfully combines predictions from smaller data subsets, enhancing the overall detection accuracy for the entire test dataset. The incremental testing methodology effectively manages the challenges associated with quantum feature mapping during the testing process. Conclusion: We contribute to the advancement of QML algorithms in defect prediction, unveiling the potential for further research in this domain. The specific scenario of the Short-Term Activity Frame (STAF) highlights the early detection of buggy software commits during the initial developmental phases of software systems, particularly when dataset sizes remain insufficient to train machine learning models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。