Security Bug Report Prediction Within and Across Projects: A Comparative Study of BERT and Random Forest

Early detection of security bug reports (SBRs) is crucial for preventing vulnerabilities and ensuring system reliability. While machine learning models have been developed for SBR prediction, their predictive performance still has room for improvement.In this study, we conduct a comprehensive comparison between BERT and Random Forest (RF), a competitive baseline for predicting SBRs. The results show that the highest G-measures are 70% for RF and 66% for BERT. In individual projects, RF outperforms BERT with a 34% higher G-measure. Adding only SBRs from various projects improves both models. However, including both security and nonsecurity bug reports boosts BERT to its best performance, surpassing RF, while RF's performance drops significantly to 46%. Notably, BERT achieves a 62% G-measure for "cross-project" SBR prediction using reports from multiple projects, which is substantially higher than RF.

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2025-04-18
DOI
https://doi.org/10.5281/zenodo.15240583
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

Security Bug Report Prediction Within and Across Projects: A Comparative Study of BERT and Random Forest

Zenodo (CERN European Organization for Nuclear Research)
Software Engineering Research
article

Security Bug Report Prediction Within and Across Projects: A Comparative Study of BERT and Random Forest

article en

Abstract

Early detection of security bug reports (SBRs) is crucial for preventing vulnerabilities and ensuring system reliability. While machine learning models have been developed for SBR prediction, their predictive performance still has room for improvement.In this study, we conduct a comprehensive comparison between BERT and Random Forest (RF), a competitive baseline for predicting SBRs. The results show that the highest G-measures are 70% for RF and 66% for BERT. In individual projects, RF outperforms BERT with a 34% higher G-measure. Adding only SBRs from various projects improves both models. However, including both security and nonsecurity bug reports boosts BERT to its best performance, surpassing RF, while RF's performance drops significantly to 46%. Notably, BERT achieves a 62% G-measure for "cross-project" SBR prediction using reports from multiple projects, which is substantially higher than RF.

Zenodo (CERN European Organization for Nuclear Research)
Openalex Percentile: Top 37%
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.