Skip to main content
QUICK REVIEW

[Paper Review] Better Security Bug Report Classification via Hyperparameter Optimization

Rui Shu, Tianpei Xia|arXiv (Cornell University)|May 16, 2019
Software Engineering ResearchComputer Science62 references30 citations
TL;DR

This paper improves security bug report classification by applying hyperparameter optimization to both machine learning learners and data pre-processing, particularly focusing on handling class imbalance. It demonstrates that optimizing the pre-processor—specifically using SMOTUNED—yields significantly better recall (up to 65%) compared to baseline methods, with only a moderate increase in false positives, outperforming learner hyperparameter tuning.

ABSTRACT

When security bugs are detected, they should be (a)~discussed privately by security software engineers; and (b)~not mentioned to the general public until security patches are available. Software engineers usually report bugs to bug tracking system, and label them as security bug reports (SBRs) or not-security bug reports (NSBRs), while SBRs have a higher priority to be fixed before exploited by attackers than NSBRs. Yet suspected security bug reports are often publicly disclosed because the mislabelling issues ( i.e., mislabel security bug reports as not-security bug report). The goal of this paper is to aid software developers to better classify bug reports that identify security vulnerabilities as security bug reports through parameter tuning of learners and data pre-processor. Previous work has applied text analytics and machine learning learners to classify which reported bugs are security related. We improve on that work, as shown by our analysis of five open source projects. We apply hyperparameter optimization to (a)~the control parameters of a learner; and (b)~the data pre-processing methods that handle the case where the target class is a small fraction of all the data. We show that optimizing the pre-processor is more useful than optimizing the learners. We also show that improvements gained from our approach can be very large. For example, using the same data sets as recently analyzed by our baseline approach, we show that adjusting the data pre-processing results in improvements to classification recall of 35% to 65% (median to max) with moderate increment of false positive rate.

Motivation & Objective

  • Address the critical problem of mislabeling security bug reports (SBRs) as non-security reports (NSBRs), which delays patching and increases exploitation risk.
  • Improve upon the FARSEC method by applying hyperparameter optimization to both learners and data pre-processors to enhance classification performance.
  • Investigate whether optimizing data pre-processing (especially for class imbalance) yields greater improvements than optimizing machine learning model parameters.
  • Demonstrate that better data preparation through tuned pre-processing can outperform better model tuning in vulnerability detection.

Proposed method

  • Applied hyperparameter optimization to both machine learning learners (e.g., SVM, random forest) and data pre-processing techniques to improve classification of security vs. non-security bug reports.
  • Used SMOTUNED—a tuned version of SMOTE (Synthetic Minority Over-sampling Technique)—to address class imbalance in datasets where SBRs constitute only 0.8% of reports.
  • Optimized pre-processing parameters to control outlier removal and minority class sampling, improving model generalization on imbalanced data.
  • Replicated the FARSEC baseline using the same datasets and pre-processed data, enabling direct comparison of performance improvements.
  • Evaluated results using standard metrics including recall, precision, and F1-score, with a focus on improving recall for rare SBRs.
  • Avoided data leakage by ensuring pre-processing (e.g., SMOTUNED) was applied only to training data, not test data.

Experimental results

Research questions

  • RQ1RQ1: Can hyperparameter optimization of the data pre-processor significantly improve security bug report classification performance compared to default configurations?
  • RQ2RQ2: Does optimizing the data pre-processor yield better improvements than optimizing the machine learning learner’s hyperparameters in the context of SBR classification?
  • RQ3RQ3: How does the performance of the proposed approach compare to the baseline FARSEC method in terms of recall and false positive rate across multiple open-source projects?

Key findings

  • Optimizing the data pre-processor—specifically using SMOTUNED—produced significantly better improvements in recall than optimizing the machine learning model’s hyperparameters.
  • For the same datasets used in the FARSEC study, recall increased from a median of 33% to 66% and a maximum of 65% after pre-processor optimization, with only a moderate rise in false positive rate.
  • The improvement in recall was most pronounced in projects with very low SBR prevalence, such as the Chromium project, where recall rose from 15% to 77%.
  • The results confirm that 'better data' (via optimized pre-processing) outperforms 'better learners' (via hyperparameter tuning), supporting the hypothesis that data quality is more critical than model tuning in this context.
  • The study demonstrates that applying SMOTUNED or similar pre-processing techniques to test data leads to data leakage and invalid results, reinforcing the need to apply such methods only to training data.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.