Visualization-Based Software Defect Prediction via Convolutional Neural Network with Global Self-Attention

Mengyang Huang,Xuhong Tian,Shaojian Qiu,Qiong Huang,Shaosheng Wang
DOI: https://doi.org/10.1109/QRS57517.2022.00029
2022-12-01
Abstract:Defect prediction technology helps software quality assurance teams understand the distribution of software defects, which can assist them to allocate testing and verification resources appropriately. Current visualization-based software defect prediction methods lack spatial and global information of code images during the feature extraction process. To solve the problem of incomplete information, this paper proposes a Convolutional Neural Network with Global Self-Attention (CNN-GSA). The method converts codes into corresponding images and uses an improved convolutional neural network, which combines channel attention, spatial attention, and self-attention mechanisms in a global attention layer, to extract defect-related structural and semantic features in code images. Empirical study shows that the model built with the features generated by CNN-GSA can achieve better F-measure results in defect prediction tasks.
Computer Science
What problem does this paper attempt to address?