cs.CROct 13, 2026

Bytes to Threats: Byte-Sequence Transformer For Malware Detection

Authors: Abdelrahman Yassin Eljamal, Abdeltawab Hendawi

Organizations: Department of Computer Science, University of Rhode Island, Kingston, USA

Abstract

Existing malware detection approaches heavily rely on handcrafted features derived from static or dynamic analysis of the executable files. These methods require specialized domain expertise, dedicated analysis tools, and time-consuming analysis, which limits their scalability and robustness in the face of the increasing complexity and diversity of modern malware. Consequently, there is a growing interest in approaches that operate directly on raw bytes, which contain rich semantic and structural information. However, capturing long-range dependencies within executable files remains challenging for conventional static and CNN-based methods. This paper presents MalwareFormer, a transformer-based, byte-level malware detection framework that operates directly on raw bytes, without requiring domain knowledge or feature extraction. MalwareFormer achieves an accuracy of 98.35%, a balanced accuracy of 98.32%, a macro-F1 of 98.32%, and a false positive rate of 1.94%, outperforming both baselines across all threshold-dependent classification metrics and demonstrating that transformers provide a powerful and scalable approach for byte-level malware detection.

Figures & tables

Explore similar work

CardsList
  1. Large Byte Model: Teaching Language Models About Compiled Code

    Jun 1, 2026Florian Störtz, Catalin-Andrei Stan, Alexandru Dinu +4Malware ClassificationByte-Level Language Model

  2. ThreatVisionAI: A Hybrid CNN-ViT Framework for Image-Based Malware Classification

    Jul 4, 2026Allyson Taylor, Prashanth BusiReddyGariHybrid CNN-Transformer ArchitecturesMalware Classification

  3. ViPER: Vision-based Packing-Aware Encoder for Robust Malware Detection

    Jun 11, 2026Fatima Qaiser, Bisma Tahir, Muhammad Abid Mughal +1Malware ClassificationMalware Analysis