[论文解读] Revisiting Process versus Product Metrics: a Large Scale Analysis
本研究基于700个GitHub项目中722,471个提交的规模化分析,重新评估了过程度量与产品度量在缺陷预测中的有效性。结果表明,过程度量显著优于产品度量(AUC:95% vs. 54%,召回率:98% vs. 44%),但警告称,小规模研究中得出的度量重要性排名无法推广至大规模环境,主张采用集成方法和规模化分析以确保结果的稳健性与普适性。
Numerous methods can build predictive models from software data. However, what methods and conclusions should we endorse as we move from analytics in-the-small (dealing with a handful of projects) to analytics in-the-large (dealing with hundreds of projects)? To answer this question, we recheck prior small-scale results (about process versus product metrics for defect prediction and the granularity of metrics) using 722,471 commits from 700 Github projects. We find that some analytics in-the-small conclusions still hold when scaling up to analytics in-the-large. For example, like prior work, we see that process metrics are better predictors for defects than product metrics (best process/product-based learners respectively achieve recalls of 98\%/44\% and AUCs of 95\%/54\%, median values). That said, we warn that it is unwise to trust metric importance results from analytics in-the-small studies since those change dramatically when moving to analytics in-the-large. Also, when reasoning in-the-large about hundreds of projects, it is better to use predictions from multiple models (since single model predictions can become confused and exhibit a high variance).
研究动机与目标
- 评估小规模软件分析(即“小规模分析”)中的结论在扩展至数百个项目(即“大规模分析”)时是否依然成立。
- 评估在大规模开源项目语料库中,过程度量与产品度量在缺陷预测中的相对性能。
- 调查从小规模研究中得出的度量重要性排名在应用于大规模数据时是否保持稳定。
- 为工业界与学术界在软件工程中使用预测模型提出最佳实践,强调可扩展性与普适性。
提出的方法
- 从700个GitHub项目中收集并分析了722,471个提交,同时使用过程度量与产品度量。
- 应用多种机器学习模型(随机森林、逻辑回归和SVM)进行缺陷预测。
- 采用超参数优化(HPO)对模型进行调优,以确保不同学习器之间的公平比较。
- 使用标准指标(AUC、召回率和F1分数)比较模型性能,以评估预测能力。
- 开展消融研究,评估单个度量及其重要性排名的影响。
- 采用集成建模(如随机森林)以降低方差,提升大规模预测中的稳定性。
实验结果
研究问题
- RQ1在大规模软件分析中,过程度量是否始终优于产品度量用于缺陷预测?
- RQ2从小规模研究中得出的度量重要性排名在应用于大规模数据时是否稳定?
- RQ3在大规模软件缺陷预测中,使用单模型预测与集成预测的实际影响是什么?
- RQ4在规模化环境下,过程度量与产品度量在系统与数据收集挑战方面有何不同?
- RQ5小规模研究的发现能否可靠地推广至大规模软件项目?
主要发现
- 过程度量在缺陷预测中实现了95%的中位AUC和98%的中位召回率,显著优于产品度量的54%中位AUC和44%中位召回率。
- 小规模研究(如ICSE 2013、ICSM 2010)中得出的度量重要性排名无法推广至大规模数据,小规模研究中排名靠前的度量在大规模分析中常变得无关紧要。
- 在大规模环境中,单模型预测表现出高方差,易导致混淆,因此集成方法(如随机森林)更为可靠。
- 产品度量的计算需要显著更多的计算资源——约500个CPU天,而过程度量的计算速度快一个数量级。
- 本研究证实,过程度量在工业应用中更具可扩展性和实用性,因其收集开销更低,且与编程语言无关。
- 小规模定性研究的发现无法推广;因此,必须在大规模项目集合上进行定量复现,才能获得稳定且具有普适性的洞察。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。