🤖 AI Summary
This study addresses the challenge of accurately identifying security bug reports (SBRs) at an early stage to facilitate timely remediation. It systematically evaluates the performance trade-offs between prompt-engineered closed-source large language models and fine-tuned open-source counterparts for SBR prediction. Experiments across multiple real-world datasets reveal that prompt-based models achieve a recall of 74% and a G-measure of 77%, but suffer from low precision (22%). In contrast, fine-tuned models attain substantially higher precision (75%) and up to 50× faster inference, albeit with a lower G-measure of 51%. This work is the first to uncover the complementary strengths of these two approaches—highlighting their distinct trade-offs in sensitivity, precision, and efficiency—and provides practical guidance for selecting appropriate strategies based on deployment contexts.
📝 Abstract
Early detection of security bug reports (SBRs) is critical for timely vulnerability mitigation. We present an evaluation of prompt-based engineering and fine-tuning approaches for predicting SBRs using Large Language Models (LLMs). Our findings reveal a distinct trade-off between the two approaches. Prompted proprietary models demonstrate the highest sensitivity to SBRs, achieving a G-measure of 77% and a recall of 74% on average across all the datasets, albeit at the cost of a higher false-positive rate, resulting in an average precision of only 22%. Fine-tuned models, by contrast, exhibit the opposite behavior, attaining a lower overall G-measure of 51% but substantially higher precision of 75% at the cost of reduced recall of 36%. Though a one-time investment in building fine-tuned models is necessary, the inference on the largest dataset is up to 50 times faster than that of proprietary models. These findings suggest that further investigations to harness the power of LLMs for SBR prediction are necessary.