ML-Based 5G Network Slicing Security: A Comprehensive Survey

: Fifth-generation networks efﬁciently support and fulﬁll the demands of mobile broadband and communication services. There has been a continuing advancement from 4G to 5G networks, with 5G mainly providing the three services of enhanced mobile broadband (eMBB), massive machine type communication (eMTC), and ultra-reliable low-latency services (URLLC). Since it is difﬁcult to provide all of these services on a physical network, the 5G network is partitioned into multiple virtual networks called “slices”. These slices customize these unique services and enable the network to be reliable and fulﬁll the needs of its users. This phenomenon is called network slicing. Security is a critical concern in network slicing as adversaries have evolved to become more competent and often employ new attack strategies. This study focused on the security issues that arise during the network slice lifecycle. Machine learning and deep learning algorithm solutions were applied in the planning and design, construction and deployment, monitoring, fault detection, and security phases of the slices. This paper outlines the 5G network slicing concept, its layers and architectural framework, and the prevention of attacks, threats, and issues that represent how network slicing inﬂuences the 5G network. This paper also provides a comparison of existing surveys and maps out taxonomies to illustrate various machine learning solutions for different application parameters and network functions, along with signiﬁcant contributions to the ﬁeld. Vector Machine (SVM), K-Nearest Neighbors (KNN), Decision Tree over the Unicauca-Version-2 public dataset (7 days data, containing 87 attributes), and simulation performed with an NVIDIA GPU. The results show that slice selection strategy in the Random Forest and KNN algorithms give more accurate results than SVM and Decision Tree algorithms to obtain a high QoS and Service Level Agreement (SLA).


Introduction
With the emergence of new technologies that require advances in networks and communication (including high throughput, low latency, and high reliability), such as the Internet of Things (IoT), augmented reality (AR), and vehicle-to-vehicle (V2V) and vehicle-to-everything (V2X) communication [1], 5G networks satisfy more and more of the needs of consumers. 5G has opened up a wealth of opportunities, thereby allowing for innovation and providing reliability for service providers and consumers. These aspects have led service providers to move toward an era of virtualization and adopt 5G.
5G promises data rates that are 10 to 100 times faster, high coverage, high reliability, low latency, an improved quality of service (QoS), and economically affordable services. Such services and opportunities are growing day by day, which has led to competition among service providers and network operators to deploy 5G and adopt the network slicing phenomenon within the physical network.
5G stands for fifth-generation wireless mobile technology, which offers three diverse services: eMBB, mMTC, and URLLC. eMBB stands for enhanced mobile broadband, which offers a 10 to 100 GBPS peak data rate. eMBB uses macro and small cells to provide a high mobility of up to 500 Kmph and also reduces power consumption. mMTC stands for

4.
A taxonomy of attack prevention from the proposed frameworks, services, and security considerations of network slicing. 5.
The paper also discusses machine learning-based network slicing and the ML-based techniques that can be applied during different stages of slicing to prevent attacks over the network. 6.
The paper discusses network slicing threats and their countermeasures throughout the complete lifecycle of a network slice. 7.
Finally, the paper outlines ongoing research on and future directions for 5G network slicing security to enable 5G to become more secure and robust without affecting network and end-user connectivity (Section 7).

Outline of the Survey
The rest of the paper is structured as follows: Section 2 contains a state-of-art comparison of existing surveys and road-maps. Sections 3 and 4 discuss network slicing and its paradigms and various machine learning-based network slicing along with taxonomy, respectively. Sections 5 and 6 include the emerging threats and security concerns, the taxonomy of network slicing attack prevention, and network slicing security solution and management, respectively. Section 7 consists of recommendations and future directions. Section 8 concludes the paper. This review paper also helps the future perspective and ideas among researchers. A graphical representation of the paper's organization is depicted in Figure 1. We include the definition of frequently used acronyms in Table 1.

Comparison with Existing Survey Articles and Roadmap
Some studies emphasize network slicing in some aspects such as SDN, NFV, security solutions, attacks over a network. Table 2 incorporates a summary of existing surveys on network slicing. Barakabitze et al. [11] give some updated solutions in NS using SDN and NFV. Kaloxylos [12] covers domains such as transport, accessibility in the slices. Qiang et al. [13] show the importance of SDN and NFV in overcoming the traditional problems in the network. Zhang [14] discussed the concept of modularization and dynamic service chaining concerning NFV. Finally, Zhang et al. [15] provide a study on E2E slicing models. Table 2. Comparison with existing survey articles and road-maps (discussed: never mentioned: -partially mentioned: *).

Authors
Main Contribution SDN and NFV Based NS ML Based NS Threats and Attacks Security Solutions Research Challenges [11] Author contributed a comprehensive survey with updated solutions related to 5G NS using SDN and NFV.
-ML based NS is not covered [12] This survey covers solutions for network slicing domains such as access, transport and core.
--ML based NS and security considerations are not covered [13] The author contributed the importance of SDN and NFV, to overcome the traditional problems in the network.
--ML based NS and security considerations are not covered [14] The author discussed the key technologies such as NFV, modularisation, dynamic service chaining, and MANO.
--ML based NS and security considerations are not covered [15] This survey provided a study on End to End network slicing model to enable Smart Grid.
---ML based NS, threats and security considerations not discussed. [16] The survey mainly focuses on applications of 5G. Additionally, emphasize ETSI architecture with capabilities of SDN and NFV.
--ML base NS and threats are not discussed in the study. [17] The author discussed the network slicing and its architecture, services along with the challenges.
---ML based NS, threats and security considerations not discussed. [18] The article mainly focuses on principles and models of resource allocation in NS. Additionally, categorised the mathematical model of resource allocation.
--ML base NS and threats are not discussed in the study. [19] The author discussed the challenges and open issues regarding resource allocation and isolation in slices.
--Discussed a fact that machine learning techniques can be considered to learn control policies in wireless networks. [20] The article focuses on the advancement of network slicing in IoT and smart applications. Additionally, discussed the key requirements to enable smart services.
-Recommended machine learning approaches for future research. [21] The survey emphasises on Software defined IoT orchestration using Edge computing to solve the challenges in IoT service management.

*
Discussed the use of machine learning for IoT to prevent malicious attacks, traffic and to manage user requests. [22] The author discussed the end-to-end network slicing along with the enabling technologies and solutions. Additionally, explained how slicing can be achieved while considering RAN sharing and the core network.
--ML base NS and threats are not discussed in the study. [23] This article discussed the utilization of NS in IoT applications, along with the obstacles in network slicing which occurs due to the advancement of the IoT. Some surveys focus on the architecture and challenges in the NS. Lucena et al. [16] emphasized 5G architecture along with the capabilities of SDN, NFV, and the application of 5G. Foukas et al. [17] discuss the challenges of NS and its architecture. Su et al. [18] and Richart et al. [19] focused on resource allocation in slices. Khan et al. [20] and Wijethilaka et al. [23] discussed the advancement of the NS in IoT and smart applications, as well as challenges in NS due to the evolution of IoT. Rafique et al. [21] give solutions to the challenges in IoT service management. Afolabi et al. [22] explained how slicing can be achieved in RAN and CN networks along with the enabling technologies and solutions.
These surveys emphasized NS and provided solutions to the issues but lacked machine learning-based Network Slicing. Some studies recommended ML approaches for future research to counter these challenges. Our survey mainly emphasizes Machine Learning-based Network Slicing and new blend-up solutions based on ML, how ML can be applied over various stages in the NS life cycle, and network components and 5G NS application parameters. Figure 2 shows the evolution of Network Slicing, the year of conceptualization [24], implementation [25,26] network virtualization [27,28] the concept of SDN [29] and NFV [30,31], and different services for the users [32][33][34][35][36]. From the year 2015, research in the field of Network Slicing accelerated, with the result of increasing the quality of services. Various Machine Learning (ML) [37][38][39] and Deep Learning (DL) [40][41][42][43][44] algorithms are being applied to manage slices, user requests, slice admissions, resources, and traffic in 5G network slicing. Various optimization algorithms [45,46] are also utilized to optimize the network functions.

Network Slicing and Its Paradigms
Network slicing is one of the key features of the 5G mobile network, which boosts the performance of complete architecture. 5G differs from 1G to 4G mobile networks; it offers various other services with mobile broadband services such as mMTC and URLLC. To offer multiple heterogeneous services from a single platform which is flexible in nature, the flexibility is provided by a network slicing mechanism in which one physical network is divided into multiple logical networks to offer these services simultaneously. Each network slice creation is done in four phases: softwarization, virtualization, orchestration, and management. These slices use generic resources to serve users and specific applications. SDN and NFV play a significant role in slicing to make the 5G network more scalable and reliable. Network slicing deals with three prominent use cases: the first enhances mobile broadband (eMBB) for those applications which require high bandwidth to offer Ultra-HD video communication. This use case increases the traffic load on mobile networks. The second massive machine type communication (mMTC) offers connectivity between millions of devices. This use case does not increase traffic but increases the magnitude of mobile networks. The last service is ultra-reliable low latency communication (URLLC) which applies to connectivity, remote surgery, industry 4.0, etc. in vehicles to everything (V2X). This use case needs very low latency connectivity [16].
The network slicing architectural framework is based on three categories, as mentioned in Figure 3.
• Radio Access Network (RAN) slicing: In the 4G network, one extra en-gNB master node is added to benefit the cloudification in the 5G network. The next-generation RAN is dynamic and scalable, adding or releasing the requirement's network functions.
It also balances the load over the slice and manages the resources over the slice [47]. Implementation of RAN in network slicing can be done through logical abstraction of physical resources such as base stations (master eNB and secondary en-gNB) packet data network gateway (PDN-GW), home subscriber server (HSS), serving gateway (S-GW), mobility management entity (MME) [48]. • Core Network (CN) slicing: The 4G network works on centralized architecture without a fully isolated control and data plane. The problems with such centralized architectures are its single point of failure and traffic congestion, etc. The core slicing developed in 3GPP isolates the control and data plane, effectively supporting mobile broadband services and massive and mission-critical IoT services. The core network architecture includes the following network functions: access and mobility management functions, authentication server functions, unified data management functions, data storage functions, session management functions, user equipment, user data plane functions, policy control functions, and RAN [49]. Network slicing involves three layers: As shown in Figure 4.
• The Service Instance layer offers the services to the end-user or subscriber based on their request. Each service in the service instance layer is represented as an 'instance'. • The Network Slice Instance layer includes the network slices, which are customized with all the network features and are provided to the service instance. • The Resource layer is a pool of all the virtual and physical resources which are required by the network slices to serve the services of the service instance.

Architecture
Network Slicing architecture is mainly composed of two blocks: actual slice implementation and slice management and configuration. The first block is responsible for creating slices, allocating resources, and deploying at the end-user level. The other block manages and controls the functionalities and effective mutualism between the slices. Standard bodies provide numerous proposed architectures for network slicing in 5G. Table 3 represents state-of-art studies on various architectural standards by different authors.  [54] proposed architecture for network slicing based on 3GPP services and system aspects. The authors specified the current architecture is based on the 5G Core (5GC) and described various technical specifications (TS). Some of the TS are as follows: TS 23.501 specifies stage 2 system architecture, TS 23.502 specifies the procedure, and TS 23.503 specifies policy and charging control for 5G network system. Additionally, we suggest that 3GPP collaborates with ETSI and NFV to obtain effortless end-to-end network connectivity and smooth execution of slices in a virtual environment.
NGMN standardized architecture. Next Generation Mobile Network (NGMN) Alliance visualizes the 5G network as an end-to-end system with extreme productivity and feasibility. NGMN comprises both RAN and CN for E2E connectivity. NGMN justifies that the 5G network slicing system must be designed keeping in mind the current trends and principles such as dynamic radio topology and cost-effective deployment to create common composable cores, flexibilities, built-in security, and simplification of operations and management. Foukas et al. [17] break the overall architecture into three layers as shown in Figure 5.
• Infrastructure resource layer-the pool of physical resources such as access nodes, cloud nodes, networking nodes, and 5G supportable devices are constituted at this layer. These resources are disclosed to the upper layers through virtualization. • Business enablement layer-the library of all modular network functions comprehended by software modules and value-enabling capabilities; a set of configuration parameters such as RAT config. These parameters and functions are called by orchestration entities via APIs. • Business application layer-comprises applications of the operators, enterprises, verticals, and third-party services that use 5G.

Business Application Layer
Operator services Enterprise vertical

Infrastructure resources Layer
Access Node Cloud Node Network Node 5G Devces 5G Radio Access Technologies Figure 5. NGMN architecture.
5G-PPP standardized architecture. 5G-PPP expands the roles of the 5G network to support virtualization and softwarization and to encourage slicing for diverse use cases. In comparison to the NGMN architectural proposal of layers, where both architectures are based on the network function and infrastructure layers, 5G-PPP divides the framework into five layers: infrastructure, network function, orchestration, business function and service layers. Orchestration or MANO is a separate layer and the business application layer of NGMN is separated into two different layers: the business function and service layer in 5G-PPP [17].
ONF-SDN standardized network slicing architecture. Open Network Foundation (ONF) defines orchestration as a selection process of resources and optimally managing the client's request. The orchestrator is governed by an administrative body that tends to follow specific policies and fulfill clients' service requests. The SDN supports the slicing phenomenon, which needs to ensure the clients' service requests are fulfilled effectively and swiftly. The two main components in ONF-SDN architecture are controllers and resources, as shown in Figure 6. The controller mediates between the clients and resources as a centralized body pictured in the control plane. The administrator controls and configures the entire controller, including the client and server context and its policies for effective functioning [16]. Network Function virtualization (NFV) standardized architecture. ONF-SDN architecture discussed the control plane features that enable network slicing architecture but lack effective management of network slicing and its essential resources. NFV architecture is comprised of the following: NFV Infrastructure (NFVI), a collection of resources; virtual network functions run on NFVI and MANO, consisting of a VNF Manager, Orchestrator and Virtualized Infrastructure Manager; and a Network Management System (NMS), which is comprised of Element Management (EM) and Operation/Business Support Systems (OSS/BSS) [51,56]. The NFV architecture works on the management of infrastructure resources and directs the allocation of the slices concerning the needs of the virtual networks and network services.
ETSI standardized architecture. The European Telecommunications Standards Institute (ETSI) standards led NFV in 2012, and since then, it has collaborated with industries to set up a standard to support the concept of network virtualization. The ETSI standard sets up an architectural framework for NFV; it focuses on the changes in the network which are likely to happen due to the NFV virtualization process. It never focuses on network functions, packet flow, end-to-end network services, or physical infrastructure control.
Instead, it adds new reference points and functional blocks. With NFV, generic hardware can handle the software [12]. ETSI works on three domains, as shown in Figure 7.

Service, Infrastructure & VNF description
Operations/business support system: an operator's back-end systems that together manage networks, services, customers, products and orders. In NFV world, will talk to the NFV MANO

Machine Learning Based Network Slicing
Machine Learning (ML) is a branch of Artificial Intelligence (AI) based on the ideology of self-learning, where the machine or the system can self-learn based on the previous results or the dataset gathered with less human intervention. It has the potential to provide more straightforward solutions to complex problems by learning from and analyzing bulk data. It analyses and adapts the changes as per the environment and predicts the near future with accurate results. With the growing amount of data and market competition, ML technology is being adopted by most industries and sectors such as the government, healthcare, retail, financial services, and transportation. By extracting insight from the data, the organizations can work more effectively and procure advantages over the competitors.
5G networks are becoming more complex due to the emergence of an exceptionally massive number of newly connected devices and different types of services that can be termed as data. With the increase in the volume of traffic and service requests for diverse users and applications, there has been an increase in the need for creating network slices over physical networks to optimize the services and the requests by maintaining the robustness, workload, and security in the network with the involvement of ML technologies. ML can be considered an automation in various network operations and management such as planning and design, construction and deployment, on-demand adaptive network configuration, monitoring, fault detection, and security. Figure 8 portrays various network functions in network slicing and their relevant ML techniques. ML also provides algorithms to retrieve information from raw data, perceptive advice, and prediction based on learning [39]. Focusing on machine learning-based network slicing, numerous research has been published to emphasize the use of ML and DL models along with the network components, application parameters, and security considerations, as shown in Table 4.  In case of slice admission in the 5G network, infrastructure providers (InPs) have to effectively and efficiently serve a variety of services, improve resource efficiency, and reduce the cost based on the service request, which can be scaled up or scaled down as per the requirements and service time. In such cases, the profit of the InPs can only be increased when they accept as many slice requests as possible and check the variations in the slice's requirements to avoid performance degradation. Here, it is necessary to create an intelligent slice admission scheme for systematic admission; the ML approach can be best suited to preventing the obstruction in the infrastructure and obtaining the maximum profit for an InP. Raza et al. [60] have modeled an ML approach with two algorithms working together, i.e., supervised learning and reinforcement learning. Supervised learning-based big data analytics collected historical data and observed the change in the requirements of the incoming requests and the present slices. In contrast, a reinforcement learningbased solution checks the circumstances where obstruction can occur in the system or infrastructure. From these observations and learning, they only admitted those slices that may not give rise to any obstruction and may not lead to degradation. Consequently, the profit of InPs will rise.
Considering use cases such as throughput, availability, reliability, scalability, and latency in terms of quality of service (QoS) and quality of experience (QoE), respectively, 5G networks tend to provide such flexibility and use cases. Since virtual slice allocation in network slicing over a physical network over a shared pool of resources becomes very complex, an ML-based approach can be modeled to solve this problem. To select the best suitable slice, Gupta et al. [59] use different ML algorithms such as Random Forest, Support Vector Machine (SVM), K-Nearest Neighbors (KNN), Decision Tree over the Unicauca-Version-2 public dataset (7 days data, containing 87 attributes), and simulation performed with an NVIDIA GPU. The results show that slice selection strategy in the Random Forest and KNN algorithms give more accurate results than SVM and Decision Tree algorithms to obtain a high QoS and Service Level Agreement (SLA).
To overcome the challenges which affect the performance of network slicing, various ML and hybrid learning models are applied for effective slicing. Abidi et al. [46] proposed glowworm swarm-based deer hunting optimization algorithms (GS-DHOA), which are two meta-heuristic optimization algorithms. They combined these two algorithms to optimize weight function. First, they collected the data from different 5G networks, with attributes such as device type, bandwidth, duration, modulation type, packet delay, and packet loss ratios. Then they carried out the optimal weight feature extraction (OWFE) using the proposed GS-DHOA model; next, they performed slice classification in which they classified the slices based on eMBB, mMTC, and URLLC with respect to the devices, with the help of a hybrid classifier-a hybrid of Deep Belief Network (DBN) and an NN.
Another approach to making slice selection more efficient and accurate while handling network load balancing and avoiding slice failure is using a Deep Learning NN. The load efficiency, availability, efficient utilization of resources, and network are also to be considered while slicing the selection. A model called DeepSlice uses KPIs to analyze the network traffic and predict the device type. It also manages the efficient use of resources, allocation, and load balancing. It aims for proper selection of slices, slice prediction with adequate resource allocation, traffic management, slice management, and new slice allotment in case of a slice or network failure. Their model also identifies the traffic pattern and predicts the future patterns to avoid forthcoming failure [40].
With the emergence of the 5G network and its popularity and ability to serve an abundance of services, and with the rise in the complexity of the network compared to previous generation networks, ML approaches have become a necessary part of 5G [65]. The self-organizing networks (SONs) in 5G and network slicing need to be integrated with SDN and NFV to build a comprehensive architecture and experimental framework, using ML and Big Data techniques to develop more intelligent capabilities for the future to satisfy the emerging requirements and to assure intelligence, automation, faster management, and optimization [65]. ML approaches have been used to ameliorate network security, as well as access control, authentication, anti-jamming offloading and malware detection in 5G networks to protect users' data and to maintain privacy [71].
Another application of 5G in cellular and IoT networks is to manage the resources within the network. Fatima et al. [72] give a comprehensive survey on management and allocation of resources using ML and DL techniques and bringing intelligence to IoT networks. In V2X communication through the 5G wireless network, to reduce the increasing complexity of the network slicing, various ML approaches are used to automate the deployment of slices and network operations derived from the historical data of the vehicular network [73]. For resource mapping in 5G network slicing, a deep reinforcement learning model derived from the communal relationship between a node and link mapping (RLCO) is proposed in [44]. The RLCO algorithm proposed is based on this reward function, which results in network slice mapping reaching the global optimum. The dynamic network slicing or slice configuration in WiFi networks can be achieved by applying DRL approaches and can achieve promising results in highly dynamic and complex environments without expert knowledge [74].

Emerging Threats and Security Concerns in ML Based 5G Network Slicing
This section discusses the existing solutions on 5G, the services of 5G security, the network slicing concept, its applications, and its security concerns. The enhanced fifth generation of mobile network will bring considerable modifications in mobile technologies and communication. It advances the fields of Internet of Things (IoT), Augmented Reality (AR), and machine to machine communication such as Vehicle-to-Vehicle (V2V) and Vehicle-to-Everything (V2X). The 5G network provides features such as scalability, availability, reliability, and mobility and fulfills security dimensions such as authentication, authorization, data integrity, confidentiality, availability, access control, and privacy needed for critical applications.
Network slicing is one of the key features of 5G. By slicing the physical network into multiple logical networks, each provides specified services depending upon the type of application scenario. According to Khan et al. [20], network slicing is a transition from network-as-an-infrastructure to network-as-a-service. According to the authors, network slicing put an end to the need for diverse necessities; they explored key factors in the recent advancements in network slicing by adapting several IoT smart applications. The authors also devised the taxonomy based on numerous parameters such as slicing resource levels, physical infrastructure, security, and many others. Foukas et al. [17] reviewed the existing works on 5G network slicing, identified challenges, and how will look in reality. The authors reviewed the state-of-the-art 5G network slicing and illustrated the architectures based on NGMN and 5G-PPP visions. Abidi et al. [46] have implemented a hybrid learning algorithm on a 5G network slicing dataset, presuming three phases, namely data collection, optimal weighted feature extraction (OWFE), and slicing classification. The author operated with GS-DHOA-NN + DBN-based network slicing to make network slicing more effective and accurate. Afaq et al. [75] proposed an M-Cord-based LTE network, in which they implemented a programmable and dynamic slicing mechanism, with end-to-end and logically separate resource connectivity, using vNSSF and OAI frameworks for network slicing with M-Cord, with a programmable handling control and data plane.
Security is always a key concern in the network. Lots of researchers are working on the improvement of security in the 5G network. Lal et al. [76] developed a secure 5G network framework which offers 5G services from the LTE advanced network platform. The authors also worked on various security-related issues relating to the implementation of cost-effective 5G network architectures. Ahmad et al. [77] presented various security challenges in the 5G network. The authors developed a secure 5G network architecture that overcomes all of the security-related challenges. To resolve IoT, SDN, NFV, and MEC related challenges, an artificial intelligence system was used in the 5G network. Park et al. [78] gave a detailed survey of various security and privacy-related threats to the 5G network. The authors presented various 5G network security parameters such as availability, authentication, data confidentiality, reliability, accessibility. The authors also discussed various technologies of 5G networks such as SDN, D2D, industry 4.0, MEC, AI and many others.
The growing digitization of industrial automation requires networks to be more efficient, resilient, high performing, secure, and simple to use [79]. Continuous improvement in the field of 5G and networking infrastructure, and the concept of virtualisation encountered in networks that use slicing, are both associated with risk. Cyber risk is one vital matter of security which needs to be preserved. Ehrlich et al. [80] introduced some cyber security solutions to future network management, with the aim to support automatic network management based on cyber security QoS description vectors. 5G enables IoT services to trigger new types of cyber risks. Radanliev et al. [81] provided an IoT cyber security framework, with a new epistemological analysis model that enables the assessment of unpredictable risk states in 5G-based IoT systems. Radanliev et al. [82] aimed to make an AI decision on low memory devices with the use of new and emerging forms of data in order to create a self-optimising and self-adapting autonomous artificial intelligence (AutoAI). The authors intended this iterative approach and its application in low memory devices to be beneficial to 5G network slicing.
AI is another weakness in a 5G network. A new security concern in 5G network slicing is adversarial machine learning attacks. The agents intend to fool the ML and DL models by injecting a sample of data which has had a disrupting factor added to it. Learning in the presence of adversaries with the aim of reducing the impact and defending against those adversarial ML attacks, eventually developing a secure environment, is known as adversarial machine learning [83]. Shi et al. [84] deals with flooding attacks on 5G RAN slicing by minimizing the rewards for real requests and reducing fake slicing requests by adversaries through randomizing the request weight distribution. Sagduyu et al. [85] focused on the implementation of adversarial machine learning in communication systems. The authors present two scenarios: first, the impact of attacks on spectrum sharing in 5G, and secondly, the spoofing attacks by adversaries and their impacts on the DL based physical layer authentication system of the 5G user equipment which favours network slicing.
There are numerous applications of network slicing where technological advancement, and how 5G network slicing is embedded in people's daily routines, can be seen. Some of the applications are in vehicular communications, i.e., Vehicle-to-Vehicle (V2V), Vehicleto-Everything (V2X), WiFi networks, Industry 4.0 applications, IoT-based applications, and many others. Kalor et al. [86] stated that Industry 4.0 applications are based on network slicing. The authors defined the use of cloud computing and IoT, and how these technologies are incorporated with the manufacturing process in industry. Additionally, they specified that the current SDN is unsuitable for heterogeneous industrial work at an abstract level.
Another type of network slicing application is Vehicle-to-Everything (V2X); it is an exchange of information between vehicles and infrastructure or other vehicles (V2I or V2V). Khan et al. [87] determines the use of 5G network slicing in vehicular communication, i.e., V2X; the authors proposed the use of network slicing combined with relaying and configured the vehicular UE functionality based on the inter-vehicular distance between the vehicles by creating two virtual slices, namely the autonomous driving slice and the infotainment slice. The authors compared their work with the RSU communication method regarding the throughput of infotainment and reliability.
WiFi networks play a pivotal role in the 5G network as everything depends upon the connectivity. Nerini et al. [88] presented two slicing algorithms based on the three features of 5G, one which runs statically to assign resources as per the slice requirement and another dynamically configures the slices. The simulation is performed over an NS3 simulator, and the results obtained statistically by KPIs outperform the current WiFi access technique.
With the emerging technology in mobile communications, 5G networks enable internet connectivity over multiple devices which are connected together. The technology behind the use of 5G is network slicing, which deals with heterogeneous networks over various devices. Slicing manages the allocation and distribution of resources over the slices. With the expansion of 5G, security concerns are brought forward, which are a matter of consideration. This section covers surveys that elaborate on different security issues and how they have been managed. Mathew [89] illustrated the concept of network slicing and how it has gained traction in 5G. The author discussed the significant challenges in slicing, such as the security and implementation of RAN. The existing solutions to these challenges are slice isolation, manual slice allocation, cryptography, and authentication.
Jain et al. [90] discussed the security issues in the 5G-IoT ecosystem, and proposed a security solution for DDoS and DoS attacks. The authors presented the 5G-IoT architecture by applying network slicing technology and implementing pattern matching IDS; IDS manages to detect intrusion in the slices and the base stations. Chemodanov et al. [91] proposed AGRA, an AI-augmented geographic routing approach for IoT-based incidentsupporting applications. The authors presented an approach to advanced geographic routing using AI that relies on physical obstacle information derived from satellite imagery by applying DL. The performance of the model is shown in terms of packet delivery success ratio and path stretch.
Cunha et al. [92] explained the practical aspects such as network heterogeneity and unpredictable demands with the increased use of 5G in IoT applications. The article presented the security principles and threats associated with slicing. The authors categorized the challenges as classical and non-trivial. The classical difficulties include authentication measures, integrity measures, encryption mechanisms, etc., while the non-trivial challenges include defending against side channels and dealing with end device vulnerability. Martini et al. [93] investigated the security challenges within the ETSI NFV architectural framework with management and orchestration (MANO) security functions. The authors targeted the authorization and access control functions, and improved the performance by adopting the continuous closed-loop usage control mechanism (UCON). The aftermath of this approach impacted the end users' experience but led to improvements in reaction time against violations of the security policies. Ni et al. [94] proposed an efficient and secure service-oriented authentication framework to support network slicing and fog computing in 5G IoT services. The authors instigated slice selection mechanisms to prevent the privacy of the users, and used session keys throughout the network to assure secure accessibility.
Porambage et al. [95] implemented a key management scheme in network slicing and a secure keying mechanism for third-party applications which are accessing the slices. The keying mechanism is designed based on multi-party computation; the proposed scheme adjusts the characteristics of the network slice concerning the required security measures and scenarios. Thantharate et al. [40] discussed the DDoS attack in network slicing, and to prevent an attack in the network, the authors modeled a deep learning-based neural network named 'Secure 5G' to identify malicious requests and transfer them to a quarantine slice. The authors framed the architecture in accordance with the three key services of the 5G network, and added an extra quarantine slice in which to deposit malicious slices. The deep learning-based 5G secure model countered the DDoS attacks by filtering malicious requests with a detection accuracy of 98%.
During the life cycle of a network slice, there are numerous attacks that threaten the network and cause distortion in the complete network or some portion of a network. Several significant studies, along with their proposed frameworks, security mechanisms, considerations, and several attacks which threaten the network, have been published and are presented in Table 5.
Develop a secure network slicing architecture for third party application using secure key scheme Multi party computation X X X X X X X X Data tampering [40] Proposed framework Secure 5G quarantines the threats which challenge the end-end security NN based Secure 5G network slicing model Efficient and secure service oriented authentication framework is proposed to support network slicing and fog computing for 5G IoT services Privacy preserving slice selection mechanism Proposed a solution which prevents Denial of Service (DoS) attack for secure network slicing Learning assisted secure network slicing Intra and Inter Slice isolation To secure the main segments of the end-end 5G network, proposed a hierarchical detection scheme with reinforcement learning Reinforcement Learning (RL) Botnet attack [98] The potential design issues and challenges of the secure 5G mobile fronthaul architecture Backhaul Security * * X X X X Replay and man-in middle attack [99] Proposed an architectural design for 5G transfer solution which targets the integration of existing and fronthaul and backhaul technologies and interfaces.
SDN/NFV based MANO entity (XCI) and Ethernet based packet forwarding entity (XFE) A key exchange and authentication protocol is proposed, which secures Xhaul for a moving terminal in the network. The paper targets the privacy and forward secrecy in the mobile Xhaul network.

BAN logic and AVISPA evaluations
Replay and eavesdropping attacks [101] The proposed framework provides real time detection and mitigation of known attacks in 5G Network Slicing. It used P4 based switches which implemented a service function chaining protocol layer, and reduced the overhead induced on the control channel.
Frame RTP4, a P4 based framework Zero -day attack [102] The capability of the IDS has been extended to identify the attacking nodes in a 5G network, despite multiple network traffic encapsulations.
This letter introduced a new type of Distributed Slice Mobility (DSM) attack, which is caused by inter-slice mobility of the user in the 5G network. Additionally, mentioned that the damage caused by DSM is higher than DoS and yo-yo attacks, in terms of performance and economy.

Autoscaling of resources
yo-yo attack The entire life cycle of a slice can be divided into four phases [104], as depicted in Figure 9, along with the respective attacks and threats associated. Preparation phase. This phase is committed to the preparation, designing, creation, and modification of the network slices. A slice is an arrangement of elements and their configuration. If there are any errors in the network slice template, they may lead to various attacks such as content exposure, data leakage, injected malware, etc. Such attacks can lead to leaked user information from the databases and access to unencrypted channels, which will cause loss of confidentiality, integrity, and authenticity of the network. Some security measures such as encryption and decryption of the slice template and real-time security analysis must be taken to prevent such attacks.
Installation, configuration, and activation phase. The second phase in the life cycle includes the installation of the slices to the network, configuration of the services as per the request, and activation of the slices, i.e., as a ready-to-use software or service. The primary threat in this phase is the creation of fake slices and re-configuration of the slices during or before the final activation. The target points of these attacks are the APIs, which can ultimately affect installation and configuration and give an activation error in a slice. Security measures must be taken to secure APIs by providing operational and accessibility rights to the authorized people and utilizing TLS or O-Auth for authentication and authorization purposes.
Run time phase. This phase signifies that the slice is in use and allows updates concerning the requirements, changes in configuration, allocation, deallocation of resources, and network functions. The targets of attacks in this phase are controllers, hypervisors, the overall cloud system, control channels, and centralized control elements. However, APIs remain the main target of attacks. The types of attacks include performance attacks, privacy breaks, and data exposure. The security measures that must be taken are authentication and integrity of the network slices to prevent fake requests, slice isolation to prevent DoS and DDoS attacks, and secure-5G modeling to prevent accessibility of unauthorized and malicious requests. Dynamic NFV can also be used, which provides an on-demand security mechanism.
Deactivation phase. This is the last phase of the network slice's life cycle, in which the resources and network functions are relieved. The slice is no longer in use. The most common threats which can harm the network, even after the slice is decommissioned, are due to improper handling while deactivating the slice and improper usage of resources and network functions. The targets for these attacks are user information databases, cloud storage, and centralized control elements. The measures to avoid attacks in this phase are proper deallocation of the resources and network functions that are no longer in use, and deletion of sensitive data that is no longer required. Figure 10 shows the taxonomic structure of NS in terms of architecture, requirement and services, security, communication, and network management. The taxonomy states the classification of the different architectural domains based on network management attributes in NS such as RAN, CN and their sub-classifications such as mMIMO, mmWAVE, SDN, and NFV, respectively. The paper has already discussed different types of standardized NS architectures in the above section, such as NGMN, ETSI, 3GPP, 5GPPP, ONF-SDN, and NFV [105].

Network Slicing Security Solutions and Management
RAN slicing is provided by the 5G network, where mobile virtual network operators share the same physical network infrastructure. According to dynamic user demands, allocation of the resources is replaced, moving from static to dynamic resources [106]. The multiple traffic services supported by the 5G NS are eMBB, mMTC, and urLLC, which are solely based on the throughput and latency requirements. The various architectures discussed above use RAN slicing for dynamic resource allocation using multiple ML and RL techniques, which are also mentioned in the above sections. CN slicing in the NS is further classified as SDN and NFV, and the SDN-and NFV-based standardized architectures have been discussed in earlier sections. E2E slicing is possible, which requires an automated management system for the creation, deletion, and updating of slices based upon the user's demands and requirements, which can be possible by providing abstract-level configuration for both the core and access network [107].
Resource provisioning for NS in a robust and efficient manner is always a challenge with the ever-growing requirements [108]. Various challenges occur while communicating between the user and the network; some tasks include dynamic resource allocation, handover, resource sharing, infrastructure sharing, and spectrum sharing. Slicing in the communication network offers different end-user services and ensures QoS within the slice. Some real-time examples are live video streaming and broadband connection while responding to medical emergencies. Infrastructure sharing is another aspect of communication management; the fundamental idea behind this concept is virtualization in the wireless network. It optimizes the cost model while increasing the overall revenue and providing scalability to the network.
Spectrum sharing in NS is the setting up of the slices in such a way as to ensure resources, which are a fixed block of a spectrum allocated to a specific network operator, can be shared with the aim of increasing the number of users who are allocated a sufficient portion of the spectrum to meet their QoS requirements. It also aims to overcome the inefficiency in the dynamic allocation of resources [109]. Handover in NS is a portable mobile communication used while moving from one base station to another without losing connection. Various ML approaches, optimization, and fuzzy logic approaches are applied to reduce the handover failure, which certainly degrades the performance of the system [110].
5G NS provides various services and fulfills the requirements of the users. Some requirements and services provided by 5G NS are eMBB, eMTC, and urLLC. eMBB stands for Enhanced Mobile Broadband, which offers a 10 to 100 GBPS peak data rate. eMBB uses macro and small cells to provide a high mobility of up to 500 Kmph. eMBB also reduces power consumption. mMTC stands for Massive Machine Type Communication, which provides long-range connectivity with a very low data rate of up to 100 Kbps. It also provides ultra-low-cost machine to machine (M2M) communication. URLLC stands for Ultra-Reliable Low Latency Communication. It offers ultra-responsive connections among multiple devices with a latency far below 1 ms. It also offers 5 ms end-to-end latency between a mobile device and the base station. It is ultra-reliable and has 99.9999% available service, which provides medium data rates of approx. 50 Kbps to 10 Mbps. Confidentiality, authenticity, accessibility, availability, data integrity, access control are the security and privacy aspects that must be protected in 5G NS [111].

Future Directions and Research Challenges
With the growth of emerging technologies, the requirement of 5G in the market will increase, since high-speed mobile communication will be in demand to fulfill the needs of the market. With the growth of 5G networks, new challenges will also open up. By considering the various threats and challenges discussed in this paper regarding security concerns, we can see there is a need to minimize those threats in 5G network slicing. Since 5G is used in multiple sectors such as robotics, medical, automobile, agriculture, mining, media, and fashion sectors [8], as well as applications such as IoT, Industry 4.0, M2M, V2X, and many others, these issues will impact the global market in the near future, as discussed in the above sections. Therefore, security in 5G network slicing is a primary concern. This paper also discussed and illustrated the taxonomies of security measures in terms of attack prevention and machine learning algorithms at various phases of network functions. These measures must be put into action to secure 5G network slicing. Thus, following these requirements, this paper summarizes major directions to be followed in further research.

1.
AI driven 5G architecture and network slicing-This paper discussed the various standard architectures in 5G network slicing and how they have been framed to man-age and secure the network. The AI modulates the robustness of the 5G network [112]. The architecture should be generalized with an in-built security mechanism to handle attacks and threats [113]. A standard AI-based architecture should be framed to support flexibility, reliability, and scalability, which supports a faster data rate, improved QoS, and efficiency in the network. The security in 5G is the primary concern that must be considered.

2.
Secure authentication-This paper discussed the various attacks and threats over the slice, which affect the user's privacy and may lead to unauthorized access. Secure mutual authentication should be incorporated to verify the authenticity and secure the application in the 5G network [113]. Therefore, a cryptographic algorithm must be applied to the channel to secure the session and keys, with real-time security analysis to prevent the network from being breached [114].

3.
Secure service migration-Multi-access edge computing (MEC) can be applied to speed up the service migration in the network [115]. The high throughput and low latency communication with a time delay of 1 ms-10 ms is a key requirement in 5G. The connection between 5G and edge computing is empowering; 5G enables more data collection and faster processing [6], which encourages the demands of the users. Therefore, such requirements can be attained using MEC and AI techniques while supporting the properties of network slicing.

4.
Secure and continuous connectivity-This paper discussed various attacks on the slices in a 5G network, which affect the connectivity between the end-users and the service provider. Such attacks must be minimized by adapting NN-based security measures to avoid malicious requests, unauthorized access, or intrusion within the network without affecting the network and end-user connectivity. Adversarial machine learning attacks, which affect the ML and DL models in the network, should be reduced by redesigning the models with adversarial machine learning methods as provided in [116].

5.
Fronthaul/Backhaul/Xhaul Security-Fronthaul is an optic network link between multiple radio remote heads (RRH) and centralized baseband units (BBU) [117]. Backhaul is a bridge between RAN elements (wired network) and the mobile network, responsible for data transmission. Security in mobile backhaul is paramount. Due to continuous traffic by the 5G applicants and an increase in threats and attacks, security in mobile networks is of utmost importance [98]. Current 5G approaches employ C-RAN, but with increasing challenges and needs, it is necessary to reduce the operating cost, accelerate operation over the network, enhance the QoS, and save energy. Therefore the aim is to flexibly interconnect D-RAN and core network functions hosted over cloud network infrastructure. Xhaul architecture can enable such flexibility and reconfigure the network quickly and cost-effectively.

6.
Secure deployment-5G has been designed by considering multiple security mechanisms with secure control over the network to provide mutual authentication, subscriber identity protection, secure service migration, secure slicing, and many other benefits. For successful deployment of 5G, the provider needs to certify all the connections and verify all the carriers' IDs, frequencies, and cell coverage in the network [118]. 7.
Performance Metrics-In 5G communication networks, several parameters are involved, all of which have an impact on the network's performance. Communication network performance can be measured in terms of the network's capacity, quality, lifetime, efficiency of routing, low latency, and high reliability. 5G networks allow lots of traffic, requiring a higher load balancing capacity to keep the networks running well. According to Choudhary et al. [98], collaboration between the RAN and backhaul will open up new possibilities for improved performance. According to recent breakthroughs in the field, the energy consumption of communication networks is based on carried traffic modeling and topology options. Throughput can be increased through effective load balancing. Future research should concentrate on improving QoS and traffic control. 8.
Optimization-The 5G network is made up of several sub-modules, each of which has an essential function in ensuring secure data transmissions. A network's efficiency will be harmed by channel interference and path loss. The bandwidth utilization of networks is affected by link failure and node isolation. Network slicing is a feature of 5G networks that allows for virtual network partitioning. In heterogeneous networks, time synchronization is a significant issue that affects inter-cell coordination, which are directly proportional to each other. This new idea aids in a variety of applicationbased network allocations. As a result, effective network slicing aids in network traffic optimization, load management, and traffic management efficiency [119].

Conclusions
This paper extends the understanding of the impact of network slicing over 5G. This paper explains network slicing and its layers and architectural framework by using a different standardization. The state-of-the-art comparison and road-map of the existing surveys has been discussed in addition to the timeline of the evolution of slicing. The key aspects the paper presents are the importance of security in NS and how to minimize attacks that threaten the network. Furthermore, the paper demonstrates that machine and deep learning solutions should be applied at the planning and design, construction and deployment, monitoring, fault detection, and security stages of NS, and with different application parameters and network functions. This paper gives a detailed survey of NS in 5G, machine learning-based NS and attack prevention to maintain confidentiality, authenticity, accessibility, availability, and data integrity. Finally, this paper presents a taxonomy of 5G Network Slicing, security, and management along with future directives and recommendations which anticipate a further need for analysis and evolution required in network slice security to eradicate threats and fulfill the user's requirements. This paper has shown how AI and ML can be integrated into networks in order to build self-healing and self-upgrading networks.
AI is already being integrated in networks, with the objective of minimising capital costs, improving network performance, and creating fresh revenue sources. Operators all around the globe are experiencing the advantages of AI integration in their networks. By the end of 2020, it was expected that more than half of service providers (53%) expected to have completely incorporated certain components of AI into their networks. With possibilities for leveraging machine learning and artificial intelligence to interact with 5G networks, some sectors are already scrambling to innovate with 5G. Sports, wireless virtual reality (VR), augmented reality (AR), live performances, self-driving vehicles, public safety and infrastructure, ATMs, medical equipment, remote control heavy machinery, and healthcare are just a few of the top technologies on this frontier. The upcoming industry will be surely benefited by this survey and it will help to provide a detailed study on machine learning-based approaches in 5G network slicing. This survey will also help researchers to gain knowledge and understand the facts in this field, and encourage them to further explore this field in order to benefit society and future generations.