Next Article in Journal
A Black-Box Multiobjective Optimization Method for Discrete Markov Chains
Next Article in Special Issue
Real-Time Urban Animal Monitoring Using Transfer Learning-Based Object Detection on Web Platforms
Previous Article in Journal
Advances in Applied Optimization in Automatic Control and Systems Engineering
Previous Article in Special Issue
A Machine Learning Framework for Interpreting Composition-Dependent Weathering in Heritage Glass
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Evaluation of Supervised Machine Learning Pipelines for the Identification of Distributed Denial-of-Service Attacks Using Conventional and Computational Performance Metrics

School of Computer Science and Informatics, De Montfort University, Gateway House, Leicester LE1 9BH, UK
*
Author to whom correspondence should be addressed.
Math. Comput. Appl. 2026, 31(2), 62; https://doi.org/10.3390/mca31020062
Submission received: 4 January 2026 / Revised: 1 April 2026 / Accepted: 9 April 2026 / Published: 13 April 2026

Abstract

Distributed denial-of-service (DDoS) attacks, a type of Denial-of-Service (DoS) attack in which the targeted server, service or network is overloaded with malicious traffic originating from various different sources with the aim of making such targets inaccessible for legitimate users, continue to pose a pertinent threat to the availability and integrity of organisational digital assets. While many studies have shown that machine learning models can provide high predictive accuracy in detecting such attacks, they often fail to evaluate the practicality of deploying such models to production. This study aims to address this gap by evaluating a considerable amount of pipelines based on five popular supervised classifiers for detecting DDoS attacks using the CICDDoS2019 dataset. The study employs a comprehensive methodology that combines both manual feature removal with automated encoding, scaling and feature selection integrated within pipelines. A total of 210 pipelines formed of five classifiers, three features selectors, two hyperparameter tuners and seven train–test splits were initially evaluated. Pipeline performance was assessed using both conventional and computational performance metrics. To identify the champion pipeline, a two-step approach was employed: composite scoring for shortlisting and statistical testing using Friedman and post hoc Nemenyi tests. The champion pipeline was shown to be Decision Tree coupled with Recursive Feature Elimination (with 20 features selected) and Grid Search hyperparameter tuning with a 90-10 train–test split. It achieved the most optimal balance of predictive capabilities and computational overheads, achieving an MCC of 0.993 ± 0.024 , training time of 0.194 ± 0.001 s, inference time of 0.000998 ± 0.00008 s, CPU time of 0.194 ± 0.008 s and average memory usage of 15,167 ± 322 kilobytes across training and inference. The findings highlight the importance of a holistic and more nuanced approach when selecting a champion pipeline that is not only effective but also feasible for deployment in resource-constrained environments.

1. Introduction

As global connectivity continues to grow, with over two thirds of the world’s population now having access to the Internet [1], the challenges that come with DDoS attacks are further compounded by the emergence of cybercrime-as-a-service models. In particular, DDoS-as-a-service operations (aka. DDoS for hire), which have become even more prevalent due to the increase in the commercialisation of cybercrime [2,3]. DDoS-as-a-service operations enable low-skilled adversaries to carry out powerful DDoS attacks against any potential targets for an often minimal fee [4,5]. As a result, traditional detection methodologies are often insufficient when dealing with modern DDoS attacks, underscoring the desperate need for more intelligent approaches. Researchers and companies alike are turning to the use of artificial intelligence and more specifically machine learning (ML) to solve the DDoS problem, with some real-world solutions already in production.
While the literature continues to propose numerous ML models as viable solutions for detecting DDoS attacks, there has been a noticeable lack of discussion and assessment of their practical feasibility. Most studies evaluate models solely using conventional metrics such as accuracy, precision, recall and F1-score, although some studies do also go beyond this. While these metrics are often highly useful, they only form a single dimension in the model evaluation process. This is because they do not measure other factors that are of crucial importance in such applications, such as deployment feasibility, scalability, detection speed and resource requirements for model training and testing.
Thus, this study aims to evaluate hundreds of supervised ML pipelines for detecting modern DDoS attacks using the CICDDoS2019 dataset [6]. Specifically, we investigate which pipeline configurations achieve the best of both worlds in terms of predictive accuracy and computational efficiency and identify the features of the CICDDoS2019 dataset that contribute most to effective detection. Additionally, the trade-offs between accuracy and computational efficiency across different pipelines are examined to inform practical deployment of DDoS detection systems. To achieve this, this study is guided by three objectives: (a) to evaluate the performance of hundreds of supervised ML pipelines on the CICDDoS2019 dataset using conventional and computational metrics; (b) to identify the features of the CICDDoS2019 dataset that contribute the most to effective detection; and (c) to assess the trade-offs between predictive accuracy and computational efficiency across different pipeline configurations.

2. Related Work

2.1. Classifiers

Supervised ML has emerged as a widely used ML paradigm for detecting DDoS attacks [7]. This is primarily due to its ability to learn complex patterns from labelled data such as network traffic with ease [7]. Supervised ML models are trained on datasets that contain both benign and malicious traffic. This enables them to classify data points based on learned characteristics that appear in the form of dataset features. In DDoS attack detection, the primary goal of these solutions is to identify malicious traffic quickly and accurately, seeking to enable timely mitigation before services suffer significant impact. A variety of supervised ML algorithms have been explored within the literature; these include Decision Trees (DT), Random Forests (RF), Support Vector Machines (SVM), Naive Bayes (NB) and k-Nearest Neighbour (kNN) [8,9,10,11,12]. Each algorithm has its own strengths and trade-offs. Among the popular choices, tree-based models are favoured for their inherent interpretability and fast training, making them suitable for real-world DDoS detection. Particularly, the dominance of RF in the literature can be attributed to its ability to reduce overfitting through the use of multiple trees and ability to handle highly dimensional data. This is often desired, as most benchmark datasets are highly dimensional. Further, their relatively fast training times making them well-suited for DDoS detection [13].
While supervised ML often achieves high accuracy in controlled environments, such as studies, they face several limitations when it comes to real-world deployment feasibility. The performance of these models is often highly dependent on the availability of high-quality and up-to-date labelled datasets, which can be particularly difficult to obtain given both the rapid evolution of DDoS attacks in modern times but also the privacy concerns related to sharing such sensitive data, as is the case with network traffic. Furthermore, the very nature of supervised ML provides a limitation that manifests in requiring frequent updates to the training data as well as retraining to remain effective against novel or zero-day attack patterns, which models do not see during training. Finally, prior works have typically explored a relatively small number of classifiers, feature selectors, hyperparameter tuners and train–test splits, if any.
Despite these limitations, supervised ML remains an integral component of modern DDoS detection systems, especially when proper feature engineering, dataset selection and curation, and hyperparameter tuning takes place. As prior works have shown, RF’s combination of accuracy and interpretability makes it particularly suited for DDoS detection.

2.2. Data Sources

The choice of dataset significantly impacts the performance and generalisability of ML models, thus the selection of the dataset used in this study is crucial [14]. Several benchmark datasets are commonly used in DDoS detection research (see Table 1), each with distinct strengths and limitations. KDD99 [15] and its updated version NSL-KDD [16] have been widely used due to their age and reputation. However, their outdated traffic patterns reduce their relevance significantly for DDoS detection in the modern day [17]. To address this, UNSW-NB15 [17] and CIC-IDS2017 [18] provide more realistic network traffic and richer feature sets, improving model performance, though neither is specifically focused on DDoS attacks. CIC-DDoS2019 [6] directly focuses on DDoS attacks, covering many different attack vectors. Despite its imbalance, it remains the most comprehensive, popular, publicly available dataset for evaluating ML models for DDoS detection. Further, certain datasets are purely synthetic; that is, they contain data that are artificially generated using tools rather than produced by real events, while other datasets rely on controlled test environments that, despite being much more realistic, may still not fully capture the true nuances of modern networks [19]. Additionally, some of these datasets suffer from class imbalance and being out of date [20]. Thus, these differences directly influence the generalisability of supervised classifiers that are trained on them as they may learn patterns that do not directly translate well into real-world DDoS attack scenarios.

2.3. Pre-Processing, Feature Selection and Model Evaluation

Pre-processing steps are often important for multiple reasons; notably, scaling must be applied when using distance-based classifiers such as SVM. Moreover, balancing is needed due to class imbalances. Some of the commonly utilised pre-processing steps include scaling, normalisation, and encoding. Feature selection is also often a key component in supervised ML pipelines. Some of the commonly used families of feature selectors include filter-based, wrapper-based and embedded methods. This is often a key step in ML as datasets can have redundant or highly correlated features that can hinder performance [21,22]. Prior studies often only applied a single feature selector that was directly tailored to the problem using expert knowledge and did not compare different selectors conclusively.
Model evaluation within the context of DDoS detection and supervised ML more broadly typically involves metrics such as accuracy, precision, recall and F1-score [23]. These, however, often do not capture the full performance spectrum of a given model or pipeline. Despite this lack of holistic perspective, the conventional metrics that are used also have their inherent issues. For example, when datasets are imbalanced, the use of accuracy as a primary or target metric can be often be misleading [24], as a model with high accuracy may just be favouring the majority class, and thus fail to detect the minority class. As a result, many studies report and utilise precision and recall to provide a more accurate perspective on model performance in these scenarios. Furthermore, depending on the specific situation, either metric may be far more important than the accuracy. For example, failing to detect a critical cyberattack such as a DDoS attack can result in a costly impact [25], meaning that recall is often a crucial metric in DDoS detection studies. Similarly, causing unnecessary false alarms is also a significant problem as it can degrade the response from technical users due to a phenomenon known as alert fatigue [26]. The F1-score is thus used as it provides a balance between precision and recall, allowing for the best of both worlds. While these four conventional metrics dominate the literature in terms of model evaluation, some studies do also explore additional or different metrics such as ROC-AUC to offer deeper insights into model performance [27]. Despite the importance of accurately detecting cyberattacks as impactful as DDoS attacks, relatively few studies explore model performance from a computational efficiency standpoint.

3. Materials and Methods

3.1. Study Design

This paper adopts a quantitive–experimental approach that utilises the well-known benchmark dataset CICDDoS2019 to both train and evaluate hundreds of different supervised ML pipelines across a set of conventional and computational evaluation metrics. The primary aim is to assess which supervised ML pipeline is the most effective at both accurately and efficiently identifying malicious network traffic. To ensure a fair and comprehensive comparison and evaluation, all of the pipelines created as part of this study were trained and evaluated on the same pre-processed dataset using the same evaluation metrics and run on the same hardware. Numerous feature selection and hyperparameter tuning approaches were also assessed to identify which combination of approaches provides the best trade-off between performance and computational overhead. The quantitive nature of this study will enable it to ensure that any conclusions drawn regarding the efficacy of any pipelines remain data-driven, sound and verifiable.

3.2. Dataset

The basis of this study is the CIC-DDoS2019 dataset [6]. It is a publicly accessible dataset often utilised for benchmarking intrusion detection systems, with a specific focus on DDoS attacks. The dataset was created by the Canadian Institute for Cybersecurity in collaboration with the University of New Brunswick in 2019 and is a widely recognised and adopted dataset within the literature due to its comprehensive, labelled nature and realistic representation of modern network traffic and attack patterns [6]. The dataset is structured as a collection of 18 individual CSV files separated by the type of DDoS attack performed and then further divided into training and testing folders that were collected at different times. Once merged, the dataset comprises a total of 70,427,637 records, with 70,313,809 records being labelled as various DDoS attack types, with the remaining 113,828 records being benign traffic [28]. The dataset is highly imbalanced, with 99% of records being labelled as malicious. The dataset also contains 87 unique features, with 80 being of statistical nature, extracted using the CICFlowMeter tool [29], and the remaining 7 features being socket- or metadata-related information (i.e., Flow ID, Source IP, Protocol or Timestamp). The features are a mix of numerical and categorical data, with numerical data being the dominant data type. Further, the features capture a range of different characteristics such as flow duration, packet count and protocol type [30].

3.3. Pre-Processing

Due to the initial structure of the dataset, the data is of a multi-class nature, with each record being labelled according to the DDoS attack that was performed or alternatively as benign traffic. However, for the purpose of this study, these labels were converted into a single attack-specific label called “MALICIOUS” as a binary classification problem was explored, with benign records retaining their original “BENIGN” label.
ML model development often requires a critical step to ensure that the data is refined and of the highest possible quality, this being pre-processing. This step helps to eliminate or reduce any potential noise that may be present in the dataset, and by proxy, helps improve model performance. To enable the experiments to be carried out on the pipelines in a timely manner, a sample of the original dataset was taken; specifically, a sample of roughly 25,000 rows was used (see Table 2). To obtain the sample, each CSV file from the dataset was proportionally randomly stratified andsampled, to ensure that the sampled dataset retained its original class distribution and its proportional size to each file in the original dataset. A random sample of records was taken from each CSV file and stratified against the target column (Label). The total number of records used was chosen based on the computing resources available.
To prepare the dataset for the pipelines, various data inspection and pre-processing steps were carried out (see Figure 1). First, due to the nature of the dataset, namely where each attack type is given its own label, all the DDoS attack type labels were combined under one over-arching “MALICIOUS” label for completeness and correctness. Second, the data was identified to have missing data within the Flow Bytes/s and SimillarHTTP columns with 93 and 4 rows of missing data respectively. Next, duplicate rows were identified using a filter-condition method; curiously, no duplicate rows were identified. Further, four columns, specifically, Fwd Header Length, min_seg_size_forward, Init_Win_bytes_forward and Init_Win_bytes_backward, were identified to contain negative values, with both Init_Win_bytes_forward and Init_Win_bytes_backward containing in excess of 90% negative values and Fwd Header Length and min_seg_size_forward containing around 12.36% and 15.92% respectively.
Column names were stripped of any white spaces that prepended or appended them. Furthermore, columns that were deemed to be irrelevant based on factors such as high homogeneity, lack of contribution to the model and excessive amounts of invalid data were removed, these were: Row No., Flow ID, Source IP, Destination IP, Protocol, SimillarHTTP, Timestamp, Init_Win_bytes_forward, Init_Win_bytes_backward, Bwd PSH Flags, Fwd URG Flags, Bwd URG Flags, FIN Flag Count, SYN Flag Count, RST Flag Count, PSH Flag Count, URG Flag Count, CWE Flag Count, ECE Flag Count, Fwd Avg Packets/Bulk, Fwd Avg Bytes/Bulk, Fwd Avg Bulk Rate, Bwd Avg Packets/Bulk, Bwd Avg Bytes/Bulk, and Bwd Avg Bulk Rate. As identified during the data inspection, both min_seg_size_forward and Fwd Header Length contained negative values. To resolve this, the rows that contained said negative values were filtered out of the dataset, with min_seg_size_forward being removed first as it contained a higher proportion of negative values. As neither the minimum segment size nor the header length can realistically be a value below zero, it was deemed that the negative values present in these columns were the result of placeholders or logging issues in the tooling that was utilised during data collection. Subsequently, the missing values identified were also handled. Given that SimillarHTTP was dropped due to its irrelevance, the remaining column with missing data, Flow Bytes/s, was handled accordingly, with 93 rows being dropped from the dataset. Similarly, infinite values in both Flow Bytes/s and Flow Packets/s were also dropped, resulting in 20,304 rows and 62 columns remaining after pre-processing. Outliers were not handled explicitly as RobustScaler was used instead. The model evaluation loop also features the use of LabelEncoder which ensures that the class labels are appropriately encoded. Data quality checks were performed after each significant pre-processing step using the helper function check_data_quality, which noted the shape (rows and columns) along with the number of missing values and duplicate rows. Table 3 shows the dataset shape, missing value count and duplicate row count before and after each pre-processing stage, while Table 4 shows the number of rows in the dataset by class before and after the pre-processing step.

3.4. Evaluation Metrics

Evaluation metrics are used to assess the performance of the supervised machine learning pipelines explored in this study. The reason for such metrics is that without them, evaluation and comparison of pipelines cannot be performed, and thus, the pipelines are not grounded in reality [31]. This study makes use of five popular metrics: accuracy, precision, recall, F1-score and Matthews Correlation Coefficient (MCC). Equations (1)–(4) show how they were calculated.
A c c u r a c y = T P + T N T P + T N + F P + F N
P r e c i s i o n = T P T P + F P
R e c a l l = T P T P + F N
F 1 _ s c o r e = 2 · P r e c i s i o n · R e c a l l P r e c i s i o n + R e c a l l
M C C = T P · T N F P · F N ( T P + F P ) ( T P + F N ) ( T N + F P ) ( T N + F N )
where TP, FP, TN, and FN represent true positives, false positives, true negatives, and false negatives, repsectively.
Additionally, four computational metrics were used:training time, inference time (batch inference), CPU time and average memory usage (see Algorithms A1–A4). Reporting these metrics is essential for evaluating not only the predictive capabilities but also the computational efficiency of the pipelines, especially when considering their practicality in real-world scenarios. In certain applications of ML, especially those in resource-constrained environments, an understanding of computational costs is critical for ideal pipeline selection, as a balance of good predictive performance and low computational cost is often required. The use of these metrics aims to provide some insight into the potential scalability and deployment feasibility of each pipeline in a modern network.

3.5. Models

This study makes use of several supervised machine learning classifiers, including Logistic Regression (LR), Support Vector Machine (SVM) [32], Decision Tree (DT) [33], Random Forest (RF) [34] and Extreme Gradient Boost (XGBoost) [35] in a binary classification scenario. All of these classifiers are supervised classifiers and thus are trained on labelled data, such that they can learn the mapping between the input features and the labels. These classifiers were selected due to their widespread adoption within the literature as well as their diversity across different model families. LR is a linear-based probabilistic classifier that models the probability of a data point belonging to one of two classes. SVM is a margin-based classifier that aims to identify the most optimal decision boundary such that class separation is maximised. DT is a rule-based tree-structured classifier that makes decisions based on a dataset’s features using multiple if–then splits until it identifies a split path that yields the most optimal split. RF is an ensemble classifier made up of multiple decision trees, which aids in improving performance and reduces the overfitting experienced by decision trees. While XGBoost is also an ensemble classifier, it is based on gradient boosting, where multiple decision trees are built sequentially, with each new tree focusing on correcting the errors of the previous ones.

3.6. Experimental Setup

The pipelines were executed in a controlled environment to ensure both consistency and reproducibility across all explored pipeline configurations. The environment consisted of a desktop computer with an AMD Ryzen 7 7800X3D CPU rated at 4.20 GHz with 8 cores and 16 threads; 32 GBs of DDR5 RAM; Windows 11 Pro 64-bit as the operating system and Python version 3.13.6. The code developed as part of this study was implemented using Python. All of the code development took place on a Jupyter Notebook with several key libraries used, which were numpy 2.3.2, pandas 2.3.1, polars 1.32.3, scikit-learn 1.7.1, matplotlib 3.10.5, jupyterlab 4.4.5, xgboost 3.0.4, pyarrow 20.0.0, shap 0.51.0, scikit-posthocs 0.12.0 and requests 2.32.4. To maintain code quality and consistency, all of the code was developed in adherence with the Google Python Style Guide. All classifiers explored in this study were trained without the use of GPU acceleration. To monitor both the average and peak memory usage during training and inference, a custom profiler was implemented that sampled the process’ memory approximately every 100 ms (0.1s) in a separate thread (see Appendix A Algorithm A4). This approach aimed to provide a balance between measurement overhead and resolution, capturing sustained memory peaks and trends while avoiding any interference with the pipeline’s execution.
In order to streamline model development, scikit-learn pipelines were employed through the use of the Pipeline interface. This interface enables the encapsulation of multiple different pipeline components into a single reproducible object, making it particularly useful in machine learning workflows that involve a fixed sequence of steps [36]. Each pipeline explored comprised three key stages: feature selection, hyperparameter tuning and classification. In the feature selection stage, the dimensionality of the dataset was reduced to improve the performance of each model; specifically, the SelectKBest, VarianceThreshold and RFE functions were used due to their availability. SelectKBest is a filter-based feature selection technique that ranks features using univariate statistical tests and retains the top-k most relevant features. VarianceThreshold is also a filter-based feature selection technique, but instead, it removes all features whose variance does not meet the defined threshold. Finally, RFE is a wrapper-based feature selection technique that repeatedly trains and evaluates a machine learning model on different subsets of features with the least important features being pruned from the original set until the desired number of features is reached.
Hyperparameter tuning was implemented through the use of the GridSearchCV and RandomizedSearchCV functions. Train–test split ratios were pre-computed with random_state=42 and stored in a dictionary for easy retrieval within the model evaluation loop when needed. A summary of all pipeline components explored in this study is provided in Table 5. Despite the fact that a larger and more expansive hyperparameter grid may have provided much more complex insights, due to computational limitations and other constraints, the scope of the hyperparameter grids was narrowed by prioritising parameters and values that were most likely to yield meaningful results. The selection of parameter values hinged on retaining enough variation to allow for robust comparisons without significantly impacting computational demands (see Table 6). Ultimately, the trade-off between search space coverage and computing time was necessary to obtain results in an appropriate amount of time.

4. Results and Discussion

The findings from this study’s evaluation of a variety of supervised machine learning pipeline configurations for DDoS attack detection using the CICDDoS2019 dataset are discussed in this section. Additionally, statistical testing, feature importance analysis and generalisation evaluation are performed to strengthen the findings. The primary objective was to investigate the most effective pipeline configuration by systematically evaluating and assessing their performance across a range of conventional and computational metrics. The study involved a total of 210 unique pipelines that comprised five supervised classifiers, three feature selection techniques, two hyperparameter tuning techniques and seven train–test splits and were evaluated using nine metrics: accuracy, precision, recall, F1, MCC, training time, inference time, average memory usage and average CPU time. The following section will detail the performance results starting from a wider perspective, then it will hone in on the top 10 most performant pipelines; subsequently, feature frequency analysis is performed to identify the most effective features for detection, and finally the section concludes with a discussion of performance trade-offs. The metric values were obtained by training and evaluating each pipeline against the same pre-processed dataset that was stratified and randomly sampled from the original dataset, containing a total of 20,304 rows and 62 columns (61 features, 1 label) post pre-processing.

4.1. Performance Results

Generally, as shown in Table 7, pipelines that utilise tree-based classifiers dominate predictive performance. LR-based pipelines appear to struggle, suggesting that there may be non-linear patterns in the data that they simply are not able to catch, or that the interactions between features in the dataset cannot be effectively captured by linear models. Further, LR-based pipelines also have considerably higher training times compared to other pipelines; this, however, may be the result of having to provide static parameters to the LR classifier function from scikit-learn to enable it to identify a valid model within the max_iter limit. SVM and DT both exhibit very fast training times compared to more complex models such as XGBoost and RF. Similarly, DT-based pipelines note the fastest inference times on average. Additionally, DT-based pipelines also showcase the lowest memory usage on average, indicating that they are more memory-efficient in comparison to other classifiers. On the other hand, SVM showcases the worst memory usage, likely due to its need to store the generated support vectors.
As shown in Table 8, feature selection results highlight that SelectKBest offers the highest predictive performance with an MCC of 0.51649, at the clear cost of more memory usage and a moderate increase in training time compared to RFE, making it the most suitable and practical selector for maximising predictive performance. RFE achieves moderately lower predictive performance with an MCC of 0.45046, but it is both faster in training time and more memory-efficient, showcasing a good compromise between computational resources and predictive performance on average when needed. VarianceThreshold performs the worst across the predictive performance metric and most computational metrics, indicating that it is likely not an appropriate selector for the CICDDoS2019 dataset because of the feature complexity present within in the dataset.
Comparing both hyperparameter tuning methods explored in this study shows a clear trade-off between predictive performance and computational efficiency (see Table 9). The Grid tuner achieves a higher average MCC score (0.50017) compared to the Random tuner (0.41209), indicating better overall performance. However, despite this, it comes at the cost of significantly longer training times, with Grid taking an average of 33.35 s versus only 12.40 s for Random. In terms of inference time, both methods perform similarly (roughly 0.008 s), suggesting that prediction speed is largely unaffected by the tuning method employed in the pipeline. The CPU time is also comparable across the tuners, with Random being slightly lower. On the other hand, Random tuning appears to consume slightly over two times more memory than Grid tuning on average. Overall, while Grid tuning provides better predictive performance and lower memory usage on average, it still requires substantially more training time, whereas Random tuning sacrifices some predictive performance and uses memory to achieve faster training speeds.
To identify the champion pipeline from the 210 that were evaluated in this study, a two-step approach was used: composite scoring and statistical testing. First, composite scoring was employed. To do this, we identified, using Spearman’s correlation coefficient, highly correlated metrics such as accuracy, recall, precision and F1 and removed them from the composite scoring formula to avoid redundant contributions (see Figure 2). This formula was used to ensure that each metric reflected some form of unique information about the pipeline itself, rather than overweighting a specific aspect, where x i j norm is the normalised metric and w j is its weight (see Equation (6)). Despite train_time_sec and cpu_time_sec being highly correlated with each other ( r = 0.8273 ) they were both retained, as they capture distinct aspects of the computational efficiency of a given pipeline. Moreover, to not overweight them, their combined influence was controlled through a weight for each metric of 0.125. Next, each metric was normalised to a range of [0, 1] based on whether higher values were indicative of better (e.g., MCC) or worse (e.g., training time) performance (see Equation (7)). This weighted composite score was computed from the normalised metrics to produce a preliminary ranking of the top 10 candidate champion pipelines. The top 10 pipelines presented in Table 10 were selected according to this weighted composite score.
Composite Score i = j = 1 M w j · x i j norm
x norm = x x min x max x min , if higher is better x max x x max x min , if lower is better
Second, statistical testing was performed on the top 10 selected pipelines, with each candidate pipeline being re-run 10 times with a different random_seed value set for the train_test_split function each time, generating multiple measures for each metric. These repeated measures enabled the use of the Friedman test to assess whether the performance differences among the top 10 pipelines’ metrics were statistically significant. For each of the 9 metrics, the Friedman test was applied to determine if any pipeline performed significantly differently from the others. When the test indicated significance ( p < 0.05 ), a post hoc Nemenyi test was used to identify which pipelines differed significantly in pairwise comparisons, the results of which are summarised in Table 11 and Table 12.
Despite the post hoc tests not being able to identify a single statistically superior pipeline across all of the metrics, they still revealed notable differences in specific pairwise comparisons. Several of the pairwise comparisons highlighted meaningful differences between specific pipelines, revealing trends that are not immediately apparent. While several pipelines excel in specific metrics, no single pipeline dominates across all of them, highlighting the trade-offs between computational efficiency and predictive performance. Thus, with Table 11 and Table 12 (where an X character denotes a top-performing pipeline for a given metric) in mind, the selection of the champion pipeline is based on choosing the pipeline that is top-ranked in a majority of metrics rather than strict statistical superiority. As a result, DT_RFE_Grid_90-10 was identified to be the champion pipeline, ranking highest across six of the nine metrics considered, Recall, Precision, Accuracy, F1, MCC and Inference Time, with other pipelines not achieving the same.
With the champion pipeline, the false negative rate (FNR) achieved was 0, indicating that no positive samples were misclassified (see Table 13). However, given the relative size of the negative class (n = 5), the conventional performance metrics are highly sensitive to individual misclassifications. Consequently, while the pipeline appears to perfectly avoid false positives and false negatives, the results should be interpreted with caution. The observed performance may overstate the pipeline’s robustness and may not generalise well to other datasets with a larger size or more balanced class distribution.
In real-world applications where negative samples are much more abundant, even a small number of false positives may reduce precision and increase operational costs, such as allocating resources like analysts to inspect flagged events. The limited test size also raises the risk that the pipeline is overfitted to CIC-DDoS2019, meaning that its apparent perfect performance may not hold in cross-dataset evaluations.

4.2. Feature Analysis

From the top 10 most performant pipelines as reported in Table 10, the frequency of each feature’s appearance in the corresponding feature subsets was counted and totalled (see Table 14). The analysis reveals that a single feature appeared in all of the top 10 most performant pipelines: Idle Min.
The consistent presence of the aforementioned core feature indicates that it is highly predictive of the target label. In particular, its repeated selection highlights a strong underlying correlation with the Label column, which tree-based classifiers such as DT, RF and XGBoost are able to exploit to great effect. This may explain why the top 10 most performant pipelines each make use of these features to achieve perfect predictive performance across all conventional evaluatory metrics.
Furthermore, the top 10 most performant pipelines employed the RFE feature selector that used the DecisionTreeClassifier as the estimator. This fact inherently ties the feature selection performed by RFE to the bias of the DT classifier itself. As a consequence, the repeated selection of the same features might reflect the properties of the RFE-DT combination rather than purely the dataset’s inherent characteristics.
To enhance interpretability of the champion pipeline (DT_RFE_Grid_90-10), a SHapley Additive exPlanations (SHAP) analysis was conducted to quantify the contributions of each feature to the pipeline’s predictions [37]. The results of this indicate that a small subset of features consistently drive the majority of the predictive power, with top-ranked features exhibiting the largest SHAP values. In the case of the champion pipeline, only three features provide predictive information, which are: Source Port ( 38.83 % ), Destination Port ( 34.95 % ) and Inbound ( 26.21 % ). These accounted for 100 % of the pipeline’s total predictive contribution, while the remaining features did not contribute any predictive information. The beeswarm and global feature importance plots (see Figure 3 and Figure 4) confirm that these features consistently push predictions towards or away from the positive class, highlighting their key role in the pipeline’s decision-making process. The sparsity in feature usage is a reflection of the pipeline’s inherent simplicity and interpretability; this is because DT_RFE_Grid_90-10 uses a maximum tree depth of 5 nodes, while RFE selects 20 features. The shallow tree cannot fully utilise all 20 features, which explains why only 3 features show non-zero contributions in the SHAP plots.

4.3. Generalisation and Overfitting

Generalisation is a critical requirement for reliable model deployment and assessment. As a result, the champion pipeline was evaluated on an independent dataset derived from the CIC-IDS2017 dataset [18]. A subset of approximately 25,000 samples, including both benign and DDoS-labelled traffic from the Friday afternoon attack file was extracted and adjusted to match the class distribution of the CIC-DDoS2019 subset used during pipeline development. Both datasets were obtained from the Canadian Institute for Cybersecurity using the same CICFlowMeter tool, ensuring comparable features sets, while offering differing traffic scenarios, network conditions and attack implementations. This evaluation aimed at determining whether the champion pipeline retains its high predictive performance and relatively good computational efficiency on previously unseen data, providing a robust assessment of its generalisation beyond the patterns present in the original training and testing sets.
The pre-processing steps defined in Section 3.3 were applied accordingly to this independent dataset to ensure compatibility. Similarly, the same evaluation metrics as defined in Section 3.4 were used to quantify the pipeline’s performance. To enable a fair cross-dataset comparison, the champion pipeline was constrained to feature shared by both datasets. Certain features originally selected by the RFE feature selector were not present in CIC-IDS2017, therefore, RFE was re-run restricted to the shared feature set, preserving the overall pipeline structure. Pipeline performance was evaluated across 10 random train–test splits per dataset, with the metrics reported as mean ± standard deviation to capture variability.
Furthermore, all computational metrics reported in Table 15 were measured separately for training and inference, as retraining on the independent dataset would provide misleading results. Training was performed solely on the CIC-DDoS2019 subset used throughout this study. As shown in Table 15, the pipeline retained near-perfect performance, with MCC and other predictive performance metrics approaching 1.0. In contrast, on the unseen CIC-IDS2017 subset, performance can be seen to drop considerably. While precision remained moderately high, other metrics suffered significant drops, indicating the pipeline’s inability to correctly identify most DDoS samples. CPU time and memory usage remained low across inference on both datasets, with slight differences in inference time.
The results indicate that while the pipeline may perform exceptionally on the CIC-DDoS2019 subset, it exhibits very poor generalisation on unseen data. Differences in attack patterns and traffic distributions between both datasets appear to have a substantial impact on predictive performance.

4.4. Performance Trade-Offs

In evaluating models for DDoS detection and, more broadly, cyber attack detection, performance must be assessed not only from a predictive perspective but also from a computational perspective. This is because this perspective is of particular use in cases where the deployment environment is constrained by the available resources. This study reveals that while many pipelines do in fact achieve perfect or near-perfect predictive performances, trade-offs are evident when comparing them in the computational dimension.
Notably, pipelines using more complex and exhaustive hyperparameter tuning approaches like Grid Search on average only marginally increased their predictive performance while incurring a several fold increase in computational cost in metrics such as training, inference and CPU time, along with average memory usage. The fact that the results indicate diminishing returns highlights a common trade-off—that is, gaining a small increasein predictive capabilities may not be justified when the resource requirement is considered. Further, while efficiency may have appeared to play only a background role in some prior works or have been absent entirely, it is often of paramount importance in real-world deployments, alongside conventional ML metrics. For instance, a pipeline that has very high predictive performance but poor computational metrics may be deemed unsuitable for high-throughput networks. In contrast, a pipeline with marginally lower predictive capabilities but a several fold improvement in terms of memory usage and CPU time may be far more adequate.
Another less evident trade-off occurs when the maintainability and interpretability of a pipeline are an area of concern. This is because pipelines with simpler and more efficient configurations such as those using RFE and Random Search tend to be much easier to re-train, debug and maintain over time compared to those that require much more heavy computation such as Variance Threshold and Grid Search. Furthermore, tree-based models, shown in this study to be well-suited for the DDoS detection task, offer greater interpretability advantages compared to other supervised classifiers. Their tree structure enables security analysts to visualise decision paths and understand which features drive predictions. This transparency supports bias detection, maintainability and informed decision making based on the model’s structure and outputs.
All things considered, the selection of a pipeline and its respective components for production and use often involves a much more comprehensive and context-tailored approach that goes beyond using the best pipeline in terms of conventional ML metrics. It often requires an adequate balance between predictive and computational performance along with other trade-offs to be considered, all of which shape the decision made in relation to the pipeline design process. As demonstrated in this study, the most performant pipelines are not always the most computationally efficient and vice versa; this underscores the importance and necessity of evaluating all these trade-offs using a holistic and nuanced evaluatory framework.

5. Conclusions

In this study, 210 unique ML pipelines comprising five supervised classifiers, three feature selectors, two hyperparameter tuners and seven train–test splits were evaluated against conventional and computational metrics. The results show that tree-based classifiers tend to outperform the other supervised ML classifiers that were investigated, achieving higher MCC while also demonstrating superior training and inference times, which aligns with prior works. Among the explored feature selection methods, SelectKBest emerged as the feature selector with highest average MCC; however, in comparison, RFE showcased lower computational costs with slightly worse MCC. Random Search was identified to have superior computational efficiency when compared to Grid Search in terms of training time and CPU time, with slight predictive performance loss. Overall, although RF-based pipelines achieved slightly higher MCC on average than DT-based pipelines, the difference was marginal, and thus, as DT-based pipelines have much lower training, inference and CPU times along with lower memory usage on average, they represent the best compromise in terms of balancing predictive performance and computational performance.
These findings seek to provide actionable guidance for researchers and industry professionals who develop ML pipelines for DDoS detection in resource-conscious environments. The results demonstrate that tree-based methods are able to deliver competitive predictive performance at much lower computational cost, providing an attractive alternative to more resource-intensive approaches. More broadly, this study highlights the value and necessity of evaluating ML pipelines across multiple dimensions, with computational metrics revealing trade-offs that have remained unclear or underreported in prior works that relied solely on conventional metrics.
However, this study is also not without its limitations, which are discussed below:
  • Limited sample size: Due to computational constraints, this study utilised a representative subset of approximately 25,000 samples from the full CIC-DDoS2019 dataset, which contains over 70 million records. Although this subset was selected to closely reflect the original dataset’s distribution, it may not have fully captured the variability and nuances present in the complete dataset. As a result, the reported findings should be interpreted with this limitation in mind. Future work should explorer larger samples, if feasible, to further validate the generalisability of the results.
  • Memory profiling methodology: Memory usage was monitored using a threaded sampling approach with periodic intervals (≈100 ms). While this provides a general overview of a pipeline’s memory consumption, it may not capture short-lived peak usage spikes. As a result, the reported memory metric may underestimate the true average memory usage. Future work should seek to employ more precise profiling tools or methods to capture more fine-grained memory consumption behaviour and more accurately characterise a given pipeline’s memory usage.
  • Pipeline exploration scope: Despite the comprehensive nature of this study, it remains limited by the range of supervised classifiers, feature selectors, hyperparameter tuning methods and parameter grids explored. The lack of exploration of alternative paradigms, such as unsupervised learning, further restricts the generalisability of the findings. Additionally, while computational metrics such as memory usage and CPU time served as valid comparators across the explored pipelines, the results obtained for them may not fully reflect the true performance of said pipelines in different deployment environments. Future work should extend this multi-dimensional evaluation framework to include a broader set of classifiers, more advanced hyperparameter tuning techniques, more extensive parameter grids and diverse datasets to better assess its robustness and applicability.
  • Cross-dataset feature restriction: Evaluation of the champion pipeline’s generalisability was limited to the features shared between both the CIC-DDoS2019 and CIC-IDS2017 datasets to ensure comparability. While this approach helped in some aspects, it may have constrained the pipeline’s performance by excluding informative features such as Source Port that were unique to either dataset.
In conclusion, this study aimed to lay a foundation for the idea of multi-dimensional evaluation of ML pipelines, not just for DDoS detection but in other research avenues too, exploring both predictive and computational performance. This is because it hopes to aid in the development of more efficient and scalable ML-based solutions that can be directly applied from future studies to future industry solutions with minimal difficulty.

Author Contributions

Conceptualization, A.K. and W.S.; methodology, A.K.; software, A.K.; validation, A.K.; formal analysis, A.K.; investigation, A.K.; resources, A.K.; data curation, A.K.; writing—original draft preparation, A.K.; writing—review and editing, A.K. and W.S.; visualization, A.K.; supervision, W.S.; project administration, A.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Publicly available data was used in this study. These data are openly available in the University of New Brunswick’s Canadian Institute for Cybersecurity (CIC) data repository located at http://cicresearch.ca/CICDataset/CICDDoS2019 (accessed on 12 July 2025) and http://cicresearch.ca/CICDataset/CIC-IDS-2017 (accessed on 21 March 2026).

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

    The following abbreviations are used in this manuscript:
DDoSDistributed denial-of-service
DoSDenial-of-service
MLMachine Learning
DTDecision Tree
RFRandom Forest
XGBoostExtreme Gradient Boost
SVMSupport Vector Machine
LRLogistic Regression
RFERecursive Feature Elimination
TFTPTrivial File Transfer Protocol
MSSQLMicrosoft Structured Query Language Server
NetBIOSNetwork Basic Input/Output System
UDPUser Datagram Protocol
SNMPSimple Network Management Protocol
DNSDomain Name System
LDAPLightweight Directory Access Protocol
SSDPSimple Service Discovery Protocol
NTPNetwork Time Protocol
HTTPHypertext Transfer Protocol
CSVComma-separated value
CICCanadian Institute for Cybersecurity
UNBUniversity of New Brunswick
DARPADefense Advanced Research Projects Agency
SHAPSHapley Additive exPlanations

Appendix A

Algorithm A1 Algorithm used to calculate the training time of a pipeline
  • train_start ← time.perf_counter()
  • trained_model ← training_function()
  • train_end ← time.perf_counter()
Algorithm A2 Algorithm used to calculate the inference time of a pipeline
  • infer_start ← time.perf_counter()
  • predictions ← inference_function(trained_model)
  • infer_end ← time.perf_counter()
Algorithm A3 Algorithm used to calculate the CPU time of a pipeline
  • process ← psutil.Process()
  • start_cpu_t ← process.cpu_times()
  • start_total_cpu ← start_cpu_t.user + start_cpu_t.system
  • end_cpu_t ← process.cpu_times()
  • end_total_cpu ← end_cpu_t.user + end_cpu_t.system
Algorithm A4 Algorithm used to track the average and peak memory usage of a pipeline
 process ← psutil.Process()
 mem_samples ← []
 keep_running ← true
Function monitor
while keep_running do
     mem_delta ← process.memory_info().rss
     mem_samples.append(mem_delta)
     time.sleep(sleep_interval)
end while
End Function
 t ← threading.Thread(target=monitor)
 t.start()
 …
 keep_running ← False
 t.join()
 avg_mem_kb ← float(np.mean(mem_samples)/1024)
 peak_mem_kb ← float(np.max(mem_samples)/1024)

References

  1. Kemp, S. Digital 2025: Global Overview Report. 2025. Available online: https://datareportal.com/reports/digital-2025-global-overview-report (accessed on 18 June 2025).
  2. Arctic Wolf. The Big Business of Cybercrime. 2025. Available online: https://arcticwolf.com/business-of-cybercrime (accessed on 20 June 2025).
  3. U.S. Attorney’s Office, Central District of California. Law Enforcement Seizes 9 DDoS-for-Hire Webpages as Part of Global Crackdown on ‘Booter’ and ‘Stresser’ DDoS Services. 2025. Available online: https://www.justice.gov/usao-cdca/pr/law-enforcement-seizes-9-ddos-hire-webpages-part-global-crackdown-booter-and-stresser (accessed on 21 June 2025).
  4. Zand, A.; Modelo-Howard, G.; Tongaonkar, A.; Lee, S.-J.; Kruegel, C.; Vigna, G. Demystifying ddos as a service. IEEE Commun. Mag. 2017, 55, 14–21. [Google Scholar] [CrossRef]
  5. Santanna, J.J.; van Rijswijk-Deij, R.; Hofstede, R.; Sperotto, A.; Wierbosch, M.; Granville, L.Z.; Pras, A. Booters—An analysis of DDoS-as-a-service attacks. In Proceedings of the IFIP/IEEE International Symposium on Integrated Network Management (IM), Ottawa, ON, Canada, 11–15 May 2015; pp. 243–251. [Google Scholar] [CrossRef]
  6. Sharafaldin, I.; Lashkari, A.H.; Hakak, S.; Ghorbani, A.A. Developing realistic distributed denial of service (Ddos) attack dataset and taxonomy. In Proceedings of the International Carnahan Conference on Security Technology (ICCST), Chennai, India, 1–3 October 2019; pp. 1–8. [Google Scholar] [CrossRef]
  7. Abiramasundari, S.; Ramaswamy, V. Distributed denial-of-service (DDoS) attack detection using supervised machine learning algorithms. Sci. Rep. 2025, 15, 13098. [Google Scholar] [CrossRef] [PubMed]
  8. Ahmad Najar, A.; Manohar Naik, S. Applying Supervised Machine Learning Techniques to Detect DDoS Attacks. In Proceedings of the 2022 2nd Asian Conference on Innovation in Technology (ASIANCON), Ravet, India, 26–28 August 2022; pp. 1–7. [Google Scholar] [CrossRef]
  9. Hosseini, S.; Azizi, M. The hybrid technique for DDoS detection with supervised learning algorithms. Comput. Netw. 2019, 158, 35–45. [Google Scholar] [CrossRef]
  10. Acharjee Apu, A.; Islam, N. A DDoS Attack Detection Technique Using Supervised Machine Learning Algorithms. SSRN J. 2024. [Google Scholar] [CrossRef]
  11. Polat, H.; Polat, O.; Cetin, A. Detecting DDoS Attacks in Software-Defined Networks Through Feature Selection Methods and Machine Learning Models. Sustainability 2020, 12, 1035. [Google Scholar] [CrossRef]
  12. Alduailij, M.; Khan, Q.W.; Tahir, M.; Sardaraz, M.; Alduailij, M.; Malik, F. Machine-Learning-Based DDoS Attack Detection Using Mutual Information and Random Forest Feature Importance Method. Symmetry 2022, 14, 1095. [Google Scholar] [CrossRef]
  13. Becerra-Suarez, F.L.; Fernández-Roman, I.; Forero, M.G. Improvement of Distributed Denial of Service Attack Detection through Machine Learning and Data Processing. Mathematics 2024, 12, 1294. [Google Scholar] [CrossRef]
  14. Hatamian, A.; Levine, L.; Oskouie, H.E.; Sarrafzadeh, M. Exploring the Impact of Dataset Statistical Effect Size on Model Performance and Data Sample Size Sufficiency. arXiv 2025, arXiv:2501.02673. [Google Scholar] [CrossRef]
  15. University of California Irvine. KDD Cup 1999 Data. 1999. Available online: https://kdd.ics.uci.edu/databases/kddcup99/kddcup99.html (accessed on 13 December 2025).
  16. Tavallaee, M.; Bagheri, E.; Lu, W.; Ghorbani, A.A. A detailed analysis of the KDD CUP 99 data set. In Proceedings of the IEEE Symposium on Computational Intelligence for Security and Defense Applications, Ottawa, ON, Canada, 8–10 July 2009; pp. 1–6. [Google Scholar] [CrossRef]
  17. Moustafa, N.; Slay, J. UNSW-NB15: A comprehensive data set for network intrusion detection systems (UNSW-NB15 network data set). In Proceedings of the Military Communications and Information Systems Conference (MilCIS), Canberra, ACT, Australia, 10–12 November 2015; pp. 1–6. [Google Scholar] [CrossRef]
  18. Sharafaldin, I.; Lashkari, A.H.; Ghorbani, A.A. Toward Generating a New Intrusion Detection Dataset and Intrusion Traffic Characterization. In Proceedings of the 4th International Conference on Information Systems Security and Privacy (ICISSP), Funchal, Portugal, 22–24 January 2018. [Google Scholar]
  19. Siddique, K.; Akhtar, Z.; Aslam Khan, F.; Kim, Y. Kdd cup 99 data sets: A perspective on the role of data sets in network intrusion detection research. Computer 2019, 52, 41–51. [Google Scholar] [CrossRef]
  20. Moustafa, N.; Slay, J. The evaluation of Network Anomaly Detection Systems: Statistical analysis of the UNSW-NB15 data set and the comparison with the KDD99 data set. Inf. Secur. J. Glob. Perspect. 2016, 25, 18–31. [Google Scholar] [CrossRef]
  21. Kira, K.; Rendell, L.A. A practical approach to feature selection. In Machine Learning Proceedings 1992; Elsevier Inc.: Amsterdam, The Netherlands, 1992; pp. 249–256. [Google Scholar] [CrossRef]
  22. Jović, A.; Brkić, K.; Bogunović, N. A review of feature selection methods with applications. In Proceedings of the 38th International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia, 25–29 May 2015; pp. 1200–1205. [Google Scholar] [CrossRef]
  23. Kim, M. Supervised Learning-based DDoS Attacks Detection: Tuning Hyperparameters. ETRI J. 2019, 41, 560–573. [Google Scholar] [CrossRef]
  24. Mortaz, E. Imbalance accuracy metric for model selection in multi-class imbalance classification problems. Knowl.-Based Syst. 2020, 210, 106490. [Google Scholar] [CrossRef]
  25. Cloudflare. Shelter-in-Place Has Alerted the DDoS Landscape. 2020. Available online: https://www.cloudflare.com/ddos-landscape (accessed on 21 August 2025).
  26. Baruwal Chhetri, M.; Tariq, S.; Singh, R.; Jalalvand, F.; Paris, C.; Nepal, S. Towards Human-AI Teaming to Mitigate Alert Fatigue in Security Operations Centres. ACM Trans. Internet Technol. 2024, 24, 12. [Google Scholar] [CrossRef]
  27. Liu, Z.; Wang, Y.; Feng, F.; Liu, Y.; Li, Z.; Shan, Y. A DDoS Detection Method Based on Feature Engineering and Machine Learning in Software-Defined Networks. Sensors 2023, 23, 6176. [Google Scholar] [CrossRef] [PubMed]
  28. Agostinello, D.; Genovese, A.; Piuri, V. Anomaly-based intrusion detection system for ddos attack with deep learning techniques. In Proceedings of the 20th International Conference on Security and Cryptography, Rome, Italy, 10–12 July 2023; pp. 267–275. [Google Scholar] [CrossRef]
  29. Lashkari, A.H.; Gil, G.D.; Mamun, M.S.I.; Ghorbani, A.A. Characterization of tor traffic using time based features. In Proceedings of the 3rd International Conference on Information Systems Security and Privacy, Porto, Portugal, 19–21 February 2017; pp. 253–262. [Google Scholar] [CrossRef]
  30. University of New Brunswick. DDoS Evaluation Dataset (CIC-DDoS2019). Available online: https://www.unb.ca/cic/datasets/ddos-2019.html (accessed on 16 October 2025).
  31. Rainio, O.; Teuho, J.; Klén, R. Evaluation metrics and statistical tests for machine learning. Sci. Rep. 2024, 14, 6086. [Google Scholar] [CrossRef] [PubMed]
  32. Cortes, C.; Vapnik, V. Support-vector networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef]
  33. Breiman, L.; Friedman, J.; Olshen, R.A.; Stone, C.J. Classification and Regression Trees; Chapman and Hall/CRC: New York, NY, USA, 2017. [Google Scholar]
  34. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
  35. Chen, T.; Guestrin, C. XGBoost: A Scalable Tree Boosting System. In Proceedings of the KDD’16: The 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016. [Google Scholar]
  36. Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine learning in python. J. Mach. Learn. Res. 2011, 12, 2825–2830. Available online: http://jmlr.org/papers/v12/pedregosa11a.html (accessed on 3 August 2025).
  37. Lundberg, S.; Su-In, L. A Unified Approach to Interpreting Model Predictions. In Proceedings of the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017; Available online: http://papers.nips.cc/paper/7062-a-unified-approach-to-interpreting-model-predictions.pdf (accessed on 20 March 2026).
Figure 1. Data preprocessing workflow illustrating the order of operations including label consolidation, feature filtering, handling of missing and infinite values and final scaling and encoding applied to the sampled dataset.
Figure 1. Data preprocessing workflow illustrating the order of operations including label consolidation, feature filtering, handling of missing and infinite values and final scaling and encoding applied to the sampled dataset.
Mca 31 00062 g001
Figure 2. Heatmap illustrating the Spearman correlation coefficients between all tracked metrics.
Figure 2. Heatmap illustrating the Spearman correlation coefficients between all tracked metrics.
Mca 31 00062 g002
Figure 3. Beeswarm plot showcasing the SHAP analysis conducted on features of the champion pipeline.
Figure 3. Beeswarm plot showcasing the SHAP analysis conducted on features of the champion pipeline.
Mca 31 00062 g003
Figure 4. Plot indicating the relative percentage contribution of each of the top features to the champion pipeline’s predictions on the CIC-DDoS2019_25K dataset.
Figure 4. Plot indicating the relative percentage contribution of each of the top features to the champion pipeline’s predictions on the CIC-DDoS2019_25K dataset.
Mca 31 00062 g004
Table 1. Popular datasets used within the DDoS attack detection literature.
Table 1. Popular datasets used within the DDoS attack detection literature.
NameYearSource
KDD99 [15]1999Defense Advanced Research Projects Agency (DARPA)
NSL-KDD [16]2009University of New Brunswick (UNB) and Canadian Institute for Cybersecurity (CIC)
UNSW-NB15 [17]2015University of New South Wales (UNSW)
CIC-IDS2017 [18]2017University of New Brunswick (UNB) and Canadian Institute for Cybersecurity (CIC)
CIC-DDoS2019 [6]2019University of New Brunswick (UNB) and Canadian Institute for Cybersecurity (CIC)
Table 2. Number of rows in the dataset by attack type before and after applying the sampling approach.
Table 2. Number of rows in the dataset by attack type before and after applying the sampling approach.
Attack TypeNo. of Rows (Before)No. of Rows (After)
TFTP20,107,8277128
MSSQL10,300,8243659
NetBIOS7,550,8852750
UDP6,919,0082484
SYN5,903,2222296
SNMP5,161,3771831
DNS5,074,4131800
LDAP4,924,7761453
SSDP2,611,374926
NTP1,217,007427
UDPLag725,165131
Portmap191,69466
Total70,313,80924,951
Table 3. Dataset shape, missing value count and duplicate row count before and after each pre-processing stage.
Table 3. Dataset shape, missing value count and duplicate row count before and after each pre-processing stage.
StageShapeNo. of Missing ValuesNo. of Duplicate Rows
Unprocessed Data(24,992, 88)970
Data Pruning(21,013, 63)930
Data Wrangling(20,304, 63)00
Deduplication(20,304, 62)00
Final(20,304, 62)00
Table 4. Number of rows in the dataset by class before and after pre-processing.
Table 4. Number of rows in the dataset by class before and after pre-processing.
ClassNo. of Rows (Before)No. of Rows (After)
BENIGN4139
MALICIOUS24,95120,265
Total24,99220,304
Table 5. Pipeline configuration options that were explored in the study.
Table 5. Pipeline configuration options that were explored in the study.
ComponentOptions
Feature Selection (FS)SelectKBest, VarianceThreshold and RFE
Hyperparameter Tuning (HT)GridSearchCV and RandomizedSearchCV
Train–Test Ratios (TTR)90-10, 85-15, 80-20, 75-25, 70-30, 65-35, 60-40
Table 6. Parameter grids used for classification algorithms and feature selection methods in this study.
Table 6. Parameter grids used for classification algorithms and feature selection methods in this study.
ClassifierOptions
Random Forestn_estimators: [100, 200]
max_depth: [1, 5, 10]
max_features: [’sqrt’, ’log2’]
Decision Treemax_depth: [1, 5, 10]
criterion: [’gini’, ’entropy’]
Support Vector MachineC: [0.1, 1]
Extreme Gradient Boostinglearning_rate: [0.01, 0.1]
max_depth: [2, 3]
max_leaves: [2, 3]
Logistic RegressionC: [0.001, 0.01, 0.1]
(solver = ’sag’, max_iter = 20,000, random_state = 42)
SelectorOptions
SelectKBestk: [10, 20]
score_func: [f_classif, mutual_info_classif]
VarianceThresholdthreshold: [0.1, 0.5, 1.0]
RFEn_features_to_select: [10, 20]
(estimator = DecisionTreeClassifier(), step = 6)
Table 7. Comparison of classifiers across all pipelines with key metrics averaged and reported.
Table 7. Comparison of classifiers across all pipelines with key metrics averaged and reported.
ClassifierAvg. MCCAvg. Training TimeAvg. Inference TimeAvg. CPU TimeAvg. Memory Usage
RF0.7893613.356670.010141.3151979
DT0.737023.651170.002060.2631388
XGBoost0.624346.094750.003091.5702547
SVM0.069312.978310.024760.8054304
LR0.0606288.296000.0022715.6371605
Table 8. Comparison of feature selectors across all pipelines with key metrics averaged and reported.
Table 8. Comparison of feature selectors across all pipelines with key metrics averaged and reported.
Feature SelectorAvg. MCCAvg. Training TimeAvg. Inference TimeAvg. CPU TimeAvg. Memory Usage
SelectKBest0.5164925.392730.006363.8672840
RFE0.4504611.410380.007442.2392103
VarianceThreshold0.4014431.823030.011595.6472151
Table 9. Comparison of hyperparameter tuning techniques across all pipelines with key metrics averaged and reported.
Table 9. Comparison of hyperparameter tuning techniques across all pipelines with key metrics averaged and reported.
TunerAvg. MCCAvg. Training TimeAvg. Inference TimeAvg. CPU TimeAvg. Memory Usage
Grid0.5001733.354230.008353.9961547
Random0.4120912.396530.008583.8403182
Table 10. Pipelines ranked by composite score with top 10 reported.
Table 10. Pipelines ranked by composite score with top 10 reported.
PipelineComposite Score
DT_VarianceThreshold_Grid_90-100.980111
RF_RFE_Grid_85-150.961469
DT_RFE_Grid_90-100.959835
DT_RFE_Grid_85-150.959645
RF_RFE_Grid_80-200.957575
DT_RFE_Grid_80-200.954237
RF_RFE_Grid_90-100.947317
DT_VarianceThreshold_Grid_75-250.939987
XGBoost_VarianceThreshold_Grid_85-150.935331
DT_SelectKBest_Grid_90-100.933228
Table 11. Top-performing pipelines for each predictive metric. An X indicates a pipeline identified as top-performing by the Nemenyi post hoc tests.
Table 11. Top-performing pipelines for each predictive metric. An X indicates a pipeline identified as top-performing by the Nemenyi post hoc tests.
PipelineMCCF1AccuracyPrecisionRecall
DT_RFE_Grid_90-10XXXXX
DT_VarianceThreshold_Grid_90-10
DT_SelectKBest_Grid_90-10 X
DT_RFE_Grid_85-15XXXXX
DT_RFE_Grid_80-20XXXXX
DT_VarianceThreshold_Grid_75-25
RF_RFE_Grid_90-10 X
RF_RFE_Grid_80-20 X
RF_RFE_Grid_85-15X XXX
XGBoost_VarianceThreshold_Grid_85-15
Table 12. Top-performing pipelines for each computational metric. An X indicates a pipeline identified as top-performing by the Nemenyi post hoc tests.
Table 12. Top-performing pipelines for each computational metric. An X indicates a pipeline identified as top-performing by the Nemenyi post hoc tests.
PipelineCPU TimeAvg. Mem UsageTraining TimeInference Time
DT_RFE_Grid_90-10 X
DT_VarianceThreshold_Grid_90-10
DT_SelectKBest_Grid_90-10 X
DT_RFE_Grid_85-15
DT_RFE_Grid_80-20
DT_VarianceThreshold_Grid_75-25X
RF_RFE_Grid_90-10 X
RF_RFE_Grid_80-20
RF_RFE_Grid_85-15
XGBoost_VarianceThreshold_Grid_85-15
Table 13. Confusion matrix of champion pipeline (DT_RFE_Grid_90-10).
Table 13. Confusion matrix of champion pipeline (DT_RFE_Grid_90-10).
Actual/PredictedPositiveNegative
PositiveTP = 2026FN = 0
NegativeFP = 0TN = 5
Table 14. Frequency of features among the top 10 pipelines where the feature appears in more than half of the top 10 pipelines.
Table 14. Frequency of features among the top 10 pipelines where the feature appears in more than half of the top 10 pipelines.
Feature(s)Frequency
Idle Min10
Active Mean, Active Max, Active Min, Idle Mean, Idle Std, Idle Max9
Source Port, Destination Port8
Inbound7
Avg Bwd Segment Size, Subflow Bwd Bytes6
Table 15. Comparison of performance of the champion pipeline (DT_RFE_Grid_90-10) on the subset of the CIC-DDoS2019 dataset (CIC-DDoS2019_25K) used vs unseen dataset that is a subset of the CIC-IDS2017 dataset (CIC-IDS2017_25K) with mean and standard deviation reported for each metric.
Table 15. Comparison of performance of the champion pipeline (DT_RFE_Grid_90-10) on the subset of the CIC-DDoS2019 dataset (CIC-DDoS2019_25K) used vs unseen dataset that is a subset of the CIC-IDS2017 dataset (CIC-IDS2017_25K) with mean and standard deviation reported for each metric.
MetricCIC-DDoS2019_25KCIC-IDS2017_25K
MCC 0.8348 ± 0.1534 0.1441 ± 0.3059
F1 0.9997 ± 0.0002 0.4253 ± 0.2241
Accuracy 0.9994 ± 0.0005 0.2903 ± 0.1526
Precision 0.9997 ± 0.0004 0.7988 ± 0.4210
Recall 0.9998 ± 0.0003 0.2898 ± 0.1527
CPU Time 0.0000 ± 0.0000 0.0000 ± 0.0000
Avg. Memory Usage 20.4 ± 1.3 20.0 ± 0.0
Inference Time 0.0008 ± 0.0000 0.0029 ± 0.0002
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Kwiecien, A.; Saeed, W. An Evaluation of Supervised Machine Learning Pipelines for the Identification of Distributed Denial-of-Service Attacks Using Conventional and Computational Performance Metrics. Math. Comput. Appl. 2026, 31, 62. https://doi.org/10.3390/mca31020062

AMA Style

Kwiecien A, Saeed W. An Evaluation of Supervised Machine Learning Pipelines for the Identification of Distributed Denial-of-Service Attacks Using Conventional and Computational Performance Metrics. Mathematical and Computational Applications. 2026; 31(2):62. https://doi.org/10.3390/mca31020062

Chicago/Turabian Style

Kwiecien, Adrian, and Waddah Saeed. 2026. "An Evaluation of Supervised Machine Learning Pipelines for the Identification of Distributed Denial-of-Service Attacks Using Conventional and Computational Performance Metrics" Mathematical and Computational Applications 31, no. 2: 62. https://doi.org/10.3390/mca31020062

APA Style

Kwiecien, A., & Saeed, W. (2026). An Evaluation of Supervised Machine Learning Pipelines for the Identification of Distributed Denial-of-Service Attacks Using Conventional and Computational Performance Metrics. Mathematical and Computational Applications, 31(2), 62. https://doi.org/10.3390/mca31020062

Article Metrics

Back to TopTop