<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">SAPARS</journal-id>
<journal-title>Scientiarum: A Multidisciplinary Journal</journal-title>
<abbrev-journal-title abbrev-type="pubmed">SAPARS</abbrev-journal-title>
<issn pub-type="epub">0000-0000</issn>
<publisher>
<publisher-name>BOHR</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.54646/SAPARS.2026.35</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Original research</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Detection of distributed denial of service attacks in NFV environments using machine learning-based anomaly detection</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name><surname>Gali</surname> <given-names>Sai Vineela</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x002A;</sup></xref>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Department of Computer Science, University of Dayton</institution>, <addr-line>Dayton, OH</addr-line>, <country>United States</country></aff>
<aff id="aff2"><sup>2</sup><institution>Artex Risk Solutions</institution>, <addr-line>Fairlawn, OH</addr-line>, <country>United States</country></aff>
<author-notes>
<corresp id="c001">&#x002A;Correspondence: Sai Vineela Gali, <email>Saivineelagali@gmail.com</email></corresp>
</author-notes>
<pub-date pub-type="epub">
<day>31</day>
<month>07</month>
<year>2026</year>
</pub-date>
<volume>2</volume>
<issue>4</issue>
<fpage>1</fpage>
<lpage>8</lpage>
<history>
<date date-type="received">
<day>11</day>
<month>06</month>
<year>2026</year>
</date>
<date date-type="accepted">
<day>07</day>
<month>07</month>
<year>2026</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x00A9; 2026 Gali.</copyright-statement>
<copyright-year>2026</copyright-year>
<copyright-holder>Gali</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/"><p>&#x00A9; The Author(s). 2024 Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.</p></license>
</permissions>
<abstract>
<sec>
<title>Objectives</title>
<p>The rise of Network Function Virtualization (NFV) has created a scalable, flexible alternative to traditional hardware-based networking infrastructures. However, due to the nature of NFV, there is a potential for an increased occurrence of Distributed Denial of Service (DDoS) attacks in a dynamic NFV environment and the need for adaptive security mechanisms capable of identifying DDoS attacks with high levels of accuracy. Through this research, the author intends to develop a machine learning (ML)-based anomaly detection framework that uses ML techniques to detect DDoS attacks accurately within an NFV environment.</p>
</sec>
<sec>
<title>Methodology</title>
<p>A ML model with the use of CICDDoS2019 (2020): Data (a dataset) includes data preprocessing, feature scaling, and principal component analysis (PCA), which are techniques for reducing the dimensions of the dataset and maintaining important features for analysis of traffic on the network in this article. Five ML models were developed from the training dataset: Isolation Forest, Autoencoder, One-Class Support Vector Machine (SVM), Random Forest (RF) and XGBoost (XG). An ensemble approach was also created to improve detection performance by combining three or more of these (or other) ML techniques. Findings from this research demonstrate that PCA can facilitate a reduction in dimensionality from 29 unique features to 24 unique principal components while preserving almost 95% of the variability in the original feature set. In addition, RF and XG were identified as the two highest-performing modeling algorithms, with each scoring a perfect &#x201C;100&#x201D; on all measures of performance (including accuracy, precision, recall, and F1) calculated. One-Class Support Vector Machine (OSVM) scored an average of 96%, and the composite of all three models (ensemble model) averaged 93% with a very limited ability to detect each of the different types of DDoS attacks with the same degree of confidence. Therefore, the results of this study support the use of the developed system for detection purposes for both previously known and unknown forms of DDoS attacks as well as increasing the overall level of reliability and resiliency against attacks targeting NFV infrastructure.</p>
</sec>
<sec>
<title>Novelty</title>
<p>This research presents a novel hybrid framework for anomaly detection in NFV by integrating supervised, unsupervised, and semi-supervised ML methods within a single NFV security architecture. In addition, the proposed method employs PCA for dimensionality reduction and ensemble learning to improve detection accuracy, adaptation to evolving attack patterns, and computational efficiency of detected anomalies, thereby providing a more effective means of defeating DDoS attacks within virtualized network environments.</p>
</sec>
</abstract>
<kwd-group>
<kwd>network function virtualization</kwd>
<kwd>distributed denial-of-service</kwd>
<kwd>anomaly detection</kwd>
<kwd>machine learning</kwd>
<kwd>principal component analysis</kwd>
<kwd>random forest</kwd>
<kwd>XGBoost</kwd>
<kwd>ensemble learning</kwd>
</kwd-group>
<counts>
<fig-count count="12"/>
<table-count count="2"/>
<equation-count count="0"/>
<ref-count count="12"/>
<page-count count="8"/>
<word-count count="4405"/>
</counts>
</article-meta>
</front>
<body>
<sec id="S1" sec-type="intro">
<title>Introduction</title>
<p>Network Function Virtualization (NFV) has changed the way we manage networks today; it has taken away the need for dedicated hardware devices to create a new standard use of commodity computing in order to run virtual cloud-based network functions (<xref ref-type="bibr" rid="B1">1</xref>, <xref ref-type="bibr" rid="B2">2</xref>). With this change, we have increased scalability and flexibility and reduced operational costs to meet the increasing demands from Cloud Computing, the Internet of Things (IoT) and 5G networks (<xref ref-type="bibr" rid="B1">1</xref>, <xref ref-type="bibr" rid="B2">2</xref>). By decoupling all of the Network Services from the physical hardware platforms, organizations can easily and quickly deploy, modify, and manage Network Functions, such as Firewalls, Load Balancers, and Intrusion Detection Systems (IDS), to improve the use of resources and reduce operating expenses (<xref ref-type="bibr" rid="B1">1</xref>).</p>
<p>While NFV provides numerous benefits, it also has a number of significant security challenges related to the fact that NFV is a virtualized/distributed system (<xref ref-type="bibr" rid="B2">2</xref>, <xref ref-type="bibr" rid="B3">3</xref>). Features like dynamic resource allocation, multi-tenancy, virtualization layers, and software-defined orchestration pose increased attack surfaces that can expose NFV infrastructures to multiple cyber threats (<xref ref-type="bibr" rid="B2">2</xref>, <xref ref-type="bibr" rid="B3">3</xref>). Distributed Denial of Service (DDoS) attacks are one of the most significant types of cyber threats to NFV environments today (<xref ref-type="bibr" rid="B4">4</xref>, <xref ref-type="bibr" rid="B5">5</xref>). DDoS attacks target specific services and overwhelm them with large amounts of malicious traffic in an effort to exhaust the computational and network resources of those services, causing those services to be unavailable (<xref ref-type="bibr" rid="B4">4</xref>, <xref ref-type="bibr" rid="B5">5</xref>). When an DDoS attack occurs against an NFV environment, the number of services impacted by the attack is amplified, since many Virtual Network Functions share the same physical resources (<xref ref-type="bibr" rid="B2">2</xref>, <xref ref-type="bibr" rid="B5">5</xref>).</p>
<p>Recently, researchers have begun to investigate DDoS detection through machine learning (ML) methods in both cloud-based and NFV scenarios (<xref ref-type="bibr" rid="B6">6</xref>&#x2013;<xref ref-type="bibr" rid="B9">9</xref>). A variety of supervised learning techniques (e.g., Random Forest (RF), Support Vector Machines (SVM), and XGBoost (XG)) have generally provided high accuracy rates with respect to already known DDoS attack patterns (<xref ref-type="bibr" rid="B6">6</xref>, <xref ref-type="bibr" rid="B7">7</xref>). Unsupervised models that attempt to identify anomalies (e.g., Isolation Forest and Autoencoders) have also been tested as methods of detecting attacks in changing network environments (<xref ref-type="bibr" rid="B8">8</xref>, <xref ref-type="bibr" rid="B9">9</xref>). However, most of these existing studies examine only a particular type of learning, and they typically suffer from limitations in detecting previously unobserved attack patterns; adapting to emerging threat vectors; or retaining performance across different types of networks (<xref ref-type="bibr" rid="B7">7</xref>&#x2013;<xref ref-type="bibr" rid="B10">10</xref>). Additionally, a lack of research integrates supervised, unsupervised, and semi-supervised approaches to develop a unified framework for detecting and mitigating DDoS attacks using NFV technologies (<xref ref-type="bibr" rid="B9">9</xref>, <xref ref-type="bibr" rid="B10">10</xref>).</p>
<p>This study proposes to develop a hybrid model-based anomaly detection framework for detecting DDoS attacks inside NFV architectures using the CICDDoS2019 dataset (<xref ref-type="bibr" rid="B11">11</xref>). The proposed framework employs PCA to reduce the dimensionality of features and integrates multiple ML models (e.g., Isolation Forest, Autoencoder, One-Class SVM, RF, and XG) designed around differing DDoS attack characteristics (<xref ref-type="bibr" rid="B6">6</xref>&#x2013;<xref ref-type="bibr" rid="B10">10</xref>). The goal of integrating multiple methods into a commonly implemented framework is to improve the accuracy, robustness, and adaptability of the intended model for detecting and mitigating both previously observed and unobserved DDoS attacks occurring across virtualized environments (<xref ref-type="bibr" rid="B4">4</xref>, <xref ref-type="bibr" rid="B5">5</xref>, <xref ref-type="bibr" rid="B9">9</xref>, <xref ref-type="bibr" rid="B10">10</xref>).</p>
</sec>
<sec id="S2">
<title>Methodology</title>
<p>The Canadian Institute for Cybersecurity (CIC) has created a new benchmark dataset, called the CICDDoS2019, to test the efficacy of IDS and Anomaly Detection Systems (ADS) (<xref ref-type="bibr" rid="B11">11</xref>). The dataset contains real-world network traffic examples, including good traffic examples and network DDoS attacks (<xref ref-type="bibr" rid="B11">11</xref>). There is sufficient flow feature data for both types of systems (<xref ref-type="bibr" rid="B11">11</xref>). Each flow provides a variety of features, including the total duration (seconds) of the flow, ingress rate into the flow (packets per second), egress rate from the flow (packets per second), size (bytes) of the TCP/IP header of each flow, average size (bytes) of each packet in the flow, and the average time between two packets in the flow (<xref ref-type="bibr" rid="B11">11</xref>). These flow features allow for the creation and testing of ML-based DDoS detection models designed for use in NFV environments (<xref ref-type="bibr" rid="B1">1</xref>, <xref ref-type="bibr" rid="B11">11</xref>).</p>
</sec>
<sec id="S3">
<title>Data preprocessing</title>
<p>Data preprocessing has two purposes: first, improve the quality of data through removing bad data, missing values, and duplicate records to be reliable and valid; second, normalize the scales of the traffic features so that all numeric traffic features have a mean of 0 and a standard deviation of 1 so that they won&#x2019;t skew the results of the model training by being larger than the smaller numeric traffic features. As an example, we would use StandardScaler to standardize all numerical traffic features (<xref ref-type="bibr" rid="B12">12</xref>).</p>
<p>When we prepared the data for the anomaly detection task, we created a two-class, binary representation of the categorical traffic labels (0 = benign traffic, 1 = DDoS attack traffic). This makes it easier to have a definite decision to make as to whether a sample of traffic is normal or malicious (<xref ref-type="bibr" rid="B6">6</xref>, <xref ref-type="bibr" rid="B7">7</xref>).</p>
<p>The final dataset was split into training and testing datasets with an 80:20 split. The training dataset will be used to create and train a ML model, and the testing dataset will be used to assess the performance of the ML model after it has been trained (<xref ref-type="bibr" rid="B12">12</xref>).</p>
</sec>
<sec id="S4">
<title>EDA</title>
<p>Exploratory Data Analysis (EDA) was carried out to identify the characteristics of network traffic and discover clues for DDoS attack-associated patterns (<xref ref-type="bibr" rid="B11">11</xref>). Throughout this analysis, a variety of statistical techniques were utilized, including graphs, to study how each of the features within DDoS protocol families and at the packet level, as well as which class of packets, was being transmitted over the network and how they are distributed.</p>
<p>In addition to using statistical methods, visual analysis was also performed, indicating that a class imbalance exists and that there are statistically significant differences in benign and malicious patterns of traffic, which provides evidence of using ML to detect possible DDoS attacks from network traffic data (<xref ref-type="bibr" rid="B6">6</xref>&#x2013;<xref ref-type="bibr" rid="B10">10</xref>).</p>
<p>In order to reduce multidimensionality, PCA is typically used to reduce the quantity of features within a dataset that have many features or a number of variables measuring the same characteristic (<xref ref-type="bibr" rid="B12">12</xref>). Using more than one type of measure to create an accurate model from a dataset creates a time-consuming and potentially inaccurate use of computational resources (<xref ref-type="bibr" rid="B12">12</xref>).</p>
<p>By applying PCA, the collection of original features was transformed into new (orthogonal) features that retain approximately 95.25% of the original information (from analyzing the variance within the dataset from the first 24 principal components) (<xref ref-type="bibr" rid="B12">12</xref>). The new (orthogonal) features were then used to create changers and test changers and produced good computational efficiencies and retained the fundamental characteristics present within the original dataset that would allow for effective DDoS detection (<xref ref-type="bibr" rid="B12">12</xref>).</p>
</sec>
<sec id="S5">
<title>Machine learning models</title>
<p>To evaluate the various techniques available to learn to identify anomalies, we used five different ML models based on the methodologies of supervised, unsupervised, and semi-supervised learning (<xref ref-type="bibr" rid="B6">6</xref>&#x2013;<xref ref-type="bibr" rid="B10">10</xref>).</p>
</sec>
<sec id="S6">
<title>Isolation forest</title>
<p>The isolation forest was used as an unsupervised model to find anomalies from data by making use of tree structures that recursively split the data into groups of observations by dividing by half until there are only the observations that require the fewest number of divisions remaining (being isolated) (<xref ref-type="bibr" rid="B8">8</xref>). The isolation forest is a quick and efficient way to find anomalies throughout large high-dimensional networks and traffic flow (<xref ref-type="bibr" rid="B8">8</xref>).</p>
<p>The Deep Learning-based Autoencoder is a neural network architecture for identifying anomalies (<xref ref-type="bibr" rid="B9">9</xref>). The Autoencoder is composed of two neural networks, the encoder, which produces a reduced representation of normal network activity, and the decoder, which tries to reconstruct the original input of the given network (<xref ref-type="bibr" rid="B9">9</xref>). If the reconstruction error of any sample from the input set is above a predetermined value, then this could signal a possible DDoS attack or some other type of unknown malicious act (<xref ref-type="bibr" rid="B9">9</xref>).</p>
<p>The One-Class SVM (often called One-Class SVM) is a semi-supervised anomaly detection method that has also been used in many applications (<xref ref-type="bibr" rid="B10">10</xref>). One-Class SVM is trained using a set of training samples that contain only the normal traffic of the network (<xref ref-type="bibr" rid="B10">10</xref>). These normal training samples are used by the One-Class SVM to create a boundary between the normal and abnormal behavior of the traffic (<xref ref-type="bibr" rid="B10">10</xref>). Any traffic sample falling outside of this boundary will be classified as an anomaly and could indicate a potentially malicious act (<xref ref-type="bibr" rid="B10">10</xref>).</p>
</sec>
<sec id="S7">
<title>Random forest</title>
<p>RF is a supervised learning technique implemented as a classification algorithm (<xref ref-type="bibr" rid="B6">6</xref>). Depending on bootstrap sampling and randomly chosen variables, many decision trees are constructed by a RF (<xref ref-type="bibr" rid="B6">6</xref>). As a direct result, RF produces a better level of confidence due to superior generalization, less overfitting, and a higher level of confidence than using only the classification accuracy of a decision tree classifier alone (<xref ref-type="bibr" rid="B6">6</xref>). The ultimate classification will be determined by a popular vote of all of the created trees (<xref ref-type="bibr" rid="B6">6</xref>).</p>
</sec>
<sec id="S8">
<title>XGBoost</title>
<p>XG is a more advanced supervised learning technique that is based upon gradient boosting (<xref ref-type="bibr" rid="B7">7</xref>). A tree is built one at a time, with each tree being built in such a way that it improves upon the prediction of the prior classifier by optimizing and thus better regulating the nature of the classifier&#x2019;s predictions on the training data (<xref ref-type="bibr" rid="B7">7</xref>). XG has demonstrated its capacity to produce very high levels of accuracy with respect to large datasets, thus, making it very useful in ML (<xref ref-type="bibr" rid="B7">7</xref>).</p>
</sec>
<sec id="S9">
<title>Hybrid ensemble method for detecting anomalies</title>
<p>Three approaches (Classification of an Attack &#x2013; Anomaly Detected) of anomaly detection, Isolation Forests, Autoencoders, and One-Class SVM, were used in the ensemble of this framework to identify an anomaly in the data (<xref ref-type="bibr" rid="B8">8</xref>&#x2013;<xref ref-type="bibr" rid="B10">10</xref>). An ensemble voting system was created to classify an instance of data as an attack if two or more of the three models classified the sample as anomalous traffic (<xref ref-type="bibr" rid="B8">8</xref>&#x2013;<xref ref-type="bibr" rid="B10">10</xref>).</p>
<p>The purpose of using the Hybrid Ensemble Method of multiple anomaly detection models was to improve the reliability of the classification of an attack and improve detection methods (<xref ref-type="bibr" rid="B8">8</xref>&#x2013;<xref ref-type="bibr" rid="B10">10</xref>). The intent was to combine different learning paradigms, which would provide lower numbers of false positives and provide better identification of unknown DDoS attack patterns (<xref ref-type="bibr" rid="B8">8</xref>&#x2013;<xref ref-type="bibr" rid="B10">10</xref>).</p>
</sec>
<sec id="S10">
<title>Evaluation metrics for performance</title>
<p>We evaluated performance on the classification task using standard metrics of accuracy, precision, recall, and F1-score for all three models (as well as the entire framework) (<xref ref-type="bibr" rid="B12">12</xref>). These performance metrics evaluate the model&#x2019;s ability to classify benign (normal) versus malicious (DDoS) traffic in real-time (<xref ref-type="bibr" rid="B12">12</xref>).</p>
<p>Receiver operating characteristic (ROC) curves and AUC values were also used to evaluate how well each model performed at classifying normal and DDoS traffic (<xref ref-type="bibr" rid="B12">12</xref>). Each metric provides an evaluation of the detection capability of the models, as well as an indication of overall performance when detecting DDoS attacks in an NFV environment (<xref ref-type="bibr" rid="B4">4</xref>, <xref ref-type="bibr" rid="B5">5</xref>).</p>
</sec>
<sec id="S11">
<title>Results and discussion</title>
<sec id="S11.SS1">
<title>Principal component analysis to reduce dimensionality</title>
<p>Principal Component Analysis (PCA) was utilized to reduce the dimensionality of the CICDDoS2019 dataset as well as to provide more efficient computational processing. The cumulative explained variance analysis determined that 24 of the principal components retained approximately 95.25% of the total variance of the original feature set. Therefore, PCA can provide a significant amount of dimensionality reduction (i.e., remove redundant or highly correlated features) while retaining much of the information necessary for accurate DDoS detection.</p>
<p><xref ref-type="fig" rid="F1">Figure 1</xref> shows the PCA scree plot that illustrates the cumulative variance retained by the selected principal components. PCA reduced the computational complexity of model training and minimized the chances of overfitting through the elimination of redundant and highly correlated features. The result is that PCA became an effective feature extraction method for subsequent ML analysis.</p>
<fig id="F1" position="float">
<label>FIGURE 1</label>
<caption><p>PCA scree plot.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="sapars-2026-35-g001.tif"/>
</fig>
</sec>
<sec id="S11.SS2">
<title>Performance of individual machine learning models</title>
<p>To determine the effectiveness of different learning paradigms for DDoS detection within NFV environments, five ML models were implemented and tested against the preprocessed dataset; these included Isolation Forest, Autoencoder, One-Class SVM, RF, and XG.</p>
</sec>
<sec id="S11.SS3">
<title>Isolation forest</title>
<p>Isolation Forest was assessed as an unsupervised anomaly detection model that has the ability through recursive data partitioning to detect traffic anomalies. The model is computationally efficient, making it well suited for large-scale network monitoring applications. This model, however, achieved a relatively low classification accuracy at 20%, precision of 0.26, a recall of 0.02, F1 score of 0.03. While Isolation Forest may be capable of detecting high-level anomalies, it is not capable of discerning subtle differences in both normal traffic and attack traffic in complex NFV environments. <xref ref-type="fig" rid="F2">Figure 2</xref> presents the performance report of the Isolation Forest model.</p>
<fig id="F2" position="float">
<label>FIGURE 2</label>
<caption><p>Isolation forest performance report.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="sapars-2026-35-g002.tif"/>
</fig>
</sec>
<sec id="S11.SS4">
<title>Autoencoder</title>
<p>The Autoencoder is an approach to detecting anomalies using deep learning. By creating compressed representations of normal network traffic and reconstructing those compressed packets back into the original data packet, the Autoencoder will identify potential anomalies based on the amount of error between the reconstructed data and its original form. The confusion matrix and ROC analysis were used to show the ability of this architecture to distinguish between benign and malicious network traffic; however, the overall classification performance was limited, with an accuracy of 22%, precision of 0.39, recall of 0.03, and an F1-score of 0.05. Therefore, while reconstruction-based anomaly detection methods detected abnormal behavior, the methods&#x2019; effectiveness was determined by the attacking patterns present in the training dataset when implementing this type of model for the purpose of Network Intrusion Detection. <xref ref-type="fig" rid="F3">Figure 3</xref> shows the Autoencoder confusion matrix. <xref ref-type="fig" rid="F4">Figure 4</xref> presents the ROC curve of the Autoencoder model.</p>
<fig id="F3" position="float">
<label>FIGURE 3</label>
<caption><p>Autoencoder confusion matrix.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="sapars-2026-35-g003.tif"/>
</fig>
<fig id="F4" position="float">
<label>FIGURE 4</label>
<caption><p>Autoencoder ROC curve.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="sapars-2026-35-g004.tif"/>
</fig>
</sec>
<sec id="S11.SS5">
<title>One-Class SVM</title>
<p>Training was performed on benign traffic samples using the One-Class SVM model, which utilized an radial basis function (RBF) kernel to form a boundary defining the expected behavior of normal traffic on the network. Any sample that fell outside this boundary was determined to be an anomaly. The One-Class SVM model produced an accuracy of 96%, a precision of 0.98, a recall of 0.96, and an F1 score of 0.97 indicating that this model is very effective at identifying attack traffic since it has a high recall value; therefore, it is a viable semi-supervised methodology for detecting previously unknown attacks. However, because the performance of the model depends upon its parameters, they need to be well tuned in order to achieve optimal performance. <xref ref-type="fig" rid="F5">Figure 5</xref> illustrates the ROC curve of the One-Class SVM model. <xref ref-type="fig" rid="F6">Figure 6</xref> presents the performance report of the One-Class SVM model.</p>
<fig id="F5" position="float">
<label>FIGURE 5</label>
<caption><p>One-Class SVM ROC curve.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="sapars-2026-35-g005.tif"/>
</fig>
<fig id="F6" position="float">
<label>FIGURE 6</label>
<caption><p>One-Class SVM performance report.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="sapars-2026-35-g006.tif"/>
</fig>
</sec>
<sec id="S11.SS6">
<title>Random forest</title>
<p>RF performed exceptionally well in classifying and was found to be one of the best models assessed in the research. This model achieved a perfect score on all metrics: 100% for accuracy, precision, recall, and F1-score. The RF&#x2019;s multiple decision tree architecture effectively modeled the relationships between network traffic features while minimizing overfitting of the classifier. The features analysis indicates that flow duration, packet statistics, and attributes related to the protocol were strong contributors to the classification of attack traffic. This means that the characteristics of network traffic flow will be highly useful in detecting whether an attack against a DDoS has occurred. <xref ref-type="fig" rid="F7">Figure 7</xref> shows the performance report of the Random Forest model. <xref ref-type="fig" rid="F8">Figure 8</xref> illustrates the feature importance obtained using the Random Forest model.</p>
<fig id="F7" position="float">
<label>FIGURE 7</label>
<caption><p>Random forest (RF) performance report.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="sapars-2026-35-g007.tif"/>
</fig>
<fig id="F8" position="float">
<label>FIGURE 8</label>
<caption><p>RF feature importance.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="sapars-2026-35-g008.tif"/>
</fig>
</sec>
<sec id="S11.SS7">
<title>XGBoost</title>
<p>XG was the best-performing model across all models tested. Similar to RF, XG had a perfect score for each of the metrics: 100% for accuracy, precision, recall, and F1-score. The use of gradient boosting by XG allowed the model to perform well in learning the complex interactions between features resulting in fewer classification errors. The feature importance analysis of XG confirmed the importance of the network flow characteristics when distinguishing between benign traffic and malicious traffic. Furthermore, XG produced the lowest false positive rates of all the models tested; therefore, it would be very appropriate for use in an operational environment where the generation of accurate alerts is critical. <xref ref-type="fig" rid="F9">Figure 9</xref> presents the performance report of the XGBoost model. <xref ref-type="fig" rid="F10">Figure 10</xref> illustrates the feature importance generated by the XGBoost model. <xref ref-type="fig" rid="F11">Figure 11</xref> compares the ROC curves of the Random Forest and XGBoost models.</p>
<fig id="F9" position="float">
<label>FIGURE 9</label>
<caption><p>XGBoost (XG) performance report.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="sapars-2026-35-g009.tif"/>
</fig>
<fig id="F10" position="float">
<label>FIGURE 10</label>
<caption><p>XG feature importance.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="sapars-2026-35-g010.tif"/>
</fig>
<fig id="F11" position="float">
<label>FIGURE 11</label>
<caption><p>RF vs. XG ROC comparison.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="sapars-2026-35-g011.tif"/>
</fig>
<sec id="S11.SS7.SSS1">
<title>Comparative model evaluation</title>
<p>A comparative analysis was conducted to assess the performance of all evaluated models. The results are presented in <xref ref-type="table" rid="T1">Table 1</xref>.</p>
<table-wrap position="float" id="T1">
<label>TABLE 1</label>
<caption><p>Models&#x2019; performance comparison.</p></caption>
<table cellspacing="5" cellpadding="5" frame="hsides" rules="groups">
<thead>
<tr>
<td valign="top" align="left">Model</td>
<td valign="top" align="center">Precision</td>
<td valign="top" align="center">Recall</td>
<td valign="top" align="center">F1-score</td>
<td valign="top" align="center">Accuracy</td>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">Isolation Forest</td>
<td valign="top" align="center">0.26</td>
<td valign="top" align="center">0.02</td>
<td valign="top" align="center">0.03</td>
<td valign="top" align="center">0.2</td>
</tr>
<tr>
<td valign="top" align="left">Autoencoder</td>
<td valign="top" align="center">0.39</td>
<td valign="top" align="center">0.03</td>
<td valign="top" align="center">0.05</td>
<td valign="top" align="center">0.22</td>
</tr>
<tr>
<td valign="top" align="left">One-Class SVM</td>
<td valign="top" align="center">0.98</td>
<td valign="top" align="center">0.96</td>
<td valign="top" align="center">0.97</td>
<td valign="top" align="center">0.96</td>
</tr>
<tr>
<td valign="top" align="left">Ensemble</td>
<td valign="top" align="center">0.95</td>
<td valign="top" align="center">0.96</td>
<td valign="top" align="center">0.96</td>
<td valign="top" align="center">0.93</td>
</tr>
<tr>
<td valign="top" align="left">RF</td>
<td valign="top" align="center">1.00</td>
<td valign="top" align="center">1.00</td>
<td valign="top" align="center">1.00</td>
<td valign="top" align="center">1.00</td>
</tr>
<tr>
<td valign="top" align="left">XG</td>
<td valign="top" align="center">1.00</td>
<td valign="top" align="center">1.00</td>
<td valign="top" align="center">1.00</td>
<td valign="top" align="center">1.00</td>
</tr>
</tbody>
</table></table-wrap>
<p>The comparative results show that supervised learning techniques are much more effective than any of the unsupervised anomaly detection methods. Furthermore, RF as well as XG reached perfect classification accuracy, showing their ability to identify discriminative patterns of attacks from labeled data during training. On the other hand, One-Class SVM achieved strong classification results, even though it learned to classify the attacks on the basis of benign traffic alone.</p>
<p>When the ROC curves were created, they confirmed the above analysis, as RF and XG distinguished between benign and malicious traffic nearly perfectly. XG had slightly better overall classification confidence than RF and also had a lower false-positive classification rate.</p>
</sec>
</sec>
<sec id="S11.SS8">
<title>Performance of the hybrid ensemble model</title>
<p>The hybrid anomaly detection framework comprised Isolation Forest, Autoencoder and One-Class SVM and used a majority voting system to enable classifying any anomalies detected in the network traffic sample as malicious if any 2 out of the 3 models classified that sample as anomalous.</p>
<p>When comparing the hybrid ensemble model to the supervised models, the hybrid ensemble demonstrated an overall lower accuracy (93%) but was significantly more robust than each individual model, using the individual models together to provide a lower false positive rate and greater consistency across different attack types by combining the results of the separate models to provide classification. <xref ref-type="fig" rid="F12">Figure 12</xref> presents the performance report of the proposed hybrid ensemble model.</p>
<fig id="F12" position="float">
<label>FIGURE 12</label>
<caption><p>Ensemble model performance report.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="sapars-2026-35-g012.tif"/>
</fig>
</sec>
<sec id="S11.SS9">
<title>Suitability for NFV deployment</title>
<p>Suitability for deployment in NFV environments will consider the practical operational suitability of the various models. There are practical issues in choosing the proper operation model, such as the fact that the supervised models have demonstrated a practical maximum accuracy in classifying attacks; however, they will require large amounts of labeled data for training and will not work well against attacks that are completely new and different. On the other hand, the unsupervised and semi-supervised models have the greatest flexibility to develop and utilize detection methods to identify and locate new threat patterns; however, they have exhibited lower classification accuracies.</p>
<p>The hybrid ensemble will provide the appropriate approach for combining the adaptability of detection capability with a reliable detection accuracy within an NFV environment. The ability for a model to adjust to variations in computational resources, virtualization technologies, and rapidly evolving behaviors of threat actors (attack patterns) requires security mechanisms that can continue to perform effectively in an ever-changing and evolving environment in an NFV solution. <xref ref-type="table" rid="T2">Table 2</xref> compares the evaluated machine learning techniques based on real-time capability, accuracy, scalability, label requirements, and adaptability for deployment in NFV environments.</p>
<table-wrap position="float" id="T2">
<label>TABLE 2</label>
<caption><p>Comparison of techniques and suitability for network function virtualization (NFV) deployment.</p></caption>
<table cellspacing="5" cellpadding="5" frame="hsides" rules="groups">
<thead>
<tr>
<td valign="top" align="left">Technique</td>
<td valign="top" align="center">Real-time</td>
<td valign="top" align="center">Accuracy</td>
<td valign="top" align="center">Scalability</td>
<td valign="top" align="center">Requires labels</td>
<td valign="top" align="center">Adaptability</td>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">Isolation Forest</td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center"><bold>&#x2717;</bold></td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center"><bold>&#x2717;</bold></td>
<td valign="top" align="center">&#x2713;</td>
</tr>
<tr>
<td valign="top" align="left">Autoencoder</td>
<td valign="top" align="center"><bold>&#x2717;</bold></td>
<td valign="top" align="center"><bold>&#x2717;</bold></td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center"><bold>&#x2717;</bold></td>
<td valign="top" align="center">&#x2713;</td>
</tr>
<tr>
<td valign="top" align="left">One-Class SVM</td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center">Only benign</td>
<td valign="top" align="center">&#x2713;</td>
</tr>
<tr>
<td valign="top" align="left">RF</td>
<td valign="top" align="center"><bold>&#x2717;</bold></td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center"><bold>&#x2717;</bold></td>
</tr>
<tr>
<td valign="top" align="left">XG</td>
<td valign="top" align="center"><bold>&#x2717;</bold></td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center">&#x2713;</td>
</tr>
<tr>
<td valign="top" align="left">Ensemble</td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center">&#x2713;</td>
<td valign="top" align="center"><bold>&#x2717;</bold></td>
<td valign="top" align="center">Partial</td>
<td valign="top" align="center">&#x2713;</td>
</tr>
</tbody>
</table></table-wrap>
</sec>
</sec>
<sec id="S12" sec-type="conclusion">
<title>Conclusion</title>
<p>Anomaly detection in DDoS attacks on NFV environments was examined in this study through the use of a hybrid machine-learning anomaly detection framework utilizing the CICDDoS2019 dataset. The framework incorporated PCA with supervised, unsupervised, and semi-supervised machine-learning approaches; these included RF, XG, Isolation Forest, Autoencoder, and One-Class SVM.</p>
<p>Results obtained experimentally showed that PCA could reduce the dimensionality of the feature space down to 24 principal components while retaining approximately 95.25% of the variance of the original data and, at the same time, improving computational efficiency without a loss of information. RF and XG provided outstanding performances, with both having perfect accuracies (100%), precision (100%), recall (100%), and F1-scores (100%). One-Class SVC had an accuracy of 96% and an F1-score of 97%, while the hybrid ensemble framework proposed herein had an accuracy of 93% and an F1-score of 96%. Therefore, results demonstrated that machine-learning techniques are very effective in detecting all forms of DDoS attack types that may either already be known or not previously known within the NFV environment.</p>
</sec>
<sec id="S13" sec-type="data-availability">
<title>Data availability statement</title>
<p>The CICDDoS2019 dataset used in this study is publicly available from the Canadian Institute for Cybersecurity (CIC). The dataset can be accessed through the official CIC dataset repository for research purposes.</p>
</sec>
<sec id="S14" sec-type="ethics-statement">
<title>Ethics statement</title>
<p>This study did not involve human participants, animals, or clinical data. Therefore, ethical approval was not required.</p>
</sec>
</body>
<back>
<sec id="S15" sec-type="funding-information">
<title>Funding</title>
<p>The author declares that financial support was not received for this work and/or its publication.</p>
</sec>
<sec id="S16">
<title>Conflict of interest</title>
<p>The author declares that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<ref-list>
<title>References</title>
<ref id="B1"><label>1.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Novaes</surname> <given-names>MP</given-names></name> <name><surname>Carvalho</surname> <given-names>LF</given-names></name> <name><surname>Lloret</surname> <given-names>J</given-names></name> <name><surname>Proen&#x00E7;a</surname> <given-names>ML</given-names></name></person-group>. <article-title>Adversarial deep learning approach for detection and defense against DDoS attacks insoftware-defined networks.</article-title> <source><italic>Fut Generat Comput Syst</italic>.</source> (<year>2021</year>) <volume>125</volume>:<fpage>156</fpage>&#x2013;<lpage>67</lpage>. <pub-id pub-id-type="doi">10.1016/j.future.2021.06.017</pub-id></citation></ref>
<ref id="B2"><label>2.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Sayed</surname> <given-names>MSE</given-names></name> <name><surname>Le-Khac</surname> <given-names>NA</given-names></name> <name><surname>Azer</surname> <given-names>MA</given-names></name> <name><surname>Jurcut</surname> <given-names>AD</given-names></name></person-group>. <article-title>A flow-based anomaly detection approach with feature selection against DDoS attacks in software-defined networks.</article-title> <source><italic>IEEE Transac Cognit Commun Netw</italic>.</source> (<year>2022</year>) <volume>8</volume>(<issue>4</issue>):<fpage>1862</fpage>&#x2013;<lpage>80</lpage>. <pub-id pub-id-type="doi">10.1109/TCCN.2022.3185819</pub-id></citation></ref>
<ref id="B3"><label>3.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Elubeyd</surname> <given-names>H</given-names></name> <name><surname>Yiltas-Kaplan</surname> <given-names>D</given-names></name></person-group>. <article-title>Hybrid deep learning approach for automatic DoS and DDoS attack detection in software-defined networks.</article-title> <source><italic>Appl Sci</italic>.</source> (<year>2023</year>) <volume>13</volume>(<issue>6</issue>):<fpage>3828</fpage>. <pub-id pub-id-type="doi">10.3390/app13063828</pub-id></citation></ref>
<ref id="B4"><label>4.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Al-Dunainawi</surname> <given-names>Y</given-names></name> <name><surname>Al-Kaseem</surname> <given-names>BR</given-names></name> <name><surname>Al-Raweshidy</surname> <given-names>HS</given-names></name></person-group>. <article-title>Optimized artificial intelligence model for DDoS detection in software-defined network environments.</article-title> <source><italic>IEEE Access</italic>.</source> (<year>2023</year>) <volume>11</volume>:<fpage>106733</fpage>&#x2013;<lpage>48</lpage>. <pub-id pub-id-type="doi">10.1109/ACCESS.2023.3319214</pub-id></citation></ref>
<ref id="B5"><label>5.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Zhou</surname> <given-names>H</given-names></name> <name><surname>Zheng</surname> <given-names>Y</given-names></name> <name><surname>Jia</surname> <given-names>X</given-names></name> <name><surname>Shu</surname> <given-names>J</given-names></name></person-group>. <article-title>Collaborative prediction and detection of DDoS attacks in edge computing using deep learning and distributed SDN.</article-title> <source><italic>Comput Netw</italic>.</source> (<year>2023</year>) <volume>225</volume>:<fpage>109642</fpage>. <pub-id pub-id-type="doi">10.1016/j.comnet.2023.109642</pub-id></citation></ref>
<ref id="B6"><label>6.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ahuja</surname> <given-names>N</given-names></name> <name><surname>Mukhopadhyay</surname> <given-names>D</given-names></name> <name><surname>Singal</surname> <given-names>G</given-names></name></person-group>. <article-title>DDoS attack traffic classification in software-defined networking using deep learning.</article-title> <source><italic>Person Ubiquit Comput</italic>.</source> (<year>2024</year>) <volume>28</volume>(<issue>2</issue>):<fpage>417</fpage>&#x2013;<lpage>29</lpage>. <pub-id pub-id-type="doi">10.1007/s00779-023-01785-2</pub-id></citation></ref>
<ref id="B7"><label>7.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Han</surname> <given-names>D</given-names></name> <name><surname>Li</surname> <given-names>H</given-names></name> <name><surname>Fu</surname> <given-names>X</given-names></name> <name><surname>Zhou</surname> <given-names>S</given-names></name></person-group>. <article-title>Traffic feature selection and distributed denial of service attack detection in software-defined networks based on machine learning.</article-title> <source><italic>Sensors</italic>.</source> (<year>2024</year>) <volume>24</volume>(<issue>13</issue>):<fpage>4344</fpage>. <pub-id pub-id-type="doi">10.3390/s24134344</pub-id></citation></ref>
<ref id="B8"><label>8.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Tymoshchuk</surname> <given-names>D</given-names></name> <name><surname>Yasniy</surname> <given-names>O</given-names></name> <name><surname>Mytnyk</surname> <given-names>M.</given-names></name></person-group> <source><italic>Detection and Classification of DDoS Flooding Attacks Using Machine Learning Methods.</italic></source> <publisher-name>arXiv</publisher-name> (<year>2024</year>). Available online at: <ext-link ext-link-type="uri" xlink:href="https://arxiv.org/abs/2412.18990">https://arxiv.org/abs/2412.18990</ext-link></citation></ref>
<ref id="B9"><label>9.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Abiramasundari</surname> <given-names>S</given-names></name> <name><surname>Ramaswamy</surname> <given-names>V</given-names></name></person-group>. <article-title>Distributed denial-of-service attack detection using supervised machine learning algorithms.</article-title> <source><italic>Sci Rep</italic>.</source> (<year>2025</year>) <volume>15</volume>:<fpage>13098</fpage>. <pub-id pub-id-type="doi">10.1038/s41598-024-84879-y</pub-id></citation></ref>
<ref id="B10"><label>10.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Batool</surname> <given-names>S</given-names></name> <name><surname>Ahmed</surname> <given-names>M</given-names></name> <name><surname>Rehman</surname> <given-names>A</given-names></name></person-group>. <article-title>A comprehensive review of DDoS detection and mitigation using machine learning and deep learning in software-defined networking.</article-title> <source><italic>Electronics</italic>.</source> (<year>2025</year>) <volume>14</volume>(<issue>21</issue>):<fpage>4222</fpage>. Available online at: <ext-link ext-link-type="uri" xlink:href="https://www.mdpi.com/journal/electronics">https://www.mdpi.com/journal/electronics</ext-link></citation></ref>
<ref id="B11"><label>11.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kalambe</surname> <given-names>D</given-names></name> <name><surname>Sharma</surname> <given-names>D</given-names></name> <name><surname>Kadam</surname> <given-names>P</given-names></name> <name><surname>Surati</surname> <given-names>S</given-names></name></person-group>. <article-title>A comprehensive plane-wise review of DDoS attacks in software-defined networking using machine learning and deep learning.</article-title> <source><italic>J Netw Comput Appl</italic>.</source> (<year>2025</year>) <volume>235</volume>:<fpage>104081</fpage>. <pub-id pub-id-type="doi">10.1016/j.jnca.2025.104081</pub-id></citation></ref>
<ref id="B12"><label>12.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Rahman</surname> <given-names>MA.</given-names></name></person-group> <source><italic>Detection of Distributed Denial of Service Attacks Based on Machine Learning Algorithms.</italic></source> <publisher-name>arXiv</publisher-name> (<year>2025</year>). Available online at: <ext-link ext-link-type="uri" xlink:href="https://arxiv.org/abs/2502.00975">https://arxiv.org/abs/2502.00975</ext-link></citation></ref>
</ref-list>
</back>
</article>
