Melola Discovery

← Melola Discovery

Open access Journal SINTA 1

Machine Learning-Based Malware Detection: A Critical Comparative Analysis of Random Forest, Naive Bayes, and Neural Network on Imbalanced Datasets

JURNAL INFOTEL · Vol. 17 No. 4 (2025) · pp. 767–788

DOI
10.20895/infotel.v17i4.1413
ISSN
2085-3688, 2460-0997
Published
2025-12-18
Publisher
LPPM Institut Teknologi Telkom Purwokerto
Language
en
License
creativecommons.org/licenses/by-sa/4.0/

Abstract

Malware detection remains a major challenge in cybersecurity as threats become increasingly complex. This study critically compares three machine learning algorithms Random Forest, Naive Bayes, and Neural Network for automated malware detection using a large, imbalanced dataset (131,574 samples, 57 features). Class imbalance is addressed with SMOTE (Synthetic Minority Oversampling Technique), and preprocessing includes feature selection (SelectKBest), normalization (StandardScaler), and outlier handling. Evaluation metrics include accuracy, Precision, recall, F1-score, and AUC-ROC, using 5-fold cross-validation. Results show Random Forest achieves the highest accuracy (98%, AUC-ROC 0.998), followed by Neural Network (95%, AUC-ROC 0.95), and Naive Bayes (93%, minority class recall 0.80). Feature analysis identifies ImageBase and ResourcesMinSize as key contributors. This study highlights the effectiveness of ensemble methods and the critical importance of addressing class imbalance for robust malware detection. Limitations and implications for real-world deployment are discussed.

Keywords

Collaboration network of the authors

2 authors · 1 co-authorship link

Hover or tap a name to highlight its co-authors. Double-click to open the author's page.

  • Telkom University
  • Different organisations
  • Same organisation
  • Affiliation unknown
  • Thicker line = more joint articles · bigger circle = more articles
Show as table
Co-authorOrganisationJoint articles

Affiliations come from OpenAlex; journal OAI-PMH metadata carries none. Authors without an OpenAlex ID are matched by name, which can merge or split people.

Metadata source: OpenAlex API (jurnal SINTA, ADR 0048) https://openalex.org/S4210188896, first harvested 19 Nov 2026, last seen 29 Nov 2026.
Original metadata (oai_dc)
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"><dc:title xml:lang="en">Machine Learning-Based Malware Detection: A Critical Comparative Analysis of Random Forest, Naive Bayes, and Neural Network on Imbalanced Datasets</dc:title><dc:creator>Muhamad Hanif Rafiq Sulaeman</dc:creator><dc:creator>Rakhmad Maulidi</dc:creator><dc:subject>malware detection</dc:subject><dc:subject>class imbalance</dc:subject><dc:subject>SMOTE</dc:subject><dc:subject>random forest</dc:subject><dc:subject>naive Bayes</dc:subject><dc:subject>artificial neural networks</dc:subject><dc:subject>feature selection</dc:subject><dc:subject>SelectKBest</dc:subject><dc:subject>malware classification</dc:subject><dc:subject>ensemble methods</dc:subject><dc:subject>cybersecurity</dc:subject><dc:description xml:lang="en">Malware detection remains a major challenge in cybersecurity as threats become increasingly complex. This study critically compares three machine learning algorithms Random Forest, Naive Bayes, and Neural Network for automated malware detection using a large, imbalanced dataset (131,574 samples, 57 features). Class imbalance is addressed with SMOTE (Synthetic Minority Oversampling Technique), and preprocessing includes feature selection (SelectKBest), normalization (StandardScaler), and outlier handling. Evaluation metrics include accuracy, Precision, recall, F1-score, and AUC-ROC, using 5-fold cross-validation. Results show Random Forest achieves the highest accuracy (98%, AUC-ROC 0.998), followed by Neural Network (95%, AUC-ROC 0.95), and Naive Bayes (93%, minority class recall 0.80). Feature analysis identifies ImageBase and ResourcesMinSize as key contributors. This study highlights the effectiveness of ensemble methods and the critical importance of addressing class imbalance for robust malware detection. Limitations and implications for real-world deployment are discussed.</dc:description><dc:publisher>LPPM Institut Teknologi Telkom Purwokerto</dc:publisher><dc:date>2025-12-18</dc:date><dc:type>info:eu-repo/semantics/article</dc:type><dc:identifier>https://doi.org/10.20895/infotel.v17i4.1413</dc:identifier><dc:identifier>10.20895/infotel.v17i4.1413</dc:identifier><dc:source>JURNAL INFOTEL; Vol 17 No 4 (2025); 767-788</dc:source><dc:source>2085-3688</dc:source><dc:source>2460-0997</dc:source><dc:language>en</dc:language><dc:rights>https://creativecommons.org/licenses/by-sa/4.0/</dc:rights></oai_dc:dc>