Towards Autonomous Cybersecurity: An Intelligent AutoML Framework for Autonomous Intrusion Detection
Li Yang Abdallah Shami



§ ABSTRACT 
The rapid evolution of mobile networks from 5G to 6G has necessitated the development of autonomous network management systems, such as Zero-Touch Networks (ZTNs). However, the increased complexity and automation of these networks have also escalated cybersecurity risks. Existing Intrusion Detection Systems (IDSs) leveraging traditional Machine Learning (ML) techniques have shown effectiveness in mitigating these risks, but they often require extensive manual effort and expert knowledge. To address these challenges, this paper proposes an Automated Machine Learning (AutoML)-based autonomous IDS framework towards achieving autonomous cybersecurity for next-generation networks. To achieve autonomous intrusion detection, the proposed AutoML framework automates all critical procedures of the data analytics pipeline, including data pre-processing, feature engineering, model selection, hyperparameter tuning, and model ensemble. Specifically, it utilizes a Tabular Variational Auto-Encoder (TVAE) method for automated data balancing, tree-based ML models for automated feature selection and base model learning, Bayesian Optimization (BO) for hyperparameter optimization, and a novel Optimized Confidence-based Stacking Ensemble (OCSE) method for automated model ensemble. The proposed AutoML-based IDS was evaluated on two public benchmark network security datasets, CICIDS2017 and 5G-NIDD, and demonstrated improved performance compared to state-of-the-art cybersecurity methods. This research marks a significant step towards fully autonomous cybersecurity in next-generation networks, potentially revolutionizing network security applications.



<ccs2012>
   <concept>
       <concept_id>10002978.10003014</concept_id>
       <concept_desc>Security and privacy Network security</concept_desc>
       <concept_significance>500</concept_significance>
       </concept>
   <concept>
       <concept_id>10002978.10002997</concept_id>
       <concept_desc>Security and privacy Intrusion/anomaly detection and malware mitigation</concept_desc>
       <concept_significance>500</concept_significance>
       </concept>
   <concept>
       <concept_id>10010147.10010257</concept_id>
       <concept_desc>Computing methodologies Machine learning</concept_desc>
       <concept_significance>500</concept_significance>
       </concept>
 </ccs2012>


[500]Security and privacy Network security
[500]Security and privacy Intrusion/anomaly detection and malware mitigation
[500]Computing methodologies Machine learning


Field Theory of Non-Newtonian Turbulence
    Esteban Calzetta
    September 9, 2024
========================================






§ INTRODUCTION

The progression of mobile networks has played a pivotal role in the digital revolution, with each generation bringing forth new technologies and capabilities. The fifth-generation (5G) networks have significantly enhanced mobile broadband and enabled massive machine-type communications with ultra-reliable low latency <cit.>. 5G networks leverages abstraction and virtualization techniques, such as Software-Defined Networking (SDN), Network Function Virtualization (NFV), and Network Slicing (NS), to provide flexible, efficient, and automated network management and services <cit.>.

For the evolution from 5G to the sixth generation (6G) networks, network automation has become a necessity to meet the unprecedented demand for future network applications. 6G networks are expected to leverage Artificial Intelligence (AI), Machine Learning (ML), and automation techniques to provide functional modules and operational services, leading to self-organizing and autonomous networks <cit.>. Previous researchers have extensively dedicated efforts to developing network automation architectures, including Intent-Based Network Management (IBN), Self-Organizing Network Management (SON), and Autonomic Network Management (ANM), etc. <cit.>. Recently, Zero-Touch Networks (ZTNs) were proposed by the European Telecommunications Standards Institute (ETSI) as a fully autonomous network management architecture with minimal human involvement <cit.>. Network automation solutions, including ZTNs, can effectively decrease network operational costs, enhance resource utilization efficiency, and mitigate the risks associated with human errors. 

On the other hand, as network and service management requires a trustworthy and reliable system, cybersecurity has become a critical component of next-generation networks. Modern networks are vulnerable to various cyber-attacks, such as Denial of Service (DoS), sniffing/eavesdropping, spoofing, web attacks, and botnets <cit.>. These threats can lead to severe consequences, including financial losses, disruption of critical services, compromise of sensitive information, and reputational damage <cit.>. Therefore, effective cybersecurity measures should be developed to enhance the security of modern networks, while autonomous cybersecurity solutions are essential for safeguarding future networks with high automation requirements.

AI/ML techniques are widely used in network applications to develop data-driven cybersecurity mechanisms such as Intrusion Detection Systems (IDSs) and anomaly detection systems, which can analyze network traffic patterns and identify anomalies or cyber-attacks <cit.>. AI/ML models have shown effectiveness in network data analytics and IDS development, due to their capability to large volumes of network data, identify complex patterns, and adapt to evolving threats. ML-based IDSs can detect malicious attacks and predict potential threats based on historical data, thereby triggering countermeasures or response mechanisms to safeguard against the detected attacks <cit.>. 

To ensure robust cybersecurity in next-generation networks, such as ZTNs, it is crucial to incorporate self-management functionalities that address security concerns, such as self-configuration, self-monitoring, self-healing, self-protection, and self-optimization <cit.>. To meet these requirements, autonomous cybersecurity solutions, such as autonomous IDSs, should be developed to automatically monitor network activities, detect network anomalies, and identify potential attacks.

Automated ML (AutoML) techniques, which are developed to automate the design and implementation of ML models, are promising solutions to realize network automation for ZTNs or future networks <cit.>. AutoML techniques offer the advantage of automating laborious and repetitive tasks involved in the ML and data analytics pipeline, such as data pre-processing, feature engineering, model selection, and hyperparameter tuning <cit.>. This automation can effectively reduce human effort, minimize the occurrence of human errors, and alleviate the need for extensive expert knowledge. In the cybersecurity domain, autonomous IDSs can be developed using AutoML techniques by automatically designing, tuning, and optimizing ML models that can effectively detect cyber-attacks and achieve self-monitoring and self-protection.

Therefore, this paper proposes an AutoML-based autonomous IDS framework to automatically detect malicious cyber-attacks for safeguading 5G and potential 6G networks. The proposed AutoML framework enables the automation of critical procedures of the ML/data analytics pipeline for intrusion detection. Specifically, it consists of: an Automated Data Pre-processing (AutoDP) component that focuses on automated data balancing using the Tabular Variational Auto-Encoder (TVAE) <cit.> method to address class-imbalance issues and improve data quality, an Automated Feature Engineering (AutoFE) component that automatically selects the most relevant features based on their average importance scores calculated using the Gini index and entropy metrics, an automated base model learning and selection component that automatically trains six tree-based machine learning models—Decision Tree (DT) <cit.>, Random Forest (RF) <cit.>, Extra Trees (ET) <cit.>, Extreme Gradient Boosting (XGBoost) <cit.>, Light Gradient Boosting Machine (LightGBM) <cit.>, and Categorical Boosting (CatBoost) <cit.>—and selects the top three best-performing models from them, a Hyper-Parameter Optimization (HPO) component that automatically tunes and optimizes the hyperparameters of the selected ML models using Bayesian Optimization with Tree-structured Parzen Estimator (BO-TPE) <cit.> to obtain optimized base models, and an automated model ensemble component that employs the proposed novel Optimized Confidence-based Stacking Ensemble (OCSE) method to generate the meta-learner for final intrusion detection. Overall, the proposed AutoML-based IDS can automatically process network data and generate optimized ML models capable of detecting various types of cyber-attacks to safeguard current and future networks.

This paper presents the following key contributions:


  * It proposes a novel and comprehensive AutoML framework[
Code for this paper is publicly available at: <https://github.com/Western-OC2-Lab/AutonomousCyber-AutoML-based-Autonomous-Intrusion-Detection-System>]. that enables fully autonomous intrusion detection in next-generation networks, holding the potential to achieve fully autonomous cybersecurity. 

  * It proposes a novel automated data balancing method based on TVAE and class distribution exploration. 

  * It proposes a novel ensemble learning method, OCSE, which extends the traditional stacking ensemble method by incorporating confidence values of classes and the BO-TPE method for model optimization. 

  * It assesses the proposed AutoML-based IDS model using two public benchmark network security datasets, CICIDS2017 <cit.> and 5G-NIDD <cit.> datasets, which contain state-of-the-art cyber-attack scenarios.

  * It compares the performance of the proposed AutoML-based IDS model with state-of-the-art methods. 




To the best of our knowledge, no previous research has proposed such a comprehensive autonomous IDS model that leverages AutoML to automate all essential network data analytics procedures, ensuring efficient and automatic detection of diverse cyber-attacks for safeguarding 5G and next-generation networks.

The paper is structured as follows: Section 2 introduces the related work using AI/ML and AutoML-based methods for developing IDSs and cybersecurity mechanisms. Section 3 presents a detailed description of the proposed AutoML-based IDS framework, including AutoDP, AutoFE, automated base model selection, HPO, and automated model ensemble. Section 4 presents and discusses the experimental results of evaluating the proposed framework on benchmark network datasets. Finally, Section 5 summarizes the paper.




§ RELATED WORK


AI/ML models have been extensively applied in recent years to the development of IDSs for modern networks. This related work section aims to provide an overview of the critical studies that have contributed to the development and advancement of IDSs using ML and AutoML models for future networks.






 §.§ AI/ML-based IDSs

Research on developing IDSs using AI/ML models has gained significant attention and importance, as threat hunting and cyber-attack detection are critical components of cybersecurity systems for modern networks.

Traditional AI/ML algorithms have demonstrated their effectiveness in intrusion detection, especially tree-based algorithms such as DT and RF. Sharafaldin et al. <cit.> created the benchmark network security dataset, CICIDS2017, and observed that the DT and RF algorithms outperformed the other compared ML models on this dataset. Maseer et al. <cit.> proposed a ML-based benchmarking Anomaly-based IDS (AIDS) approach that develops ten typical supervised and unsupervised ML models and evaluates their performance on the CICIDS2017 dataset. The experimental results illustrate that the DT and K-Nearest Neighbor (KNN) based AIDS models perform the best on the CICIDS2017 dataset among the evaluated ML models. Yang et al. <cit.> proposed a Multi-Tiered Hybrid IDS (MTH-IDS) framework for intrusion detection in vehicular networks. It incorporates both supervised learning algorithms (DT, RF, ET, and XGBoost) and unsupervised learning methods (k-means) to detect multiple types of cyber-attacks. They evaluated their framework on the CAN-intrusion dataset and the CICIDS2017 dataset to emphasize the model's effectiveness.

The utilization of Deep Learning (DL) methods in the development of IDSs has become prevalent due to their effectiveness in handling high-dimensional network traffic data. Agrafiotis et al. <cit.> proposed the embeddings and Fully-Connected network (Embeddings & FC) model to detect malware traffic in 5G networks. This IDS model employs the Long Short-Term Memory Autoencoders (LSTM-AE) to transform packets into embeddings and uses the Fully-Connected (FC) network model to identify attacks. The Embeddings & FC IDS demonstrates improved accuracy when applied to the 5G-NIDD dataset, a dedicated dataset for 5G networks. Tayfour et al. <cit.> proposed a DL-LSTM method supported by Software-Defined Networking (SDN) to detect cyber-attacks in the Internet of Things (IoT) and 5G networks. The DL-LSTM model achieved high accuracy on the CICIDS2017 dataset, demonstrating the effectiveness of deep learning in network intrusion detection. He et al. <cit.> proposed a Pyramid Depthwise Separable Convolution neural network-based IDS (PyDSC-IDS) for network intrusion detection. The PyDSC-IDS model uses Pyramid convolution (PyConv) to extract features from data and Depthwise Separable Convolution (DSC) to reduce model complexity. Compared with other DL models, PyDSC-IDS achieves higher detection accuracy with only a small increase in complexity on the NSL-KDD, UNSW-NB15, and CICDIDS2017 datasets.

Due to the robustness of tree-based ML algorithms in handling large-scale, high-dimensional, and non-linear network data, they are utilized as base models in the proposed framework for intrusion detection. While DL models offer powerful data analysis capabilities, they often come with higher computational complexity compared to traditional ML algorithms. To mitigate the impact of this challenge, the proposed framework employs the TVAE method, a DL model, only for synthesizing samples for minority classes. This approach proves to be more efficient than using it for intrusion detection, as processing minority class samples is significantly faster than dealing with the entire large dataset. Furthermore, the development of traditional ML/DL models for intrusion detection poses several critical challenges, such as manual effort, human bias & errors, and expertise requirements. These challenges underscore the importance of automating AI/ML models and developing autonomous IDSs.




 §.§ AutoML-based IDSs

AutoML techniques are promising solutions to develop autonomous IDSs by automating the tedious procedures in the data analytics/ML pipeline. While AutoML is a relatively new research area in IDS development, several recent works have already employed AutoML techniques to create autonomous IDSs for modern networks. Yang et al. <cit.> provided a comprehensive discussion on the general and specific procedures of applying AutoML techniques to IoT data analytics and conducted a case study to employ AutoML for IoT intrusion detection tasks. Khan et al. <cit.> proposed an Optimized Ensemble IDS (OE-IDS) for intrusion detection in network environments. It automates the hyperparameter tuning process of four supervised ML algorithms and uses them to develop an ensemble model based on a soft-voting method. The OE-IDS model achieved better accuracy and F1-scores than most other compared traditional ML models on the CICIDS2017 and UNSW-NB15 datasets. Elmasry et al. <cit.> proposed a double PSO and DL-based IDS for network intrusion detection. It involves the Particle Swarm Optimization (PSO) method to select features and tune hyperparameters of three DL methods: Deep Neural Networks (DNN), LSTM, and Deep Belief Networks (DBN). This IDS model outperforms other compared methods in terms of accuracy and detection rate on the CICIDS2017 dataset. Singh et al. <cit.> proposed AutoML-ID, an AutoML-based IDS designed for Wireless Sensor Networks (WSNs). The AutoML-ID approach focuses on simple automated ML model selection and hyperparameter optimization using Bayesian Optimization (BO). The model AutoML-ID was tested on a public IDS dataset, Intrusion-Data-WSN, and achieved better performance than traditional ML models. 

The existing literature has demonstrated the advantages of AutoML-based IDSs in improving performance and reducing human effort in intrusion detection and cybersecurity applications. However, many current AutoML-based IDS models only focus on automated model selection and hyperparameter optimization, leaving significant potential for improvement in other crucial stages of the AutoML pipeline. In our proposed AutoML framework, we aim to propose and develop techniques to automate every critical step in the data analytics pipeline, including the TVAE-based automated data balancing method in the AutoDP process to handle class imbalance issues, the tree-based averaging method in the AutoFE process to reduce noise and data complexity, automated model selection and BO-based hyperparameter optimization on tree-based ML algorithms to acquire optimized base models, and the proposed OCSE method for automated model ensemble to further enhance model performance. Table <ref> summarizes and compares the contributions of existing literature introduced in Section <ref>. 

Overall, this paper presents a generic, comprehensive, and fully automated AutoML framework for future networks with high automation requirements.




§ PROPOSED FRAMEWORK







 §.§ System Overview

The objective of this study is to develop an autonomous IDS model capable of detecting various cyber-attacks to safeguard 5G and potential 6G networks. The overall framework of the proposed AutoML-based IDS is demonstrated in Fig. <ref>, which comprises five stages: AutoDP, AutoFE, automated base model learning and selection, HPO, and automated model ensemble. During the initial stage, AutoDP, the input network traffic data undergoes pre-processing, where the proposed automated data balancing method identifies and addresses class-imbalance issues through the TVAE model to improve data quality. In the AutoFE stage, the most relevant features are automatically selected based on their importance scores calculated by the Gini index and entropy metrics using tree-based algorithms. This AutoFE process reduces data complexity and improves the generalization ability of the IDS model by minimizing noisy and redundant features. Subsequently, during the automated base model learning and selection stage, six tree-based ML algorithms (i.e., DT, RF, ET, XGBoost, LightGBM, and CatBoost) are trained and evaluated on the training set, and the top three best-performing models are automatically selected as the base models for further processing. In the HPO stage, the three selected ML models are further optimized through automated hyperparameter tuning or HPO using the BO-TPE method. In the automated model ensemble stage, the confidence values of all classes generated from the three optimized base models are integrated using the proposed OCSE model to obtain the final ensemble IDS model for final intrusion detection. 

Overall, this comprehensive AutoML-based framework enables the integration of advanced AutoML techniques across multiple stages,  collectively enhancing the detection capabilities and robustness of the proposed autonomous IDS model against various cyber threats for safeguarding next-generation networks.




 §.§ Automated Data Pre-Processing (AutoDP)

Data pre-processing is an essential stage in the ML and data analytics pipeline, since it directly influences the quality of input data and, consequently, the performance of ML models <cit.>. However, data pre-processing procedures can be tedious and time-consuming, often requiring massive human effort and expert knowledge. To address these challenges, Automated Data Pre-processing (AutoDP) has emerged as a critical component of AutoML that aims to automatically identify and address data quality issues in datasets, thereby ensuring that ML models can learn meaningful patterns from high-quality data <cit.>. 

In the proposed AutoML framework, the AutoDP component focuses on automated data balancing, a crucial aspect of data pre-processing that addresses class imbalance issues. Class imbalance is a common data quality issue in network data analytics and intrusion detection problems, as cyber-attacks or anomalies usually occur less frequently compared to benign or normal events, leading to a significant imbalance in class distribution. Class imbalance issues often bias ML models in IDS development, leading them to prioritize the detection of normal sample and common attacks and neglecting the less common but critical threats  <cit.>.

Data balancing techniques are designed to address class imbalance issues and can be classified into under-sampling and over-sampling techniques. Under-sampling methods alter the class distribution by eliminating instances from the majority classes to balance data, which can result in the loss of critical patterns of normal network activities <cit.>. On the other hand, over-sampling methods balance data by creating synthetic samples for the minority classes, which may slightly increase model training time but often outperform under-sampling methods. Therefore, over-sampling methods are considered in this research. 

Over-sampling methods can be broadly categorized into random and informed over-sampling methods <cit.>. Random over-sampling randomly replicates samples from the minority classes, while informed methods aim to generate higher-quality samples to improve the data balancing performance. In the proposed framework, the Tabular Variational Auto-Encoder (TVAE) <cit.> method is used as an informed over-sampling method to synthesize minority class samples to balance tabular network data. TVAE is a DL model that extends the capabilities of the traditional autoencoder by incorporating probabilistic modeling and adapting to tabular data <cit.>. TVAEs incorporate an encoder to project the input data 𝑥 as a probability distribution in the latent space 𝑧, denoted as q(𝑧|𝑥), and a decoder to reconstruct the data generation process as a probability distribution p(𝑥|𝑧). The objective function of TVAE is to maximize the Evidence Lower BOund (ELBO) on the log-likelihood of data, denoted by <cit.>:

    ELBO = 𝔼[log p(𝑥|𝑧)] - D_KL(q(𝑧|𝑥) || p(𝑧))

where D_KL is the Kullback-Leibler (KL) divergence, a measure of the difference between two probability distributions, and 𝔼 denotes the expectation.

To automate the data balancing procedure, the proposed AutoDP method consists of two procedures: automated class-imbalance detection and automated data synthesis. In the automated class-imbalance detection procedure, the system calculates three metrics in the training set: the number of classes, the number of samples in each class, and the average number of samples per class. Based on these three metrics, the system will identify minority classes that have fewer than a certain threshold, defined as half of the average number of samples per class in the training set, in the proposed framework. If there are minority classes indicating class imbalance, the system will automatically perform automated data synthesis by synthesizing minority class samples using the TVAE method until the number of samples in each minority class reaches the threshold (half of the average number of samples). The details of the proposed TVAE-based automated data balancing method are provided in Algorithm <ref>. Finally, a balanced training dataset is automatically obtained using the proposed AutoDP method, which involves generating high-quality minority class samples that better represent patterns of less common attacks, thereby assisting in effective IDS model development.






 §.§ Automated Feature Engineering (AutoFE)

After the AutoDP stage, Automated Feature Engineering (AutoFE) is another crucial component of the proposed AutoML framework. Feature Engineering (FE) involves extracting and selecting the most informative and relevant features from a dataset, as the original features are often suboptimal for specific datasets <cit.>. This process enhances the performance of ML models. AutoFE aims to automate the traditional FE process, minimizing human effort on FE tasks. In the proposed framework, AutoFE focuses on the Feature Selection (FS) process, aiming to identify and select the most relevant features to construct a highly efficient and accurate ML model. The proposed Automated FS (AutoFS) method is designed based on the feature importance scores generated by the tree-based algorithms used in the automated model learning process. 

To construct a DT in tree-based algorithms, features that result in significant reductions in Gini impurity or entropy will be assigned higher importance scores, as they have an important impact on the node-splitting process. Gini impurity and entropy are two common evaluation metrics to measure the impurity of nodes in DTs for classification problems to which intrusion detection problems belong <cit.>. The Gini index quantifies the impurity of a node by evaluating the probability of misclassifying a randomly selected element within that node. The Gini index is calculated as follows for a multi-class problem with K classes <cit.>: 

    Gini(p_1, p_2, …, p_K)=1-∑_i=1^K p_i^2


where p_1, p_2, …, p_k indicate the proportions of classes 1, 2, …, k.

Entropy is another impurity measure that calculates how much information is required to identify the class of a randomly selected element within a node <cit.>. The entropy for a multi-class problem with K classes can be denoted by: 

    Entropy(p_1, p_2, …, p_K)=-∑_i=1^K p_i log _2(p_i)


In the proposed AutoFE framework, the FS process is automated by leveraging the power of tree-based models, as they can automatically calculate the feature importance scores during their training process. The specific procedures of this AutoFS process are as follows:


  * Train the six tree-based ML models (DT, RF, ET, XGBoost, LightGBM, and CatBoost) on the training set and evaluate their performance.

  * Obtain the feature importance scores generated from the top three best-performing models.

  * Calculate the average relative importance score for each feature across the top three best-performing models.

  * Rank the features from highest to lowest based on these average importance scores.

  * Select features from the top of this ranked list, accumulating their importance scores until the sum reaches a predefined threshold, α (default value is 0.9).

  * Generate the updated training and test sets using the newly generated feature set that comprises the selected features.



By implementing the proposed AutoFE process, the most relevant features are selected based on their cumulative relative importance scores, ensuring a total of 90%. Simultaneously, features with a cumulative importance score below 10% are discarded, effectively reducing noise and computational complexity. The cumulative feature importance threshold, α, can be tuned using the optimization method presented in Section <ref> to customize it for specific tasks or problems. The proposed AutoFE process helps to simplify the model, reduce the risk of overfitting, improve computational efficiency, and increase model interpretability. 




 §.§ Automated Base Model Learning and Selection

After the AutoDP and AutoFE procedures, the improved network traffic datasets are learners by supervised ML algorithms to train ML-based IDS that can detect various types of cyber-attacks. Six tree-based ML models, i.e., DT, RF, ET, XGBoost, LightGBM, and CatBoost, are built as base models to perform the initial intrusion detection. 

DT <cit.> is a fundamental ML algorithm that makes predictions by learning decision rules inferred from the input features. The decision rules are formed in a tree structure, where each internal node represents a test on a feature, each branch denotes a test outcome, and each leaf node contains a class label <cit.>. The DT algorithm recursively partitions data by selecting the best splitting rule, creating child nodes based on the chosen criterion, and repeating this process until a stopping condition is met.

RF <cit.> is an ensemble learning model constructed on multiple DT models. RF works by generating a set of DTs from randomly selected subsets of the training set and then aggregates the votes from the base DTs to decide the final result based on the majority voting rule. 

ET <cit.> is another tree-based ensemble method constructed by combining multiple DTs. However, it randomizes both features and cut-point choices to construct completely randomized trees. As the splitting points in ETs are chosen randomly, the constructed trees in ETs are more diverse and less prone to over-fitting than in RF. 

XGBoost <cit.> is an ensemble model built on the speed and performance of the Gradient-Boosted Decision Trees (GBDT) model. XGBoost distinguishes itself from traditional gradient boosting methods by incorporating a regularization term into the objective function, which effectively controls the model's complexity, smooths the final weights, and mitigates overfitting <cit.>. Additionally, XGBoost uses a second-order Taylor expansion to estimate the loss function, enabling an accurate model update and fast convergence. 

LightGBM <cit.> is another improved version of the GBDT model with enhanced model performance and efficiency. Similar to other tree-based algorithms, LightGBM is constructed on an ensemble of DTs, but it introduces two advanced techniques, Gradient-based One-Side Sampling (GOSS) and Exclusive Feature Bundling (EFB) <cit.>. GOSS is a down-sampling approach that keeps instances with large gradients and randomly samples instances with small gradients to save model training time and memory. EFB groups mutually exclusive features into bundles as single features, reducing feature space dimensionality and improving training efficiency. By utilizing GOSS and EFB, LightGBM significantly reduces data size without losing critical information, preserving accuracy in the learning process and reducing computational cost.

CatBoost <cit.> is another GBDT-based algorithm that is particularly effective for datasets with categorical features. CatBoost distinguishes itself from traditional GBDT algorithms through three major innovations: symmetric trees, ordered boosting, and native feature support. Symmetric trees ensure that all the DTs in the model are symmetric, which simplifies the model and reduces the risk of overfitting. Ordered boosting is a novel boosting scheme that prevents overfitting on small-sized datasets. Native feature support allows CatBoost to handle categorical features for model performance enhancement natively.

The primary reasons for choosing these six tree-based algorithms as candidate base models are as follows:


  * RF, ET, XGBoost, LightGBM, and CatBoost are all ensemble models that combine multiple base DTs to improve model performance and robustness, and DT can serve as the baseline model for comparison. 

  * These methods are proficient at handling non-linear and high-dimensional data to which 5G network data belongs. 

  * They support parallel computation, which can significantly improve the training efficiency on large network datasets.

  * These tree-based ML algorithms offer the advantage of automatically calculating feature importance in their training process, which assists in efficient feature selection process in the proposed AutoFE method. 

  * These tree-based models incorporate randomness during their tree construction process, which enables the proposed framework to build a robust ensemble model with diverse base models and increased generalizability.




After training and evaluating the performance of these six tree-based models on the training set, the three best-performing models based on their cross-validated F1-scores are automatically selected as the three base models to construct the ensemble model discussed in Section <ref>.



 §.§ Hyper-Parameter Optimization (HPO)


Tuning hyper-parameters is a crucial step in deploying an effective ML model to a particular problem or dataset. Hyper-parameters of a ML model determine its architecture and have a direct effect on the performance of this ML model. The process of using optimization methods to automatically tune and optimize these hyper-parameters is known as Hyper-Parameter Optimization (HPO). In HPO or AutoML tasks, Given the hyperparameter search space X,  the goal is to find the optimal hyper-parameter value or configuration x^* that minimizes the objective function f(x) <cit.>:

    x^*=min _x∈ X f(x)


In the proposed AutoML framework, the important hyperparameters of the six tree-based algorithms are optimized during the HPO process. Utilizing terminology from the Scikit-Learn library, key hyperparameters for the Decision Tree (DT) include `max_depth', which sets the maximum tree depth; `min_samples_split', specifying the minimum number of samples required to split a node; and `min_samples_leaf', defining the minimum number of samples required at a leaf node. The `criterion' hyperparameter allows selection between Gini impurity and entropy to measure splitting quality. As RF and ET are ensemble models built using DTs, they inherit these four critical hyperparameters from DT. Additionally, RF and ET include the `n_estimators' hyperparameter, which determines the number of trees in the ensemble and significantly influences model performance and efficiency.

The number of base trees and maximum tree depth are two crucial hyperparameters shared by XGBoost, LightGBM, and CatBoost. Additionally, since these three algorithms are gradient-boosting models, the learning rate is another critical hyperparameter that significantly impacts their learning speed and overall performance.

Among the various optimization methods for HPO tasks, Bayesian Optimization (BO) methods have proven to be efficient <cit.>. BO leverages a posterior distribution, known as the surrogate, to describe the function under optimization. As more observations are made, the posterior distribution improves, which increases the certainty about promising regions in the parameter space worth exploring and the unpromising regions. Therefore, BO methods can determine future hyper-parameter evaluations based on the results of previous evaluations to avoid unnecessary model assessments <cit.>. 

The Tree Parzen Estimator (TPE) is a common surrogate for BO to model the evaluated configurations <cit.>. BO with TPE, or BO-TPE, can handle a tree-structured hyper-parameter search space using Parzen estimators, also known as kernel density estimators (KDEs) <cit.>. In BO-TPE, the hyper-parameter configuration space D is split into the better group D^(l) and the worse group D^(g) based on a top quantile y^*. The KDEs are estimated using a kernel function with a bandwidth that changes based on a provided dataset. The density functions of the configurations, modeled by TPE, can be denoted by <cit.>:

    p(x| y, D)= p(x| y, D^(l)),     if  y ≤ y^*, 
     p(x| y, D^(g)),     if  y>y^*,


The ratio between the two probability density functions is utilized to determine the new configurations for evaluation, facilitating the gradual identification of optimal configurations. BO-TPE is selected as the HPO method to tune and optimize the hyperparameters of the ML models in the proposed framework for the following reasons <cit.> <cit.>:


  * BO-TPE is effective for handling high-dimensional variables with multiple types, rendering it suitable for the tree-based ML methods utilized in the proposed framework, which involve numerous hyperparameters.

  * BO-TPE can handle tree-structured search spaces, enabling flexible and complex hyperparameter optimization, making it well-suited for the tree-based ML models employed in the proposed framework.

  * Unlike other HPO methods, like grid search, which treats each hyperparameter configuration independently and causes many unnecessary evaluations, BO-TPE enables more efficient HPO by exploring promising regions and determining new hyperparameter configurations based on previous evaluation results. 

  * BO-TPE has low time complexity of O(nlog n), where n is the number of hyperparameter configurations, which is much lower than other HPO methods, such as grid search, with time complexity of O(n^k) <cit.>.



By automatically tuning the hyperparameters of the three best-performing base ML models using BO-TPE, three optimized ML models with improved intrusion detection effectiveness are obtained for further analysis.



 §.§ Automated Model Ensemble






After selecting the top three best-performing tree-based models and optimizing their hyperparameters using BO-TPE, the three optimized models are utilized as base models to construct an ensemble model for further performance enhancement. Ensemble learning is an advanced technology that combines the prediction outcomes of multiple individual ML models to make final predictions <cit.>. Ensemble learning aims to improve model performance and generalizability by leveraging the collective knowledge of multiple models. 

In the last stage of the proposed AutoML framework, a novel Optimized Confidence-based Stacking Ensemble (OCSE) method is proposed to construct the final ensemble model by extending the traditional stacking ensemble strategy. Stacking is a widely-used ensemble learning method that comprises two layers of models. The first layer of stacking contains multiple trained base learners, and their output labels serve as the input for training a robust meta-learner in the second layer <cit.>. 

Compared with the traditional stacking method, the proposed OCSE method introduces two additional strategies: confidence inputs and optimization. Firstly, the three optimized base ML models provide a probability distribution over the target classes for each sample, which indicates the confidence of the models’ prediction for this sample. The confidence values output by the base models are used as input to the meta-learner in the second layer of the proposed OCSE model.


Secondly, the best-performing base model from the six tree-based models, based on the cross-validated F1-scores, is selected to construct the meta-learner. Its hyperparameters are optimized by BO-TPE to obtain the optimized meta-learner, following the same HPO process used for the base models, as described in Section <ref>. The specifications of the proposed OCSE method and the entire AutoML framework are illustrated in Algorithm  <ref>. 

The computational complexity of the proposed OCSE model is O(ncmh), where n is the number of samples, c is the number of unique classes, m is the number of base models, and h is the number of hyperparameter configurations of the meta-learner. In the proposed framework, c, m, and h are all relatively small numbers.

Compared with other ensemble techniques, the proposed OCSE method presents the following advantages: 


  * Utilization of Confidence: Unlike many existing ensemble techniques, such as bagging, boosting, and traditional stacking, which solely rely on the predicted labels to construct the ensemble model, the proposed OCSE method utilizes the confidence of all classes as input features, which provides more comprehensive information about the certainty of base model's predictions, resulting in more informed and robust ensemble predictions.

  * Automated and Optimized Models: The proposed OCSE method automatically selects the best-performing base model as the second-layer meta-learner and tunes its hyperparameters, resulting in an optimized final learner capable of achieving the optimal overall performance. The automation process also reduces the need for manual effort and saves time in model development.

  * Flexibility: OCSE is a flexible method in which both the base models and the meta-learner can be replaced with other ML algorithms to adapt to a wide range of tasks.







Overall, with the use of the novel OCSE method and all the other critical components described in this section, the proposed AutoML-based IDS framework can automatically generate an optimized ensemble model for effective and robust intrusion detection, serving as a key component for autonomous cybersecurity solutions.



§ PERFORMANCE EVALUATION



 §.§ Experimental Setup

The proposed AutoML-based IDS framework was developed in Python by extending the Scikit-Learn <cit.>, Xgboost <cit.>, Lightgbm <cit.>, Catboost <cit.>, Synthetic Data Vault (SDV) <cit.>, and Hyperopt <cit.> libraries. The experiments were performed on a Dell Precision 3630 computer equipped with an i7-8700 processor and 16 GB of memory, which served as the server machine in 5G and potential 6G networks.

To evaluate the proposed AutoML-based IDS framework, two public benchmark network traffic datasets, namely CICIDS2017 <cit.> and 5G-NIDD <cit.>, are utilized in the experiments. The CICIDS2017 dataset is one of the most comprehensive public cybersecurity datasets, created by simulating a real-world network environment and involves six primary types of attacks: DoS, botnets, brute force, infiltration, port scan, and web attacks <cit.>. The diverse attack scenarios and comprehensive feature set of the CICIDS2017 dataset make it suitable for network security applications. The 5G-NIDD dataset is one of the most state-of-the-art network security datasets developed in December 2022 <cit.>. This dataset was generated by capturing network traffic within a 5G testbed under diverse DoS and port scan cyber-attacks. The 5G-NIDD dataset is particularly suitable for our research, as it specifically targets 5G networks and enables the detection of new and sophisticated cyber-attacks.

To develop and evaluate the proposed AutoML-based IDS model, both cross-validation and hold-out validation methods are used in the experiments. The model training and optimization process utilizes five-fold cross-validation to automatically generate the optimized ensemble model, while the final model produced by the proposed AutoML framework is evaluated using an unseen test set, which is split from an 80%/20% hold-out validation during the initial stage of data pre-processing.

Due to the inherent class imbalance issues in network intrusion detection datasets, four model performance metrics—accuracy, precision, recall, and F1-scores—are considered collectively in the experiments. The F1-score is utilized as the primary performance metric in the performance-based automated model selection and tuning process of the proposed AutoML framework, as it offers a balanced view of anomaly detection results by calculating the harmonic mean of recall and precision. Additionally, the model execution time, involving the training and inference time of the final OCSE model, is utilized to assess the model's efficiency.




 §.§ Experimental Results and Discussion

As described in Section <ref>, the proposed AutoML-based IDS comprises five critical stages: AutoDP, AutoFE, automated base model learning and selection, HPO, and automated model ensemble. Initially, the proposed TVAE-based automated data balancing method applied in the AutoDP stage automatically balances the distributions of two datasets, CICIDS2017 and 5G-NIDD, to prevent model bias. During the AutoFE stage, important features are selected based on the average importance scores obtained from the three best-performing ML models, where the accumulative importance score reaches the threshold α=90%. These selected features, along with their relative importance scores for the CICIDS2017 and the 5G-NIDD datasets, are illustrated in Figs. <ref> and <ref>, respectively. Subsequently, the three top-performing ML models—RF, XGBoost, and LightGBM—are optimized by tuning their hyperparameters using BO-TPE. The hyperparameters tuned, their search spaces, and the optimal values obtained for these hyperparameters for both datasets are detailed in Table <ref>. Finally, the three optimized base ML models are integrated using the proposed OCSE model to automate the model ensemble, improving the decision-making effectiveness in intrusion detection.
 
The performance of the proposed AutoML-OCSE model and several state-of-the-art methods in the literature is provided in Table <ref> for the CICIDS2017 dataset and Table <ref> for the 5G-NIDD dataset. The performance is evaluated based on the metrics: accuracy, precision, recall, F1-score, training time, and average test time per sample. 
Firstly, as shown in Table <ref>, results on the CICIDS2017 dataset indicate that RF, XGBoost, and LightGBM perform better than the other three base models, DT, ET, and CatBoost. Hence, these three ML models are selected as the base models of the proposed AutoML-OCSE framework. 
After optimizing the hyperparameters of the three selected base models (as detailed in Table <ref>) and integrating their outputs using the proposed OCSE ensemble method, the final AutoML-OCSE model outperforms all the compared methods in the literature <cit.> <cit.> <cit.> <cit.> - <cit.>. The proposed method achieves the highest metrics on the CICIDS2017 dataset, with accuracy, precision, recall, and F1-score of 99.806%, 99.806%, 99.806%, and 99.804%, respectively.

Furthermore, the average test time per sample of the proposed AutoML-OCSE method is the fastest among the compared methods <cit.> <cit.> <cit.> <cit.> - <cit.>, highlighting its efficiency on network traffic datasets. Compared with state-of-the-art methods on the CICIDS2017 dataset, AutoML-OCSE demonstrates notable improvements in both accuracy and inference efficiency. These enhancements are attributed primarily to the AutoDP, AutoFE, HPO, and automated model ensemble procedures, which collectively enhance data quality, optimize machine learning models, and reduce feature and model complexity.


Similarly, as indicated in Table <ref>, the proposed AutoML-OCSE method outperforms all other compared methods <cit.> <cit.> - <cit.> <cit.> <cit.> on the 5G-NIDD dataset, achieving the highest accuracy, precision, recall, and F1 score, all at 99.956%. In terms of average test time per sample, the AutoML-OCSE method matches the fastest time set by the DT method, demonstrating an exceptional balance between performance and efficiency.

















Regarding the intrusion detection performance of the proposed AutoML-OCSE on the CICIDS2017 and 5G-NIDD datasets, while its accuracy and F1-score are only slightly higher than those of the best-performing base ML models, this is primarily attributed to the simplicity of these datasets, where many base ML models can achieve over 99% accuracy and F1-score. In real-world scenarios, where the complexity and variability of network traffic datasets are usually higher than those of public benchmarks, the proposed AutoML-based IDS is expected to demonstrate more significant improvements. This enhancement is due to every component of the proposed framework, including AutoDP, AutoFE, automated model selection, HPO, and automated model ensemble, each contributing to the overall enhancement of intrusion detection performance. Additionally, considering the error rate reduction, the proposed AutoML-OCSE method achieves significant decreases of approximately 15.65% and 24.13% in the error rates on the CICIDS2017 and 5G-NIDD datasets, respectively, calculated as 99.806% - 99.770%/100% - 99.770% and 99.956% - 99.942%/100% - 99.942%. 
Furthermore, without the proposed automated model selection method, researchers might resort to selecting ML models either randomly or based on personal experience, which may not always lead to choosing the best-performing base ML model. This limitation further highlights the significant potential for improvement offered by the proposed AutoML method, which can automatically select, optimize, and integrate the best-performing ML models. Consequently, the proposed AutoML-based IDS can achieve substantial improvements over traditional cybersecurity methods through its autonomous cybersecurity strategies.

On the other hand, although the AutoML-OCSE model takes longer to train than certain base models, such as DT, ET, and LightGBM, its training time is still shorter than that of some other models, like CatBoost. This efficiency is due in part to its AutoFE process, which reduces data dimensionality and model complexity. Moreover, the improvement in accuracy, precision, recall, and F1-score justifies the slightly increased training time. Furthermore, the AutoML-OCSE model achieves the fastest average inference time per sample by constructing a stacking ensemble model based on confidence values rather than the original high-dimensional dataset, making it highly suitable for real-time network data analytics and intrusion detection applications. In network applications, low inference time is often more crucial than low training time, as model training typically occurs on cloud servers with ample computational resources, while model predictions are performed on edge or local devices with limited computational capabilities in many scenarios.

Overall, the performance results demonstrate the effectiveness and efficiency of the proposed AutoML-OCSE method. It integrates the strengths of various base ML models, automates tedious ML tasks through AutoML, and achieves high detection performance via an optimized ensemble strategy. Therefore, the proposed AutoML-OCSE method and the AutoML framework can serve as powerful autonomous cybersecurity solutions for intrusion detection in 5G and potential 6G networks.



§ CONCLUSION

The advent of 5G and the impending transition to 6G networks have underscored the importance of ZTNs in achieving network automation. However, the increased connectivity and complexity of these networks have also escalated cybersecurity risks, making the development of effective and autonomous cybersecurity mechanisms a critical necessity. In this paper, we propose an AutoML-based Intrusion Detection System (IDS) to achieve autonomous cybersecurity for future networks. By introducing AutoDP, AutoFE, automated base model learning and selection, HPO, and automated model ensemble components, the proposed AutoML-based IDS can automatically generate an optimized ensemble model for accurate intrusion detection. This paper also proposed a novel TVAE-based automated data balancing method and a novel OCSE model to improve the AutoML procedures. Through the experiments, the proposed AutoML-based IDS achieves high F1-scores of 99.804% and 99.956% on two public benchmark network security datasets: the CICIDS2017 and 5G-NIDD datasets. This illustrates the effectiveness of the proposed autonomous IDS framework in achieving autonomous cybersecurity. In future work, the IDS framework will be extended to involve automated model updating using continual learning and drift adaptive methods in dynamic networking environments.

ACM-Reference-Format



