Skip to main content
QUICK REVIEW

[Paper Review] CNN vs ELM for Image-Based Malware Classification

Mugdha Jain, William Andreopoulos|arXiv (Cornell University)|Mar 24, 2021
Advanced Malware Detection TechniquesComputer Science22 references5 citations
TL;DR

This paper compares Convolutional Neural Networks (CNNs) and Extreme Learning Machines (ELMs) for image-based malware classification using the Malimg dataset, where malware binaries are visualized as grayscale images. Despite CNNs being standard in image classification, ELMs achieve 97.7% accuracy—slightly outperforming the best CNN (96.3%)—while training up to 67 times faster, making ELMs highly efficient for large-scale malware detection.

ABSTRACT

Research in the field of malware classification often relies on machine learning models that are trained on high-level features, such as opcodes, function calls, and control flow graphs. Extracting such features is costly, since disassembly or code execution is generally required. In this paper, we conduct experiments to train and evaluate machine learning models for malware classification, based on features that can be obtained without disassembly or execution of code. Specifically, we visualize malware samples as images and employ image analysis techniques. In this context, we focus on two machine learning models, namely, Convolutional Neural Networks (CNN) and Extreme Learning Machines (ELM). Surprisingly, we find that ELMs can achieve accuracies on par with CNNs, yet ELM training requires less than~2\%\ of the time needed to train a comparable CNN.

Motivation & Objective

  • To evaluate the performance of ELMs versus CNNs in classifying malware using image-based representations of executable files.
  • To determine whether ELMs can match or exceed CNN performance in malware classification while drastically reducing training time.
  • To explore the feasibility of using raw byte-to-image mapping without disassembly or execution for feature extraction.
  • To investigate the impact of ensemble methods and hyperparameter tuning on ELM stability and accuracy in malware detection.
  • To assess the scalability of ELMs for real-time detection of rapidly evolving malware families.

Proposed method

  • Malware samples from the Malimg dataset are converted into grayscale images by mapping raw bytes directly to pixel values.
  • Two input representations are used: 2D images (e.g., 128×128) and 1D flattened vectors (e.g., 1024×1) derived from the images.
  • A variety of CNN architectures are trained with varying depths, filter counts, and input sizes to optimize performance.
  • ELM models are trained using both standard and ensemble configurations, with 50 ELMs combined using dropout and class weighting.
  • The ELM activation function is ReLU, and the hidden layer uses 1024 neurons with an MLP kernel (α=1) for optimal performance.
  • Hyperparameter tuning is performed for both models, including learning rate, batch size, and regularization, to maximize accuracy and F1 scores.

Experimental results

Research questions

  • RQ1Can ELMs achieve comparable or better accuracy than CNNs in malware classification using image-based representations of binaries?
  • RQ2How does the training time of ELMs compare to that of CNNs when applied to the same malware classification task?
  • RQ3Does the use of ensemble ELMs improve classification performance and stability compared to single ELMs on the Malimg dataset?
  • RQ4Can one-dimensional feature vectors derived from malware images be effectively used with ELMs to maintain high accuracy while reducing computational cost?
  • RQ5Is the performance of ELMs robust across all 25 malware families, especially in cases where CNNs fail to detect entire families?

Key findings

  • The best ELM-based model achieved 97.7% overall accuracy, outperforming the best CNN model, which achieved 96.3% accuracy on the Malimg dataset.
  • ELMs achieved equal or better F1 scores on 18 out of 25 malware families, with the CNN model completely failing to classify any samples from the Autorun.K family.
  • The ELM model correctly classified all instances of the previously missed Autorun.K family, demonstrating superior robustness on rare or challenging classes.
  • ELM training required less than 2% of the time needed to train a comparable single-convolutional-layer CNN, and less than 1.5% for deeper CNNs.
  • Even with the more computationally expensive RBF kernel, ELM training remained under 30% of the time required for the fastest CNN architecture.
  • The ensemble ELM approach with dropout and class weighting (α=1) significantly improved stability and performance, overcoming inherent ELM variability.

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.