# Method for Recognition of Communication Interference Signals under Small-Sample Conditions
## 3 Data Enhancement Network
### The Generative Model WDCGAN-SA  
Most models based on generative adversarial networks use convolutional layers to model images. However, the receptive field of convolutional operations is limited, particularly when capturing global correlation features in images. Accumulating multiple layers of convolutions to capture relationships between distant pixels also significantly increases the model's computational complexity. The self-attention mechanism can be used to compute dependencies between different areas within an image [18]. Therefore, embedding self-attention modules within the convolutional layers of both the generator and discriminator helps guide the learning of global correlation features to compensate for the limitations of convolutional operations. The self-attention module is illustrated in Figure 3.  
Figure 3: Self-Attention Module. In the figure above, two \(1\times 1\) convolution kernels, \(f\) and \(g\), are first used to extract features from the feature map \(\mathbf{x}\), respectively generating feature tensors \(f(\mathbf{x})\) and \(g(\mathbf{x})\) for calculating the attention weight map \(\mathbf{\beta}\). The definition of \(\mathbf{\beta}_{i,j}\) is as follows:  
\[\mathbf{\beta}_{i,j}=\frac{\exp\left(\mathbf{x}_{ij}\right)}{\sum\limits_{i=1}^{n} \left(\mathbf{s}_{ij}\right)},\text{ where }\mathbf{s}_{ij}=f(\mathbf{x}_{i})^{\text{T}}g(\mathbf{x}_{j}) \tag{9}\]  
where \(\mathbf{s}_{ij}\) represents the correlation between the \(i\)-th and \(j\)-th pixels in the convolutional feature map, which is normalized by the Softmax function to obtain \(\mathbf{\beta}_{i,j}\), representing the weights indicating the degree of attention required for the interrelations between elements in the convolutional feature map. From the equation above, it can be inferred that the attention weight map \(\mathbf{\beta}\) can focus on the global information of the feature map. By element-wise multiplication of \(\mathbf{\beta}\) and the feature tensor \(h(\mathbf{x})\), followed by feature extraction using a \(1\times 1\) convolutional kernel, the self-attention feature map \(\mathbf{o}\) is obtained. Then, by weighted fusion of \(\mathbf{o}\) with the original convolutional feature map \(\mathbf{x}\), the output feature map \(\mathbf{y}\) after self-attention module extraction is obtained. This computational process can be represented as follows:  
\[\mathbf{y}_{i}=\gamma\mathbf{o}_{j}+\mathbf{x}_{j},\text{ where }\mathbf{o}_{j}=\mathbf{v}\left( \sum\limits_{j=1}^{n}\mathbf{\beta}_{j,i}\times h(\mathbf{x}_{i})\right) \tag{10}\]  
where \(\mathbf{o}_{j}\in\mathbf{o}=\left(\mathbf{o}_{1},\mathbf{o}_{2},\dots,\mathbf{o}_{j},\dots,\mathbf{o} _{n}\right)\), \(\gamma\) serves as the scale parameter initialized to 0, allowing the model to progressively extend from capturing local information to learning the global information of the feature map. The model for data enhancement of communication jamming signals based on the self-attention mechanism is illustrated in Figure 4. The composition of the generator network and the parameters are as described in (a). The generator takes random noise with dimensions of \(100\times 1\times 1\) as input, which first passes through a fully connected layer for expansion, and then is reshaped into a \(512\times 4\times 4\) matrix. This noise is subsequently transformed into a \(3\times 64\times 64\) image through multiple transposed convolution layers and outputted. Self-attention modules are embedded before and after the third transposed convolution layer to guide the generator to focus on the global key features of the time-frequency graph of the communication jamming signals. Gaussian Error Linear Units (GELU) are used in the transposed convolution layers as activation functions to provide more continuous gradient information. The output layer employs a tanh activation function to ensure the pixel values of the output image are within a reasonable range. The discriminator network's composition and input-output parameters are depicted in (b).