计算机科学 ›› 2023, Vol. 50 ›› Issue (5): 21-30.doi: 10.11896/jsjkx.221000028

• 可解释性人工智能 • 上一篇    下一篇

软件缺陷预测模型可解释性对比

李汇来1, 杨斌2, 于秀丽3, 唐晓梅4   

  1. 1 北京邮电大学人工智能学院 北京 100876
    2 中国联合网络通信有限公司研究院 北京 100048
    3 北京邮电大学现代邮政学院 北京 100876
    4 北京联合大学信息网络中心 北京 100101
  • 收稿日期:2022-10-07 修回日期:2023-02-22 出版日期:2023-05-15 发布日期:2023-05-06
  • 通讯作者: 唐晓梅(tangxiaomei@buu.edu.cn)
  • 作者简介:(lihuilai@bupt.edu.cn)

Explainable Comparison of Software Defect Prediction Models

LI Huilai1, YANG Bin2, YU Xiuli3, TANG Xiaomei4   

  1. 1 School of Artificial Intelligence,Beijing University of Posts and Telecommunications,Beijing 100876,China
    2 China Unicom Research Institute,Beijing 100048,China
    3 School of Modern Post,Beijing University of Posts and Telecommunications,Beijing 100876,China
    4 Information Technology Center,Beijing Union University,Beijing 100101,China
  • Received:2022-10-07 Revised:2023-02-22 Online:2023-05-15 Published:2023-05-06
  • About author:LI Huilai,born in 1998,postgraduate,is a member of China Computer Federation.His main research interests include software test and deep learning.
    TANG Xiaomei,born in 1978,senior engineer.Her main research interest is network and information security.

摘要: 软件缺陷预测已经成为软件测试中的重要研究方向,缺陷预测的全面与否直接影响着测试效率和程序运行。但现有的缺陷预测是根据历史数据进行推断,大多不能对预测过程给出合理的解释,这种黑盒的预测过程仅仅展现输出结果,使得人们难以得知测试模型内部结构对输出的影响。为解决这一问题,需挑选软件度量方法和部分典型深度学习模型,对其输入、输出及结构进行简要对比,从数据差异程度和模型对代码的处理过程两个角度进行分析,对它们的异同给出解释。实验表明,采用深度学习的方法进行缺陷预测比传统软件度量方法更加有效,这主要是由它们对原始数据处理过程不同造成的;采用卷积神经网络和长短期记忆神经网络做缺陷预测时,数据差异主要由对代码信息理解的完整程度不同造成的。综上可知,要提高对软件缺陷的预测能力,模型的计算应该对代码的语义、逻辑和上下文联系进行全面的介入,避免有用信息被遗漏。

关键词: 软件缺陷预测, 可解释性, 软件度量, 神经网络, 抽象语法树

Abstract: Software defect prediction has become an important research direction in software testing.The comprehensiveness of defect prediction directly affects the efficiency of testing and program operation.However,the existing defect prediction is based on historical data,and most of them cannot give a reasonable explanation for the prediction process.This black box prediction process only shows the output results,making it difficult for people to know the impact of the internal structure of the test model on the output.In order to solve this problem,it is necessary to select software measurement methods and some typical deep lear-ning models,make a brief comparison of their input,output and structure,analyze them from the two perspectives of the degree of data differences and the processing process of the model on the code,and explain their similarities and differences.Experiments show that the method of deep learning is more effective than traditional software measurement methods in defect prediction,which is mainly caused by their different processing processes of raw data.When using convolution neural network and long-term and short-term memory neural network to predict defects,the data difference is mainly caused by the integrity of the understan-ding of code information.To sum up,in order to improve the prediction ability of software defects,the calculation of the model should comprehensively involve the semantics,logic and context of the code to avoid the omission of useful information.

Key words: Software defect prediction, Explicability, Software metrics, Neural network, Abstract syntax tree

中图分类号: 

  • TP311
[1]ZHAO J S,SONG M X,GAO X.A review of the developmentand application of natural language processing[J].Information Technology and Informatization,2019(7):142-145.
[2]ZHANG J Y,WANG H L,GUO Y,et al.Review of deep lear-ning[J].Application Research of Computers,2018,35(7):1921-1928,1936.
[3]KONG X W,TANG X Z,WANG Z M.A survey of explainable artificial intelligence decision[J].Systems Engineering-Theory &Practice,2021,41(2):524-536.
[4]ZHANG K Y,ZHANG W N,LIU T.A survey of multi-party dialogue research based on deep learning[J].Scientia Sinica(Informationis),2021,51(8):1217-1232.
[5]WANG X G.Research on malware detection technology of mobile intelligent terminal based on behavior sequence[D].Guangzhou:Guangzhou University,2022.
[6]ZHAO M.Group Emotion analysis based on multiple dimension[D].Beijing:Beijing University of Technology,2018.
[7]DING X.Constructing network learning object model with interpretive structure model[J].Journal of Fujian Computer,2010,26(2):173.
[8]ZHANG Q.Research on software defect prediction based onconvolutional neural network[J].Computer Programming Skills &Maintenance,2020,(9):14-16.
[9]WANG Y X.Research on interpretability method of deep recognition network[D].Harbin:Harbin Institute of Technology,2021.
[10]CHEN D J.Bug interpretation-based input generation for soft-ware testing[D].Nanjing:Nanjing University,2021.
[11]CHEN X,GU Q,LIU W S,et al.Survey of static software defect prediction[J].Journal of Software,2016,27(1):1-25.
[12]GAO T,GUO X.Integrated software defect prediction model for code evolution[J].Journal of Wuhan University(Natural Science Edition),2022,68(3):279-288.
[13]ZHU Y W.Research on automatic generation of vulnerabilityfeatures for program code[D].Wuhan:Huazhong University of Science and Technology,2020.
[14]MIKOLOV T,CHEN K,CORRADO G,et al.Efficient estimation of word representations in vector space[J].arXiv:1301.3781,2013.
[15]LI J,HE P,ZHU J,et al.Software defect prediction via convolutional neural network[C]//2017 IEEE International Conference on Software Quality,Reliability and Security(QRS).IEEE,2017:318-328.
[16]LI Z W,LIU F,YANG W J,et al.A survey of convolutionalneural networks:analysis,applications,and prospects[J].arXiv:2004.02806,2020.
[17]CHENG K Y,WANG N,SHI W X,et al.Research advances in the interpretability of deep learning[J].Journal of Computer Research and Development,2020,57(6):1208-1217.
[18]HE H C.Retrieving the interpretability of AI[J].CAAI Tran-sactions on Intelligent Systems,2019,14(3):393-412.
[19]ZHANG Y F.Research on explainable personalized recommender systems[D].Beijing:Tsinghua University,2016.
[20]WU F,LIAO B B,HAN Y H.Interpretability for deep learning[J].Aero Weaponry,2019,26(1):39-46.
[21]PARK J H,JO H S,LEE S H,et al.A reliable intelligent diagnostic assistant for nuclear power plants using explainable artificial intelligence of GRU-AE,LightGBM and SHAP[J].Nuclear Engineering and Technology,2022,54(4):1271-1287.
[22]LEE K,AYYASAMY MUKIL V,JI Y F,et al.A comparison of explainable artificial intelligence methods in the phase classification of multi-principal element alloys[J].Scientific Reports,2022,12(1):11591.
[23]ASLAM N,KHAN I U,MIRZA S,et al.Interpretable machine learning models for malicious domains detection using explai-nable artificial intelligence(XAI)[J].Sustainability,2022,14(12):1-22.
[24]WU S P.Research on assisted diagnosis of thyroid nodules onSPECT image based on deep learning[D].Harbin:Harbin Institute of Technology,2021.
[25]SANO T,HORII T,ABE K,et al.Temperament estimation of toddlers from child-robot interaction with explainable artificial intelligence[J].Advanced Robotics,2021,35(17):1068-1077.
[26]ZHANG D,XU Y,PENG Y,et al.An interpretable station delay prediction model based on graph community neural network and time-series fuzzy decision tree[J].IEEE Transactions on Fuzzy Systems,2022,31(2):421-433.
[27]CHEN L Q,WANG C,SONG S L.Just-in-time software defect prediction model and its interpretability research[J].Journal of Chinese Computer Systems,2022,43(4):865-871.
[28]ZHANG B,WEN Z,WEI X Y,et al.InterDroid:an interpretable Android malware detection method for conceptual drift[J].Journal of Computer Research and Development,2021,58(11):2456-2474.
[29]WANG Y L,LU M M.Interpretable automatic detection of Android malware based on graph embedding[J].Computer Engineering and Applications,2021,57(23):122-128.
[30]HU X Y,CHEN X,XIA H L,et al.Interpretable method of just-in-time defect prediction model for mobile App[J].Application Research of Computers,2022,39(7):1-5.
[31]QIU M M.Research on detection method of interpreted malware based on deep learning[D].Nanjing:Nanjing University of Technology,2021.
[32]JIRAYUS J,CHAKKRIT T,CHRISTOPH T.The impact ofautomated feature selection techniques on the interpretation of defect models[J].Empirical Software Engineering:An International Journal,2020,25(5):3590-3638.
[33]CHENG M.Research on some key technologies of software defect prediction[D].Wuhan:Wuhan University,2016.
[34]GONG L N,JIANG S J,JIANG L.Research progress of software defect prediction[J].Journal of Software,2019,30(10):3090-3114.
[35]YANG H W,CUI Z Q,CHEN X,et al.Defect prediction for solidity smart contracts based on software measurement[J].Journal of Software,2022,33(5):1587-1611.
[36]HALL T,ZHANG M,BOWES D,et al.Some code smells have a significant but small effect on faults[J].ACM Transactions on Software Engineering and Methodology,2014,23(4):1-39.
[37]WANG C,YU Q,HAN H.Similarity-based training set recommendation for software defect prediction[J].Computer Engineering and Applications,2022,1(10):10-31.
[38]CHIBA S,TATSUBORI M.Yet another java.lang.class[J].Lecture Notes in Computer Science,1998,1543:372-373.
[39]CHEN C T,PAN L M,GONG J,et al.The vulnerability detection method based on compression coding of abstract syntax tree[J].Journal of Information Security Research,2022,8(1):35-42.
[40]GOODFELLOW I,BANGIO Y,COURVILLE A.Deep learning[M].Cambridge:MIT Press,2016:367-415.
[41]RAY A,RAJESWAR S,CHAUDHURY S.Text recognitionusing deep BLSTM networks[C]//2015 Eighth International Conference on Advances in Pattern Recognition(ICAPR).IEEE,2015:1-6.
[42]GRAY D,BOWES D,DAVEY N,et al.Reflections on theNASA MDP data sets[J].Software Let,2012,6(6):549-558.
[43]ZHANG Q,WU B.Software Defect Prediction via Transformer[C]//2020 IEEE 4th Information Technology,Networking,Electronic and Automation Control Conference(ITNEC).IEEE,2020.
[44]WANG S,LIU T Y,NAM J,et al.Deep Semantic FeatureLearning for Software Defect Prediction[J].IEEE Transactions on Software Engineering,2020,46(12):1267-1293..
[45]WU R X,ZHANG H Y,KIM S H,et al.Relink:Recovering links between bugs and changes[C]//Proceeding of the ACM SIGSOFT Symposium and the European Conference on Foundations of Software Engineering.2011:15-25.
[46]D'AMBROS M,LANZA M,ROBBES R.An extensive comparison of bug prediction approaches[C]//Proceeding of the Mining Software Repositories.2010:31-41.
[47]SUN Y,JING X Y,WU F,et al.Adversarial Learning for Cross-project Semi-supervised Defect Prediction[J].IEEE Access,2020,8:32674-32687.
[48]XING Y,QIAN X M,GUAN Y,et al.Cross-project defect prediction method using adversarial learning[J].Journal of Software,2022,33(6):2097-2112.
[49]ZENG Y,LI G H,ZHUANG L.A comparison of the power of the Wilcoxon rank-sum test and K-S test on completely rando-mized design of independent samples[J].Chinese Journal of Health Statistics,2011,28(4):372-374.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!