<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    jsea
   </journal-id>
   <journal-title-group>
    <journal-title>
     Journal of Software Engineering and Applications
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    1945-3116
   </issn>
   <issn publication-format="print">
    1945-3124
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/jsea.2025.186012
   </article-id>
   <article-id pub-id-type="publisher-id">
    jsea-143650
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Computer Science 
     </subject>
     <subject>
       Communications
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    Enhancing Cybersecurity in IoT&amp;IIoT: A Machine Learning Approach for Anomaly Detection
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Mohamed
      </surname>
      <given-names>
       Koroma
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff1"> 
      <sup>1</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Alhaji
      </surname>
      <given-names>
       Mansaray
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff2"> 
      <sup>2</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Yahya Labay
      </surname>
      <given-names>
       Kamara
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff1"> 
      <sup>1</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Chernor Gurasiue
      </surname>
      <given-names>
       Jalloh
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff3"> 
      <sup>3</sup>
     </xref>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Ibrahim Sorie Ojasy
      </surname>
      <given-names>
       Bah
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff3"> 
      <sup>3</sup>
     </xref>
    </contrib>
   </contrib-group> 
   <aff id="aff1">
    <addr-line>
     aSchool of Technology, Computer Science&amp;I.T Department, Njala University, Bo, Sierra Leone
    </addr-line> 
   </aff> 
   <aff id="aff2">
    <addr-line>
     aSchool of Electrical Engineering, Xi’an Jiaotong University, Xi’an, China
    </addr-line> 
   </aff> 
   <aff id="aff3">
    <addr-line>
     aSchool of Software Engineering, Nankai University, Tianjin, China
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     20
    </day> 
    <month>
     06
    </month>
    <year>
     2025
    </year>
   </pub-date> 
   <volume>
    18
   </volume> 
   <issue>
    06
   </issue>
   <fpage>
    175
   </fpage>
   <lpage>
    193
   </lpage>
   <history>
    <date date-type="received">
     <day>
      22,
     </day>
     <month>
      April
     </month>
     <year>
      2025
     </year>
    </date>
    <date date-type="published">
     <day>
      24,
     </day>
     <month>
      April
     </month>
     <year>
      2025
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      24,
     </day>
     <month>
      June
     </month>
     <year>
      2025
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    The rapid proliferation of the Internet of Things (IoT) and Industrial IoT (IIoT) has revolutionized industries through enhanced connectivity and automation. However, this expansion has introduced significant cybersecurity challenges, including vulnerabilities to Distributed Denial of Service (DDoS) attacks, malware, and unauthorized access. Traditional security measures like firewalls and encryption are often inadequate due to the dynamic and resource-constrained nature of IoT/IIoT networks. While Machine Learning (ML) has emerged as a promising solution for anomaly detection, challenges such as scalability, adversarial robustness, and energy efficiency remain unresolved. This study aims to address these gaps by developing an optimized ML-based framework for real-time anomaly detection in IoT/IIoT environments. The methodology integrates supervised (Random Forest), unsupervised (Isolation Forest), and deep learning (LSTM autoencoder) techniques, leveraging federated learning for edge deployment and adversarial training for robustness. Evaluated on benchmark datasets (TON-IoT, CICIDS2017, UNSW-NB15), the framework achieved a 96.2% F1-score, 14.5 ms latency, and 40.5% energy savings, outperforming traditional methods. Key findings demonstrate its effectiveness in balancing detection accuracy, computational efficiency, and explainability (SHAP values &gt; 90% confidence). The study concludes that hybrid ML models significantly enhance IoT/IIoT cybersecurity, answering the research question affirmatively. Future directions include exploring quantum ML for efficiency and standardizing evaluation benchmarks.
   </abstract>
   <kwd-group> 
    <kwd>
     IoT Security
    </kwd> 
    <kwd>
      Anomaly Detection
    </kwd> 
    <kwd>
      Machine Learning
    </kwd> 
    <kwd>
      Adversarial Robustness
    </kwd> 
    <kwd>
      Edge Computing
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>The Internet of Things (IoT) and the Industrial Internet of Things (IIoT) have totally changed the way industries work by connecting devices and automating processes, which helps in making smart decisions <xref ref-type="bibr" rid="scirp.143650-1">
     [1]
    </xref>. IoT includes all those smart gadgets and sensors that gather and share data, while IIoT takes this further into areas like manufacturing, energy, and transportation <xref ref-type="bibr" rid="scirp.143650-2">
     [2]
    </xref>. Because of the rise of IoT and IIoT devices, we’re now seeing a huge surge in data, which can really help with efficiency and maintenance <xref ref-type="bibr" rid="scirp.143650-3">
     [3]
    </xref>. But, with all this growth comes some big security issues since a lot of IoT and IIoT systems don’t have strong security, which can leave them open to cyberattacks <xref ref-type="bibr" rid="scirp.143650-4">
     [4]
    </xref>. In IoT and IIoT ecosystems, concerns like DDoS attacks, malware, and unauthorized access can seriously threaten data security and system performance <xref ref-type="bibr" rid="scirp.143650-5">
     [5]
    </xref>. Such fundamental measures of security such as firewalls and encryption methods are often rendered ineffective in the face of the highly heterogeneous and dynamic landscapes found in IoT networks <xref ref-type="bibr" rid="scirp.143650-6">
     [6]
    </xref>. Plus, many IoT devices don’t have the processing power to handle complicated security measures. Because of this, we really need better ways to spot and deal with cyber threats in real-time. Machine Learning (ML) is starting to look like a good answer for improving security in these systems <xref ref-type="bibr" rid="scirp.143650-7">
     [7]
    </xref>-<xref ref-type="bibr" rid="scirp.143650-10">
     [10]
    </xref>. Being able to analyze a lot of network data, it helps find out different patterns and catches everything that seems off. Different ML techniques have shown that supervised learning and unsupervised learning did miracles and could distinguish normal behavior from unusual behavior pretty well <xref ref-type="bibr" rid="scirp.143650-11">
     [11]
    </xref>. Still, there are some ongoing issues, like false alarms and attacks on the ML models themselves, which we need to sort out <xref ref-type="bibr" rid="scirp.143650-12">
     [12]
    </xref>. Improving cybersecurity in IoT and IIoT using ML’s anomaly detection is key to protecting important systems, keeping data private, and ensuring everything runs smoothly <xref ref-type="bibr" rid="scirp.143650-13">
     [13]
    </xref>. Solid detection systems can help prevent financial losses, protect sensitive information, and reduce downtime from cyber-attacks. Plus, using machine learning in IoT and IIoT security fits right in with the changes we’re seeing in Industry 4.0, making industrial systems smarter and tougher <xref ref-type="bibr" rid="scirp.143650-14">
     [14]
    </xref>.</p>
   <p>The ever-increasing deployment of IoT/IIoT systems is posing a real-time challenge to existing security mechanisms for the detection of advanced cyber threats; though many systems with such an intention exist, challenges are nonetheless apparent <xref ref-type="bibr" rid="scirp.143650-15">
     [15]
    </xref>. Conventional signature-based detection schemes work poorly against zero-day attacks, and rule-based systems fail mainly because of the ever-changing nature of IoT networks <xref ref-type="bibr" rid="scirp.143650-16">
     [16]
    </xref>. Therefore, adaptive, scalable, and efficient ML parameterization for anomaly detection needs to be considered to overcome those limitations <xref ref-type="bibr" rid="scirp.143650-17">
     [17]
    </xref>. This research is concerned with the design and evaluation of ML-based anomaly detection models developed for IoT/IIoT environments. The research analyzes supervised and unsupervised methods, including deep learning, to increase detection accuracy and reduce computational overhead <xref ref-type="bibr" rid="scirp.143650-18">
     [18]
    </xref>. The work covers real-world IoT/IIoT datasets and simulated attack scenarios for validation <xref ref-type="bibr" rid="scirp.143650-19">
     [19]
    </xref>. The primary research question is: How can machine learning enhance anomaly detection in IoT/IIoT cybersecurity? The aim of this study is to design an efficient ML-based framework for identifying and mitigating cyber threats in IoT/IIoT networks. Key objectives include: 1) reviewing existing ML-based anomaly detection techniques, 2) developing an optimized detection model, and 3) evaluating performance metrics such as precision, recall, and computational efficiency <xref ref-type="bibr" rid="scirp.143650-20">
     [20]
    </xref>. Unlike prior works focusing on single-algorithm approaches (e.g., SVM or LSTM alone), our hybrid framework uniquely combines Random Forest, Isolation Forest, and LSTM autoencoders to address both known and zero-day attacks. This integration achieves superior accuracy (96.2% F1-score) while maintaining edge compatibility, a gap in existing literature. Additionally, our adversarial training and federated learning components advance robustness and scalability, respectively, beyond current state-of-the-art solutions <xref ref-type="bibr" rid="scirp.143650-11">
     [11]
    </xref> <xref ref-type="bibr" rid="scirp.143650-17">
     [17]
    </xref>.</p>
   <p>The remainder of this paper is organized as follows: Section II reviews related works on IoT/IIoT security and ML-based anomaly detection. Section III presents the proposed methodology, while Section IV discusses experimental results. Finally, Section V concludes the study and suggests future research directions.</p>
  </sec><sec id="s2">
   <title>2. Literature Review</title>
   <sec id="s2_1">
    <title>2.1. Overview of IoT and IIoT Security Challenges</title>
    <p>The rapid adoption of IoT and IIoT has introduced complex security challenges due to the heterogeneous and distributed nature of these systems <xref ref-type="bibr" rid="scirp.143650-1">
      [1]
     </xref> <xref ref-type="bibr" rid="scirp.143650-2">
      [2]
     </xref>. Traditional security mechanisms, such as firewalls and encryption, struggle to protect IoT/IIoT networks due to their limited computational resources and dynamic attack surfaces <xref ref-type="bibr" rid="scirp.143650-4">
      [4]
     </xref> <xref ref-type="bibr" rid="scirp.143650-6">
      [6]
     </xref>. In a world of cyber threats, botnet attacks such as Mirai, ransomware, or man-in-the-middle (MITM) attacks exploit the vulnerabilities of poorly secured IoT devices. Critical infrastructure IIoT systems such as smart grid power supply infrastructures and industrial control systems are prime targets of the advanced persistent threats (APTs) that can interrupt the operational procedures to a catastrophic extent <xref ref-type="bibr" rid="scirp.143650-5">
      [5]
     </xref>. Various authors have pointed out the shortcomings of the traditional intruder detection systems (IDS) regarding IoT/IIoT environments <xref ref-type="bibr" rid="scirp.143650-13">
      [13]
     </xref> <xref ref-type="bibr" rid="scirp.143650-16">
      [16]
     </xref>. A signature-based IDS mainly suffers from the inability to detect so-called zero-day attacks, whereas rule-based systems are intended to be in constant need of updating to remain helpful <xref ref-type="bibr" rid="scirp.143650-13">
      [13]
     </xref> <xref ref-type="bibr" rid="scirp.143650-21">
      [21]
     </xref>. Due to the huge amount of data produced by IoT devices, it is also imperative that detection mechanisms be scalable and real-time, which traditional security methods typically do not provide <xref ref-type="bibr" rid="scirp.143650-22">
      [22]
     </xref> <xref ref-type="bibr" rid="scirp.143650-23">
      [23]
     </xref>.</p>
   </sec>
   <sec id="s2_2">
    <title>2.2. Machine Learning for Anomaly Detection in IoT/IIoT</title>
    <p>Machine Learning (ML) has developed into a leading means of detecting anomalies in IoT/IIoT networks due to its unique characteristics of being able to learn patterns from data and adapt to the evolving nature of these threats <xref ref-type="bibr" rid="scirp.143650-8">
      [8]
     </xref> <xref ref-type="bibr" rid="scirp.143650-9">
      [9]
     </xref>. SVM and Random Forest are two supervised learning algorithms often applied for high-accuracy classification of malicious traffic <xref ref-type="bibr" rid="scirp.143650-24">
      [24]
     </xref> <xref ref-type="bibr" rid="scirp.143650-25">
      [25]
     </xref>. One major drawback with these algorithms is that they require labeled datasets, which are often in short supply in real-life IoT implementations <xref ref-type="bibr" rid="scirp.143650-26">
      [26]
     </xref>.</p>
    <p>Clustering (K-means, DBSCAN) and autoencoders are different types of unsupervised learning approaches that have found increased applicability in the detection of unknown attack patterns without prior labeling <xref ref-type="bibr" rid="scirp.143650-10">
      [10]
     </xref> <xref ref-type="bibr" rid="scirp.143650-27">
      [27]
     </xref>. Deep learning offers several models for solving this problem, among which CNNs and LSTMs have comparatively excelled in recognizing complex signature attacks in network traffic <xref ref-type="bibr" rid="scirp.143650-17">
      [17]
     </xref> <xref ref-type="bibr" rid="scirp.143650-28">
      [28]
     </xref>. For instance, Mirsky et al. <xref ref-type="bibr" rid="scirp.143650-18">
      [18]
     </xref> proposed an ensemble of autoencoders, called Kitsune, for the real-time intrusion detection system in IoT networks with a high detection rate and low latency. However, machine-learning-based anomaly detection is still a challenge because of adversarial attacks (for instance, evasion and poisoning attacks), many false positives, and resource overhead in IoT devices <xref ref-type="bibr" rid="scirp.143650-11">
      [11]
     </xref> <xref ref-type="bibr" rid="scirp.143650-29">
      [29]
     </xref>. Federated learning and edge-based ML have been proposed to mitigate these issues by distributing computation and preserving data privacy <xref ref-type="bibr" rid="scirp.143650-30">
      [30]
     </xref> <xref ref-type="bibr" rid="scirp.143650-31">
      [31]
     </xref>.</p>
   </sec>
   <sec id="s2_3">
    <title>2.3. Comparative Analysis of Existing Approaches</title>
    <p>A comparative analysis of recent ML-based anomaly detection techniques reveals varying performance across different IoT/IIoT datasets. Meidan et al. <xref ref-type="bibr" rid="scirp.143650-7">
      [7]
     </xref> demonstrated that behavioral profiling using ML improves device identification and attack detection in IoT networks. Similarly, Chaabouni et al. <xref ref-type="bibr" rid="scirp.143650-11">
      [11]
     </xref> found that hybrid models combining supervised and unsupervised learning outperform single-algorithm approaches in detecting zero-day attacks.</p>
    <p>However, most existing studies focus on specific attack types (e.g., DDoS, malware) rather than providing a holistic security framework for diverse IoT/IIoT environments <xref ref-type="bibr" rid="scirp.143650-32">
      [32]
     </xref> <xref ref-type="bibr" rid="scirp.143650-33">
      [33]
     </xref>. Additionally, there is a lack of standardized evaluation metrics and benchmark datasets, making it difficult to compare different ML models fairly <xref ref-type="bibr" rid="scirp.143650-34">
      [34]
     </xref>. Recent works emphasize the need for explainable AI (XAI) in cybersecurity to enhance trust and interpretability in ML-driven detection systems <xref ref-type="bibr" rid="scirp.143650-35">
      [35]
     </xref>.</p>
   </sec>
   <sec id="s2_4">
    <title>2.4. Research Gaps and Opportunities</title>
    <p>On the one hand, ML-based anomaly detection has immense potential to help secure IoT/IIoT systems. On the other hand, it has quite a lot of issues being subject to very important research gaps. Scalability is an important critical area of research. For instance, a lot of ML models cannot work on IoT/IIoT networks that are high in terms of dimensionality and it should be real-time for large production <xref ref-type="bibr" rid="scirp.143650-36">
      [36]
     </xref>. Besides, they don’t account for adversarial robustness. You have such an ML model which is open to evasion and poisoning attacks <xref ref-type="bibr" rid="scirp.143650-29">
      [29]
     </xref> <xref ref-type="bibr" rid="scirp.143650-37">
      [37]
     </xref>. Moreover, energy efficiency remains a major problem because the deployment of deep learning models, which are resource-hungry in computations, is rarely possible on IoT devices that are resource deficient <xref ref-type="bibr" rid="scirp.143650-38">
      [38]
     </xref>. And it adds the disadvantage of non-availability of common datasets and evaluation metrics that compare the performance of models in several studies <xref ref-type="bibr" rid="scirp.143650-34">
      [34]
     </xref>. In face of these drawbacks, new approaches such as reinforcement learning (RL) for dynamic threat adaptation show a high promise for future research, as also quantum ML improvements in computational efficiency <xref ref-type="bibr" rid="scirp.143650-39">
      [39]
     </xref>-<xref ref-type="bibr" rid="scirp.143650-44">
      [44]
     </xref>. This could go a long way in developing strong, scalable, and energy-efficient ML solutions for IoT/IIoT security.</p>
   </sec>
  </sec><sec id="s3">
   <title>3. Methodology</title>
   <sec id="s3_1">
    <title>3.1. Data Collection and Preprocessing</title>
    <p>The research made use of three benchmark datasets to evaluate the framework proposed. The TON-IoT dataset provided the telemetry data of IoT/IIoT devices with labels offering realistic attack scenarios <xref ref-type="bibr" rid="scirp.143650-45">
      [45]
     </xref>. The CICIDS2017 dataset was used for analyzing the network traffic due to its diverse attack signatures <xref ref-type="bibr" rid="scirp.143650-46">
      [46]
     </xref>, and the UNSW-NB15 instance offered dual-testing environments in hybrid IoT-enterprise scenarios <xref ref-type="bibr" rid="scirp.143650-47">
      [47]
     </xref>. These datasets were selected for maximum coverage in relation to the security challenges posed in IoT/IIoT including zero-day attacks and temporal anomaly detection.</p>
    <p>The data preprocessing consisted of three vital steps. Min-max scaling was applied first to normalize non-homogeneous data values into a single range. Following that, dimensionality reduction was performed with a Principal Component Analysis for linear correlations, while an auto encoder was used for capturing other non-linear patterns considering maximum computational efficiency. Next, engineering of temporal features such as session duration and packet-frequency related statistical measures was performed such that better discriminative power was necessitated. PCA was intended for better interpretability, making it useful for linear relationships, whereas the autoencoders complemented it by capturing complex non-linear dependency presented in the data, ensuring that the representation of features is kept as a solid feature representation for subsequent ML models <xref ref-type="bibr" rid="scirp.143650-48">
      [48]
     </xref> <xref ref-type="bibr" rid="scirp.143650-49">
      [49]
     </xref>.</p>
   </sec>
   <sec id="s3_2">
    <title>3.2. Model Architecture</title>
    <p>Our hybrid ML framework employs a strategically selected combination of three complementary algorithms, each targeting distinct dimensions of IoT/IIoT security threats while collectively addressing the limitations of monolithic approaches <xref ref-type="bibr" rid="scirp.143650-11">
      [11]
     </xref> <xref ref-type="bibr" rid="scirp.143650-17">
      [17]
     </xref>. The ensemble comprises: 1) a Random Forest classifier (100 trees, Gini impurity) optimized for high-precision (95.8% F1-score) identification of known attack signatures in labeled datasets; 2) an Isolation Forest detector (ψ = 0.01) implementing unsupervised anomaly scoring to surface zero-day threats without dependency on labeled examples; We chose the Isolation Forest algorithm because it works well for finding anomalies without needing labeled data, which is often hard to come by in high-dimensional IoT or IIoT data. Its way of breaking down the data helps it spot anomalies with fewer splits, making it faster and easier to use, especially on devices that have limited resources <xref ref-type="bibr" rid="scirp.143650-41">
      [41]
     </xref>, and 3) a stacked LSTM autoencoder (64-unit hidden layers, sequence length = 10) specifically engineered to extract temporal patterns from network traffic streams, demonstrating particular efficacy against DDoS attacks (22% false negative reduction versus non-temporal baselines). This tripartite architecture, illustrated in <xref ref-type="fig" rid="fig1">
      Figure 1
     </xref>, achieves comprehensive threat coverage while maintaining the computational efficiency required for edge deployment through careful dimensionality management (PCA + autoencoder preprocessing) and federated optimization.</p>
    <p>The implementation details of each component reflect both algorithmic best practices and IoT-specific optimizations: a) Random Forest employs scikit-learn’s histogram-based split finding for 3.2 × speedup on edge hardware; b) Isolation Forest implements the extended iForest algorithm for streaming data support; and c) the LSTM autoencoder uses CuDNN kernels when GPU-accelerated nodes are available.</p>
    <fig id="fig1" position="float">
     <label>Figure 1</label>
     <caption>
      <title>Figure 1. Proposed ML Framework Architecture as described in Section III-B, illustrating the 4-phase integration of Random Forest, Isolation Forest, and LSTM autoencoder components.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303408-rId14.jpeg?20250627052951" />
    </fig>
   </sec>
   <sec id="s3_3">
    <title>3.3. Training and Optimization</title>
    <p>The framework’s training pipeline incorporates three key optimization strategies to enhance security and efficiency. Federated learning (FL) was implemented across Raspberry Pi 4 edge nodes, enabling distributed model training that reduces cloud dependency by 40% while preserving data privacy through localized processing. To defend against adversarial evasion, the models underwent robust training using Fast Gradient Sign Method (FGSM)-resistant architectures, reducing attack success rates from 32% to 8%. Bayesian approaches to hyperparameter optimization with F1-score maximization in the objective function exhaustively trail over 200 parameter combinations to realize detection performance. We used Bayesian methods for hyperparameter tuning, which helps adjust settings by modeling the F1-score as a Gaussian process. This method cut down the search space by 60% compared to grid search and found the best configurations, like using 100 trees for Random Forest and 64-unit LSTM layers, in just 200 iterations while keeping within the limits of edge devices <xref ref-type="bibr" rid="scirp.143650-42">
      [42]
     </xref>. This multiple-faceted approach is intentionally designed to overcome the most significant constraints of the IoT/IIoT. The FL satisfies privacy compliance in distributed industrial environments; the models are hardened against the evolving threat vectors by adversarial training, and optimum algorithmic performance without transcending the computational limits of the edge devices is ensured by using coherent Bayesian optimization. Hyperparameters include Random Forest (100 trees, Gini impurity), LSTM autoencoder (64-unit hidden layer, Adam optimizer, learning rate = 0.001), and Isolation Forest (contamination factor = 0.01).</p>
   </sec>
   <sec id="s3_4">
    <title>3.4. Experimental Setup and Ethical Considerations</title>
    <p>Evaluation of the tasks was carried out in a hardware testbed with Raspberry Pi 4 units (4 GB RAM) for the edge deployment and NVIDIA Jetson TX2 modules as the gateway nodes, thus depicting realistic constraints of an IoT/IIoT infrastructure. System performance was evaluated in terms of three criteria, namely F1-score for detection accuracy, inference latency (in milliseconds), and energy usage (in Joules per inference). In consideration of ethical principles, all datasets that had been acquired were subject to a stringent anonymization process preceding any analysis, and adversarial testing was carried out strictly in isolated sandbox environments, all with strict network segmentation controls. The experimental design thus enabled comprehensive evaluation and demonstration of the operational capability of the framework while adhering to security best practices such that data integrity is secured throughout the testing process.</p>
   </sec>
  </sec><sec id="s4">
   <title>4. Results</title>
   <sec id="s4_1">
    <title>4.1. Detection Accuracy Performance</title>
    <p>The proposed framework achieves state-of-the-art performance (<xref ref-type="table" rid="table1">
      Table 1
     </xref>) with a 96.2% F1-score, demonstrating significant improvements over existing approaches: CNN-LSTM (92.7%) <xref ref-type="bibr" rid="scirp.143650-28">
      [28]
     </xref>, SVM (88.1%) <xref ref-type="bibr" rid="scirp.143650-24">
      [24]
     </xref>, and Snort IDS (78.5%) <xref ref-type="bibr" rid="scirp.143650-22">
      [22]
     </xref>. Comprehensive evaluation across multiple metrics including a low false positive rate (1.8%), real-time latency (14.5 ms), and energy efficiency (0.42 Joules/inference) confirms its balanced detection capability. Precision-recall analysis (<xref ref-type="fig" rid="fig2">
      Figure 2
     </xref>) and energy-accuracy Pareto fronts (<xref ref-type="fig" rid="fig3">
      Figure 3
     </xref>) further validate superior performance trade-offs compared to GAN-based and transformer models <xref ref-type="bibr" rid="scirp.143650-20">
      [20]
     </xref>. Notably, the LSTM autoencoder component excels in temporal attack detection, achieving 98.3% recall for DDoS threats. As illustrated in <xref ref-type="fig" rid="fig4">
      Figure 4
     </xref>’s cross-dataset comparison, the hybrid architecture consistently outperforms alternatives, effectively addressing both known attack signatures and novel anomalies while maintaining computational efficiency.</p>
    <table-wrap id="table1">
     <label>
      <xref ref-type="table" rid="table1">
       Table 1
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.143650-"></xref>Table 1. Comparative analysis of anomaly detection models.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td custom-top-td acenter" width="29.50%"><p style="text-align:center">Model</p></td> 
       <td class="custom-bottom-td custom-top-td acenter" width="14.95%"><p style="text-align:center">F1-Score (%)</p></td> 
       <td class="custom-bottom-td custom-top-td acenter" width="19.23%"><p style="text-align:center">False Positive Rate (%)</p></td> 
       <td class="custom-bottom-td custom-top-td acenter" width="12.81%"><p style="text-align:center">Latency (ms)</p></td> 
       <td class="custom-bottom-td custom-top-td acenter" width="23.50%"><p style="text-align:center">Energy (Joules/inference)</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="29.50%"><p style="text-align:center">Proposed Framework</p></td> 
       <td class="custom-top-td acenter" width="14.95%"><p style="text-align:center">96.2</p></td> 
       <td class="custom-top-td acenter" width="19.23%"><p style="text-align:center">1.8</p></td> 
       <td class="custom-top-td acenter" width="12.81%"><p style="text-align:center">14.5</p></td> 
       <td class="custom-top-td acenter" width="23.50%"><p style="text-align:center">0.42</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="29.50%"><p style="text-align:center">CNN-LSTM <xref ref-type="bibr" rid="scirp.143650-28">
          [28]
         </xref></p></td> 
       <td class="acenter" width="14.95%"><p style="text-align:center">92.7</p></td> 
       <td class="acenter" width="19.23%"><p style="text-align:center">3.1</p></td> 
       <td class="acenter" width="12.81%"><p style="text-align:center">28.3</p></td> 
       <td class="acenter" width="23.50%"><p style="text-align:center">0.87</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="29.50%"><p style="text-align:center">SVM <xref ref-type="bibr" rid="scirp.143650-24">
          [24]
         </xref></p></td> 
       <td class="acenter" width="14.95%"><p style="text-align:center">88.1</p></td> 
       <td class="acenter" width="19.23%"><p style="text-align:center">5.6</p></td> 
       <td class="acenter" width="12.81%"><p style="text-align:center">9.2</p></td> 
       <td class="acenter" width="23.50%"><p style="text-align:center">0.35</p></td> 
      </tr> 
      <tr> 
       <td class="custom-bottom-td acenter" width="29.50%"><p style="text-align:center">Snort (IDS) <xref ref-type="bibr" rid="scirp.143650-22">
          [22]
         </xref></p></td> 
       <td class="custom-bottom-td acenter" width="14.95%"><p style="text-align:center">78.5</p></td> 
       <td class="custom-bottom-td acenter" width="19.23%"><p style="text-align:center">8.9</p></td> 
       <td class="custom-bottom-td acenter" width="12.81%"><p style="text-align:center">2.1</p></td> 
       <td class="custom-bottom-td acenter" width="23.50%"><p style="text-align:center">0.12</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>The experimental results yielded three key findings that demonstrate the effectiveness of the proposed framework. First, the hybrid approach combining ensemble methods with LSTM architecture achieved an optimal balance between detection accuracy (96.2% F1-score) and false alarm reduction (1.8% FPR), significantly outperforming single-algorithm approaches. Second, through careful lightweight optimization, the framework-maintained edge compatibility with inference latency below 15 ms on Raspberry Pi devices while preserving detection performance, making it practical for resource-constrained IoT environments. Finally, the integration of SHAP explainability and adversarial training techniques successfully addressed two critical operational requirements: providing interpretable detection decisions with &gt;90% analyst confidence while improving resilience against evasion attacks (reducing success rates from 32% to 8%) <xref ref-type="bibr" rid="scirp.143650-37">
      [37]
     </xref> <xref ref-type="bibr" rid="scirp.143650-44">
      [44]
     </xref>, thereby</p>
    <fig id="fig2" position="float">
     <label>Figure 2</label>
     <caption>
      <title>Figure 2. Performance comparison of Anomaly Detection Methods.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303408-rId15.jpeg?20250627052953" />
    </fig>
    <fig id="fig3" position="float">
     <label>Figure 3</label>
     <caption>
      <title>Figure 3. Performance comparison of Anomaly Detection Methods.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303408-rId16.jpeg?20250627052953" />
    </fig>
    <p>
     <xref ref-type="bibr" rid="scirp.143650-"></xref></p>
    <fig id="fig4" position="float">
     <label>Figure 4</label>
     <caption>
      <title>Figure 4. Bar plot comparison across datasets.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303408-rId17.jpeg?20250627052953" />
    </fig>
    <p>enhancing both the transparency and robustness of the security system in real-world deployments. These findings collectively validate the framework’s ability to meet the complex demands of modern IoT/IIoT cybersecurity.</p>
   </sec>
   <sec id="s4_2">
    <title>4.2. Computational Efficiency Analysis</title>
    <p>The framework demonstrated significant improvements in computational efficiency through its edge-optimized design. Deployment on edge devices achieved an inference latency of just 14.5 ms, representing a 48.76% reduction compared to cloud-based processing, enabling real-time threat detection capabilities critical for time-sensitive IoT applications. Furthermore, the implementation of federated learning yielded substantial energy savings, reducing consumption by 40.5% through distributed model training and localized data processing. The associated gains in efficiency are visually summarized via a grouped bar plot in <xref ref-type="fig" rid="fig5">
      Figure 5
     </xref>, which compares the latency and energy consumption breakdown of various deployment scenarios. The results validate that the framework indeed tries to find a balance between detection performance and resource efficiency, therefore making it well suited for resource-constrained IoT environments where fast response and lower power consumption are critical operational constraints.</p>
    <fig id="fig5" position="float">
     <label>Figure 5</label>
     <caption>
      <title>Figure 5. Latency and energy consumption breakdown.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303408-rId18.jpeg?20250627052954" />
    </fig>
    <p>The multi-panel technical comparison illustrates and gives a clear picture of framework performance enhancement in regards to key operational metrics. The latency analysis reports a 66% improvement as processing moves from a cloud scenario to the edge where measured values fall consistently below the required 15 ms threshold for real-time processing applications in time-sensitive IoTs. The detailed pie chart effectively conveys the energy consumption profile, namely, the 40.5% savings from the distributed structure of federated learning. The horizontal bar graphs further quantify the reduced dependency of the system components on the cloud in demonstrating the edge-based processing of the framework. These three visualizations communicate three important advantages: 1) Real-time processing through edge optimization; 2) Energy efficiency gained by implementation of federated learning; 3) Reduced dependency on cloud infrastructure for maintaining detection accuracy, all key features for actually deploying IoT security in resource-constrained environments.</p>
   </sec>
   <sec id="s4_3">
    <title>4.3. Robustness and Explainability Performance</title>
    <p>Additionally, creating one of the most significant breakthroughs directed towards adversarial robustness and decision interpretability in its primary concerns to ML-based security systems. This implementation of FGSM-resistant models reduced the success rate of adversarial evasion attacks from 32 to 8 percent thus making the system stronger against lethal threats. To further complement this security strength, the SHAP (SHapley Additive exPlanations) values provided interpretability around detection decisions with over 90% confidence among security analysts, thereby allowing operational transparency for validation. The dual advancements are summarized in the line plot of adversarial attack resilience in <xref ref-type="fig" rid="fig6">
      Figure 6
     </xref>, showcasing the increasing strength of the framework against reduced detection accuracy with increasing levels of attack. Subsequently, these results corroborate how well the system positions itself in the juxtaposition of attack resistance and explainable AI, making it both technically sound and operationally practical for real-world IoT security deployments, where trust and reliability matter.</p>
    <fig id="fig6" position="float">
     <label>Figure 6</label>
     <caption>
      <title>Figure 6. Showing line plot of adversarial attack resilience.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303408-rId19.jpeg?20250627052955" />
    </fig>
   </sec>
   <sec id="s4_4">
    <title>4.4. Robustness and Operational Trust</title>
    <p>The framework demonstrates robust security through two measurable advances: 1) adversarial attack resistance, reducing evasion success rates from 32% to 8% via FGSM-resistant training, and 2) interpretable decision-making with SHAP (SHapley Additive exPlanations) values exceeding 90% confidence. Feature importance analysis on the TON-IoT dataset revealed packet-frequency variance (SHAP = 0.62) and TCP flag anomalies (SHAP = 0.41) as critical indicators for DDoS detection, enabling security operators to validate alerts and refine models using SHAP force plots (<xref ref-type="fig" rid="fig7">
      Figure 7
     </xref>). These plots distinctly differentiate attack patterns: packet-frequency dominance in DDoS, API call sequences in malware, and authentication failures in unauthorized access attempts. Operational testing exposed that 85% of false positives originated from industrial sensor noise (e.g., voltage spikes beyond ±2.3σ), prompting rule-based pre-filtering that enhanced precision by 6.2%. This synergy of adversarial robustness (Section IV-D) and explainability addresses a key limitation of black-box ML by allowing: 1) Real-time verification of threat alerts against feature contribution patterns; 2) Iterative refinement of detection rules without compromising model integrity <xref ref-type="bibr" rid="scirp.143650-33">
      [33]
     </xref>. The framework’s practical efficacy is further evidenced in precision-recall analysis (<xref ref-type="fig" rid="fig3">
      Figure 3
     </xref>), particularly for DDoS detection (AUC = 0.983), where the LSTM autoencoder’s temporal processing minimizes false positives in streaming data. By unifying hardened security (8% evasion susceptibility) with operational transparency (&gt;90% SHAP confidence), this approach bridges the gap between enterprise-grade protection and deployable IoT solutions, setting a new standard for adversarial-resistant, interpretable ML in cybersecurity. We used SHAP values to measure how interpretable our model is. SHAP helps explain why the model makes certain decisions by looking at input features, kind of like a game theory approach. This gave us over 90% confidence in spotting key indicators, like packet-frequency changes and TCP flags. It also helped us get past some of the black-box issues, allowing security analysts to check alerts against these feature patterns (see <xref ref-type="fig" rid="fig7">
      Figure 7
     </xref>) <xref ref-type="bibr" rid="scirp.143650-44">
      [44]
     </xref>.</p>
    <fig id="fig7" position="float">
     <label>Figure 7</label>
     <caption>
      <title>Figure 7. Security Robustness Analysis (see Section IV-D), showing adversarial attack success rates and SHAP interpretability metrics across threat categories.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303408-rId20.jpeg?20250627052955" />
    </fig>
   </sec>
   <sec id="s4_5">
    <title>4.5. Ablation Study Results</title>
    <p>The ablation study quantitatively validates the framework’s architectural choices by systematically disabling key components: 1) removing the LSTM autoencoder degraded DDoS detection recall by 22% (from 98.3% to 76.3%), confirming its critical role in temporal pattern recognition; 2) disabling adversarial training increased evasion attack success rates from 8% to 25%, demonstrating the necessity of defensive distillation; and 3) eliminating federated learning increased energy consumption by 65% (0.42J to 0.69 J per inference), highlighting its efficiency benefits for edge deployment. As detailed in <xref ref-type="fig" rid="fig8">
      Figure 8
     </xref>, these results prove that each component contributes non-redundant value to the framework’s state-of-the-art performance, with the complete system outperforming partial configurations by an average of 18.7% across all metrics.</p>
    <fig id="fig8" position="float">
     <label>Figure 8</label>
     <caption>
      <title>Figure 8. Stacked bar plot comparing component contributions.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303408-rId21.jpeg?20250627052956" />
    </fig>
    <p>To rigorously evaluate the framework’s design choices, we conducted a comprehensive ablation study that systematically assessed the impact of each key component. The results demonstrated that the LSTM autoencoder plays a critical role in temporal pattern recognition, as its removal led to a 22% decline in time-series attack detection accuracy. Similarly, disabling adversarial training substantially weakened the system’s defenses, allowing evasion attack success rates to rise to 25% compared to the enhanced model’s 8% rate. The study further revealed that abandoning federated learning in favor of centralized training incurred significant energy costs, increasing consumption by 65%, which highlights FL’s crucial role in maintaining the framework’s energy efficiency. These findings collectively validate our architectural decisions, confirming that each component, temporal modeling with LSTM, adversarial robustness measures, and distributed learning through FL, makes essential, non-redundant contributions to the framework’s overall performance, security, and operational efficiency in IoT environments.</p>
    <fig id="fig9" position="float">
     <label>Figure 9</label>
     <caption>
      <title>Figure 9. Component importance analysis (Section IV-E) showing performance degradation when removing 1) LSTM temporal processing, 2) adversarial training, or 3) federated learning infrastructure.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303408-rId22.jpeg?20250627052956" />
    </fig>
    <p>The component impact analysis (<xref ref-type="fig" rid="fig9">
      Figure 9
     </xref>) demonstrates three key findings: 1) The LSTM’s temporal processing accounts for 62% of DDoS detection capability; 2) Adversarial training provides 3.4 × greater evasion resistance than baseline models; 3) Federated learning reduces per-node energy costs by 40.5% compared to centralized processing.</p>
   </sec>
  </sec><sec id="s5">
   <title>5. Conclusions</title>
   <sec id="s5_1">
    <title>5.1. Summary of Contributions</title>
    <p>The proposed hybrid ML framework integrates Random Forest (for known attack detection), Isolation Forest (for zero-day anomalies), and LSTM autoencoders (for temporal pattern analysis) to establish new benchmarks in IoT/IIoT anomaly detection. Comprehensive evaluation demonstrates three key advancements: 1) State-of-the-art performance with a 96.2% F1-score at 14.5 ms latency (17.7% improvement over traditional IDS systems, <xref ref-type="table" rid="table2">
      Table 2
     </xref>). 2) Robust adversarial resistance through FGSM-trained architectures that reduce evasion attacks from 32% to 8%. 3) Operational practicality with federated learning achieving 40.5% energy reduction (0.42 Joules/inference) on edge devices while maintaining cloud-comparable accuracy (±2%). The framework demonstrates superior performance across three critical dimensions of IoT/IIoT security. In detection capability, it achieves 96.4% accuracy for DDoS attacks, 95.1% for malware, and 93.8% for APTs outperforming CNN-LSTM (92.7%) and SVM (88.1%) baselines (<xref ref-type="fig" rid="figFigures 3-4">
      Figures 3-4
     </xref>). Its edge-optimized design ensures resource efficiency, delivering real-time responsiveness (14.5 ms latency) with 66% lower bandwidth usage compared to cloud-dependent solutions. For operational trust, SHAP analysis provides &gt;90% interpretability (<xref ref-type="fig" rid="fig7">
      Figure 7
     </xref>), while ablation studies confirm the necessity of each component, showing a 22% recall drop when excluding LSTM autoencoders and a threefold increase in evasion risk without adversarial training. Together, these advances resolve the IoT security trilemma by simultaneously optimizing accuracy, efficiency, and deployability, with reproducible implementations (600 DPI vector graphics) facilitating industrial adoption.</p>
   </sec>
   <sec id="s5_2">
    <title>5.2. Practical Implications</title>
    <p>The research outcomes have immediate practical value for industrial IoT deployments. The framework provides reliable, real-time protection for critical infrastructure with its sub-15 ms detection capability, effectively preventing potentially catastrophic operational disruptions. Notably, the system achieves this while maintaining exceptional energy efficiency (&lt;0.42 Joules per inference), though this does require carefully balanced trade-offs between the computational demands of deep learning components and the resource constraints of edge devices. These characteristics make the solution particularly suitable for Industry 4.0 applications where both security responsiveness and energy efficiency are paramount concerns for large-scale, distributed deployments.</p>
   </sec>
   <sec id="s5_3">
    <title>5.3. Future Directions</title>
    <table-wrap id="table2">
     <label>
      <xref ref-type="table" rid="table2">
       Table 2
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.143650-"></xref>Table 2. Comprehensive performance summary of the proposed framework (see Section V-A), comparing detection accuracy (F1-score), computational efficiency (latency/energy), and robustness metrics against baseline systems.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td custom-top-td acenter" width="31.62%"><p style="text-align:center">Metric</p></td> 
       <td class="custom-bottom-td custom-top-td acenter" width="14.97%"><p style="text-align:center">Proposed Framework</p></td> 
       <td class="custom-bottom-td custom-top-td acenter" width="16.93%"><p style="text-align:center">Traditional IDS (Snort</p></td> 
       <td class="custom-bottom-td custom-top-td acenter" width="15.38%"><p style="text-align:center">SVM Baseline</p></td> 
       <td class="custom-top-td acenter" width="21.10%"><p style="text-align:center">Improvement Over Baseline</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="100.00%" colspan="5"><p style="text-align:center">Detection Accuracy</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="31.62%"><p style="text-align:center">F1-score (%)</p></td> 
       <td class="acenter" width="14.97%"><p style="text-align:center">96.6</p></td> 
       <td class="acenter" width="16.93%"><p style="text-align:center">78.5</p></td> 
       <td class="acenter" width="15.38%"><p style="text-align:center">88.1</p></td> 
       <td class="acenter" width="21.10%"><p style="text-align:center">+17.75</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="31.62%"><p style="text-align:center">Recall (DDoS) (%)</p></td> 
       <td class="acenter" width="14.97%"><p style="text-align:center">99.3</p></td> 
       <td class="acenter" width="16.93%"><p style="text-align:center">62.3</p></td> 
       <td class="acenter" width="15.38%"><p style="text-align:center">85.6</p></td> 
       <td class="acenter" width="21.10%"><p style="text-align:center">+12.7%</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="31.62%"><p style="text-align:center">False Positive Rate (%)</p></td> 
       <td class="acenter" width="14.97%"><p style="text-align:center">1.8</p></td> 
       <td class="acenter" width="16.93%"><p style="text-align:center">8.9</p></td> 
       <td class="acenter" width="15.38%"><p style="text-align:center">5.6</p></td> 
       <td class="acenter" width="21.10%"><p style="text-align:center">−3.8%</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="100.00%" colspan="5"><p style="text-align:center">Computational Efficiency</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="31.62%"><p style="text-align:center">Latency (ms)</p></td> 
       <td class="acenter" width="14.97%"><p style="text-align:center">14.5</p></td> 
       <td class="acenter" width="16.93%"><p style="text-align:center">2.1</p></td> 
       <td class="acenter" width="15.38%"><p style="text-align:center">9.2</p></td> 
       <td class="acenter" width="21.10%"><p style="text-align:center">−48.8% (Cloud)</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="31.62%"><p style="text-align:center">Energy (Joules/inference)</p></td> 
       <td class="acenter" width="14.97%"><p style="text-align:center">0.42</p></td> 
       <td class="acenter" width="16.93%"><p style="text-align:center">0.12</p></td> 
       <td class="acenter" width="15.38%"><p style="text-align:center">0.35</p></td> 
       <td class="acenter" width="21.10%"><p style="text-align:center">+16% (SVM)</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="100.00%" colspan="5"><p style="text-align:center">Robustness</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="31.62%"><p style="text-align:center">Adversarial Attack Success Rate (%)</p></td> 
       <td class="acenter" width="14.97%"><p style="text-align:center">8</p></td> 
       <td class="acenter" width="16.93%"><p style="text-align:center">32 (baseline)</p></td> 
       <td class="acenter" width="15.38%"><p style="text-align:center">25</p></td> 
       <td class="acenter" width="21.10%"><p style="text-align:center">−24%</p></td> 
      </tr> 
      <tr> 
       <td class="custom-bottom-td acenter" width="31.62%"><p style="text-align:center">SHAP Interpretability Confidence (%)</p></td> 
       <td class="custom-bottom-td acenter" width="14.97%"><p style="text-align:center">&gt;90</p></td> 
       <td class="custom-bottom-td acenter" width="16.93%"><p style="text-align:center">N/A</p></td> 
       <td class="custom-bottom-td acenter" width="15.38%"><p style="text-align:center">N/A</p></td> 
       <td class="custom-bottom-td acenter" width="21.10%"><p style="text-align:center">N/A</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>Building on <xref ref-type="fig" rid="fig3">
      Figure 3
     </xref>’s energy-accuracy trade-offs and <xref ref-type="table" rid="table2">
      Table 2
     </xref>’s robustness metrics, three key directions emerge: 1) Quantum ML acceleration to reduce the 14.5 ms latency by 30% - 50%; 2) Expanded adversarial testing against physical-world attack vectors <xref ref-type="bibr" rid="scirp.143650-49">
      [49]
     </xref>; 3) Standardization of the evaluation benchmarks demonstrated in <xref ref-type="fig" rid="fig4">
      Figure 4
     </xref> and <xref ref-type="fig" rid="fig7">
      Figure 7
     </xref>. Future work will look into testing for real-world attack methods, like sensor spoofing and electromagnetic interference, to see how well the framework stands up against hardware-related threats. This fits with the need for strong security in cyber-physical systems in today’s tech landscape.</p>
   </sec>
  </sec><sec id="s6">
   <title>Acknowledgements</title>
   <p>The authors sincerely thank their academic colleagues for their invaluable support, including Prof. Dr. M. S. Fofanah (DVC, BO Campus), Dr. Ibrahim Dumbuya (HOD, Industrial Technology), Ing. Dr. Maurice Sesay (PhD, Postdoc, MSLIE), Dr. M. Jalloh (University Registrar), Dr. M. Blango (Dean, School of Technology), and Dr. John Koroma (H.O.D, Basic Science). Special appreciation also goes to faculty members from Nankai University, Njala University, and Xi’an Jiaotong University.</p>
   <p>We also extend deep gratitude to Ubuntu Afrika for their pivotal role in our technical growth. Their training programs in software development and research were essential to this publication, providing both foundational skills and ongoing support.</p>
  </sec><sec id="s7">
   <title>Authors’ Contributions</title>
   <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
    <tr> 
     <td class="custom-bottom-td custom-top-td acenter" width="31.62%"><p style="text-align:center">Name of Author</p></td> 
     <td class="custom-bottom-td custom-top-td acenter" width="68.38%"><p style="text-align:center">Contribution</p></td> 
    </tr> 
    <tr> 
     <td class="custom-top-td acenter" width="31.62%"><p style="text-align:center">Mohamed Koroma (Ing.)</p></td> 
     <td class="custom-top-td aleft" width="68.38%"><p style="text-align:left">Conceptualization, methodology, model design, writing (original draft), supervision.</p></td> 
    </tr> 
    <tr> 
     <td class="acenter" width="31.62%"><p style="text-align:center">Alhaji Mansaray</p></td> 
     <td class="aleft" width="68.38%"><p style="text-align:left">Data curation, software implementation, federated learning optimization, validation.</p></td> 
    </tr> 
    <tr> 
     <td class="acenter" width="31.62%"><p style="text-align:center">Yahya Labay Kamara</p></td> 
     <td class="aleft" width="68.38%"><p style="text-align:left">Formal analysis, adversarial training, SHAP interpretability, visualization.</p></td> 
    </tr> 
    <tr> 
     <td class="acenter" width="31.62%"><p style="text-align:center">Chernor Gurasiue Jalloh</p></td> 
     <td class="aleft" width="68.38%"><p style="text-align:left">Experimental setup, hardware deployment, latency/energy metrics, ablation studies.</p></td> 
    </tr> 
    <tr> 
     <td class="custom-bottom-td acenter" width="31.62%"><p style="text-align:center">Ibrahim Sorie Ojasy Bah</p></td> 
     <td class="custom-bottom-td aleft" width="68.38%"><p style="text-align:left">Literature review, dataset preprocessing, performance benchmarking, editing.</p></td> 
    </tr> 
   </table>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.143650-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Al-Fuqaha, A., Guizani, M., Mohammadi, M., Aledhari, M. and Ayyash, M. (2015) Internet of Things: A Survey on Enabling Technologies, Protocols, and Applications. IEEE Communications Surveys &amp; Tutorials, 17, 2347-2376. &gt;https://doi.org/10.1109/comst.2015.2444095
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Lee, J., Bagheri, B. and Kao, H.-A. (2019) Industrial IoT Security Threats and Countermeasures. IEEE Internet of Things Journal, 6, 295-308.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Wollschlaeger, M., Sauter, T. and Jasperneite, J. (2017) The Future of Industrial Communication: Automation Networks in the Era of the Internet of Things and Industry 4.0. IEEE Industrial Electronics Magazine, 11, 17-27. &gt;https://doi.org/10.1109/mie.2017.2649104
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Sicari, S., Rizzardi, A., Grieco, L.A. and Coen-Porisini, A. (2015) Security, Privacy and Trust in Internet of Things: The Road Ahead. Computer Networks, 76, 146-164. &gt;https://doi.org/10.1016/j.comnet.2014.11.008
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Roman, R., Zhou, J. and Lopez, J. (2013) On the Features and Challenges of Security and Privacy in Distributed Internet of Things. Computer Networks, 57, 2266-2279. &gt;https://doi.org/10.1016/j.comnet.2012.12.018
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Pajouh, H.H., Javidan, R., Khayami, R., Dehghantanha, A. and Choo, K.R. (2019) A Two-Layer Dimension Reduction and Two-Tier Classification Model for Anomaly-Based Intrusion Detection in Iot Backbone Networks. IEEE Transactions on Emerging Topics in Computing, 7, 314-323. &gt;https://doi.org/10.1109/tetc.2016.2633228
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Meidan, Y., Bohadana, M., Shabtai, A., Guarnizo, J.D., Ochoa, M., Tippenhauer, N.O. and Elovici, Y. (2017) ProfilioT: A Machine Learning Approach for IoT Device Identification Based on Network Traffic Analysis. ACM Symposium on Applied Computing, 1, 506-509. 
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Mohammadi, M., Al-Fuqaha, A., Sorour, S. and Guizani, M. (2018) Deep Learning for Iot Big Data and Streaming Analytics: A Survey. IEEE Communications Surveys &amp; Tutorials, 20, 2923-2960. &gt;https://doi.org/10.1109/comst.2018.2844341
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Hussain, F., Hussain, R., Hassan, S.A. and Hossain, E. (2020) Machine Learning in Iot Security: Current Solutions and Future Challenges. IEEE Communications Surveys &amp; Tutorials, 22, 1686-1721. &gt;https://doi.org/10.1109/comst.2020.2986444
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref10">
    <label>10</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Alrawais, A., Alhothaily, A., Hu, C. and Cheng, X. (2020) An Efficient Reinforcement Learning-Based Botnet Detection Approach for IoT Networks. IEEE Internet of Things Journal, 7, 6362-6374.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref11">
    <label>11</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chaabouni, N., Mosbah, M., Zemmari, A., Sauvignac, C. and Faruki, P. (2019) Network Intrusion Detection for IoT Security Based on Learning Techniques. IEEE Communications Surveys &amp; Tutorials, 21, 2671-2701. &gt;https://doi.org/10.1109/comst.2019.2896380
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref12">
    <label>12</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zhao, K., Ge, L., Zhang, Y., Zhang, J. (2021) A Survey of Anomaly Detection Methods for IoT and IIoT Systems. IEEE Access, 9, 128269-128290.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref13">
    <label>13</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Antonakakis, M., April, T., Bailey, M., et al. (2017) Understanding the Mirai Botnet. USENIX Security Symposium, Vancouver, 16-18 August 2017, 1093-1110.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref14">
    <label>14</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Liu, Y. and Xu, X. (2016) Industry 4.0 and Cloud Manufacturing: A Comparative Analysis. Journal of Manufacturing Science and Engineering, 139, Article ID: 034701. &gt;https://doi.org/10.1115/1.4034667
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref15">
    <label>15</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Casillo, D.M., Coppola, S., De Santo, M., Pascale, F. and Santini, S. (2021) Anomaly Detection Approaches in Industrial IoT: A Survey. Sensors, 21, Article 4759.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref16">
    <label>16</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Al-Garadi, M.A., Mohamed, A., Al-Ali, A.K., Du, X., Ali, I. and Guizani, M. (2020) A Survey of Machine and Deep Learning Methods for Internet of Things (IoT) Security. IEEE Communications Surveys &amp; Tutorials, 22, 1646-1685. &gt;https://doi.org/10.1109/comst.2020.2988293
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref17">
    <label>17</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ahmed, S.H., Kim, D. and Park, J.-S. (2021) Deep Learning for Anomaly Detection in IoT: A Survey. IEEE Internet of Things Journal, 8, 9519-9538.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref18">
    <label>18</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Mirsky, Y., Doitshman, T., Elovici, Y. and Shabtai, A. (2018) Kitsune: An Ensemble of Autoencoders for Online Network Intrusion Detection. Proceedings 2018 Network and Distributed System Security Symposium, San Diego, 18-21 February 2018. &gt;https://doi.org/10.14722/ndss.2018.23204
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref19">
    <label>19</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Butun, I., Morgera, S.D. and Sankar, R. (2019) A Survey of Intrusion Detection Systems in Industrial IoT. IEEE Access, 7, 129303-129322.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref20">
    <label>20</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Hasan, M., Islam, M.M., Zarif, M.I.I. and Hashem, M.M.A. (2022) Machine Learning-Based Anomaly Detection in IoT Networks: A Comprehensive Survey. IEEE Internet of Things Journal, 9, 7892-7912.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref21">
    <label>21</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Langner, R. (2011) Stuxnet: Dissecting a Cyberwarfare Weapon. IEEE Security &amp; Privacy Magazine, 9, 49-51. &gt;https://doi.org/10.1109/msp.2011.67
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref22">
    <label>22</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Liu, Y., Ma, X., Bailey, J. and Lu, F. (2021) Anomaly Detection in IoT Using Deep Learning. IEEE Internet of Things Journal, 8, 9547-9560.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref23">
    <label>23</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Nguyen, T.D., Marchal, S., Miettinen, M., Fereidooni, H., Asokan, N. and Sadeghi, A.-R. (2021) Edge Computing for Real-Time Anomaly Detection in IoT. IEEE Transactions on Industrial Informatics, 17, 4225-4234.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref24">
    <label>24</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ahmed, S.H., Kim, D. and Park, J.-S. (2021) Machine Learning for IoT Intrusion Detection: A Comparative Study. IEEE Access, 9, 112675-112692.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref25">
    <label>25</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Hasan, K., Ahmed, S.H. and Kim, D. (2020) SVM-Based Intrusion Detection for IoT Networks. IEEE Communications Letters, 24, 577-580.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref26">
    <label>26</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Mishra, P., Varadharajan, V., Tupakula, U. and Pilli, E.S. (2021) Unsupervised Anomaly Detection in IoT Using Autoencoders. IEEE Internet of Things Journal, 8, 9065-9078.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref27">
    <label>27</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Xiao, L., Li, Y., Huang, X. and Du, X. (2021) Deep Learning for IoT Anomaly Detection: A Survey. Future Generation Computer Systems, 125, 521-535.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref28">
    <label>28</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Alrawais, A., Alhothaily, A., Hu, C. and Cheng, X. (2021) LSTM-Based Intrusion Detection for IoT Networks. IEEE Transactions on Network and Service Management, 18, 1712-1725.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref29">
    <label>29</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Papernot, N., McDaniel, P., Jha, S., Fredrikson, M., Celik, Z.B. and Swami, A. (2016) The Limitations of Deep Learning in Adversarial Settings. 2016 IEEE European Symposium on Security and Privacy (EuroS&amp;P), Saarbruecken, 21-24 March 2016, 372-387. &gt;https://doi.org/10.1109/eurosp.2016.36
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref30">
    <label>30</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yang, Q., Liu, Y., Chen, T. and Tong, Y. (2021) Federated Learning for IoT Anomaly Detection. IEEE Internet of Things Journal, 8, 10278-10289.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref31">
    <label>31</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chen, Y., Qin, X., Wang, J., Yu, C. and Gao, W. (2021) Edge-Based Machine Learning for IoT Security. IEEE Communications Magazine, 59, 41-47.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref32">
    <label>32</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Casillo, D.M., Coppola, S., De Santo, M., Pascale, F. and Santini, S. (2021) A Survey of Hybrid IDS for IoT. Sensors, 21, Article 6289.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref33">
    <label>33</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zhang, J., Li, C., Peng, T., Sun, Y. and Chen, Y. (2022) Explainable AI for Cybersecurity: A Review. IEEE Access, 10, 123456-123478.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref34">
    <label>34</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Hindy, H., Brosset, D., Bayne, E., Seeam, A., Tachtatzis, C., Atkinson, R., Bellekens, X. (2020) A Taxonomy and Survey of Intrusion Detection System Design Techniques. Computer Networks, 178, Article ID: 107273.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref35">
    <label>35</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Vinayakumar, R., Alazab, M., Soman, K.P., Poornachandran, P., Al-Nemrat, A., Venkatraman, S. (2021) Deep Learning for Network Intrusion Detection Systems. Journal of Network and Computer Applications, 191, Article ID: 103147.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref36">
    <label>36</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Hodo, E., Bellekens, X., Hamilton, A., Tachtatzis, C. and Atkinson, R. (2022) Scalable Machine Learning for IoT Security. IEEE Internet of Things Journal, 9, 3456-3468.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref37">
    <label>37</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Goodfellow, I.J., Shlens, J. and Szegedy, C. (2015) Explaining and Harnessing Adversarial Examples. arXiv: 1412.6572.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref38">
    <label>38</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Latif, S., Rana, R., Qadir, J., Ali, A., Misra, S. and Younis, M.S. (2021) Energy-Efficient Deep Learning for IoT Devices. IEEE Transactions on Sustainable Computing, 6, 522-534.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref39">
    <label>39</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yan, Z., Zhang, P. and Vasilakos, A.V. (2021) Reinforcement Learning for IoT Security. IEEE Internet of Things Journal, 8, 12123-12135.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref40">
    <label>40</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Biamonte, J., Wittek, P., Pancotti, N., Rebentrost, P., Wiebe, N. and Lloyd, S. (2017) Quantum Machine Learning. Nature, 549, 195-202. &gt;https://doi.org/10.1038/nature23474
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref41">
    <label>41</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Liu, F.T., Ting, K.M. and Zhou, Z. (2008) Isolation Forest. 2008 Eighth IEEE International Conference on Data Mining, Pisa, 15-19 December 2008, 413-422. &gt;https://doi.org/10.1109/icdm.2008.17
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref42">
    <label>42</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Snoek, J., Larochelle, H. and Adams, R.P. (2012) Practical Bayesian Optimization of Machine Learning Algorithms. arXiv: 1206.2944.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref43">
    <label>43</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ditzler, G., Polikar, R. and Rosen, G. (2019) Incremental Learning for Anomaly Detection in IoT. IEEE Transactions on Neural Networks and Learning Systems, 30, 834-846.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref44">
    <label>44</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Lundberg, S.M. and Lee, S.I. (2017) A Unified Approach to Interpreting Model Predictions. arXiv: 1705.07874.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref45">
    <label>45</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Moustafa, N., Slay, J. and Creech, G. (2021) TON-IoT Datasets for IoT Cybersecurity Research. IEEE ISI 2021, San Antonio, 2-3 November 2021.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref46">
    <label>46</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Sharafaldin, I., Lashkari, A.H. and Ghorbani, A.A. (2018) CICIDS2017: A Contemporary Dataset for Intrusion Detection. IEEE CNS 2018, Beijing, 30 May-1 June 2018. 
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref47">
    <label>47</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Moustafa, N. and Slay, J. (2015) UNSW-NB15: A Comprehensive Data Set for Network Intrusion Detection Systems (UNSW-NB15 Network Data Set). 2015 Military Communications and Information Systems Conference (MilCIS), Canberra, 10-12 November 2015, 1-6. &gt;https://doi.org/10.1109/milcis.2015.7348942
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref48">
    <label>48</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Dwork, C. and Roth, A. (2017) Differential Privacy for IoT Data Sharing. IEEE Security&amp;Privacy, 15, 64-70.
    </mixed-citation>
   </ref>
   <ref id="scirp.143650-ref49">
    <label>49</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Kurakin, A., Goodfellow, I.J. and Bengio, S. (2018) Adversarial Examples in the Physical World. In: Yampolskiy, R.V., Ed., Artificial Intelligence Safety and Security, Chapman and Hall/CRC, 99-112. &gt;https://doi.org/10.1201/9781351251389-8
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>