A Novel Approach Based on Generative Adversarial Network for Interference Detection in Wireless Communications

With the rapid growth of wireless devices, the communication environment gets complex. The detection of interference or unauthorized signals can improve spectrum e ﬃ ciency, which is a key technology for limited spectrum resources. Traditional detection methods analyze the parameter characteristics of the received signal. But it is di ﬃ cult to detect interference with the same time and frequency as the original signal by those feature engineering. As a classical problem in deep learning, anomaly detection is usually solved by supervised learning. But a more challenging situation is to detect unknown or invisible anomalies. It means that the number of abnormal samples is insu ﬃ cient and the data is highly biased toward the normal samples. In this paper, a wireless communication interference detection algorithm based on generative adversarial network (GAN) is proposed. In the semi-supervised learning scenario, the algorithm detects the time-frequency overlapped interference by the reconstruction strategy. The generator adopts the encoder-decoder-encoder architecture. In the training process, the model jointly learns the data distribution of normal samples by minimizing the distance in both the signal space and the latent space. In the inference phase, a large distance metric implies an abnormal sample. Experiments on simulated communication datasets show the superiority of the proposed algorithm.


Introduction
Wireless communications enrich life and facilitate production. The development of information technology undoubtedly poses a challenge to communication security. Electromagnetic spectrum is the transmission medium of wireless communications, and the spectrum resources are limited. In actual communications, different wireless services use corresponding frequency bands. Since no more communication signals can be included in a specific frequency band, spectrum resources get more scarce and valuable. However, the increasing number of new users and wireless devices makes the communication environment complex. In this case, communication signals transmitted in the channel are easily overlapped by interference signals with the same frequency. The decoding of these received signals leads to many errors and further affects the communication behavior. In order to prevent this situation, it is necessary to allocate spectrum resources reasonably and detect time-frequency overlapped interference timely [1]. On this basis, interference signals can also be separated for further analysis and identification. A common and key problem to be solved in wireless communications is the guarantee of communication quality, so interference detection is essential.
Supervised methods of deep learning have achieved encouraging performance in various computer vision tasks, but they heavily rely on large labeled datasets. In some practical applications, the samples of a specific category may not be enough to construct the model effectively. For instance, it is often difficult to obtain a large amount of training data that causes security threats, and the data may change with external factors. However, the task of interference detection is to deal with this challenging situation. In other words, the model only trains on normal samples, then identifies abnormal samples that are not fully available and different from normal distribution. In addition, the receiver may be unknown about the operating parameters of the communication system. Therefore, the model needs to detect the interference in the signal with limited prior information.
Many researches have proposed anomaly detection models for different application fields [2]. As a dominant method for unsupervised and semi-supervised problems, generative adversarial network (GAN) [3] was initially introduced by Goodfellow et al. and also applied to anomaly detection. GAN jointly trains a pair of networks: a generator and a discriminator. The former simulates high-dimensional data by latent vectors to approximate the original distribution, while the latter distinguishes between generated samples and real samples. The generator is a network similar to the decoder, and the discriminator is a typical classification network. They compete with each other during training to learn the features of the original data.
Inspired by GANomaly [4], an interference detection architecture for wireless communication signals is proposed in this paper, which includes an adversarial training framework. The algorithm adopts deep learning method and extracts features end-to-end. It is only trained on normal samples and is suitable for learning representation from time-series data. The received signals are directly used as inputs to the algorithm. In the training phase, they only contain a set of normal samples. Based on the reconstruction strategy, the algorithm detects whether interference exists in the received signal. It captures the distribution of training data by joint learning in both signal space and latent space, where latent space helps to learn data features and simplify data representation. The generator works on the pipeline of encoder-decoder-encoder. Specifically, the original signal is mapped to a low-dimensional vector; then, the vector is used to reconstruct the generated signal, and finally, the signal is mapped to its latent representation. In this way, the detection effect under noisy conditions is improved. Experimental results on simulated communication datasets show that the proposed algorithm has better detection performance for time-frequency overlapped interference. And even in the case of low signal-to-noise ratio (SNR), the algorithm is still effective.
The main contents and specific sections of this paper are arranged as follows: in Section 2, the research status of interference detection in wireless communications and some related methods are introduced. In Section 3, the scenario of time-frequency overlapped interference and the detection algorithm based on generative adversarial network are proposed. Then, in Section 4, the experimental results verify that the algorithm can solve the interference detection problem and achieve better detection effect. Finally, this paper is concluded in Section 5.

Related Work
Anomaly detection has attracted extensive attention in various fields for a long time, such as network intrusion [5], video surveillance [6], financial fraud [7], and disease monitoring [8]. The related research in wireless communications is also common [9], in which interference detection and interference source localization are particularly important.
Anti-interference technology plays an active role in wireless communications [10]. It has always been a promising research direction in civil and military applications and has got a lot of valuable research results. As a key procedure in anti-interference, interference detection can find the existence of interference signals and provide necessary support for anti-interference. In other words, its main task is to detect whether the original signal is overlapped by additional interference during transmission. Further, it can obtain the parameters of the interference signal, such as type, power, and frequency. Through the feedback of this information, the anti-interference system can take corresponding measures to suppress interference signals, then reduce the bit error rate of decoding at the receiver. In addition, spectrum monitoring in cognitive radio is an important aspect of wireless communications [11], which is closely related to interference detection.
In recent years, the research on interference detection in wireless communications has gradually increased, and some effective methods have been proposed. Most of them analyze signals according to domain transformation or statistical characteristics [12]. Traditional methods use priori information for calculation, thus face some difficulties. And the proliferation of wireless devices also brings them great challenges. In the actual wireless environment, there are many interference signals with small power and the same frequency as the original signal. When the original signals are overlapped by such interference signals, their characteristics in time domain and frequency domain just change slightly. Therefore, the above methods are obviously difficult to detect time-frequency overlapped interference.
With the vigorous development of deep learning, related applications have emerged in many fields, such as speech enhancement [13,14] and image denoising [15][16][17]. Deep learning is actually a complex neural network. The improvement of its performance is attributed to the increase of network layers, the optimization of network structure, and the expansion of training data. Different from traditional methods, deep learning is independent of artificial features. It directly takes the original data as input for training and automatically extracts the corresponding features. Through the calculation of multiple neurons, the network continuously adjusts the parameter values to update the output results. As a typical representative, convolutional neural network (CNN) has the outstanding advantages of sparse connection and weight sharing. Compared with the fully connected network, it simplifies the calculation process and reduces the number of parameters. As the complexity of the network gets decreased, the training of the network gets accelerated. Signal processing based on deep learning focuses on one-dimensional data with periodicity [18]. They no longer need to analyze signal models and can be expanded to new scenarios by collecting data samples. The above researches not only provide a theoretical basis for the application of deep learning in wireless communications but also provide a factual basis for neural networks to extract signal features.
Interference detection in wireless communications is not exactly the same as general anomaly detection [19]. On the 2 Wireless Communications and Mobile Computing one hand, the type of interference is complex and variable. Interference may be quite different for various wireless applications. In this case, it is difficult to obtain the label of the interference signal or even the interference signal itself. It is no longer an ordinary classification problem, so supervised training is invalid. On the other hand, there is a lot of noise in the wireless environment. Noise is usually irregular, so neural networks cannot learn useful features. The existence of noise seriously affects the detection accuracy. Therefore, classical anomaly detection methods may not be applicable. However, interference detection in wireless communications has some similarities with anomaly detection in speech and image. In particular, both communication signals and speech signals are time-series data with correlation. Hence, deep learning methods in speech and image can be adopted to design interference detection algorithms, in which communication signals can be directly used as inputs to extract features.
Recently, some deep learning methods based on reconstruction strategy have been applied to anomaly detection [20][21][22]. Their purpose is to construct a network in the training phase and perform the reconstruction task for normal samples. But in the test phase, the network causes poor reconstructioneffect for abnormal samples due to the distribution difference. In addition, the current research also focuses on adversarial training [23,24] and especially explores the potential of generative adversarial network [25,26]. The initial task of GAN is to produce realistic images. The generator attempts to generate samples similar to the training data from the Gaussian distribution, while the discriminator needs to decide whether the generated samples are real or fake. Several improved methods have been proposed to solve its problem of unstable training, such as the use of Wasserstein loss [27].
In summary, the existing research strongly supports the prospect of GAN for interference detection in wireless communications. In this paper, an interference detection algorithm based on generative adversarial network is proposed. The generator is designed as the structure of encoderdecoder-encoder, so as to jointly learn the feature representation in the signal and latent space.

Proposed Approach
3.1. Problem Description. The problem of anomaly detection is defined as follows: given a dataset, it contains a large number of normal samples for training and a relatively small number of abnormal samples for testing. In the training phase, the model learns the data distribution of normal samples and optimizes its parameters. In the test phase, the model determines whether the input sample is abnormal by calculating the anomaly score. Since the model is aimed at minimizing the anomaly score, a large value indicates that the input sample may be abnormal. The anomaly score is universal to detect invisible anomalies different from normal distribution. Therefore, it is necessary to train a semisupervised algorithm for anomaly detection, where the data is highly biased toward a specific category. Then, the exis-tence of abnormal samples is determined by thresholding the anomaly score.
For interference detection in wireless communications, the situation considered in this paper is that the interference signal and the transmitted signal are the same in time and frequency. Traditional methods analyze the statistical information of received signals, such as spectrum and power. But in the actual wireless environment, the parameters of the interference signal may be unknown. So these spectrum analysis methods may fail to detect such time-frequency overlapped interference. Especially when the SNR is low, the interference signal may be submerged in noise and the original signal due to the small power. So it is difficult to judge the existence of the interference signal through the change of power. In addition, the characteristics of the interference signal in the time domain and frequency domain may be similar to those of the original signal, which also makes detection difficult. All the detection of interference signals mentioned in this paper is based on this relatively difficult situation.

Model Establishment.
In order to solve the above problems, an interference detection algorithm based on generative adversarial network is proposed in this paper. As a generative model that has been widely used in the field of image and speech, GAN contains two components: generator G and discriminator D. G generates data, while D measures the difference between the generated data and the labeled data then provides feedback. They compete and cooperate with each other to jointly control the output of the model.
The proposed algorithm adopts the reconstruction strategy to deal with the time-frequency overlapped interference in wireless signals. It can effectively learn the correlation of time-series data and accurately extract the features of transmitted signals. The algorithm can avoid the influence of noise and achieve better detection effect even in the case of low SNR. Figure 1 depicts the overall architecture of the proposed model, which includes three subnetworks.
The first one is an autoencoder, which acts as the generator G of the model. The encoder G E learns the compressed representation of the input signal, while the decoder G D reconstructs the input signal. Specifically, G E consists of convolution, batch normalization, and leaky ReLU activation. The input signal x forward-passes through G E and obtains the bottleneck feature z. G D adopts the structure of generator in deep convolutional generative adversarial network (DCGAN), which consists of transposed convolution, batch normalization, ReLU activation, and tanh activation. The latent vector z forward-passes through G D and expands to the generated signal x ′ . The dimension of each layer in the network is gradually changed, and the length of the output signal is equal to that of the input signal. In a word, the generator reconstructs the signal x into x ′ by z.
The second one is the encoder E, which compresses the signal x′ reconstructed by G. Compared with G E , it has the same structure but different parameters. E compresses x ′ to obtain its feature representation z ′ , which has the same dimension as z for consistency comparison.
The third one is the discriminator D, whose goal is to classify x and x ′ as real or fake. It adopts the structure of discriminator in DCGAN.

Network Training.
Theoretically, when an abnormal signal forward-passes in the generator G, G D fails to complete the reconstruction through the latent vector mapped by G E . Because G is only modeled based on normal samples during training, its parameters are not suitable to generate abnormal samples. For the same reason, the reconstructed abnormal sample also causes the encoder E to produce a feature representation different from that of the normal sample. When such dissimilarity occurs in the latent space, the model classifies the input signal as abnormal signal. As shown in Figure 2, three loss functions are established to optimize the subnetworks.
The first one is encoding loss. It can guide the model to encode the generated signal from the normal signal. It minimizes the distance between the bottleneck feature z of the original signal and the encoding feature z′ of the generated signal. But for abnormal signals, it fails to do so in the latent space.
The second one is reconstruction loss. It can optimize G according to the context information of the input data, then force it to generate an approximately real signal. The distance between the original signal and the generated signal reflects the effect of G. Since the L 1 metric has been proven to produce fewer fuzzy results, it is selected to calculate the distance.
The third one is feature matching loss. Following the trend of current methods, feature matching loss is applied to adversarial learning in the model, which is proved to reduce the instability of GAN in training. Different from the original method, G is updated based on the internal representation of D, rather than the final output of D. The feature matching loss makes it possible for the generated samples to deceive the discriminator. It is calculated according to the distance between the feature representation of the original sample and the generated sample.
In general, the objective function of the generation phase is defined as the following equation, where λ and μ are hyperparameters that balance the three parts. L G = L enc + λL rec + μL fea : ð5Þ As described above, G and E are optimized according to the encoding of normal samples during training. So in this paper, the anomaly score is defined as the following form. It is expected to be large if x is an abnormal sample.
4. Experiment  Wireless Communications and Mobile Computing signal, while the BPSK modulation signal is used as the interference signal with the same frequency. In 16QAM-BPSK and 16QAM-QPSK scenarios, the generality of the proposed algorithm for different original signals and different interference signals is comprehensively verified. Moreover, the original signals in normal samples and abnormal samples are different, so as to reflect the adaptability of the algorithm. All signals are downsampled at 2 MHz. And each sample is adjusted to a fixed length of 512 sampling points.
The following figures depict the transmitted signal and the corresponding received signal when noise or interference exists in the channel, where the SNR is 2 dB. It is a 16QAM-QPSK scenario, in which a 16QAM modulation signal is overlapped by a QPSK modulation signal with the same frequency. Figure 3 depicts the original transmitted signal without noise and interference. Figure 4 depicts the normal received signal that contains only noise. Figure 5 depicts the abnormal received signal, which contains both noise and interference with the same frequency as the transmitted signal. Since the overlapped interference is not obvious in the mixture of noise and original signal, it is difficult to judge whether the interference exists by observing the waveform. The proposed algorithm directly takes the received signal as input to obtain the detection results without prior knowledge of the communication system, which makes it superior to traditional methods.
The adversarial training in the proposed model is based on the standard DCGAN without using additional skills to improve the training process. The model adopts Adam optimizer. The initial learning rate is set to 0.0002. The momentums are set to 0.5 and 0.999, respectively. The discriminator is optimized based on the binary cross entropy loss, and the generator is updated based on the equations mentioned above. The model is trained for 10 epochs on the simulated

4.2.
Results. In order to investigate the detection performance of the proposed algorithm for time-frequency overlapped interference, one method based on improved autoencoder (IAE) [28] and another method based on improved generative adversarial network (IGAN) [29] are compared in this paper, which are commonly used for anomaly detection in deep learning.
Due to the particularity of interference detection, the area under curve (AUC) for receiver operating characteristic (ROC) is calculated in the experiment. ROC curve reflects the trade-off between true positive rate (TPR) and false positive rate (FPR). Each point on the curve represents the TPR-FPR value corresponding to different thresholds. Tables 1-3 list the experimental results obtained in three scenarios, so as to visually display the detection performance of the three models under different SNR conditions. It can be seen that the proposed algorithm provides higher AUC compared with other methods. Especially in the case of low SNR, the   7 Wireless Communications and Mobile Computing detection effect is also improved. In QPSK-BPSK scenario, the difference between the original signal and the interference signal is relatively small, but the proposed algorithm is still feasible.
Besides, the average precision (AP) is also used as an evaluation measure, the higher the better. Figures 6-8 show that the proposed algorithm achieves efficiency improvement among all methods. It can be concluded that the model fails to generate abnormal samples. Moreover, the distance in both signal space and latent space provides sufficient support for the algorithm to resist serious noise and detect sudden interference.
In summary, the above experimental results indicate that the proposed algorithm has generalization ability and performs better than other competitive methods for interference detection.

Conclusion
In wireless communications, signals are always affected by noise and interference during transmission, which leads to large errors in the decoding phase at the receiver. In order to improve communication quality, interference detection is an essential process. It is an important research direction to design an interference detection algorithm suitable for various communication scenarios. In other fields, the research on anomaly detection has made great progress. Interference detection in wireless communications can be regarded as a special anomaly detection, which identifies whether interference exists in the signal. In addition, deep learning has been proved to have strong feature extraction ability. Inspired by the combination of anomaly detection and deep learning, a wireless communication interference detection algorithm based on generative adversarial network is proposed in this paper. It uses the reconstruction strategy to detect time-frequency overlapped interference. The model optimizes the parameters in the way of adversarial training, and the generator adopts the structure of encoder-decoderencoder. It can overcome the influence of noise and improve the detection accuracy in the case of low SNR. The experimental results on the simulated communication dataset show that the proposed algorithm performs better than the competitive methods based on deep learning and effectively solves the problem of interference detection.

Data Availability
The simulated dataset used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
The authors declare that there is no conflict of interest regarding the publication of this paper.