Skip to main content
QUICK REVIEW

[Paper Review] Leveraging Uncertainty for Improved Static Malware Detection Under Extreme False Positive Constraints

André T. Nguyen, Edward Raff|arXiv (Cornell University)|Aug 9, 2021
Advanced Malware Detection TechniquesComputer Science43 references9 citations
TL;DR

This paper proposes using model uncertainty—via ensembling and Bayesian methods—to improve static malware detection under extreme false positive rate (FPR) constraints, achieving a 0.80 true positive rate (TPR) at 1e-5 FPR on the Sophos dataset, a 16% relative improvement over prior methods. It introduces a corrected evaluation protocol and demonstrates that uncertainty estimates help detect model errors and novel malware families.

ABSTRACT

The detection of malware is a critical task for the protection of computing environments. This task often requires extremely low false positive rates (FPR) of 0.01% or even lower, for which modern machine learning has no readily available tools. We introduce the first broad investigation of the use of uncertainty for malware detection across multiple datasets, models, and feature types. We show how ensembling and Bayesian treatments of machine learning methods for static malware detection allow for improved identification of model errors, uncovering of new malware families, and predictive performance under extreme false positive constraints. In particular, we improve the true positive rate (TPR) at an actual realized FPR of 1e-5 from an expected 0.69 for previous methods to 0.80 on the best performing model class on the Sophos industry scale dataset. We additionally demonstrate how previous works have used an evaluation protocol that can lead to misleading results.

Motivation & Objective

  • Address the critical challenge of achieving extremely low false positive rates (≤0.01%) in production malware detection systems, where current ML methods lack effective tools.
  • Identify and correct a widespread flaw in prior evaluation protocols that incorrectly estimate TPR@FPR by selecting thresholds on the test set instead of a validation set.
  • Improve model performance under extreme FPR constraints by using uncertainty estimates to dynamically adjust decision thresholds.
  • Enable earlier detection of novel malware families by leveraging epistemic and aleatoric uncertainty as indicators of out-of-distribution samples.

Proposed method

  • Apply ensembling and Bayesian neural network techniques (e.g., Monte Carlo dropout) to estimate both epistemic (model) and aleatoric (data) uncertainty for each malware sample.
  • Use a separate validation set to determine the optimal classification threshold for a target FPR, rather than selecting it from the test set, to avoid data leakage and obtain realistic FPR estimates.
  • Introduce a local threshold adjustment strategy based on uncertainty scores, where samples with higher uncertainty are more stringently evaluated to maintain low FPR while increasing TPR.
  • Train and evaluate multiple models (e.g., LightGBM, MalConv, FFNN) on public datasets (EMBER2018, Sophos) using uncertainty-aware inference and thresholding.
  • Correlate uncertainty distributions with model errors and novel malware families to validate that high uncertainty predicts mispredictions and out-of-distribution samples.
  • Propose a combined score metric that penalizes high FPR while maximizing TPR, enabling fair comparison across models under strict FPR constraints.

Experimental results

Research questions

  • RQ1How does incorrect threshold selection on the test set in prior work distort reported TPR@FPR performance, and what is the correct evaluation protocol?
  • RQ2Can uncertainty estimation from ensembles and Bayesian models significantly improve TPR under extreme FPR constraints (e.g., 1e-5)?
  • RQ3To what extent do epistemic and aleatoric uncertainty correlate with model errors and novel malware families not seen during training?
  • RQ4Can uncertainty-based thresholding outperform naive thresholding in maintaining low FPR while increasing TPR in real-world deployment scenarios?

Key findings

  • Prior evaluations of TPR@FPR were systematically flawed due to threshold selection on the test set, leading to overestimated TPRs with relative errors of at least 35%.
  • The proposed uncertainty-based thresholding method improved TPR at an actual FPR of 1e-5 from 0.69 (baseline) to 0.80 on the best-performing model class in the Sophos dataset.
  • Even moderately diverse or Bayesian models significantly improved TPR under low-FPR regimes, with gains of up to 11% over non-ensemble baselines.
  • Epistemic and aleatoric uncertainty scores were strongly correlated with model errors, enabling analysts to prioritize high-uncertainty samples for manual review.
  • Uncertainty distributions clearly distinguished between known and novel malware families: samples from unseen families exhibited significantly higher uncertainty, enabling early detection of new threats.
  • The Bayesian MalConv and LightGBM models showed strong correlation between high uncertainty and novel malware, while simpler models like Bayesian logistic regression did not, indicating model complexity affects uncertainty expressiveness.

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.