<?xml version="1.0" encoding="UTF-8"?>
<article xmlns:xlink="http://www.w3.org/1999/xlink">
<front><article-meta>
<title-group><article-title>Hybrid Machine Learning Models for IoT Security</article-title></title-group>
<contrib-group>
<contrib contrib-type="author"><name><surname>Sahu *</surname><given-names>Nihar Ranjan</given-names></name><xref ref-type="aff" rid="aff1"/></contrib>
<aff id="aff1">Department of Computer Science,KIIT(Deemed to Be) University,Bhubneswar-751024,Odisha,India.</aff>
</contrib-group>
<abstract><p>The swift growth of the Internet of Things (IoT) brings forth considerable security challenges due to the variety of connected devices and their limited resources. Conventional security strategies are unable to keep pace with evolving cyber threats, rendering the IoT ecosystem susceptible to attacks. This paper introduces a hybrid machine-learning framework aimed at enhancing IoT security. Our method merges supervised and unsupervised techniques to detect both known and unknown (zero-day) threats. This hybrid framework utilizes fuzzy detection along with classification algorithms to recognize malicious activities while reducing false positives. We assess the performance of the model using publicly available IoT datasets and compare it to other Machine Learning (ML) models. The findings reveal notable improvements in precision, accuracy, recall, and response time. These results suggest that the hybrid model establishes a more robust basis for safeguarding the IoT environment against threats.</p></abstract>
<kwd-group kwd-group-type="author"><kwd>Hybrid machine learning</kwd><kwd>IoT security</kwd><kwd>Anomaly detection</kwd><kwd>Threat classification</kwd><kwd>Zero-day attacks</kwd><kwd>Traffic analysis</kwd><kwd>Real-time detection</kwd></kwd-group>
</article-meta></front>
<body>
<sec id="sec-1"><label>1</label><title>Introduction</title>
<p>The Internet of Things (IoT) is expanding and transforming industries from healthcare to smart cities. However, IoT devices&apos; increasing connectivity and diversity still raise significant security concerns. Traditional security systems make networks more resilient to distributed and resource-constrained IoT <xref ref-type="bibr" rid="ref-1">[1]</xref>.</p>
<p>environments. Attacks such as Distributed Denial of Service (DDoS), ransomware, and unauthorized data deletion are becoming increasingly frequent and sophisticated, posing significant challenges to the IoT ecosystem. These challenges require new solutions. Machine Learning (ML) holds promise for improving IoT security by detecting malicious activity from data patterns <xref ref-type="bibr" rid="ref-2">[2]</xref>. However, relying solely on supervision or unsupervised training can be limiting. Pattern tracking is good at identifying known attack patterns but struggles to detect new, unseen threats <xref ref-type="bibr" rid="ref-3">[3]</xref>. On the other hand, unsupervised models can flag anomalies without prior knowledge of attack patterns, but they are more likely to be negative. Supervised and unsupervised techniques are used to develop threats in IoT systems. Using both methods, hybrid models can detect various threats, from stealth attacks to zero-day attacks. Our solutions are evaluated using a real-world IoT dataset, and the results are evaluated using traditional machine-learning methods <xref ref-type="bibr" rid="ref-4">[4]</xref>.</p>
<fig id="fig1"><label>Figure 1</label><caption><p>Hybrid ML architecture for IoT security.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:1:66,561.8,537.1,739.7"/><p content-type="note">This figure is shown in the PDF version of the article.</p></fig>
<table-wrap id="tab1"><label>Table 1</label><caption><p>Performance comparison of different ML models for IoT security.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:1:66,427.6,537.1,516.5"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<table-wrap id="tab2"><label>Table 2</label><caption><p>System performance metrics for hybrid ML model.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:1:66,251.6,537.1,416.5"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<p>Let X represent the input data, the IoT traffic features extracted from the devices. Let y represent the known traffic labels (e.g., normal or malicious). Y&apos; is the predicted label from the ML model. f(X) is the decision function applied by the supervised learning model. L(y,y’ ) is the loss function that minimizes the error between the actual and predicted values. Z represents the latent features from the unsupervised learning module (e.g., for anomaly detection). D(X, Z) represents the decision function of the hybrid model combining supervised and unsupervised results. The basic prediction of a supervised model can be represented as</p>
<p>Y&apos; =f(X), (1)</p>
<p>where f(X) is the function learned by the supervised classifier to predict the output based on input features X. For the loss function that measures the error between actual and predicted values, the cross-entropy loss is commonly used in classification problems:</p>
<p>L(y,y’) =−∑ y log (y’). (2) In a hybrid model, the anomaly detection function (unsupervised) for IoT traffic can be defined as</p>
<p>Z=g(X), (3)</p>
<p>where g(X) extracts latent variables or anomalies in the data. The final decision function in the hybrid model, combining supervised and unsupervised techniques, can be written as</p>
<p>D(X, Z)=αf(X)+βg(X), (4)</p>
<p>where α and β are weights assigned to supervised and unsupervised learning components, depending on their contribution to the overall prediction.</p>
<p>These equations explain the relationships between various components of your hybrid ML model for IoT Security and how supervised and unsupervised techniques work together for threat detection.</p>
</sec>
<sec id="sec-2"><label>2</label><title>Related Work</title>
<p>Many studies have applied ML techniques to IoT security. Supervised learning algorithms such as random forest and Support Vector Machines (SVM) have been used in intrusion detection and have shown high accuracy in classifying known threats <xref ref-type="bibr" rid="ref-5">[5]</xref>. For example, Fleury et al. <xref ref-type="bibr" rid="ref-6">[6]</xref> used SVM to analyze network connections in a smart home environment and obtain high-level classification. However, this technique requires logging and cannot detect zero-day attacks. This model works well without log information but often suffers from unpleasant consequences. Priyadarshini et al. <xref ref-type="bibr" rid="ref-7">[7]</xref> investigate the use of autoencoders to identify vulnerabilities in smart city infrastructure, highlighting the potential and challenges of vulnerability. Promise. The hybrid model provides the advantages of supervised and unsupervised learning. Mirsky et al. <xref ref-type="bibr" rid="ref-8">[8]</xref> demonstrated the potential of hybrid models in detecting known and unknown threats in critical systems. Based on this process, our model aims to improve detection accuracy further while reducing the vulnerability in the IoT environment.</p>
</sec>
<sec id="sec-3"><label>3</label><title>Proposed Hybrid ML Model</title>
<p>The proposed hybrid model consists of two primary components: anomaly detection and supervised classification. These components are integrated to detect known and unknown threats in IoT traffic.</p>
<sec id="sec-4"><label>3.1</label><title>Feature Extraction</title>
<p>The model begins with feature extraction from IoT traffic. The features used in this study include:</p>
<p>Packet size: size of the data packets exchanged between devices. Flow duration: duration of each data flow between devices. Inter-arrival time: time between consecutive packets.</p>
<p>Source/destination IP: identifiers of devices communicating over the network. Traffic volume: the overall traffic volume generated within a specific time window <xref ref-type="bibr" rid="ref-9">[9]</xref>.</p>
</sec>
<sec id="sec-5"><label>3.2</label><title>Anomaly Detection</title>
<p>The unsupervised learning component of the model uses K-means clustering to group normal IoT traffic and identify outliers. These outliers represent potential anomalies that correspond to unknown attacks. The decision function for anomaly detection is given by</p>
<p>Z=g(X), (5)</p>
<p>where Z is the anomaly score, and g(X) represents the transformation of input features X using the anomaly detection algorithm.</p>
</sec>
<sec id="sec-6"><label>3.3</label><title>Supervised Classification (Supervised Learning)</title>
<p>We employ a Random Forest classifier for the known attack patterns, which is trained on labeled IoT traffic data. The model learns to classify data as normal or malicious based on predefined labels. The classification decision function is</p>
<p>y^ =f(X), (6)</p>
<p>where y^ is the predicted label, and f(X) is the decision function derived from the supervised classifier.</p>
</sec>
<sec id="sec-7"><label>3.4</label><title>Hybrid Decision Function</title>
<p>The final decision for each data point is made by combining the results of the anomaly detection and supervised classification components:</p>
<p>D(X,Z)=αf(X)+βg(X), (7)</p>
<p>where α and β are weight coefficients that balance the contributions of supervised and unsupervised learning models, these coefficients are optimized to minimize the number of false positives while maintaining high detection accuracy.</p>
</sec>
</sec>
<sec id="sec-8"><label>4</label><title>Experimental Setup and Dataset</title>
<sec id="sec-9"><label>4.1</label><title>Dataset</title>
<p>We used the IoT-23 dataset, which contains real-world traffic from various IoT devices, including benign and malicious activities. The Dataset includes several attacks, such as DDoS, ransomware, and port scanning <xref ref-type="bibr" rid="ref-10">[10]</xref>.</p>
</sec>
<sec id="sec-10"><label>4.2</label><title>Evaluation Metrics</title>
<p>The performance of the hybrid model was evaluated using the following metrics:</p>
<p>Accuracy: the proportion of correctly identified instances (normal and malicious).</p>
<p>Precision: the proportion of true positives among all predicted positives.</p>
<p>Recall: the proportion of true positives among all actual positives.</p>
<p>F1-score: the harmonic mean of precision and recall, balancing false positives and false negatives.</p>
<p>Detection latency: the time taken to detect and respond to threats in real time.</p>
</sec>
</sec>
<sec id="sec-11"><title>Acknowledgments</title>
<p>The author would like to thank Kiit university for providing support and resources that played a significant role in completing the research on hybrid ML models for IoT security. We are particularly grateful to Hitesh Mahapatra for his expert guidance and thoughtful approach, which played a significant role in developing the established standard of research and practice. The staff for assistance in setting up and maintaining the necessary IoT infrastructure for operational testing. We would also like to thank our colleagues for their collaboration and suggestions, whose comments helped improve our process and contributed to all this great work.</p>
</sec>
<sec id="sec-12"><title>Funding</title>
<p>This research received no specific grant from funding agencies in the public, commercial, or not-for-profit sectors. The authors carried out all work independently in their respective institutional research activities. KIIT University provided the infrastructure and computational resources for this research.</p>
</sec>
<sec id="sec-13"><title>Data Availability</title>
<p>The data used in this research, including the IoT-23 dataset, is publicly available and can be accessed from the Stratosphere Laboratory at the following link: <ext-link ext-link-type="uri" xlink:href="https://www.stratosphereips.org/datasets-iot23">https://www.stratosphereips.org/datasets-iot23</ext-link>. Any additional data generated or analyzed during this study is available from the corresponding author upon reasonable request.</p>
</sec>
<sec id="sec-14"><title>Conflicts of Interest</title>
<p>The authors declare that there are no conflicts of interest regarding the publication of this paper. They have no financial, personal, or professional relationships that could be perceived as influencing the research presented here. Additionally, the authors confirm that no competing interests from any third-party organizations or funding sources could have affected the design, execution, or reporting of the findings. This study was conducted independently as part of the authors&apos; academic work, with no external influence or bias. All conclusions drawn are based solely on the data and analysis performed.</p>
</sec>
</body>
<back><ref-list><title>References</title>
<ref id="ref-1"><label>1</label><mixed-citation>Sayeed Anwar, Ujjeisheei Panda, &amp; Hitesh Mohapatra. (2024). Legal and ethical issues in IoT based smart city: data privacy, surveillance, and citizen rights. Journal of computer science engineering and software testing, 10(2), 17–26. <ext-link ext-link-type="uri" xlink:href="https://matjournals.net/engineering/index.php/JOCSES/article/view/617">https://matjournals.net/engineering/index.php/JOCSES/article/view/617</ext-link></mixed-citation></ref>
<ref id="ref-2"><label>2</label><mixed-citation>Mishra, S. R., &amp; Mohapatra, H. (2024). Enhancing money laundering detection through machine learning: A comparative study of algorithms and feature selection techniques. In AI and blockchain applications in industrial robotics (pp. 300–321). IGI Global. <ext-link ext-link-type="uri" xlink:href="https://www.igi-global.com/chapter/enhancing-money-laundering-detection-through-machine-learning/336091">https://www.igi-global.com/chapter/enhancing-money-laundering-detection-through-machine-learning/336091</ext-link></mixed-citation></ref>
<ref id="ref-3"><label>3</label><mixed-citation>Mahesh, B. (2020). Machine learning algorithms-a review. International journal of science and research (IJSR).[internet], 9(1), 381–386. <ext-link ext-link-type="uri" xlink:href="https://www.researchgate.net/profile/Batta-Mahesh/publication/344717762_Machine_Learning_Algorithms_-A_Review/links/5f8b2365299bf1b53e2d243a/Machine-Learning-Algorithms-A-Review.pdf?eid=5082902844932096t">https://www.researchgate.net/profile/Batta-Mahesh/publication/344717762_Machine_Learning_Algorithms_-A_Review/links/5f8b2365299bf1b53e2d243a/Machine-Learning-Algorithms-A-Review.pdf?eid=5082902844932096t</ext-link></mixed-citation></ref>
<ref id="ref-4"><label>4</label><mixed-citation>Madakam, S., Ramaswamy, R., &amp; Tripathi, S. (2015). Internet of things (IoT): A literature review. Journal of computer and communications, 3(5), 164–173. <ext-link ext-link-type="uri" xlink:href="https://www.scirp.org/journal/paperinformation?paperid=56616">https://www.scirp.org/journal/paperinformation?paperid=56616</ext-link></mixed-citation></ref>
<ref id="ref-5"><label>5</label><mixed-citation>Steinwart, I., &amp; Christmann, A. (2008). Support vector machines. Springer Science &amp; Business Media.</mixed-citation></ref>
<ref id="ref-6"><label>6</label><mixed-citation>Fleury, A., Vacher, M., &amp; Noury, N. (2009). SVM-based multimodal classification of activities of daily living in health smart homes: sensors, algorithms, and first experimental results. IEEE transactions on information technology in biomedicine, 14(2), 274–283. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/TITB.2009.2037317">https://doi.org/10.1109/TITB.2009.2037317</ext-link></mixed-citation></ref>
<ref id="ref-7"><label>7</label><mixed-citation>Priyadarshini, I. (2024). Anomaly detection of IoT cyberattacks in smart cities using federated learning and split learning. Big data and cognitive computing, 8(3), 21. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3390/bdcc8030021">https://doi.org/10.3390/bdcc8030021</ext-link></mixed-citation></ref>
<ref id="ref-8"><label>8</label><mixed-citation>Mirsky, Y., Doitshman, T., Elovici, Y., &amp; Shabtai, A. (2018). Kitsune: An ensemble of autoencoders for online network intrusion detection. ArXiv Preprint ArXiv:1802.09089.</mixed-citation></ref>
<ref id="ref-9"><label>9</label><mixed-citation>Wang, X., Chen, M., Xing, C., &amp; Zhang, T. (2016). Defending DDoS attacks in software-defined networking based on legitimate source and destination IP address database. IEICE transactions on information and systems, 99(4), 850–859. <ext-link ext-link-type="uri" xlink:href="https://search.ieice.org/bin/summary.php?id=e99-d_4_850">https://search.ieice.org/bin/summary.php?id=e99-d_4_850</ext-link></mixed-citation></ref>
<ref id="ref-10"><label>10</label><mixed-citation>Mirkovic, J., &amp; Reiher, P. (2004). A taxonomy of DDoS attack and DDoS defense mechanisms. ACM sigcomm computer communication review, 34(2), 39–53. <ext-link ext-link-type="uri" xlink:href="https://dl.acm.org/doi/abs/10.1145/997150.997156">https://dl.acm.org/doi/abs/10.1145/997150.997156</ext-link></mixed-citation></ref>
</ref-list></back>
</article>