# OFDM Emitter Identification Method Based on Data Augmentation and Contrastive Learning
## 3 Proposed Method
### Contrastive Learning and Residual Network Framework
We first initialize the feature extraction layer of the residual network with the pretrained model's parameters and then guide the model training through the cross-entropy loss function, formulated as:  
\[H(p,q)=-\sum_{i=1}p(y_{i})logq(y_{i}^{{}^{\prime}}) \tag{3}\]  
where \(P(y_{i})\) represents the probability of actually being \(y_{i}\) like, and \(q(y_{i})\) represents the probability of predicting \(y_{i}\) like. The proposed training strategy is represented in Algorithm 1. ```
1:\(X\), \(y_{i}\), \(y_
```
Input: Batch size \(b\), learning rate \(\alpha\), \(\beta\), dataset \(N\), data augmentation function \(D\) Output: Feature extractor \(F\), classifier \(C\) Initialize: Initialize parameter \(\theta_{f}\) of feature extractor \(F\), parameter \(\theta_{c}\) of classifier \(C\) whileFeature extractor not convergesdo  Take samples in a batch as \(X=\{x^{1},x^{2},...,x^{b}\}\) \(X^{+}=D(x)\) \(Emb=F(X)\)  compute loss InfoNCE with \(Emb\) and \(x^{+}\)  update \(F\), learning rate \(\alpha\) end while\(C\) (without fc layer) load state dict of \(F\) whileClassifier not convergesdo  Take samples in a batch as \(X=\{x^{1},x^{2},...,x^{b}\}\) \(Predict_{c}=C(X)\) compute loss L\({}_{c}with\)Predict\({}_{c}\) and label  update \(C\), learning rate \(\beta\) end
```

**Algorithm 1**Training Strategy

## 4 Experiments

### Data Construction

The experimental data are collected from the 4G signals of 30 mobile phones, and all data are collected by the same SIM card. OFDM frequency domain signals of 5 mobile phones were randomly selected to construct the dataset. The structure of signals has been represented in Section 3.1. Our experiment is carried out under the condition of few-shots, and the number of samples of various mobile phones is 62, 54, 60, 60, and 49, respectively. All samples are divided into the training set and validation set according to the ratio of 4:1. In order to eliminate randomness, each experiment was repeated 10 times, and the average accuracy and standard deviation were calculated. Figure 8: Contrastive learning and residual network framework. (1) In the upper part, we conduct pretraining based on contrastive learning, we perform data augmentation to generate positive samples, and the feature extractor is the residual network without FC layer. We use the InfoNCE loss function in this part. (2) In the bottom part, we initialize the feature extraction layer of the residual network with the pretrained model’s parameters, and the loss function is cross-entropy. ### Implementation Details

In the experiment, we use SGD as the optimizer, where the learning rate \(\alpha\) is set to 10-3 for the pretrain phase, and the learning rate \(\beta\) is set to 10-2 for the fine-tune phase. The batch size b is set as 32. The momentum is 0.9, and the training iteration of pretrain and fine-tune are 30 and 100, respectively. The Flops and parameters of our method are shown in Table 1.

### Experimental Results and Analysis

We provided the first study on individual identification of OFMD signals based on deep learning, so there is no direct baseline. However, improvements and innovations in data preprocessing, data augmentation, model structure, and training methods are proposed in our works. Therefore, in the experimental part of this paper, we intend to gradually deepen from the above aspects to show how to improve the identification accuracy of OFDM signals step by step and also confirm the effectiveness of the proposed methods. Data preprocessing experiment analysis. In this paper, we propose to change the IQ data into single-channel and dual-channel during preprocessing. The dimension of single-channel data is (108, 1200, 1), and the dimension of dual-channel data is (108, 1200, 2). The backbone model is ResNet18 with the number of input channels modified. The spectrogram input of the signal is used as the baseline.