# Machine Learning Techniques for Non-Terrestrial Networks
## 6 Machine Learning Techniques in NTN
### ML for NTN Service  
In the following, for each NTN service presented in Section 4, the adoption of some ML techniques is provided. **Moving cell connectivity. ** Deploying a reliable service for private/public transport, especially in high-speed scenarios, such as airplanes or trains, can be challenging. As stated before, LEO or HAPS are NTE that should be considered to solve this problem. RL Q-Learning algorithms can be used to dynamically adjust the position of HAPS with the aim of maximizing the network capacity and minimize the transmission latency. As an example, the trajectory planner has to position the HAPS according to the total number of users under the footprint, with their service requirements, while predicting their trajectory. Moreover, the nearest LEOs positions and trajectories have to be taken into consideration as well if space links are required to fulfill the service. RL-based approaches are also used to control the disconnectivity time and handover rate by taking into account the UAV battery lifetime and the remaining time to accomplish the requested task. In [35], the use of RL improved the NTN performance by reducing the handover rate compared to traditional strategies. More specifically, the authors used an objective function \(f(T_{tr},P_{u},T_{d},\mathcal{R}_{h})\) composed of several factors, such as the task completion time \(T_{tr}\), the power consumption \(P_{u}\), the disconnectivity time \(T_{d}\) and the handover rate \(\mathcal{R}_{h}\). According to their simulation results, the adoption of RL reduced the handover rate by 50%, compared to a blind strategy. In [35], only UAVs are taken into account, but NTNs could benefit from the RL-powered handover rate reduction as well. In this case, many optimizations are possible, for example, between the same type of NTEs (e.g., LEO) or between different NTEs (e.g., LEO and HAPS). **Unserved/Under-served and isolated areas. ** This scenario is partially similar to the previous one, and therefore, reinforcement Q-Learning techniques with the aim of finding the best position of the NTE can be exploited, too. In this case, UAVs can be adopted as well, and thus, new challenges should be considered. Special attention should be given to the energy resource management. Scheduling to ground UEs can be assisted by RL in order to minimize the Age of Information (AoI) and minimize the energy consumption. Low power devices, such as mMTC sensors, can also benefit by ground-air multi-access edge computing (MEC) by offloading computation depending on the task resource requirements. In order to obtain better QoS, multi-user MEC offloading should be properly designed. As an example, in [36], a fully distributed game-based ML algorithm is used to obtain the Nash equilibrium without any information exchange. This work showed that applying ML leads to better offloading strategies and therefore better overall performance. In this work, the authors considered the average response time and the average energy consumption as performance metrics. Simulations proved that by using ML, the average cost per device can be reduced by 50-60% with respect to a random or even offloading strategy. **Throughput increase. ** Dedicated NTEs can be used to temporarily increase the network capacity adding extra links and therefore improving the quality of experience (QoE) of the served users. During outdoor events, dedicated UAVs can be deployed above crowded areas. As discussed before, ML and especially RL can help in 3D positioning, but in this particular scenario, UAVs can also help by content caching/storage, offering significant improvements in latency performance compared to remote cloud servers. Caching in the user proximity can ease the burden on the network at the backhaul, core and network levels. However, several research problems arise, such as what, when and how to cache contents. ML can help in estimating future user requests, based on several learnable factors, and producing optimized caching decisions.