## 4 Discussion and Conclusions  
Spectrum sensing encompasses numerous aspects, with one fundamental yet critical challenge being the balance between computational complexity and performance. This study proposes a multistage approach that employs DL to adaptively estimate the energy detector threshold by utilizing only the time domain representation of received signal samples. The aim is to achieve a delicate equilibrium between computational complexity and performance. The proposed model distinguishes itself through its simplicity, relying exclusively on time domain samples affected by RF impairments, thus avoiding the need for additional feature extraction operations or transformations. It is noteworthy that some transformations excel at extracting valuable features, even in the presence of severe channel impairments. Therefore, abstaining from their use presents additional challenges. Nevertheless, our system effectively tackles these challenges within the time domain, achieving outstanding performance with low false alarm (3.85%) and missed detection (3.06%) rates, all while jointly mitigating channel impairments and conducting spectrum sensing. We leverage the received samples, which are influenced by RF impairments, to estimate the transmitted signal. By estimating the energies of both the transmitted and received signals, we can compute the noise energy necessary for threshold estimation. This noise energy is then multiplied by a correction factor, denoted as k, to further refine the threshold estimation process. The multistage approach incorporates an FCN for accurate CFO estimation and explicit CFO correction. Phase offset estimation, correction, and noise suppression are implicitly handled by a U-Net-based autoencoder network. Energy calculations are performed on the received and estimated transmitted signals to estimate the noise energy. Finally, the energy of the received signal and the k-adjusted noise energy are used for binary hypothesis testing, enabling effective spectrum sensing. Quantitative analyses confirm the efficacy of our proposed method. Based on our literature research, although AI-based methods for spectrum sensing are available, the application of DL techniques for dynamically determining the energy detection threshold has not been comprehensively investigated in the existing literature. This represents a unique and innovative contribution of our work. We also investigate a range of DL architectures, going beyond the typical selections, such as CNN and LSTM. The inclusion of autoencoders serves as a gateway to the broader integration of generative AI, a path to potentially improving spectrum sensing in the future. We acknowledge the limitations of our approach. The system's performance degrades when encountering phase offsets exceeding 45 degrees, making it less suitable for complex modulation schemes like 16-QAM or 64-QAM, as well as presenting additional challenges in accurate detection and parameter estimation when applied to signals conforming to standards like LTE and 5G NR, which exhibit noise-like properties. Motivated by the identified limitations, we propose several potential research directions to address the challenges. One immediate but challenging approach is to design custom loss functions specifically tailored to train the neural networks. The customized loss functions would incorporate various characteristics of the received signal, particularly its statistical properties. By incorporating relevant statistical information into the training process, we anticipate that the neural networks could better adapt to the inherent complexities and variations present in the received signal, ultimately improving the overall system performance. However, developing such custom loss functions would require careful consideration and exploration of appropriate statistical metrics and techniques, making it a challenging yet promising avenue for further investigation.