GSAGE2defect: An Improved Approach to Software Defect Prediction based on Inductive Graph Neural Network

Ju Ma, Yiyang Sun, Peng He, Zhang-Fan Zeng · Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering · 2023

Graph neural network is an effective deep learning framework for learning graph data.Existing research has introduced different variants of graph neural networks into the field of software defects and has achieved promising results.However, the graph neural network model based on the previous research is essentially transductive, is applied to a single fixed graph, and often ignores the direction and weight of the edges when modeling the network.In practice, software systems are dynamically evolving.Furthermore, in software network modeling, the direction and weight of edges are factors that are worth considering.Based on an inductive graph neural network, we proposed an improved defect prediction method named GSAGE2defect.We first constructed the class dependency network of the program and then used node2vec for embedding learning to automatically obtain the structural features of the network.Then we combined the learned structural features with traditional software code features to initialize the properties of nodes in the class dependency network.Next, we fed the dependency network to GraphSAGE for a deeper class representation.Finally, we evaluated the proposed method based on eight open-source programs and demonstrated that GSAGE2defect achieves an average improvement of 2.09%-26.69%over state-of-the-art methods in terms of F-measure.

Read the paper · More papers on PaperTik