Proposal and Investigation of a Convolutional and LSTM Neural Network for the Cost-Aware Resource Prediction in Softwarized Networks

2021. Abstract: Resource prediction algorithms have been recently proposed in Network Function Virtualization architectures. A prediction-based resource allocation is characterized by higher operation costs due to: (i) Resource underestimate that leads to quality of service degradation; (ii) used cloud resource over allocation when a resource overestimate occurs. To reduce such a cost, we propose a cost-aware prediction algorithm able to minimize the sum of the two cost components. The proposed prediction solution is based on a convolutional and Long Short Term Memory neural network to handle the spatial and temporal correlations of the need processing capacities. We compare in a real network and trafﬁc scenario the proposed technique to a traditional one in which the aim is to exactly predict the needed processing capacity. We show how the proposed solution allows for cost advantages in the order of 20%.


Introduction
The main advantages of NFV is the flexibility in allocating processing and bandwidth resources [1,2] and the possibility of running the Virtual Network Function Instances (VNFIs) where and when needed and appropriately dimensioning their memory, disk and processing resources. This increased flexibility allows to efficiently handle the traffic variations and it is achieved by applying some techniques: (i) The vertical scaling [3], whereby cloud resources are reconfigured, e.g., by changing the number of processing cores to the VNFIs as traffic changes; (ii) the VNFI migration [4], whereby the NFVI-PoP executing the VNFI is changed over time with the possibility of performing resource consolidation and consequently achieving cost saving.
We have proposed the Asymmetric Traffic Prediction-based Allocation (ATPA) algorithm [5][6][7] in which the resources are allocated on the basis of a traffic prediction based on both resource allocation and QoS degradation costs. The allocation cost is the rent cost of the processing cores. The QoS penalty cost is a compensation cost for the user when cloud resources are under-allocated and QoS degradation (i.e., packet loss or delay increase) occurs. The prediction models used in [5] are based on both traditional (i.e., Seasonal AutoRegressive Integrated Moving Average) and Artificial Intelligence (AI)-based (i.e., Long Short Term Memory) models.
In this paper we follow a different approach and we propose the Asymmetric Processing Resource Prediction-based Allocation (APRPA) algorithm. Based on the measurement of processing capacities required by the VNFIs in measurement periods, APRPA evaluates the processing capacities to be allocated to the VNFIs in time instants after the measurement times. Unlike all the solutions proposed in the literature, APRPA does not aim at predicting the needed processing capacities (it would be impossible to exactly do that because of the non-predictable components of traffic) but at over-allocating or under-allocating the cloud resources according to the values of the allocation and QoS penalty costs.
The advantages of APRPA with respect to ATPA are the following: • its resource-based prediction allows for a more implementable and European Telecommunications Standards Institute (ETSI)-compliant solution; in particular we highlight which are the ETSI functional blocks that may be involved in the allocation and prediction procedure; • APRPA is based on a convolutional and Long Short Term Memory (LSTM) neural network able to handle both spatial correlations of the processing capacities of the VNFIs located in each NFVI-PoP and the temporal correlation in a single VNFI; conversely ATPA performs a simple traffic prediction with a LSTM neural network able to handle temporal correlation only; • APRPA allows for a more accurate prediction, consequence of multiple SFCs sharing a single VNFI that leads to the prediction of an aggregated requested processing capacity; conversely ATPA predicts the traffic of a single SFC.
The main contributions of the manuscript are the following: (i) a resource allocation framework aiming at allocating the cloud resources so as to minimize a cost function depending on both the allocation and QoS degradation costs; (ii) a simulation study of the proposed allocation framework and its effectiveness evaluation with respect to the ATPA algorithm and the Symmetric Processing Resource Prediction-based Allocation (SPRPA) [8] benchmark algorithm in which the allocation is performed by applying a traditional approach in which the aim is to exactly predict the needed processing capacity and based on the minimization of the Root Mean Squared Error.
The related work and the research contributions are illustrated in Section 2. The NFV architecture with Artificial Intelligence (AI)-based resource allocation is discussed in Section 3. We describe the cost-aware convolutional and LSTM-based resource allocation framework in Section 4. The main numerical results are shown in Section 5. We report the main conclusions in Section 6.

Related Work and Research Contribution
The evolution towards high bandwidth and QoS services drives technological evolution towards the design and implementation of fifth generation (5G/6G) broadband wireless networks. Ref. [9] Among these technologies, NFV is one of the most important and consists in decoupling the software running the service functions from the hardware platform.
NFV is now considered a key technology for the development of access [10] and core [1] network segments. Since the NFV paradigm has been introduced by ETSI [11,12], many resource orchestration algorithms have been proposed and investigated [13,14]. Most of them are based on knowledge of traffic and solving optimization problems and/or heuristics. Offline [15] and Online [16,17] algorithms have been considered. When traffic variations occur, resource reconfiguration algorithms [18] have been proposed. Most of them are based on a reactive approach according to which resources are reconfigured as soon as traffic changes are detected. These solutions have proven to be ineffective due to the high time required to reconfigure cloud resources which can be in the order of ten minutes [19]. Recently prediction-based proactive approaches have been proposed [19,20]. Both traditional and Artificial Intelligence techniques are used to estimate traffic and/or needed resources.
Tang et al. [21] propose a traffic prediction method for scaling resources in NFV environments based on traffic modeling with an Autoregressive Moving Average (ARMA); the predicted traffic values are obtained by minimizing the Root Mean Squared Error (RMSE).
Oliveira et al. [22] present a joint approach of an Adaptive Demand Forecasting model and an Slice Allocation algorithm in softwarized networks; they apply three of the most popular forecasting techniques: Autoregressive Integrated Moving Average (ARIMA), Holt-Winters and Neural Network Auto-Regressive (NNAR); all of the three forecast methodologies are based on the minimization of the RMSE.
Among the solutions based on the prediction of the resources to be allocated, Farahnakian et al. [23] propose regressive algorithms for estimating memory and processing consumption in cloud datacenters. Some solutions [19,24,25] have been proposed on the prediction of host load in cloud infrastructures; these solutions are based on time series forecasting with LSTM recurring neural networks; however, all are based on minimizing the RMSE.
Subramanya et al. [26] propose prediction-based VNFI scaling solutions in virtualized Mobile Edge Computing (MEC) environments; the prediction is performed by applying some types of neural networks (convolutional and LSTM) and with the application of federated machine learning; the objective is to scale the resources by either maximizing the Quality of Service or minimizing the operational cost of the service provider; the optimization is performed by minimizing symmetric loss function as the RMSE, MAE (Mean Absolute Error) and Huber function.
We have proposed the ATPA algorithm based on Seasonal Auto-Regressive Integrated Moving Average (SARIMA) [5,6] prediction with asymmetric loss function; because estimation errors are inevitable and because the error sign can have an impact on the network cost depending on the resource allocation and QoS degradation costs, we have proposed a solution in which the defined loss function gives higher (lower) weight to errors that result in a higher (lower) network cost. We have shown how the proposed solution allows for 30% network cost reduction with respect to the case in which a symmetric cost function as RMSE is chosen.
Moreover, all the necessary cloud resource prediction techniques proposed in literature are always based on symmetrical cost functions i.e., RMSE and MAE. For this reason we propose the APRPA algorithm in which the allocation is based on both the VNFI processing capacities prediction and a convolutional and LSTM resource allocation framework in which the cloud resources are allocated based on the minimization of a asymmetric cost function depending on the cloud resource allocation and QoS degradation costs. The solution may be extended to any prediction framework. Finally we also show an extension of the ETSI NFV architecture supporting the proposed solution.

NFV Network Architecture with AI-Based Resource Allocation
An example of ETSI compliant NFV network [11,12] is reported in Figure 1. It is composed by NFVI-PoPs interconnected by a network infrastructure. The interconnection of the NFVI-PoPs is accomplished by means of either electrical [27] or optical [28,29] networks. LetḠ = (Ū,L) denote the graph in whichŪ =Ū NP ∪Ū S characterizes the set of NFVI-PoPs (Ū NP ) and the set of network switches (Ū S ) andL characterizes the set of network links. We assume that the NFVI-PoPū ∈Ū NP is equipped with Nū cores. In view of a multi-provider scenario we assume that the processing resource costs may be different for the various NFVI-PoPs and denote with cū core the cost of renting one core per one hour ($/h) for the NFVI-PoPū ∈Ū NP . The NFVI-PoPs are able to instantiate VNF Instance (VNFI) than can execute a given Service Function (SF), i.e., Firewall, Proxy, DPI,. . . We assume that the VNFIs can belong to Q types; the i-th (i ∈ [1..Q])) type VNFI is characterized by the allocation of n c i processing cores when the maximum processing capacity (Gbps) C pr,max i is provided by the VNFI. The traffic variation is handled by a vertical scaling technique [3] that assigns more/less cores when the traffic increases/decreases. In particular we assume that the i-th (i ∈ [1..Q]) type VNFI can work in n c i operation modes. The j-th (j ∈ [1..n c i ]) operation mode is characterized by the allocation of j cores and the guarantee of a processing capacity of C pr i,j = j  The following functional blocks are reported in Figure 1 [11]: • the VNF Manager (VNFM) manages the lifecycle of VNFIs; it is provided with a Monitoring Agent (MA) whose task is to measure the processing capacity used by the VNFI; • the Virtual Infrastructure Manager (VIM) controls and manages the NFVI-PoP resources; it is provided with an Allocation Agent (AA) whose task is to collect the data measured by the VNFIs and execute the algorithm for evaluating the processing capacities to be allocated to the VNFIs; • the NFV Orchestrator (NFVO) manages the lifecycle of Network Services; it is provided with a Reconfiguration and Placement Agent (RPA) whose task is to execute an algorithm for the resource reconfiguration and the VNFI placement on the basis of the processing capacities to be allocated to the VNFIs.
The proposed procedure consists of four main steps: • Step-1: The MAs continuously monitor on a periodic basis with duration T m and using the Ve-Vnfm-vnf ETSI interface [12] the processing capacity required by the VNFI; let us consider the reference NFVI-PoPū ∈Ū NP of Figure 1 and let Nū V NFI be the number of instantiated VNFIs. Next we denote with Step-2: The measured processing capacities cū h,j are retrieved on the Vi-Vnfm ETSI interface [12] from the AA that trains a neural network in order to determine the processing capacity to be allocated to the VNFIs; we assume the allocation procedure is performed on a periodic basis with duration T a ; we denote with S the ratio of T a to T m and witĥ cū h,nS (ū ∈Ū NP ; h ∈ [1..Nū V NFI ]; n ∈ [1..∞)) the processing capacity to be allocated to the h-th VNFI in t ∈ [nT a , (n + 1)T a ];ĉ h,nS is evaluated by a neural network based on knowledge of the required processing capacities required and measured in L previous MIs that is the values Step-3: The NFVO receives on the Or-Vi interface [12] from all of the VIMs the processing capacitiesĉū h,nS (ū ∈Ū NP ; h ∈ [1..Nū V NFI ]; n ∈ [1..∞)) to be allocated and decides if new VNFI placement, VNFI migration and updating of processing capacity allocated to the VNFI have to be performed. • Step-4: The placement and reconfiguration operations are conducted through the VIM and using the Or-Vi and Nf-Vi interfaces.
The determination of the processing capacitiesĉū h,nS (ū ∈Ū NP ; h ∈ [1..Nū V NFI ]; n ∈ [1..∞)) to be allocated to the VNFIs are determined by a convolutional and LSTM neural network and trained by minimizing the network cost. Such a cost is characterized by two components: The first one is the cloud resource allocation cost; the second one occurs when the resources are under-allocated and QoS degradation is introduced for a fraction of the offered traffic.
Finally many reconfiguration and placement algorithms have been proposed in literature [30]. The goal of this paper is not to propose a new one. We adopt a simple reconfiguration algorithm, inherited from [27] in which migrations are not involved and allowing us to verify the effectiveness of the proposed allocation procedures.

Convolutional/LSTM-Based Resource Allocation Framework
The loss function depends on two factors: The first one is the cloud resource allocation cost; the second one is the QoS degradation cost which occurs when the resources are under-allocated and QoS degradation is introduced for a fraction of the offered traffic.
To express the allocation cost we introduce the parameter Cū RA,i (i ∈ [1..Q];ū ∈Ū NP ) which is referred to as allocation cost per Mb of traffic, it is expressed in ($/Mb) and it characterizes the cost of processing one Mb of traffic for the i-th type VNFI in the NFVI-PoP u ∈Ū NP ; its expression is given by: The QoS degradation cost characterizes the compensation cost due to a user when the processing resources are under-allocated; the QoS degradation may involve the loss and/or the delay of processing tasks and the service providers have to compensate a user when the task average delay, a given delay percentile or the loss are increased with respect to the ones agreed in the Service Level Agreement; the expression of the QoS degradation cost is complex and depends on the several factors: (i) The chosen task queuing model; (ii) the traffic model at packet level that is trivial to assume, as often done in the literature, according to exponential distributions; (iii) a cost model which translates the QoS degradation in a monetary cost. The definition of these aspects is out of the scope of the paper and we assume a simple cost model in which the QoS degradation cost in an allocation interval depends linearly on the following parameters: (i) the unallocated processing capacity (Mbps); (ii) the duration of the interval; (iii) the degradation cost C QoS per Mbit of traffic which is expressed in ($/Mb) and characterizes a compensation cost due to a user when one Mb of traffic does not receive the agreed QoS. We will carry out an analysis in which the parameter C QoS is varied so as to evaluate scenarios with more or less monetary penalty when QoS constrains are not satisfied. Finally we point out that the solution can easily be extended to the case where more sophisticated QoS cost models are used.
Next we propose a neural network trained with a loss function that takes into account both resource allocation and QoS degradation costs. The inputs of the neural network are the measured VNFI processing capacities in an NFVI-PoP. The outputs are the processing capacities to be allocated in an allocation period. These capacities will be supported by allocating a sufficient number of cores to the VNFIs.
The considered neural network is composed by two main stages: (i) a convolutional layer able to handle the spatial correlations among the processing capacities required by the VNFIs running in a same NFVI-PoPs; (ii) an LSTM layer able to handle the temporal correlation of processing capacities of a same VNFI in different monitoring periods.
We describe the neural network architecture in Section 4.1, while the structure of the loss function used for the training is described in Section 4.2.

Convolutional/LSTM Neural Network
The neural network architecture is illustrated in Figure 2. It is composed by six stages referred to as normalization, convolutional, flatten, LSTM, feed-forward and denormalization. The normalization layer provides to normalize in the range [0, 1] the measured processing capacities; Let us denote with cū j and cū ,nor j the vector of the measured processing capacities and the one of their normalization, respectively, in the j-th MI for the NFVI-PoP u ∈Ū NP . The normalized processing capacity vector cū ,nor j is evaluated according to the following expression: where o Nū V NFI denotes a ones' vector of size Nū V NFI , C min and C max denote the minimum and maximum processing capacities, respectively.
The 1-D convolutional layer aims at extracting the spatial features; convolutions are performed between the normalized capacity vector cū ,nor j and N F Kernel filters referred to as k i i ∈ [1..N F ]. The convolution vectors dū j,i are evaluated according to the following expression: where the symbol ⊗ denotes the convolution operator. The size of the vectors dū j,i (j ∈ [n..n − L + 1]; i ∈ [1..N F ]) equals Nū V NFI − S F + 1 if Kernel of size S F are used. The outputs of the 1-D convolutional layer are the matrices Dū j j ∈ [n..n − L + 1]; each of them has as rows the convolution vectors evaluated in the corresponding monitoring interval.
As the input of each LSTM cell accepts only vectors, the LSTM layer is preceded by a flatten one whose function is to place for the j-th monitoring interval the rows of the matrix Dū j in the vector x j of size (Nū V NFI − S F + 1)N F .
The LSTM layer is used to handle the temporal correlations. LSTM is a variant of the recurrent neural network (RNN), has special designs for overcoming the gradient vanishing problem that troubles conventional RNNs. LSTMs have shown their strength in handling sequential data, and have been applied successfully in various tasks, such as image captioning,language modeling, video analysis [31] etc. The LSTM layer has as inputs the vectors x j (j ∈ [nS..nS − L + 1]). The final output h nS is processed by a feed forward neural network which evaluates the vectorĉū ,nor nS of normalized processing capacity values. In the LSTM Cell Block LCB j , shown in Figure 3, the state variable s j (j ∈ [nS..nS − L + 1]) in the j-th MI is updated according to the knowledge of the spatial feature x j evaluated in the j-th MI, the output h j−1 and the state variable s j−1 of the LSTM Cell Block LCB j−1 . The LSTM innovative idea is to introduce the forget and input gates that decide which components of the state vector have to be deleted (forget gate) and preserved (input gate). An output gate is also introduced that controls what information encoded in the state variable is sent to the output h j of the LSTM Cell Block LCB j . The updating of the state s j and the evaluation of the output h j are performed according to the following expressions:  Finally the Feed Forward layer outputs the normalized processing capacitiesĉū ,nor nS and the de-normalization one provides the not normalized processing capacitiesĉū nS to be allocated in the allocation period. They are achieved from the following expression: j ∈ [n..n − L + 1]

Training Algorithm
Though the model is composed of two different kinds of network architectures, i.e., the Convolutional and LSTM Neural Networks, it can be jointly trained with one loss function. In order to our neural network to predict by taking account the sign of prediction error, its loss function cannot be symmetrical as in classical predictors such as Root Mean Squared Error (RMSE) or the Mean Absolute Error (MAE). We define an asymmetrical one that weighs allocation errors e h,nS+j = cū h,nS+j −ĉū h,nS (h ∈ [1..Nū V NFI ]; j ∈ [1..S]) differently. In particular a positive error corresponds to resource under-allocation and leads to QoS degradation with a cost penalty of C QoS for each Gbit not allocated. Conversely negative errors lead to over-allocation problems and to higher costs of allocated capacity resources; in particular for each Gbit of over-allocated capacity the cost is given by Cū RA,i expressed by (1) for the i-th (i ∈ [1..Q]) type VNFI belonging to the NFVI-PoPū ∈Ū NP . For this reason the expression of the loss function J is the following: where αū i,h is a binary variable assuming the value 1 if the h-th VNFI of the NFVI-PoP u ∈Ū NP is of i-th type; otherwise its value is zero Finally the training of the neural network is performed by applying the RMSprop algorithm proposed by Tieleman and Hinton [32].

Numerical Results
The performance of the APRPA algorithm is compared to the ones of two benchmark algorithms: (i) SPRPA in which the allocation is performed by applying a traditional approach with the objective to exactly predict the needed processing capacity and based on the minimization of the Root Mean Squared Error; (ii) ATPA [5,6] in which the resources are allocated on the basis of a traffic prediction based on both resource allocation and QoS degradation costs.
The comparison is carried out for the USAnet network of Figure 4 with 24 switches and 47 links.
It is equipped with five NFVI-PoPs, all provided with the same number N core = 48 of cores. The core costs are chosen according to real prices [33] and their values are differentiated and equal to c respectively. We report in Table 1 the processing capacity and the allocated cores for the various operation modes of the VNFIs.    Table 2 for the various VNFI types and NFVI-PoPs. The costs are evaluated according to the expression (1).
The monitoring procedure is performed by the MAs every T m = 10 min. The VIM determines the processing capacities to be allocated to the VNFIs of an NFVI-PoP for a time period T a equal to 10 min, 30 min and 60 min to which correspond values of the parameter S equal to 1, 3 and 6, respectively. The high number of hyperparameters makes their optimization not as simple as in [35]. Their choice has been optimized for each of the five NFVI-PoPs and for each value of S. It has been performed as follows: • the look-back parameter L has been choice by studying the partial autocorrelation function (PACF) [36] of the processing capacities of the training set; it has been chosen the first value in which the PACF has a negligible value (10 −2 ); • the Kernel filter size S F has been chosen equal to the number of VNFIs executing in each NFVI-PoP; • the remaining hyperparametrs (the number N nr of neurons of the LSTM layer, the number N F of Kernel filters and the batch size N sz ) have been chosen by performing a sensitivity analysis with the KerasTuner software [37]. KerasTuner is an easy-touse, scalable hyperparameter optimization framework that solves the pain points of hyperparameter search. Easily configure the search space with a define-by-run syntax, then leverage one of the available search algorithms to find the best hyperparameter values for the models. We have chosen the KerasTuner option that performs the hyperparameter optimization with the Hyperband algorithm.
We report in Table 3 the values of the optimized hyperparameters for each of the five NFVI-PoPs and a value S equal to 1.  Finally the total number N ep of epochs is determined by applying a early stopping procedure and using the validation set. The effectiveness of the APRPA algorithm is studied in Figure 5 where we report over time (expressed in multiples of T m ) the required processing capacity and the ones to be allocated to a Firewall VNFI in the NFVI-PoP 1 . The allocation time T a is chosen equal to 60 min that leads to a value of S equal to 6. We report four allocation curves: (i) the first one when SPRPA is applied and the loss function of the Convolutional/LSTM neural network is characterized by the conventional Root Mean Squared Error (RMSE); (ii) the other three are ones achieved by applying the APRPA solution and characterized by the Asymmetric Mean Absolute Error (AMAE) that appropriately weights the resource allocation and QoS degradation costs. The choice of the core costs and the VNFI type leads to an average allocation costC RA equal to 1.86 * 10 −5 $/Gb. The QoS degradation cost C QoS is chosen equal to 9.30 * 10 −6 $/Gb, 9.30 * 10 −5 $/Gb, 9.30 * 10 −4 $/Gb for the three curves, respectively, that is values lower than, equal to and higher than the average allocation cost of the NFVI-PoP 1 . From Figure 5 we can remark that: (i) when the QoS degradation cost C QoS equals the average resource allocation cost we have similar values of allocated capacities for the APRPA and SPRPA algorithms; (ii) when the QoS degradation cost is lower (higher) than the average allocation cost, we can observe that APRPA solution tends to allocate less (more) processing resources with respect to the SPRPA one. Figure 5. Required and allocated capacities over time to a Firewall VNFI in the NFVI-PoP 1 . Monitoring and Allocation Times T m and T a are chosen equal to 10 min and 60 min, respectively. Four allocation curves are reported: The one based on RMSE and the ones based on AMAE with C QoS = 9.30 · 10 −6 $/Gb, C QoS = 9.30 · 10 −5 $/Gb and C QoS = 9.30 · 10 −4 $/Gb. We report in Figure 6 the total network cost as a function of the QoS degradation cost C QoS for the RMSE and AMAE solutions when the allocation time T a is chosen equal to 10 min, 30 min and 60 min to which correspond values of the parameter S equal to 1, 3 and 6, respectively. The total network cost is given by the sum of the costs of the VNFIs executed in all of the NFVI-PoPs. The values of normalized RMSE and AMAE of the SPRPA and APRPA algorithms for the five NFVI-PoPs are reported in Table 4 to show the prediction effectiveness in the case of S equal to 1, 3 and 6 and QoS degradation costs C QoS equal to 1.85 · 10 −5 $/Gb, 1.85 · 10 −4 $/Gb, 5.56 · 10 −4 $/Gb and 9.26 · 10 −4 $/Gb. Table 4. Values of normalized RMSE and AMAE of the APRPA and APRPA algorithms, respectively, in the case of S equal to 1, 3 and 6 and QoS degradation costs C QoS equal to 1.85 * 10 −5 $/Gb, 1.85 * 10 −4 $/Gb, 5.56 * 10 −4 $/Gb and 9.26 * 10 −4 $/Gb. C QoS = 1.85 · 10 −5 2.29 · 10 −1 3.04 · 10 −3 3.23 · 10 −1 4.45 · 10 −3 3.67 · 10 −1 5.09 · 10 −3 C QoS = 1.8 · 10 −4 2.29 · 10 −1 7.07 · 10 −3 3.23 · 10 −1 1.09 · 10 −2 3.67 · 10 −1 1.25 · 10 −2 C QoS = 5.56 · 10 −4 2.29 · 10 −1 7.55 · 10 −3 3.23 · 10 −1 1.09 · 10 −2 3.67 · 10 −1 1.43 · 10 −2 C QoS = 9.26 · 10 −4 2.29 · 10 −1 7.65 · 10 −3 3.23 · 10 −1 1.11 · 10 −2 3.67 · 10 −1 1.35 · 10 −2

SPRPA
We also report the two total resource allocation and QoS degradation cost components in Figures 7 and 8, respectively. We show the results in the case of interest in which the QoS degradation cost C QoS is higher than the average allocation costC RA .
We can observe that for both SPRPA and APRPA solutions a decrease in T a leads to lower total costs. As a matter of example, when C QoS equals 7.41 * 10 −4 $/Gb and the APRPA solution is applied, the total cost equals 219 $, 255 $ and 266 $ for T a equal to 10 min, 30 min and 60 min, respectively. The reason of this cost decrease is consequence of the possibility to allocate cloud resources so as to appropriately follow the required processing capacity.   Figure 6 again confirms how the minimization of a loss function taking into account both the allocation and QoS degradation costs allows for better performance in term of total network cost. For instance when T a and C QoS are equal to 60 min and 4.63 * 10 −4 $/Gb, respectively, the total network cost is equal to 425 $ and 248 $, respectively, for SPRPA and APRPA. The only minimization of the RMSE may lead to worse performance because of the error sign that differently impacts on the total network cost when the allocation and QoS degradation costs are different.
In particular we can notice from Figure 6 how the increase in C QoS leads to a rapid increase in the total network cost in the SPRPA solution because it is not able to limit the total QoS degradation cost as highlighted in Figure 8. Conversely the APRPA solution is able to apply the appropriate countermeasures, to over-allocate the processing resource and to reduce the total QoS degradation cost as highlighted in Figures 7 and 8 where we notice an increase in total resource allocation cost (due to the resource over-allocation) and a decrease in total QoS degradation cost.
Finally the APRPA algorithm is compared with our previous ATPA solution [5,6] in Figure 9 in which traffic prediction is only performed. We can observe the better performance of APRPA with 10% gain. The main reason is that APRPA performs a prediction on processing capacities requested by aggregated traffic; convesely ATPA performs the forecast on the single SFC only.

Conclusions
A Convolutional/LSTM neural network for the processing capacity prediction in NFV networks has been proposed and evaluated. We have described how the prediction procedure may be supported in an ETSI NFV architecture. The allocation framework decides the amount of processing resources to allocate to each VNFI based on the monitoring of the processing capacities required by the VNFIs in past time intervals. The Convolutional/LSTM neural network is characterized by a loss function that allows for a minimization of the allocation and QoS penalty cost. We have shown how the proposed solution outperforms the traditional ones.