Software defect prediction (SDP) exerts a major role in software development, concerning reducing software costs and ensuring software quality. However, developing an accurate SDP model is still a severe and challenging task with the lack of training data. Fortunately, Siamese networks are powerful for learning a few samples and have been perfectly used in other fields. This paper explores the advantages of Siamese networks to propose a novel SDP model, Siamese dense neural networks (SDNNs), which integrates similarity feature learning and distance metric learning into a unified approach. It mainly includes two phases: model building and training. To be more specific, it means building the novel SDNN for capturing the highest-level similarity features and training the model to realize prediction through the designed contrast loss function with cosine proximity. Importantly, we extensively compared the SDNN approach with the state-of-the-art SDP approaches utilizing 10 software defect datasets. The experimental results show that our SDNN is a competitive approach and is able to improve the prediction performance more significantly compared with the benchmarked approaches. INDEX TERMS Siamese dense neural networks, deep learning, metric learning, few-shot learning, software defect prediction.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.