###### Abstract  
Deep learning-based automatic modulation recognition networks are susceptible to adversarial attacks, posing significant performance vulnerabilities. In response, we introduce a defense framework enriched by tailored autoencoder (AE) techniques. Our design features a detection AE that harnesses reconstruction errors and convolutional neural networks to discern deep features, employing thresholds from reconstruction error and Kullback-Leibler divergence to identify adversarial samples and their origin mechanisms. Additionally, a restoration AE with a multi-layered structure effectively restores adversarial samples generated via optimization methods, ensuring accurate classification. Tested rigorously on the RML2016.10a dataset, our framework proves robust against adversarial threats, presenting a versatile defense solution compatible with various deep learning models. adversarial examples; sample detection; sample restoration; autoencoder +
Footnote †: journal: Medical  
leading to the evolution of defense mechanisms [11; 12]. Adversarial training, emerging as a primary countermeasure, has harnessed the power of data augmentation to fortify model robustness [13]. Another approach, defense distillation, focuses on attenuating the sensitivity to adversarial perturbations by training sequential deep networks [14]. The rise of adversarial attacks in deep learning has ushered in innovative detection methods such as reconstruction error and Kullback-Leibler (KL) divergence. Techniques harnessing reconstruction errors, like those using Generative Adversarial Networks (GANs) [15], focus on comparing original inputs with their regenerated counterparts to discern adversarial examples. Similarly, KL divergence [16; 17], which measures the difference between two probability distributions, has proven instrumental in detecting classifier inconsistencies. Notably, in computer vision, GAN-based methodologies are emerging as frontrunners for restoring adversarial examples [15]. The unique nature of electromagnetic signal data sets them apart from traditional image or speech data. Though techniques like reconstruction error and KL divergence have proven valuable for image classification, their direct application to signal modulation classification often falls short. This gap emphasizes a pressing need for a method tailored to electromagnetic signals, harmoniously combining reconstruction error, KL divergence, and adversarial restoration for heightened safety and classification resilience. This study focuses exclusively on enhancing adversarial example detection and restoration in electromagnetic signal modulation. We developed a framework using autoencoders (AEs) to detect and fix adversarial examples. This framework identifies whether a signal is adversarial and offers a reliable evaluation standard. Our design comprises two AE structures: one for detecting and another for restoring signals. The detection method can identify different types of attacks, namely gradient-based and optimization-based. Optimization attacks are subtle yet harmful. Our system can repair these tampered samples, ensuring they are recognized correctly. Importantly, our method can identify the attack's origin, whether from gradient-based or optimization tactics. Knowing the attack type is crucial for accurate defenses. Our framework can assist various models. Tests on the RML2016.10a dataset show that our method improves the signal recognition against adversarial threats. The contributions of this paper are as follows:  
* Integrating the metrics of reconstruction error and KL divergence, we propose a refined signal adversarial example detection framework based on AE. This approach uniquely captures the deep features of input samples, marking the first-time identification of the mechanisms behind adversarial examples, discerning whether they stem from gradient-based methods or optimization techniques. * We design an adversarial examples restoration method based on AE.