arXiv:2610.01893cs.CROct 2026

Manuscript Offprint

arXiv:2610.01893

A Structured State Space Sequence Model for Multi-Class Classification of Malware

Emmanuela Andam, Rana Shaaban, Emanuel Grant, Naima Kaabouch

Emmanuela Andam 1,2^{1,2}, Rana Shaaban 2^{2}, Emanuel Grant 2^{2}, and Naima Kaabouch 1,2^{1,2}

1^{1}Artificial Intelligence Research (AIR) Center

2^{2}School of Electrical Engineering and Computer Science, College of Engineering & Mines

University of North Dakota, Grand Forks, ND 58201, USA

© 2026 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.

Abstract—By 2030, Internet of Things (IoT) devices are projected to reach 40 billion, with fast-paced technological advancements in fields such as industry, healthcare, agriculture, automobiles, and building/home automation systems. This expansion has created a large attack surface for cybercrime, as the majority of these devices open the door for cybercriminals to exploit vulnerabilities, as they lack adequate built-in security. Cybercriminals launch malware attacks to compromise systems or steal sensitive data, and once a system is compromised, a ransom is typically demanded for its release. Current cybersecurity measures in place are being outpaced by the rapid growth of the IoT, which is accompanied by a subsequent growth in malware variants being created per day. Recognizing this pitfall, this research examines and proposes a novel approach to malware detection and classification to safeguard devices from further attacks and make IoT systems more robust and secure. The framework proposed utilizes a Structured State Space Sequence (S4) model, which discretizes sequences of malware samples in a sequence and captures long-range dependencies, essentially identifying the “cause” and “effect” hidden within malware execution flow. This study presents two novel contributions: the first empirical application of the S4 model for malware analysis, and a comprehensive comparison of its performance against other deep learning architectures, laying the stepping stone for future research in this new paradigm.

Index Terms—Internet of Things (IoT), Malware, Structured State Space, Deep Learning, Machine Learning

I. INTRODUCTION

The gradual growth of AI, 5G, and edge computing is propelling the growth of the Internet of Everything (IoE), a network that connects everything and everyone. IoE is an evolution of IoT, and it faces the greatest threat to cybersecurity, malware. Malware does not target only professionals within the domain of cybersecurity, nor does it target a specific platform or operating system, such as embedded systems, smart cars, or mobile phones. Any device with Internet connectivity is exposed to different types of malware, such as viruses, worms, ransomware, trojan horses, and so on, each designed in a unique way to exploit vulnerabilities [1]. With the projected increase in the number of devices on the Internet of 39 billion by 2030 [2], this rise corresponds to a rapid increase in vulnerabilities. A growing challenge is imposed on current cybersecurity systems due to this constant increase in vulnerabilities, and, coincidentally, the complexity and scale with which malware variants are being created.

Additionally, AV-Test roughly reports about 450,000 new malware variants per day [2], and according to a 2025 SonicWall report, malicious actors now utilize public exploit code within 48 hours of its release, leading to an increase in malware volume with a sharp rise in May 2024 at 92% [3]. The report also highlights that IoT attacks increased by 124% within that year [3]. In the United States, many critical sectors have been sitting ducks for ransomware throughout 2025 and 2026. The healthcare sector reported one of the biggest breaches, nearly affecting 193 million people, as well as disrupting services nationwide [4], [5]. In 2025 alone, over 600 healthcare breaches were reported; likewise, attacks were launched on the education, finance, and government sectors, leading to downtime and data loss resulting in substantial operational and financial costs [6], [7]. These figures illustrate how costly malware attacks have become with this rapid growth rate. This complicates early detection and timely mitigation.

Traditionally, malware detection systems rely on detecting a unique digital footprint (malware signature) [8] or work by searching for commands not normally present in a benevolent application [9]. Detection is performed

Figure

Fig. 1: Overall System Workflow

by examining the signature or behavior of a program and comparing it to known threats. A software is flagged when it matches the signature of a known threat and may go unnoticed if it does not match a known threat. To address these limitations, anti-malware vendors increasingly adopted machine learning (ML) techniques to enhance detection and classification [10], yet they remain limited in their ability to capture new malware variants at this rapid rate of growth. Recent research has shifted towards Deep Learning (DL) approaches to learn complex features from malware datasets for predictions, such as Convolutional and Recurrent Neural Networks (CNNs & RNNs). The former is restricted in its ability to model long-term dependencies, and the latter, particularly Long Short-Term Memory (LSTM), becomes computationally expensive and suffers from gradient vanishing and exploding problems [11]. While the introduction of Transformer models addresses this gap, they often do so at the cost of computation.

Malware classification research has taken several directions, with most work centered on feature extraction to improve multiclass performance. One line of research preserves raw binary structure during preprocessing, treating executables as one-dimensional byte signals. Wilkie et al. reported F1-scores of 0.503 and 0.507 for type and family classification on the large-scale MalNet dataset, indicating that low-level byte patterns retain enough information to support fine-grained family distinctions [12]. Opcode-based approaches have progressed from n-gram models to architectures combining convolutional layers with bidirectional LSTM networks, reaching above 81% accuracy across twenty families [13], [14]. Behavioral methods operating on API call sequences have shown that LSTM models consistently outperform nearest-neighbor, support vector machine, and decision tree baselines at the family level [15]. Graph-based models encoding directional API relationships have also demonstrated gains on datasets such as Cuckoo Sandbox, where structural dependencies provide useful signals for separating closely related families [16]. Portable executable metadata, packet payloads, and hybrid ensemble systems have produced strong results particularly when family count is small or class imbalance is addressed [17], [18], [19]. Among these, random forests, gradient boosting, and SVMs applied directly to tabular PE features have shown competitive classification accuracy [19], [20], though shallow decision boundaries may limit performance as families grow structurally similar. Similarly, Andam et al. proposed a hybrid framework combining an Autoencoder Feature Extractor with a Model-Agnostic Meta-Learning classifier for few-shot malware detection, achieving up to 93.65% accuracy in binary classification tasks [21]. Overall, these studies show that multiclass malware classification improves when models can retain long-range structure and capture detailed dependencies, but many existing approaches remain limited by sequence length constraints or computational cost.

To address these pitfalls, this study examines the S4 model [22], [23] for binary malware detection and multiclass family classification. Unlike recurrent and attention-based architectures, S4 applies an explicit state space formulation that captures long-range dependencies at linear computational complexity. Malware samples are represented as sequential feature inputs and passed through stacked state space layers, enabling the model to recover global structural patterns that standard deep learning architectures tend to miss. Shared state representations learned through state space dynamics are used to jointly identify discriminative features across both tasks, with particular emphasis on family-level classification where subtle inter-variant differences make accurate discrimination more demanding. This serves as the basis for the proposed methodology in this study, and thus, the objectives of this study is summarized as follows:

  1. We present the first empirical application of an S4 model to sequential malware analysis.

  2. We design and implement an S4-based framework for binary detection and multiclass family classifi-cation.

  3. We benchmark S4 against CNN, LSTM, GRU, and Transformer baselines, evaluating accuracy and computational efficiency.