Accuracy–Efficiency Trade-off of ResNet18 and MobileNetV4 for Image-Based Malware Family Classification on the Malimg Dataset
Image-based malware classification on the Malimg dataset commonly reports accuracies close to 100%, but computational cost is rarely reported in a comparable way. We compare ResNet18, MobileNetV4-Conv-Small and MobileNetV4-Conv-Medium, all initialised from ImageNet weights, under a single controlled protocol. After removing 1,330 exact duplicate images and excluding two families with fewer than ten unique images, we use 8,001 images in 23 families with a stratified 70/15/15 split (5,600/1,200/1,201). Each model is trained with fine-tuning and with feature extraction using three seeds (18 runs). Macro-F1 is the primary metric; efficiency is measured by parameter count, model size, GFLOPs, CPU and GPU latency, training time and peak GPU memory. Under fine-tuning the test macro-F1 is 0.9789 ± 0.0041 (ResNet18), 0.9755 ± 0.0018 (MobileNetV4-Small) and 0.9740 ± 0.0053 (MobileNetV4-Medium); the gaps are within seed-to-seed variation. MobileNetV4-Small has 4.4× fewer parameters, 9.8× fewer GFLOPs and 2.5× lower CPU latency than ResNet18, whereas a GPU latency advantage is not demonstrated. MobileNetV4-Medium is dominated by MobileNetV4-Small on every measured metric. Fine-tuning is consistently better than feature extraction. The findings are descriptive, based on one dataset, three seeds and a Kaggle environment.
Authors
- Febriyansyah (ORCID: https://orcid.org/0009-0003-7846-5668)
Institutions
- Universitas Pamulang (ID)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-26
- DOI
- https://doi.org/10.5281/zenodo.24553436
- Primary Topic
- Advanced Malware Detection Techniques
- Type
- preprint