计算机应用 ›› 2016, Vol. 36 ›› Issue (9): 2486-2491.DOI: 10.11772/j.issn.1001-9081.2016.09.2486

• 计算机软件技术 • 上一篇    下一篇

基于字典学习的软件缺陷检测算法

张蕾, 朱义鑫, 徐春, 于凯   

  1. 新疆财经大学 计算机科学与工程学院, 乌鲁木齐 830000
  • 收稿日期:2016-02-02 修回日期:2016-03-25 出版日期:2016-09-10 发布日期:2016-09-08
  • 通讯作者: 张蕾
  • 作者简介:张蕾(1974-),女,新疆乌鲁木齐人,讲师,硕士,主要研究方向:计算机网络、信息安全、数据挖掘;朱义鑫(1974-),男,湖南湘乡人,讲师,博士,主要研究方向:计算机网络安全、复杂网络传播;徐春(1977-),女,新疆乌鲁木齐人,副教授,博士,主要研究方向:计算机网络、自然语言处理;于凯(1974-),男,新疆乌鲁木齐人,副教授,博士,主要研究方向:复杂网络、信息传播。
  • 基金资助:
    国家自然科学基金资助项目(71561025);新疆社会科学基金资助项目(13CTJ023);新疆自治区高校科研计划项目(XJEDU2013I27)。

Software defect detection algorithm based on dictionary learning

ZHANG Lei, ZHU Yixin, XU Chun, YU Kai   

  1. College of Computer Science and Engineering, Xinjiang University of Finance and Economics, Urumqi Xinjiang 830000, China
  • Received:2016-02-02 Revised:2016-03-25 Online:2016-09-10 Published:2016-09-08
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (71561025), the Xinjiang Social Science Foundation (13CTJ023) and the Xinjiang University Scientific Research Project (XJEDU2013I27).

摘要: 针对目前存在的字典学习方法不能有效构造具有鉴别能力字典的问题,提出具有鉴别表示能力的字典学习算法,并将其应用于软件缺陷检测。首先,重新构建稀疏表示模型,通过在目标函数中设计字典鉴别项学习具有鉴别表示能力的字典,使某一类的字典对于本类的样本具有较强的表示能力,对于异类样本的表示效果则很差;其次,添加Fisher准则系数鉴别项,使得不同类的表示系数具有较好的鉴别能力;最后对设计的字典学习模型进行优化求解,以获得具有强鉴别和稀疏表示能力的结构化字典。选择经过预处理的NASA软件缺陷数据集作为实验数据,与主成分分析(PCA)、逻辑回归、决策树、支持向量机(SVM)和代表性的字典学习方法进行对比,结果表明所提出的具有鉴别表示能力的字典学习算法的准确率与F-measure值均有提高,能在改善分类器性能的基础上提高检测精度。

关键词: 字典学习, 稀疏表示, Fisher准则, 软件缺陷检测, 机器学习

Abstract: Since the exsiting dictionary learning methods can not effectively construct discriminant structured dictionary, a discriminant dictionary learning method with discriminant and representative ability was proposed and applied in software defect detection. Firstly, sparse representation model was redesigned to train structured dictionary by adding the discriminant constraint term into the object function, which made the class-dictionary have strong representation ability for the corresponding class-samples but poor representation ability for the irrelevant class-samples. Secondly, the Fisher criterion discriminant term was added to make the representative coefficients have discriminant ability in different classes. Finally, the optimization of the designed dictionary learning model was solved to obtain strongly structured and sparsely representative dictionary. The NASA defect dataset was selected as the experiment data, and compared with Principal Component Analysis (PCA), Logistics Regression (LR), decision tree, Support Vector Machine (SVM) and the typical dictionary learning method, the accuracy and F-measure value of the proposed method were both increased. Experimental results indicate that the proposed method can increase detection accuracy with improving the classifier performance.

Key words: dictionary learning, sparse representation, Fisher criterion, software defect detection, machine learning

中图分类号: