r improve sys- tem performance, we designed user scheduling and power allocation algorithm. Simulation results from three different datasets demonstrated that the proposed scheme can signifi- cantly reduce the communication latency without any compromise on the test accuracy. Secure Spectrum Sharing with Machine Learning: An Overview 10.1 Background The exponential growth of Internet-connected systems has generated numerous challenges for current and future wireless systems. One main issue is spectrum shortage. Even though Chapters 2-9 have discussed using 5G NR technology (mainly NOMA), as well as CR to alleviate this challenge, it is still urgent to call for an adaptive, reliable, and scalable spec- trum sharing (SS) mechanism, such that the scarce spectrum resources can be efficiently utilized. Furthermore, the complicated communication environment brings more risks to the users and systems. Thus, security and privacy issues have become the primary concern in 5G networks. As an example, the recent spectrum battle between federal aviation admin- istration (FAA) and several Internet service providers (ISPs) over 5G C-band has brought attention on the radio security for airplanes when 5G is in active deployments [195]. Different from traditional exclusive frequency allocations, SS by definition involves multiple entities and uses the spectrum in a shared way in order to increase the efficiency of the limited spectrum resources. According to [40], SS can fall into two main categories: horizontal sharing and vertical sharing. In horizontal sharing, it implies that all the networks and users have equal rights to access the spectrum. Such methods allow the users to co-exist peacefully and efficiently. Vertical sharing, on the other hand, allows multi-type users to access the spectrum resources with different rights. Therefore, secondary users (SUs) can use the spectrum without harming the performance of primary users (PUs). By enabling SUs to access the spectrum owned by the PUs, the limited spectrum resource can sup