Publication Date
9-1-2026
Document Type
Article
Publication Title
Electronics Switzerland
Volume
15
Issue
17
DOI
10.3390/electronics15173969
Abstract
This work proposes a comparative framework for malware classification that evaluates the synergy between traditional feature engineering and modern deep learning architectures. Our methodology follows two primary paths: first, we integrate opcode n-grams with word-embedding techniques (Word2Vec, Doc2Vec, and FastText) to capture local execution patterns in dense vector spaces. Second, we evaluate end-to-end representations using transformer-based models (BERT and ViT) and a raw opcode-based 1D Convolutional Neural Network (1D-CNN) to determine if effective features can be learned without explicit n-gram engineering. Both pathways are rigorously tested across a suite of classifiers, including Support Vector Machine (SVM), Random Forest (RF), k-Nearest Neighbor (k-NN), and CNNs. Experimental results for multi-class classification demonstrate that while transformer-based models offer high automated feature extraction capabilities, the combination of opcode n-grams with word embeddings remains a highly effective and interpretable approach for detecting real-world malware.
Keywords
BERT, Doc2Vec, FastText, malware classification, N-grams, ViT, Word2Vec
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 License.
Department
Computer Science
Recommended Citation
Siddhita Joshi, Sonya Hu, and Fabio Di Troia. "Integrating Opcode N-Grams and Word Embeddings for Enhanced Malware Classification: A Comparative Study With Transformer-Based Representations" Electronics Switzerland (2026). https://doi.org/10.3390/electronics15173969