ARFT-Transformer:建模度量依赖性以进行跨项目老化相关缺陷预测
ARFT-Transformer: Modeling Metric Dependencies for Cross-Project Aging-Related Bug Prediction
AI总结:
ARFT-Transformer通过引入多头注意力机制和Focal Loss处理跨项目老化相关缺陷预测中的度量依赖性和类别不平衡问题,提升预测性能。
摘要:
长时间运行的软件系统常常会受到软件老化的影响,这通常是由于老化相关缺陷(ARBs)引起的。为了在开发阶段早期减轻ARBs的风险,ARB预测已被引入软件老化研究。然而,由于收集ARBs的难度,单个项目中的ARB预测面临数据稀缺的挑战,从而提出了跨项目的ARB预测。这项任务面临两大主要挑战:1)由于源项目和目标项目之间的分布差异导致的领域适应问题;2)ARB易发样本与ARB无样本之间的严重类别不平衡。尽管已经提出了多种跨项目ARB预测方法,但现有方法将输入度量独立处理,通常忽略了丰富的度量间依赖性,这可能导致信息重叠和度量重要性的误判,从而影响模型性能。此外,它们通常在训练过程中使用交叉熵作为损失函数,这无法区分样本分类的难度。为了克服这些限制,我们提出了ARFT-Transformer,一种基于Transformer的跨项目ARB预测框架,引入了度量级多头注意力机制以捕捉度量交互,并结合Focal Loss函数以有效处理类别不平衡。在三个大规模开源项目上进行的实验表明,ARFT-Transformer在单源和多源情况下平均优于最先进的跨项目ARB预测方法,在平衡度量上分别实现了高达29.54%和19.92%的提升。
英文摘要:
Software systems that run for long periods often suffer from software aging, which is typically caused by Aging-Related Bugs (ARBs). To mitigate the risk of ARBs early in the development phase, ARB prediction has been introduced into software aging research. However, due to the difficulty of collecting ARBs, within-project ARB prediction faces the challenge of data scarcity, leading to the proposal of cross-project ARB prediction. This task faces two major challenges: 1) domain adaptation issue caused by distribution difference between source and target projects; and 2) severe class imbalance between ARB-prone and ARB-free samples. Although various methods have been proposed for cross-project ARB prediction, existing approaches treat the input metrics independently and often neglect the rich inter-metric dependencies, which can lead to overlapping information and misjudgment of metric importance, potentially affecting the model's performance. Moreover, they typically use cross-entropy as the loss function during training, which cannot distinguish the difficulty of sample classification. To overcome these limitations, we propose ARFT-Transformer, a transformer-based cross-project ARB prediction framework that introduces a metric-level multi-head attention mechanism to capture metric interactions and incorporates Focal Loss function to effectively handle class imbalance. Experiments conducted on three large-scale open-source projects demonstrate that ARFT-Transformer on average outperforms state-of-the-art cross-project ARB prediction methods in both single-source and multi-source cases, achieving up to a 29.54% and 19.92% improvement in Balance metric.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。