一种采用对抗学习的跨项目缺陷预测方法
作者:
作者单位:

作者简介:

邢颖(1978-),女,博士,副教授,博士生导师,CCF高级会员,主要研究领域为软件测试,人工智能的应用;章世豪(1999-),男,硕士生,CCF学生会员,主要研究领域为深度学习及其钱晓萌(1997-),女,硕士生,CCF学生会员,主要研究领域为软件缺陷预测,深度学习;应用;赵梦赐(1999-),男,硕士生,主要研究领域为深度学习及其应用;管宇(1998-),男,硕士生,主要研究领域为深度学习,软件测试;林婉婷(1997-),女,硕士生,CCF学生会员,主要研究领域为机器学习,软件缺陷预测

通讯作者:

邢颖,E-mail:xingying@bupt.edu.cn

中图分类号:

TP311

基金项目:

国家自然科学基金(61702044);国家重点研发计划课题(2017YFD0401001)


Cross-project Defect Prediction Method Using Adversarial Learning
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    跨项目缺陷预测(cross-project defect prediction,CPDP)已经成为软件工程数据挖掘领域的一个重要研究方向,它利用其他项目的缺陷代码来建立预测模型,解决了模型构建过程中的数据不足问题.然而源项目和目标项目的代码文件之间存在着数据分布的差异,导致跨项目预测效果不佳.基于生成式对抗网络(generative adversarial network,GAN)中的对抗学习思想,在鉴别器的作用下,通过改变目标项目特征的分布,使其接近于源项目特征的分布,从而提升跨项目缺陷预测的性能.具体来说,提出的抽象连续生成式对抗网络(abstract continuous generative adversarial network,AC-GAN)方法包括数据处理和模型构建两个阶段:(1)首先将源项目和目标项目的代码转换为抽象语法树(abstract syntax tree,AST)的形式,然后以深度优先方式遍历抽象语法树得出节点序列,再使用连续词袋模型(continuous bag-of-words model,CBOW)生成词向量,依据词向量表将节点序列转化为数值向量;(2)处理后的数值向量被送入基于GAN网络结构的模型进行特征提取和数据迁移,然后使用二分类器来判断目标项目代码文件是否有缺陷.AC-GAN方法在15组源-目标项目对上进行了对比实验,实验结果表明了该方法的有效性.

    关键

    Abstract:

    Cross-project defect prediction (CPDP) has become an important research direction in data mining of software engineering, which uses the defective codes of other projects to build prediction models and solves the problem of insufficient data in the process of model construction. Nevertheless, there is difference in data distribution between the code files of source and target projects, which leads to poor cross-project prediction results. Based on the adversarial learning idea of generative adversarial network (GAN), under the action of discriminator, the distribution of target project features can be changed to make it close to the distribution of source project features, so as to improve the performance of cross-project defect prediction. Specifically, the process of the proposed abstract continuous GAN (AC-GAN) method consists of two stages:Data processing and model construction. First, the source and target project codes are converted into the form of abstract syntax trees (ASTs), and then the ASTs are traversed in a depth-first manner to derive the token sequences. The continuous bag-of-words model (CBOW) is used to generate word vectors, and the token sequences are transformed into numeric vectors based on the word vector table. Second, the processed numeric vectors are fed into a GAN structure-based model for feature extraction and data migration. Finally, a binary classifier is used to determine whether the target project code files are defective or not. The AC-GAN method conducted comparison experiments on 15 sets of source-target project pairs, and the experimental results demonstrate the effectiveness of this method.

    参考文献
    相似文献
    引证文献
引用本文

邢颖,钱晓萌,管宇,章世豪,赵梦赐,林婉婷.一种采用对抗学习的跨项目缺陷预测方法.软件学报,2022,33(6):2097-2112

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2021-09-05
  • 最后修改日期:2021-10-15
  • 录用日期:
  • 在线发布日期: 2022-01-28
  • 出版日期: 2022-06-06
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号