<?xml version="1.0" encoding="UTF-8"?>
<article xmlns:xlink="http://www.w3.org/1999/xlink">
<front><article-meta>
<title-group><article-title>DDoS Attack Mitigation in Cloud Networks Using Hybrid Metaheuristic and Machine Learning</article-title></title-group>
<contrib-group>
<contrib contrib-type="author"><name><surname>Bani Hashemian</surname><given-names>Seyyed Amirhossein</given-names></name><xref ref-type="aff" rid="aff1"/></contrib>
<aff id="aff1">Department of Computer Engineering, Ayandegan University, Tonkabon, Iran.</aff>
</contrib-group>
<abstract><p>Cloud computing has become the backbone of modern enterprise infrastructure due to its scalability and cost-efficiency. However, this centralized nature makes it a prime target for Distributed Denial of Service (DDoS) attacks, which aim to exhaust network resources and render services unavailable. Traditional detection mechanisms, such as static firewalls and standalone Machine Learning (ML) algorithms, often struggle with the high dimensionality of network traffic data, leading to high False Positive Rates (FPR) and substantial detection latency. To address these challenges, this paper proposes a novel hybrid framework that integrates Grey Wolf Optimization (GWO) with a Convolutional Neural Network-Long Short-Term Memory (CNN-LSTM) deep learning model. The GWO algorithm is utilized as a wrapper-based feature selection technique to eliminate redundant features, thereby solving the curse of dimensionality. Subsequently, the CNN-LSTM architecture captures both spatial and temporal features of the traffic flows for accurate classification. Experimental evaluation was conducted using the benchmark CIC-DDoS2019 dataset. The results demonstrate that the proposed hybrid model achieves an accuracy of 99.2% and reduces detection latency by 14% compared to standard Random Forest (RF) and standalone Convolutional Neural Networks (CNNs) models. These findings suggest that bio-inspired optimization combined with deep temporal learning provides a robust defense mechanism for securing cloud environments against evolving DDoS threats.</p></abstract>
<kwd-group kwd-group-type="author"><kwd>Cloud security</kwd><kwd>Distributed denial of service mitigation</kwd><kwd>Grey wolf optimization</kwd><kwd>Deep learning</kwd><kwd>Convolutional neural network-long short-term memory</kwd><kwd>Feature selection</kwd><kwd>Network intrusion detection</kwd></kwd-group>
</article-meta></front>
<body>
<sec id="sec-1"><label>1</label><title>Introduction</title>
<p>Cloud computing has fundamentally revolutionized the IT landscape by providing on-demand availability of computer system resources, specifically data storage and computing power, without the need for active management by the user. This paradigm shift has enabled organizations to achieve unprecedented scalability, flexibility, and cost-efficiency. However, despite these transformative advantages, the cloud&apos;s inherent multi-tenant architecture where resources are shared among numerous users introduces significant and complex security vulnerabilities <xref ref-type="bibr" rid="ref-1">[1]</xref>. Among the most pervasive and disruptive threats facing cloud infrastructures today is the Distributed Denial of Service (DDoS) attack. In a typical DDoS scenario, malicious actors utilize a botnet a network of thousands of compromised devices, often referred to as &quot;zombies&quot; to flood a target server with a massive volume of superfluous requests. This onslaught aims to overwhelm the target&apos;s bandwidth or exhaust its processing capacity, rendering the service unavailable to legitimate users.</p>
<p>The financial and reputational costs of DDoS attacks are substantial. According to industry reports, the average cost of a DDoS attack can range from tens of thousands to millions of dollars, depending on the duration and scale <xref ref-type="bibr" rid="ref-2">[2]</xref>. The evolution of DDoS attack vectors from simple volumetric floods (e.g., UDP/ICMP floods) to sophisticated application-layer attacks (e.g., HTTP GET/POST floods, Slowloris) further complicates detection and mitigation efforts. Traditional defense mechanisms, including static rule-based firewalls and signature-based Intrusion Detection Systems (IDS), are increasingly inadequate against these evolving threats because they rely on known attack patterns and cannot adapt to novel, zero-day attack variants <xref ref-type="bibr" rid="ref-3">[3]</xref>.</p>
<p>Machine Learning (ML) techniques have emerged as a promising alternative, offering the ability to learn complex patterns from network traffic data and generalize to unseen attack types. However, standalone ML models face their own challenges when applied to network intrusion detection. The high dimensionality of raw network traffic features introduces the &quot;curse of dimensionality,&quot; leading to increased computational complexity, overfitting, and degraded classifier performance <xref ref-type="bibr" rid="ref-4">[4]</xref>. Feature selection becomes a critical preprocessing step to identify the most discriminative features while eliminating redundant and irrelevant ones.</p>
<p>Bio-inspired metaheuristic algorithms, particularly Grey Wolf Optimization (GWO), have demonstrated remarkable capability in solving complex optimization problems, including feature selection <xref ref-type="bibr" rid="ref-5">[5]</xref>. GWO mimics the leadership hierarchy and hunting behavior of grey wolves, providing an effective balance between exploration and exploitation of the search space. When combined with deep learning architectures capable of capturing both spatial and temporal dependencies in sequential network traffic data, such as Convolutional Neural Network-Long Short-Term Memory (CNN-LSTM), the resulting hybrid framework can achieve superior detection performance.</p>
<p>This paper proposes a novel hybrid framework integrating GWO for intelligent feature selection with a CNN-LSTM deep learning architecture for DDoS attack classification. The main contributions are: 1) a wrapper-based GWO feature selection method that reduces dimensionality from 80+ features to approximately 25 most relevant features, 2) a CNN-LSTM architecture that captures both spatial patterns and temporal dependencies in network flows, and 3) comprehensive evaluation on the CIC-DDoS2019 benchmark dataset demonstrating 99.24% accuracy with 14% latency reduction compared to baseline models.</p>
</sec>
<sec id="sec-2"><label>2</label><title>Related Work</title>
<sec id="sec-3"><label>2.1</label><title>Traditional Machine Learning Approaches</title>
<p>Early approaches to network intrusion detection relied on classical ML algorithms. Support Vector Machines (SVM) were applied to binary classification of normal vs. attack traffic, achieving moderate accuracy but struggling with multi-class scenarios <xref ref-type="bibr" rid="ref-1">[1]</xref>. Random Forest (RF) classifiers demonstrated improved robustness through ensemble learning, achieving accuracies around 96–97% on standard datasets <xref ref-type="bibr" rid="ref-6">[6]</xref>. K-Nearest Neighbors (KNN) provided simple baseline performance but suffered from high computational costs during inference on large-scale network data <xref ref-type="bibr" rid="ref-7">[7]</xref>.</p>
</sec>
<sec id="sec-4"><label>2.2</label><title>Deep Learning for Intrusion Detection</title>
<p>Deep learning methods have shown significant promise. Convolutional Neural Networks (CNNs) capture spatial patterns in traffic feature vectors, while Long Short-Term Memory (LSTM) networks model temporal dependencies across sequential packet flows <xref ref-type="bibr" rid="ref-8">[8]</xref>. Autoencoder-based anomaly detection approaches learn normal traffic representations and flag deviations <xref ref-type="bibr" rid="ref-9">[9]</xref>. However, standalone deep learning models applied to raw high-dimensional features often face convergence issues and excessive training times.</p>
</sec>
<sec id="sec-5"><label>2.3</label><title>Metaheuristic Feature Selection</title>
<p>Metaheuristic algorithms for feature selection include Genetic Algorithms (GA), Particle Swarm Optimization (PSO), and GWO. GA uses evolutionary operators but can be slow to converge <xref ref-type="bibr" rid="ref-10">[10]</xref>. PSO offers faster convergence but may prematurely converge to local optima <xref ref-type="bibr" rid="ref-11">[11]</xref>. GWO, proposed by Mirjalili et al. <xref ref-type="bibr" rid="ref-5">[5]</xref>, provides a balanced exploration-exploitation trade-off through its hierarchical social structure.</p>
</sec>
<sec id="sec-6"><label>2.4</label><title>Gap Analysis</title>
<p>While individual components (ML classifiers, deep learning, metaheuristic feature selection) have been studied separately, few works have combined wrapper-based metaheuristic feature selection with hybrid CNN-LSTM architectures specifically for DDoS detection in cloud environments. This paper addresses this gap.</p>
</sec>
</sec>
<sec id="sec-7"><label>3</label><title>Methodology</title>
<sec id="sec-8"><label>3.1</label><title>Overview of the Proposed Framework</title>
<p>The proposed framework consists of three main stages: 1) data preprocessing, 2) GWO-based feature selection, 3) CNN-LSTM classification. Raw network traffic data is first cleaned and normalized. The GWO algorithm then selects an optimal feature subset, and 4) the CNN-LSTM model classifies traffic as benign or attack (with attack sub-type identification).</p>
</sec>
<sec id="sec-9"><label>3.2</label><title>Grey Wolf Optimization</title>
<p>GWO mimics the social hierarchy and hunting mechanism of grey wolves. The pack hierarchy consists of four levels: alpha (α) the leader and best solution; beta (β) the second-best advisor; delta (δ) the third-ranked wolf; and omega (ω) the remaining wolves that follow.</p>
<p>The mathematical model of encircling prey is defined as:</p>
<p>D = |C · Xp(t) − X(t)|,</p>
<p>X(t + 1) = Xp(t) − A · D,</p>
<p>where t is the current iteration, Xp is the position vector of the prey, X is the position vector of a wolf, and A and C are coefficient vectors calculated as:</p>
<p>A = 2a · r1 − a,</p>
<p>C = 2 · r2,</p>
<p>where a decreases linearly from 2 to 0 over the course of iterations, and r1, r2 are random vectors in [0, 1]. In the hunting phase, the positions of alpha, beta, and delta guide the search:</p>
<p>Dα = |C1 · Xα − X|, X1 = Xα − A1 · Dα, Dβ = |C2 · Xβ − X|, X2 = Xβ − A2 · Dβ,</p>
<p>Dδ = |C3 · Xδ − X|, X3 = Xδ − A3 · Dδ,</p>
<p>X(t + 1) = (X1 + X2 + X3) / 3.</p>
<p>For feature selection, each wolf&apos;s position is a binary vector where 1 indicates feature selection and 0 indicates exclusion. The fitness function combines classification accuracy and feature count to balance performance and parsimony.</p>
</sec>
<sec id="sec-10"><label>3.3</label><title>CNN-LSTM Architecture</title>
<p>The hybrid CNN-LSTM architecture processes the selected features in two stages:</p>
<sec id="sec-11"><label>3.3.1</label><title>Convolutional neural network component</title>
<p>I. Input layer: selected features reshaped as 1D sequence.</p>
<p>II. Conv1D layer 1: 64 filters, kernel size 3, Rectified Linear Unit (ReLU) activation.</p>
<p>III. MaxPooling1D: pool size 2.</p>
<p>IV. Conv1D layer 2: 128 filters, kernel size 3, ReLU activation.</p>
<p>V. MaxPooling1D: pool size 2.</p>
<p>VI. The CNN layers extract local spatial patterns and feature interactions.</p>
</sec>
<sec id="sec-12"><label>3.3.2</label><title>Long short-term memory component</title>
<p>I. LSTM layer 1: 128 units, return sequences = True.</p>
<p>II. Dropout: 0.3.</p>
<p>III. LSTM layer 2: 64 units.</p>
<p>IV. Dropout: 0.3.</p>
<p>V. The LSTM layers capture temporal dependencies across sequential traffic flows.</p>
</sec>
<sec id="sec-13"><label>3.3.3</label><title>Classification head</title>
<p>I. Dense layer: 128 units, ReLU.</p>
<p>II. Dropout: 0.5.</p>
<p>III. Output dense layer: softmax activation for multi-class classification.</p>
</sec>
</sec>
<sec id="sec-14"><label>3.4</label><title>Training Pipeline</title>
<p>The complete pipeline is summarized as follows:</p>
<p>Raw CIC-DDoS2019 Data → Cleaning (remove NaN, infinity) → Min-Max Normalization → GWO Feature Selection (50 iterations, 30 wolves) → Train/Test Split (80/20) → CNN-LSTM Training (Adam optimizer, lr = 0.001, batch size 64, 100 epochs, early stopping patience = 10) → Evaluation</p>
</sec>
</sec>
<sec id="sec-15"><label>4</label><title>Experimental Setup</title>
<sec id="sec-16"><label>4.1</label><title>Dataset</title>
<p>The CIC-DDoS2019 dataset was used, developed by the Canadian Institute for Cybersecurity. It contains benign and multiple DDoS attack types including DNS, LDAP, MSSQL, NetBIOS, NTP, SNMP, SSDP, UDP, and SYN floods. The dataset contains over 80 network traffic features extracted using CICFlowMeter. After preprocessing, the dataset comprised approximately 685,000 samples with a balanced distribution achieved through stratified sampling.</p>
</sec>
<sec id="sec-17"><label>4.2</label><title>Evaluation Metrics</title>
<p>The following standard metrics were employed for performance evaluation:</p>
<p>I. Accuracy: (TP + TN) / (TP + TN + FP + FN).</p>
<p>II. Precision: TP / (TP + FP).</p>
<p>III. Recall (sensitivity): TP / (TP + FN).</p>
<p>IV. F1-Score: 2 × (precision × recall) / (precision + recall).</p>
<p>V. False Positive Rate (FPR): FP / (FP + TN).</p>
<p>VI. Detection latency: average time from packet arrival to classification output.</p>
</sec>
<sec id="sec-18"><label>4.3</label><title>Baseline Models</title>
<p>Three baseline models were implemented for comparison:</p>
<p>I. RF: 100 estimators, all features.</p>
<p>II. Standalone CNN: same architecture without LSTM and without GWO feature selection.</p>
<p>III. Standalone LSTM: 2-layer LSTM without CNN and without feature selection.</p>
</sec>
<sec id="sec-19"><label>4.4</label><title>Hardware and Software</title>
<p>Experiments were conducted on a machine with Intel Core i7-10700K, 32GB RAM, NVIDIA RTX 3080 GPU. Software: Python 3.8, TensorFlow 2.6, scikit-learn 1.0.</p>
</sec>
</sec>
<sec id="sec-20"><label>5</label><title>Results and Discussion</title>
<sec id="sec-21"><label>5.1</label><title>Feature Selection Results</title>
<p>GWO reduced the feature set from 80+ original features to approximately 25 most relevant features. The selected features predominantly included flow duration, total forward/backward packets, flow bytes per second, packet length statistics, flag counts, and inter-arrival time statistics. This 69% reduction in dimensionality significantly reduced computational overhead without sacrificing discriminative power.</p>
</sec>
<sec id="sec-22"><label>5.2</label><title>Classification Performance</title>
<table-wrap id="tab1"><label>Table 1</label><caption><p>Performance comparison of models.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:4:66,46.4,537.1,69.9"/><graphic content-type="pdf-region" xlink:href="pdf-region:5:66,655.8,537.1,773.3"/><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>Per-attack-type detection results (proposed model).</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:5:66,520.4,537.1,633.9"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
</sec>
<sec id="sec-23"><label>5.3</label><title>Discussion</title>
<p>The proposed GWO + CNN-LSTM model outperforms all baselines across every metric. Key observations include: 1) GWO feature selection not only reduces latency but also improves accuracy by removing noisy features, 2) the hybrid CNN-LSTM captures complementary spatial and temporal patterns that neither component alone can model, 3) the 0.08% FPR is critical for practical deployment where false alarms cause operational disruption, and 4) the 12ms average latency enables near-real-time detection suitable for cloud environments.</p>
<table-wrap id="tab3"><label>Table 3</label><caption><p>Ablation study.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:5:66,290.2,537.1,369"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<p>The ablation study in <xref ref-type="table" rid="tab3">Table 3</xref> confirms that each component of the proposed framework contributes positively to overall performance. Removing GWO feature selection increases latency by 16.7% and reduces accuracy by 0.84 percentage points. Removing either the CNN or LSTM component degrades accuracy further, confirming the complementary nature of spatial and temporal feature extraction. The GWO + RF configuration, while benefiting from feature selection, cannot match the representational power of the deep learning architecture.</p>
</sec>
</sec>
<sec id="sec-24"><label>6</label><title>Conclusion</title>
<p>This paper presented a novel hybrid framework combining GWO with CNN-LSTM deep learning for DDoS attack detection in cloud networks. The GWO algorithm effectively reduced feature dimensionality by 69% while preserving discriminative information. The CNN-LSTM architecture successfully captured both spatial feature interactions and temporal traffic patterns. Experimental results on the CIC-DDoS2019 benchmark demonstrated state-of-the-art performance with 99.24% accuracy, 0.08% FPR, and 12ms detection latency. Future work will focus on: 1) real-time deployment in production cloud environments, 2) adversarial robustness testing against evasion attacks, 3) extension to zero-day attack detection using transfer learning, and 4) integration with Software-Defined Networking (SDN) controllers for automated mitigation.</p>
</sec>
<sec id="sec-25"><title>Authors&apos; Contributions</title>
<p>All aspects of the research and manuscript preparation were carried out by the author. The author has read and approved the final version of the manuscript.</p>
</sec>
<sec id="sec-26"><title>Data Availability</title>
<p>All data supporting the reported findings in this research paper are provided within the manuscript.</p>
</sec>
<sec id="sec-27"><title>Funding</title>
<p>Not applicable.</p>
</sec>
<sec id="sec-28"><title>Conflict of Interest</title>
<p>The author declares that they do not have any conflict of interest.</p>
</sec>
<sec id="sec-29"><title>Consent for Publication</title>
<p>The author confirms consent for the publication of this work</p>
</sec>
<sec id="sec-30"><title>Ethics Approval and Consent to Participate</title>
<p>This article does not contain any studies with human participants performed by the author.</p>
</sec>
</body>
<back><ref-list><title>References</title>
<ref id="ref-1"><label>1</label><mixed-citation>Modi, C., Patel, D., Borisaniya, B., Patel, H., Patel, A., &amp; Rajarajan, M. (2013). A survey of intrusion detection techniques in cloud. Journal of network and computer applications, 36(1), 42–57. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.jnca.2012.05.003">https://doi.org/10.1016/j.jnca.2012.05.003</ext-link></mixed-citation></ref>
<ref id="ref-2"><label>2</label><mixed-citation>Zargar, S. T., Joshi, J., &amp; Tipper, D. (2013). A survey of defense mechanisms against distributed denial of service (DDoS) flooding attacks. IEEE communications surveys &amp; tutorials, 15(4), 2046–2069. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/SURV.2013.031413.00127">https://doi.org/10.1109/SURV.2013.031413.00127</ext-link></mixed-citation></ref>
<ref id="ref-3"><label>3</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://doi.org/10.1145/997150.997156">https://doi.org/10.1145/997150.997156</ext-link></mixed-citation></ref>
<ref id="ref-4"><label>4</label><mixed-citation>Sharafaldin, I., Lashkari, A. H., Hakak, S., &amp; Ghorbani, A. A. (2019). Developing realistic distributed denial of service (DDoS) attack dataset and taxonomy. 2019 international carnahan conference on security technology (ICCST) (pp. 1–8). IEEE. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/CCST.2019.8888419">https://doi.org/10.1109/CCST.2019.8888419</ext-link></mixed-citation></ref>
<ref id="ref-5"><label>5</label><mixed-citation>Mirjalili, S., Mirjalili, S. M., &amp; Lewis, A. (2014). Grey wolf optimizer. Advances in engineering software, 69, 46–61. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.advengsoft.2013.12.007">https://doi.org/10.1016/j.advengsoft.2013.12.007</ext-link></mixed-citation></ref>
<ref id="ref-6"><label>6</label><mixed-citation>Buczak, A. L., &amp; Guven, E. (2015). A survey of data mining and machine learning methods for cyber security intrusion detection. IEEE communications surveys &amp; tutorials, 18(2), 1153–1176. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/COMST.2015.2494502">https://doi.org/10.1109/COMST.2015.2494502</ext-link></mixed-citation></ref>
<ref id="ref-7"><label>7</label><mixed-citation>Liao, H. J., Lin, C. H. R., Lin, Y. C., &amp; Tung, K. Y. (2013). Intrusion detection system: A comprehensive review. Journal of network and computer applications, 36(1), 16–24. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.jnca.2012.09.004">https://doi.org/10.1016/j.jnca.2012.09.004</ext-link></mixed-citation></ref>
<ref id="ref-8"><label>8</label><mixed-citation>Kim, J., Kim, J., Thu, H. L. T., &amp; Kim, H. (2016). Long short term memory recurrent neural network classifier for intrusion detection. 2016 international conference on platform technology and service (PlatCon) (pp. 1–5). IEEE. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/PlatCon.2016.7456805">https://doi.org/10.1109/PlatCon.2016.7456805</ext-link></mixed-citation></ref>
<ref id="ref-9"><label>9</label><mixed-citation>Shone, N., Ngoc, T. N., Phai, V. D., &amp; Shi, Q. (2018). A deep learning approach to network intrusion detection. IEEE transactions on emerging topics in computational intelligence, 2(1), 41–50. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/TETCI.2017.2772792">https://doi.org/10.1109/TETCI.2017.2772792</ext-link></mixed-citation></ref>
<ref id="ref-10"><label>10</label><mixed-citation>Xue, B., Zhang, M., Browne, W. N., &amp; Yao, X. (2015). A survey on evolutionary computation approaches to feature selection. IEEE transactions on evolutionary computation, 20(4), 606–626. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/TEVC.2015.2504420">https://doi.org/10.1109/TEVC.2015.2504420</ext-link></mixed-citation></ref>
<ref id="ref-11"><label>11</label><mixed-citation>Xue, B., Zhang, M., &amp; Browne, W. N. (2012). Particle swarm optimization for feature selection in classification: A multi-objective approach. IEEE transactions on cybernetics, 43(6), 1656–1671. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/TSMCB.2012.2227469">https://doi.org/10.1109/TSMCB.2012.2227469</ext-link></mixed-citation></ref>
</ref-list></back>
</article>