首页|基于注意力和代价敏感的软件缺陷预测方法

基于注意力和代价敏感的软件缺陷预测方法

扫码查看
软件缺陷预测的目的是预先识别容易出现缺陷的代码模块以帮助软件质量保障团队适当的分配资源和人力;当前基于稳定学习的软件缺陷预测方法在特征提取过程中缺乏代码图像的全局信息,并忽视了不平衡数据对模型性能的影响;为了解决上述问题,文章提出了一种基于注意力和代价敏感的软件缺陷预测方法;该方法在SDP-SL的神经网络中增加了全局注意力模块,重点关注图像中和缺陷代码相关的特征,并将分类器的损失函数改进为代价敏感的损失函数,降低类不平衡对模型性能的影响;为了评估SDP-SLAC的性能,在PROMISE数据库中的10个开源Java项目上进行了多组比较实验;实验结果表明,SDP-SLAC方法可以有效提升缺陷预测模型的性能。
Software Defect Prediction Method Based on Attention and Cost Sensitivity
Software defect prediction aims to identify code modules that are prone to defects in advance,assisting the software quality assurance team to appropriately allocate resources and manpower.Currently,the software defect prediction method based on stable learning lacks the global information of code images during the process of feature extraction,and disregards the influence of im-balanced data on model performance.To address these issues,a software defect prediction method based on attention and cost sensi-tivity is proposed.This method enhances the global attention module in the software defect prediction and stable learning(SDP-SL)neural network,which focuses on the features of defective codes in the images.Moreover,it improves the classifier's loss function to the cost sensitive loss function,reducing the influence of the class imbalance on the model performance.To evaluate the performance of software defect prediction method based on attention and cost sensitivity(SDP-SLAC),multiple comparative experiments are con-ducted on ten open-source Java projects in the PROMISE database.The results show that the SDP-SLAC method effectively enhances the performance of defect prediction models.

software defect predictionglobal attentioncost sensitiveclass imbalanceloss function

毛敬恩、周世健、章树卿、樊鑫

展开 >

南昌航空大学软件学院,南昌 330038

南昌航空大学软件测评中心,南昌 330038

软件缺陷预测 全局注意力 代价敏感 类不平衡 损失函数

2024

计算机测量与控制
中国计算机自动测量与控制技术协会

计算机测量与控制

CSTPCD
影响因子:0.546
ISSN:1671-4598
年,卷(期):2024.32(9)