{'fraction_non_alphanumeric': 0.0346967937840493, 'fraction_numerical': 0.007412699830311691, 'mean_word_length': 4.594554084436672, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Knowledge Transfer based Radio and Computation Resource Allocation for 5G RAN Slicing

To implement network slicing in 5G, resource allocation is a key function to allocate limited network resources such as radio and computation resources to multiple slices. However, the joint resource allocation also leads to a higher complexity in the network management. In this work, we propose a knowledge transfer based resource allocation (KTRA) method to jointly allocate radio and computation resources for 5G RAN slicing. Compared with existing works, the main difference is that the proposed KTRA method has a knowledge transfer capability. It is designed to use the prior knowledge of similar tasks to improve performance of the target task, e.g., faster convergence speed or higher average reward. The proposed KTRA is compared with Qlearning based resource allocation (QLRA), and KTRA method presents a 18.4% lower URLLC delay and a 30.1% higher eMBB throughput as well as a faster convergence speed.


I. INTRODUCTION
Network slicing is an important technique in 5G to enable flexibility and customization. Based on software defined networks and network function virtualization techniques, network slicing can define various virtual network slices over a single physical network infrastructure [1]. To realize the network slicing, resource allocation is an important part to guarantee service level agreements of slices. The network operator needs to allocate limited resources between slices. For example, enhanced Mobile Broad Band (eMBB) slice usually requires a high throughput, while Ultra Reliable Low Latency Communications (URLLC) slice needs a low latency and a high reliability. Compared with core network slicing, the RAN slicing is more complicated due to limited resources and dynamic channel states [2]. In [3], a risk sensitive model for the resource allocation of URLLC slice is presented. A twolayer method is introduced in [4] to realize an efficient and low complexity RAN slicing. [5] shows a RAN slicing scheme by considering both rate and latency demands of various traffic types, and the scheme is tested in a industry 4.0 case.
The aforementioned works mainly focus on the radio resource allocation. However, the evolving network architecture requires a joint resource allocation scheme, such as radio and computation resources. Indeed, to support the emerging computation intensive applications, deploying mobile edge computing (MEC) servers becomes an ideal solution [6]. The computation tasks can be processed in the MEC server instead of the central cloud, thus a lower delay is achieved. The work of [7] shows that joint resources allocation slicing has a better performance than slicing one single resource, and [8] introduced a mathematical model to jointly slice mobile network and edge computation resource.
Although incorporating computation capability into RAN will bring significant benefits, it also leads to a higher network management complexity, especially when multiple slices are involved. To this end, machine learning methods provide a good opportunity for network management [9]. For example, in reinforcement learning, the agent interacts with environment to maximize the long term reward based on Markov decision process (MDP), and the complexity of defining a dedicated optimization model is avoided. However, the reinforcement learning algorithms that are applied in most existing works, such as Q-learning and deep Q-learning, generally require a huge number of samples to train the algorithm, which consequently lead to a long convergence time. In addition, the low training efficiency will unavoidably affect the system performance, especially for tasks with tight delay budgets. To this end, we propose a knowledge transfer based resource allocation (KTRA) method in this paper. Different with existing algorithms such as reinforcement learning or deep reinforcement learning, the proposed KTRA method has a knowledge transfer capability, and the agent can leverage the knowledge of other expert agents to improve its own performance on the target task [10]. With the prior knowledge of experts, it requires less samples when exploring the target task, which means a higher exploration efficiency. The proposed KTRA is compared with Q-learning based resource allocation (QLRA), and the simulation shows that KTRA achieves a 18.4% lower delay for URLLC slice and a 30.1% higher throughput for eMBB slice as well as a faster convergence.
The rest of this work is organized as follows. Section II presents the related work. Section III introduces the system model and problem formulation, and Section IV defines the KTRA scheme and baseline algorithm. We show simulation results in Section V, and conclude this work in Section VI.

II. RELATED WORK
Recently machine learning techniques have been extensively studied for wireless network applications, and various techniques are proposed for resource allocation of 5G networks. [11] proposed a reinforcement learning based method for joint power and radio resource allocation for URLLC and eMBB users. A Q-learning based solution is presented in [12] to maximize the network utility by satisfying network slicing requests under network resources constraints. [13] introduced a RAN slicing method to dynamically allocate radio and computation resources, and a constrained learning scheme is defined. A decentralized deep reinforcement learning method is presented in [14] for network slicing, which ensures service level agreements under networking and computation resources constraints. The joint RAN slicing and computation offloading problem is investigated in [15], and multi-agent deep Qlearning is applied to maximize the communication and computation resources utilization. Furthermore, [16] proposed a actor-critic network based deep reinforcement learning method for joint radio and computation resource allocation of virtualized RAN.
Although various machine learning methods have been proposed for resource allocation of 5G, including reinforcement learning [11]- [13], deep reinforcement learning [14], [16], and multi-agent deep reinforcement learning [15], these methods usually require a huge amount of samples for training, which means a long exploration phase. Deep reinforcement learning is considered as a breakthrough, but the time-consuming network training is a well known issue [17]. We propose a correlated Q-learning based method for radio resource allocation of network slicing in [18], but the knowledge transfer capability is still not considered. To this end, we propose a KTRA scheme for the joint radio and computation resources allocation of 5G networks in this work. Based on the knowledge transfer strategy, our proposed method can utilize the prior knowledge of expert agent to achieve a faster convergence speed or a higher average reward.

III. SYSTEM MODEL AND PROBLEM FORMULATION
A. Network Architecture The proposed system model is shown as Fig.1. We assume the base station (BS) is equipped with a MEC server to process computation tasks of eMBB and URLLC slices. We apply a two-step resource allocation scheme. In the inter-slice phase, the BS intelligently allocates radio and computation resources between different slices. Then these resources are utilized within each slice in the intra-slice phase. For example, the URLLC slice operator will distribute radio resource between attached UEs, and use available MEC server capacity to process the computation tasks of its UEs. In this work, we mainly focus on the inter-slice resource allocation. Given this architecture, the delay experienced by a computation task is: where d tx and d rtx are the task transmission and retransmission delays, respectively. d que is the queuing delay in BS, which is considered as the scheduling delay. d edge is the processing delay in MEC server, and d cloud is the processing delay in central cloud. α is a binary variable. α = 1 if the task is computed in the BS, and α = 0 means the task is forwarded to the central cloud. We presume the intelligent BS will decide whether to process the task in MEC server or offload it to the cloud. Eq. (1) shows that the delay is affected by both radio and computation resources. The radio resource allocation will affect the transmission delay d tx , and computation resource allocation can change the processing delay d edge . Meanwhile, the scheduling efficiency will affect the queuing delay d que . Following we will explain the communication and computation model.

B. Communication Model
We consider resource blocks (RBs) as the smallest timefrequency resource that is distributed to users. The transmission delay d tx between BS and user equipment (UE) is: where L u is the transmitted packet size of UE u, E j,u is the link capacity between the BS j and the UE u. The link capacity depends on the number of RBs that are allocated to this transmission: where N u denotes the set of RBs that is allocated to UE u, b RB denotes the bandwidth of one RB, N 0 denotes the noise power density, p j,r denotes the transmission power of RB r in BS j. x j,u,r is a binary variable. x j,u,r = 1 means the RB r is allocated to UE u; otherwise x j,u,r = 0. g j,u,r denotes the channel gain between BS j and UE u. J −j denotes the set of BSs except j th BS, U j denotes the set of UEs in BS j , and N j denotes the set of total RBs in BS j .

C. Computation Model
For a computation task from UEs, we assume it requires certain computation resources to complete the task (denoted by number of CPU cycles). Then the processing delay in MEC server d edge is: where c u,q denotes required computation resources of task q from UE u, β denotes the proportion of computation resources allocated to this task (0 ≤ β ≤ 1), and C j denotes the total computation capacity of MEC server in BS j.
On the other hand, BS may decide to offload the task to central cloud computation servers. The d cloud in Eq. (1) is described as: where d up and d down are upload and download transmission delay of the computation task, respectively. d c,que is the cloud queuing delay, and d c,computation is cloud computation delay.
The d down and d c,computation can be omitted because: i) the downloaded packet size after computation is usually much smaller than input packet; ii) the central cloud usually has a very high computation capacity [19]. Then Eq. (5) can be rewritten as: where B is the backhaul capacity, B/L u denote the service rate, and λ is the packet arrival rate. We apply the M/M/1 queue model to describe the upload delay d up = 1 B Ls −λ . Meanwhile, this work mainly focuses the RAN resource allocation, and it is reasonable to assume a fixed cloud queuing delay d c,que . Finally, we assume: i) the task is preferred to be processed in the MEC server of the BS due to the potential benefit of MEC; ii) BS will offloaded the task to central cloud if the queuing time expires the preset target delay [6].

D. Problem Formulation
Here we consider two typical slices: eMBB and URLLC slices. The eMBB slice intends to maximize the throughput, while the URLLC slice requires a lower latency. The intelligent BS needs to balance the requirements of both slices, then we define the problem formulation as following: denote the UE set of eMBB and URLLC slices in BS j, respectively. In eq. (7), a higher eMBB throughput and a lower URLLC latency are expected to maximize the objective. The eq. (7d) guarantees one RB can only be allocated to one UE. Eq. (7e) and (7f) mean that total allocated RBs and computation capacity should not exceed the available resources in the BS j.

IV. KNOWLEDGE TRANSFER BASED RADIO AND COMPUTATION RESOURCE ALLOCATION
In this section, we first introduce the proposed KTRA method, including the knowledge transfer strategy, MDP definition, and the knowledge transfer reinforcement learning. Then we introduce the Q-learning based resource allocation scheme as a baseline algorithm.

A. Knowledge Transfer Strategy and MDP definition.
First, we compare the knowledge transfer reinforcement learning with reinforcement learning to better explain the knowledge transfer strategy. The interaction between agent and task can be described by MDP < S, A, T, R >, where S, A, T , R are the set of states, set of actions, transition probability, and reward function, respectively. As shown in Fig.2, in reinforcement learning, the agent selects an action, receives reward and arrives new state. The agent starts from scratch to explore the task, since no prior knowledge is available in the learning phase.
By contrast, in knowledge transfer reinforcement learning, two agents are involved, namely learner and expert agents. Compared with single learning phase in RL, knowledge transfer reinforcement learning has two phases: knowledge transfer phase and learning phase. In knowledge transfer phase, considering different MDP definitions of two agents, a map function is needed to transform the expert agent's knowledge to the leaner agent. In the learning phase, learner agent utilizes the knowledge of expert agent to improve its own performance on target task. Learner agent is expected to achieve a higher exploration efficiency, since it already has some prior knowledge at the beginning of exploration.
In this work, we define a learner agent for joint radio and computation resources allocation, and an expert agent for radio resource allocation. The expert agent has no knowledge for computation resource allocation, but it's knowledge of radio resource allocation can be used by learner agent. Following we will define the state, action and reward of two agents.
• State: The states of both expert and learner agents are (q embb , q urllc ). q embb denotes the number of tasks in the queue of eMBB slice, and q urllc is defined similarly.
(q embb , q urllc ) represents the demands of two slices, and agent can select actions accordingly. • Action: For the expert agent, it only implements the radio resource allocation, and then the action is defined as (r embb , r urllc ), which represents the number of radio resources allocated to eMBB and URLLC slices. For the learner agent, it considers both radio and computation resource allocation, and then the action is defined as (r embb , r urllc , c embb , c urllc ), where c embb and c urllc denote the computation capacity allocated to eMBB and URLLC slices, respectively. • Reward: The reward is defined by the objective of slices, which is denoted by (7). We also apply a penalty to guarantee the packet drop rate.

B. Knowledge Transfer Reinforcement Learning
Here we will introduce the knowledge transfer reinforcement learning and define the map function for knowledge transfer. In reinforcement learning, to maximize the expected reward, the agent needs to improve its policy π(s t ) to select the best action at state s t , and arrives a new state s t+1 . Then the state value is defined to represent the potential reward of arriving a new state: where V π (s t+1 ) is the state value to describe the expected reward if the agent arrives s t+1 , r t+1 is the reward at time t+1, and γ is the discount factor (0 < γ < 1). Furthermore, we need to define the state-action value to describe the expected reward of taking action a t under state s t . In Q-learning, the Q-values are updated by: where Q old and Q old denote old and new Q-values, respectively, a t is the action at time t, r is the reward, and α is the learning rate (0 < α < 1).
In Q-learning, the agent needs to explore the state-action space to find the optimal action sequence. This exploration usually takes a large number of iterations, because the agent With probability choose actions randomly, otherwise select a l,t by greedy policy. 5: BS allocates radio and computation resource between slices. Slices process computation tasks by allocated MEC server capacity, and allocate RBs by proportional fairness algorithm. 6: Calculating reward based on received metrics. 7: Updating state s l,t , find Q T (F(s l,t ), F (a l,t )). for Every BS do 4: With probability choose actions randomly, otherwise select a l,t by greedy policy. 5: BS allocates radio and computation resource between slices. Slices process computation tasks by allocated MEC server capacity, and allocate RBs by proportional fairness algorithm. 6: Calculating reward based on received metrics. 7: Updating state s t . 8: Updating Q-values by eq.(9). 9: end for 10: end for needs to try huge amounts of action combinations without any prior knowledge. On the contrary, in knowledge transfer reinforcement learning, we use the prior knowledge of experts to improve the exploration efficiency [20]. The Q-values are updated by: Q new (s l,t , a l,t ) =Q T (F(s l,t ), F (a l,t )) + Q old (s l,t , a l,t )+ α(r + γ max a Q(s l,t+1 , a) − Q old (s l,t , a l,t )), where s l,t and a l,t are learner's state and action at time t, respectively. Q T (F(s l,t ), F (a l,t )) is the mapped Q-values as an extra reward of selecting a l,t under state s l,t , which aims to guide the exploration of learner agent. F and F are state and action map functions, respectively. Q T (F(s l,t ), F (a l,t )) can be generated by: where Q e is the Q-values of expert agent, s e and a e are state and action of expert agent. The goal of eq. (11) is to find a specific Q-value of expert agent to represent the potential reward of taking a l,t under s l,t in learner. Thus we need to find similar states and actions in expert agent's Q-table. Note that the expert and learner agents have the same state definition, then we can always find a s e that satisfy s l,t = s e , then F can be easily defined. Meanwhile, based on the definition of actions, for any a l = (r eM , r U R , c eM , c U R ), we consider a e = (r eM , r U R ) as a similar action for mapping, and F can be defined accordingly.
The KTRA algorithm is summarized as Algorithm 1. Noting that we apply a classic proportional fairness algorithm for intra-slice radio resource allocation, because this work mainly focus on inter-slice level scheduling [18], and there is no intraslice computation resource allocation.

C. Baseline Algorithms: QLRA
We apply QLRA as a baseline algorithm. Q-learning is the most generally applied reinforcement learning algorithm. The MDP definition of QLRA is the same with KTRA, but there is no prior knowledge. QLRA is given in Algorithm 2.

V. PERFORMANCE EVALUATION A. Parameter Settings
We consider three different cases, including: • Case I: Q-learning based radio resource allocation. It works as an expert for the Case II. • Case II: KTRA based joint radio and computation resource allocation. As a learner, BSs in Case II can utilize the Q-tables of expert agent as prior knowledge. • Case III: QLRA based joint radio and computation resource allocation. It is considered as a baseline algorithm without any prior knowledge for the task. Each case contains 5 BSs with 500 m inter-site distance, and each BS is considered as an independent agent to implement the proposed strategy. For example, all BSs in Case II will implement the KTRA independently to achieve its own goal. We assume each BS has one eMBB slice with 5 UEs and one URLLC slice with 10UEs. The avaliable bandwidth of one BS is 20 MHz, which contains 100 RBs. We assume there are 13 resource block groups (RBGs) to reduce the allocation complexity. The first 12 RBGs contains 8 RBs each, while the last RBG has 4 RBs. 200 CPU cycles are required to process 1 bit data [13]. Other parameters are shown as Table I.

B. Simulation Results
Firstly, Fig.3 (a) shows the empirical cumulative distribution function (ECDF) of URLLC latency of three cases under 2 Mbps eMBB and URLLC traffic, and 3 GHz MEC server per cell. The result shows that expert case has the highest delay distribution, and the reason is that we assume MEC servers are not deployed in expert. Thus all computation tasks need to be processed in the central cloud, which leads to a higher delay. Meanwhile, the proposed KTRA method outperforms QLRA by a better delay distribution, as indicated by a lower ECDF curve in Fig.3 (a), and it can be explained by the knowledge transfer capability of KTRA. Fig.3 (b) presents the average delay experienced by URLLC UEs, and Fig.3 (c) shows the average eMBB throughput per cell. Here the eMBB traffic load is fixed to 2 Mbps per cell,  Fig.3 (d) and (e), we investigate the network performance under various MEC server capacities, which is indicated by CPU cycles per second. Considering expert case has no MEC capability, we focus on the performance of KTRA and QLRA to further present the advantage of proposed method. As expected, both algorithms have a lower URLLC delay and a higher eMBB throughput by increasing the MEC server capacity, because higher computation capacity means lower task processing delay. KTRA still outperforms QLRA by a 15.1% lower URLLC delay and a 33.8% higher eMBB throughput under 3 GHz MEC server capacity.
Furthermore, we compare the convergence performance in Fig.3 (f). Based on prior knowledge of expert, KTRA has a significantly higher exploration efficiency, which is indicated by a shorter exploration period and a higher average reward. On the contrary, QLRA suffers a longer exploration phase and a lower average reward, because it needs to explore the task from scratch. To summarize, KTRA achieves a better performance in both network metrics (higher URLLC delay and lower eMBB throughput) and machine learning metrics (better convergence speed and higher average reward).
Finally, the packet drop rate of KTRA and QLRA are 0.042% and 0.048%, respectively, under 2 Mpbs eMBB traffic and 4 Mbps URLLC traffic. The satisfying packet drop rate is because we apply a penalty in both algorithms to prevent dropping packet.

VI. CONCLUSION
The evolving network architecture requires more efficient solutions for network resource allocation. In this work, we propose a KTRA method for joint radio and computation resource   allocation. Compared with existing works, the main difference is that the proposed method has a knowledge transfer capabil-ity. The proposed KTRA method is compared with Q-learning based resource allocation, and KTRA presents a 18.4% lower URLLC delay and 30.1% higher eMBB throughput as well as a faster convergence. In the future, we will consider the knowledge transfer of tasks with different state definition.