# A Framework for User Traffic Prediction and Resource Allocation in 5G Networks
## 6 Discussion  
The approach shows very promising results in both predicting user traffic and allocating to base stations based on the predicted traffic. The combination of ML-based traffic prediction and our adaptive user allocation strategy shows the potential of the model to be applied to operational 5G networks, with the aim to improve the QoS and reduce network congestion in densely populated urban centers. The capability to combine the capture of temporal features in user traffic and spatial features from our previous work in user allocation is a significant step towards a holistic approach in data-driven resource allocation for 5G networks. Moreover, the ability to anticipate network demands through the user traffic prediction module can also be used separately with all user allocation systems that can integrate future predictive resource demand into their strategy. The most significant advantage of the framework is the incorporation of historical trends in real-time data, which creates the ability to quickly adapt to changing conditions of the network. Capturing long-term trends in user traffic data is underexplored in current literature, with most works focusing in short-range predictions [18] or predictions depending on the previous frame [19]. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Without UserTrafficPred** & \multicolumn{2}{c}{**With UserTrafficPred**} \\ \hline
**Loss** & **Accuracy** & **Loss** & **Accuracy** \\ \hline
0.37 \(\pm\) 0.02 & 0.80 \(\pm\) 0.01 & 0.32 \(\pm\) 0.02 & 0.84 \(\pm\) 0.01 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: CNN’s accuracy metrics. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & & **RMSE** & \\ \hline
**Loss Configuration** & **Beginning** & **Middle** & **End** \\ \hline MSE\_Only & 3500.426 & 2963.618 & 1300.578 \\ MSE\_Direction & 2820.053 & 2543.905 & 1040.686 \\ MSE\_Volatile & 3274.975 & 2359.294 & 1344.490 \\ MSE\_Dir\_Vol & 3311.516 & 2395.418 & 1298.337 \\ \hline \hline \end{tabular} The RMSE and Directional Accuracy metrics are reported during inference at test points at (i) the beginning, (ii) the middle, and (iii) the end of the test dataset.  
\end{table} 
Table 5: Loss configuration results. In [21], the authors present their GNN approach and other frameworks for user traffic prediction in the literature comparing the results of their datasets. They report a performance of at best 88% accuracy, while previous methods go up to 76%. The dataset is of cellular network traffic in the city of Milan and seems to be more sensitive to data volatility. This could be due to the difference in network requirements of the users and the fact that it is just cellular network traffic instead of complete internet traffic that the 5G Traffic dataset consists of. Moreover, the LSTM presented in [6] indicates a better performance up to 95% accuracy for long-term user traffic prediction. This method shows a performance very similar to ours. Our method shows more than 99% accuracy, but this is due to the dense nature of the data stemming from a very large dataset. The hybrid Transformer-TCN architecture used for the traffic prediction module has been shown to be simple yet effective for both short- and long-term predictions. In this architecture, the Transformer module could be replaced by the Informer [36] one and perform just as well or even better. The Informer is an extension of the Transformer model, with many modifications focusing on efficiency. The whole hybrid architecture could also be compared to the Temporal Fusion Transformer (TFT) [37], which is capable of handling multi-horizon temporal dependencies. The incorporation of either models in the framework remains as future work. The main limitation of the system is its dataset. As with most data-oriented approaches, the data is the most important part of any such system. The data used to train the models was gathered in dense urban environments, which creates strong statistical features through the very large number of users and common patterns between them.