A radio frequency fingerprint recognition method based on self-supervised contrastive learning
Through self-supervised comparative learning and twin network structure, the difficulty of manually labeling data in RF fingerprint recognition is solved, efficient and accurate RF fingerprint recognition is achieved, and the recognition speed and accuracy of the model are improved.
Patent Information
- Application Number
- CN202310754154.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-25
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2043-06-25
Smart Images

Figure CN116782237B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of Internet of Things security technology, and specifically relates to a radio frequency fingerprint recognition method based on self-supervised comparative learning. Background Art
[0002] Radio frequency fingerprinting is a radio-based biometric technology designed to create a unique identification code for each person by analyzing radio signals generated by the human body. The development of this technology dates back to the early 1950s, when research and experimental verification began. However, at the time, radio frequency technology and processing capabilities were relatively limited, making complex signal processing and algorithms infeasible. Therefore, in its early stages, the application of this biometric technology was very limited.
[0003] With the development and advancement of technology, RFID fingerprinting began to be widely used and researched in the late 1990s and early 2000s. Researchers continuously improved hardware and algorithms, increasing signal sampling rates and resolution. These improvements made RFID fingerprinting more accurate, reliable, and practical.
[0004] In the early days of radio frequency fingerprint recognition technology, data processing and feature extraction primarily relied on the experience and knowledge of domain experts. This approach was able to achieve biometric identification to a certain extent, but due to subjectivity and inherent limitations, it could not achieve high accuracy. With the development and advancement of deep learning technology, neural network-based models have begun to be adopted, using large amounts of data to train them. Due to the complexity and diversity of data, obtaining and annotating sufficient data is extremely cumbersome. Other issues, such as the quality of the annotated data, uncertainty between labels, and consistency in the labeling results, can all affect model performance. Summary of the Invention
[0005] To address these issues, the present invention proposes a radiofrequency fingerprint recognition method based on self-supervised contrastive learning. This method requires no labeled data and can be trained based on the inherent structure and characteristics of the data, avoiding the difficulty and complexity of manual data labeling. Therefore, self-supervised learning technology provides new insights and methods for the development of radiofrequency fingerprint recognition technology, potentially unlocking greater potential for practical applications of radiofrequency fingerprint recognition.
[0006] The technical solution of the present invention is:
[0007] A radio frequency fingerprint recognition method based on self-supervised contrastive learning, characterized by comprising the following steps:
[0008] S1. The acquired radio equipment I / Q signals are processed into training data through data augmentation. Specifically, each unlabeled I / Q signal x is subjected to different data augmentation methods to obtain two data x1 and x2. (x1, x2) is used as the new training data, thereby obtaining a training data set.
[0009] S2. Construct a self-supervised recognition network. The recognition network consists of two branches, each of which inputs one of the training data (x1, x2). The two branches adopt a twin structure, one of which contains only the encoder part, and the other includes the encoder and the prediction MLP head. The encoder consists of a CNN and a projection MLP head. The specific structure of the CNN is: convolution layer + first convolution module + second convolution module + third convolution module + flatten layer + dropout layer + first fully connected layer + second fully connected layer + third fully connected layer. The first convolution module, the second convolution module, and the third convolution module have the same structure, each consisting of two convolution layers connected in sequence and a maximum pooling layer. The output of the projection MLP head is followed by a batch normalization (BN) algorithm. The training data (x1, x2) is defined as z1 = f(x1) and z2 = f(x2) after passing through the encoders of the two branches. z1 and z2 are then passed through the prediction MLP head to obtain p1 = h(z1) and p2 = h(z2). Unlike the projection MLP head, the output layer of the prediction MLP head does not have a batch normalization (BN) algorithm. In the forward propagation of the recognition network, the similarity between p1 and z2, and between p2 and z1, is maximized. In the backward propagation, the gradient propagation is stopped for the model of one of the branches.
[0010] S3, use the training data set of S1 to pre-train the recognition network constructed by S2. According to the characteristics of the constructed network, the loss function used is:
[0011]
[0012] in
[0013]
[0014]
[0015] S4. For the recognition network obtained after pre-training, freeze the parameters of the CNN, train the projection MLP head and the prediction MLP head, and optimize the classification results so that the model can finally input which device the RF signal comes from.
[0016] S5. Input the acquired I / Q signal into the trained recognition network to obtain the recognition result.
[0017] The beneficial effect of the present invention is that, in view of the shortcomings of traditional recognition methods that require manual marking of data labels, the present invention solves the problems that manual marking of data is time-consuming and labor-intensive, and that existing models for radio frequency identification take too long. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is the overall architecture of the present invention.
[0019] Figure 2 Schematic diagram of the CNN network of the present invention. DETAILED DESCRIPTION
[0020] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0021] Example
[0022] This example is based on Figure 1 The architecture shown includes the following steps:
[0023] S1. Perform data augmentation on each data point x in the preprocessed unlabeled I / Q dataset to obtain x1 and x2. Note that x1 and x2 are obtained by superimposing a series of different data augmentation methods, rather than using a single data augmentation method. This example primarily uses random horizontal flipping, random rotation, and random cropping, and employs SGD for pre-training.
[0024] S2. Input the enhanced I / Q data into the encoder respectively. The two augmented data generated by one data x are a group, and a group of data is represented as a pair z1=f(x1) and z2=f(x2). In this example, the encoder includes a backbone network and a projection MLP head module. The convolutional neural network (CNN) model is a common method for extracting radio frequency fingerprint features from I / Q signals in current radio frequency fingerprint recognition technology. Therefore, the CNN model is selected as the backbone network to extract the I / Q signal feature vector. By adding BN after the output of the projection MLP, the accuracy can be further improved to more than half. The specific structure of the CNN used in this example is shown in Table 1, which includes a convolution layer, three convolution modules, a Flatten layer, a Dropout layer, and three fully connected layers. The specific structure of each layer is as follows:
[0025] The first layer is the input layer, whose input size is N×1024×2, for example, N is 2048;
[0026] The second layer is the convolution layer, where the convolution kernel size is 2×5 and the stride is 1, and then it is activated by the Relu function. The Relu activation function performs a nonlinear transformation on the input number. For the input number x, the output after the operation is as follows
[0027] y=max{0,x}
[0028] The third layer is the first convolutional module, consisting of two convolutional layers and a max pooling layer. The activation function of the first convolutional layer is Linear, and the activation function of the second convolutional layer is ReLU. The convolution kernels of both convolutional layers are 1×5, and the convolution kernel of the max pooling layer is 1×3. The stride size of both layers is 1.
[0029] The third layer is the second convolutional module, which also consists of two convolutional layers and a max pooling layer. The activation function of the first convolutional layer is ReLU, and the activation function of the second convolutional layer is Linear. The convolution kernels of both convolutional layers and the max pooling layer are 1×3, and the stride is 1.
[0030] The fourth layer is the third convolutional module, which also consists of two convolutional layers and a max pooling layer. The activation function of the first convolutional layer is ReLU, and the activation function of the second convolutional layer is Linear. The convolution kernels of both convolutional layers and the max pooling layer are 1×2, and the stride is 1.
[0031] The fifth layer is the Flatten layer, which flattens the input high-dimensional tensor data and converts it into a one-dimensional vector for processing by the subsequent fully connected layer.
[0032] The sixth layer is the Dropout layer, with a parameter of 0.3. During training, neurons are randomly dropped with a certain probability to reduce overfitting. Specifically, Dropout randomly selects neurons in each training batch and sets their outputs to 0, removing them from the forward and backward propagation of the current batch. This prevents the model from becoming overly dependent on any particular neuron during learning, making it more robust and versatile.
[0033] The seventh and eighth layers are fully connected layers, using the ReLU activation function. They perform nonlinear transformations on the input vectors, mapping them into a high-dimensional space. These nonlinear transformations enable the model to better fit nonlinear data and avoid vanishing or exploding gradients.
[0034] The last layer is also a fully connected layer with a Softmax activation function. The input vector is mapped to a set of probability distributions, and each output node corresponds to a category.
[0035] Table 1 CNN network structure details
[0036]
[0037]
[0038] The encoder outputs z1 and z2 are then passed through a prediction MLP head to obtain p1 = h(z1) and p2 = h(z2). Experiments have shown that using a constant learning rate in the prediction MLP head module can achieve better results than the baseline. However, adding batch normalization to the prediction MLP output leads to unstable training, so the output layer does not use batch normalization.
[0039] Maximizing the similarity between p1 and z2, and between p2 and z1 is equivalent to minimizing the negative cosine similarity, that is,
[0040]
[0041] This is a symmetrical process, and the above losses are taken as L1 and L2. Finally, the total loss is:
[0042] Right now
[0043] The previous one is the forward process, while in the back propagation, the gradient propagation will be stopped for the model on one side, and the reaction formula becomes This paper employs a symmetric loss, or the concept of twin network representation learning, to significantly improve optimization efficiency. The use of predictor h to predict the expected value E serves as a supplementary tool, improving accuracy. Without this process and without an alternative solution, accuracy would quickly drop to 0.1%.
[0044] The model has been trained during the pre-training phase, but fine-tuning is required to accurately identify the source of the signal. Freezing the backbone network allows more resources to be invested in training the network parameters later in the training process, ultimately enabling the model to achieve its goal of identifying the source of information from each device.
[0045] Through the above design, the present invention solves the problem of wasted time and energy caused by manual labeling of large amounts of data. By adopting the "stop-gradient" concept, it eliminates the need to introduce negative samples to increase the computational complexity and only requires a very small batch size to achieve the purpose of recognition quickly and efficiently. To extract more effective RF fingerprint features, the present invention increases the complexity of the data enhancement part and converts the backbone network into a CNN that is more suitable for RF fingerprinting. Compared with traditional deep learning algorithms, the improved network model of the present invention performs well in recognition of unlabeled data and is also faster in training speed.
Claims
1. A radio frequency fingerprint recognition method based on self-supervised contrastive learning, characterized in that: The following steps are involved: S1. The acquired radio equipment I / Q signals are processed into training data through data augmentation. Specifically, each unlabeled I / Q signal x is subjected to different data augmentation methods to obtain two data x1 and x2. (x1, x2) is used as new training data, thereby obtaining a training data set based on the obtained I / Q data. S2. Construct a recognition network based on self-supervision. The recognition network includes two branches, each of which inputs one of the training data (x1, x2). The two branches adopt a twin structure, one of which contains only the encoder part, and the other includes the encoder and the prediction MLP head. The encoder is composed of CNN and projection MLP head. The specific structure of the CNN is: convolution layer + first convolution module + second convolution module + third convolution module + Flatten layer + Dropout layer + first fully connected layer + second fully connected layer + third fully connected layer; the combination of the first convolution module, the second convolution module and the third convolution module is as follows: The structures are the same, both including two convolutional layers and a maximum pooling layer connected in sequence, and BN is added after the output of the projection MLP head. It is defined that the training data (x1, x2) passes through the encoders of the two branches to obtain z1=f(x1) and z2=f(x2). z1 and z2 pass through the prediction MLP head respectively to obtain p1=h(z1) and p2=h(z2). Unlike the projection MLP head, the output layer of the prediction MLP head does not have BN. In the forward propagation of the recognition network, the similarity between p1 and z2, and p2 and z1 is maximized, while in the back propagation, the gradient propagation is stopped for the model of one of the branches. S3, use the training data set of S1 to pre-train the recognition network constructed by S2. According to the characteristics of the constructed network, the loss function used is: in S4. For the recognition network obtained after pre-training, freeze the parameters of the CNN, train the projection MLP head and the prediction MLP head, and optimize the classification results so that the model can finally input which device the RF signal comes from; S5. Input the acquired I / Q signal into the trained recognition network to obtain the recognition result.
Citation Information
Patent Citations
Comparative learning-based unsupervised pre-training-fine tuning type radar target identification method
CN115047423A
Clothing sketch-to-image generation method based on multi-modal information
CN115393456A