A Software Defect Prediction Model Enhanced by Self-Attention Mechanism and Particle Swarm Optimization

Software defect prediction is a key aspect of software quality assurance that involves the use of historical data and a variety of analytical techniques to estimate which parts of the code are most likely to contain errors. Not only can software defects lead to system failure, but they can also have serious economic and social consequences. Most of the current methods rely on a single type of feature and fail to explore the multiple information in the code fully. Meanwhile, manually tuning hyperparameters is both time-consuming and difficult to achieve optimal results. Based on the encoder architecture, this research proposes an enhanced software defect prediction model, which combines the self-attention mechanism and particle swarm optimization (PSO-BiEncoders-SelfAttn). This model achieves efficient feature extraction, dynamic adjustment of feature fusion weights, and automated optimization of hyperparameters. This study trained and tested the model on five different publicly available datasets and evaluated it using metrics including precision, recall, and F-measure. The proposed PSO-BiEncoders-SelfAttn model improves the state-of-art, achieving an average F-measure improvement of 7.92% according to the experimental result.

Authors

Institutions

Publication Details

Published
2025-03-21
DOI
https://doi.org/10.1109/csecs64665.2025.11009247
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Software Defect Prediction Model Enhanced by Self-Attention Mechanism and Particle Swarm Optimization

Bin Jin, Yizheng Tao, Jingjing Li
Software Engineering Research
article

A Software Defect Prediction Model Enhanced by Self-Attention Mechanism and Particle Swarm Optimization

Bin Jin, Yizheng Tao, Jingjing Li
article en

Abstract

Software defect prediction is a key aspect of software quality assurance that involves the use of historical data and a variety of analytical techniques to estimate which parts of the code are most likely to contain errors. Not only can software defects lead to system failure, but they can also have serious economic and social consequences. Most of the current methods rely on a single type of feature and fail to explore the multiple information in the code fully. Meanwhile, manually tuning hyperparameters is both time-consuming and difficult to achieve optimal results. Based on the encoder architecture, this research proposes an enhanced software defect prediction model, which combines the self-attention mechanism and particle swarm optimization (PSO-BiEncoders-SelfAttn). This model achieves efficient feature extraction, dynamic adjustment of feature fusion weights, and automated optimization of hyperparameters. This study trained and tested the model on five different publicly available datasets and evaluated it using metrics including precision, recall, and F-measure. The proposed PSO-BiEncoders-SelfAttn model improves the state-of-art, achieving an average F-measure improvement of 7.92% according to the experimental result.

China Academy of Engineering Physics (CN)
Openalex Percentile: Top 83%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.