Semi-supervised radio frequency fingerprint method based on metric learning and pseudo tag
Through variational autoencoder pre-training and pseudo-labeling strategy, combined with metric learning and improved loss function, the problems of incomplete feature extraction and overfitting in radio frequency fingerprint recognition are solved, and the recognition accuracy and generalization ability are improved.
Patent Information
- Application Number
- CN202510716696.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-05
AI Technical Summary
Existing semi-supervised learning methods in radio frequency fingerprint recognition have problems such as incomplete feature extraction, insufficient representativeness and overfitting in classification network training, resulting in low recognition accuracy, especially when there are insufficient labeled samples.
A variational autoencoder is used to pre-train the encoder network, unlabeled samples are used to generate pseudo labels and combined with confidence threshold screening, the classification network is trained through metric learning and an improved central loss function, and unlabeled samples are used to assist labeled sample training to improve feature extraction and classification accuracy.
It effectively improves the recognition accuracy and generalization performance in the case of insufficient labeled samples, alleviates the overfitting problem, and improves the recognition effect of the model.
Smart Images

Figure CN120599671A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of radio frequency fingerprint recognition methods, and in particular relates to a semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo labels. Background Art
[0002] With the rapid development of mobile communications and the internet, the number of devices interconnected via wireless transmission has skyrocketed. Simultaneously, the amount of sensitive data involved in signal transmission has also increased. Currently, device authentication and identification methods are being used to address transmission security issues. Traditional authentication technologies include those based on security certificates, key encryption, and MAC addresses. However, security certificates place high demands on device computing resources and performance, and keys and MAC addresses are susceptible to leakage and forgery. RF fingerprinting, on the other hand, is a unique characteristic of a device's physical layer, derived from minute deviations in the wireless device's internal hardware. Therefore, RF fingerprinting is a low-cost, low-power, low-computing-resource consuming, and highly secure wireless device security authentication technology.
[0003] In recent years, with the widespread application of artificial intelligence technology, especially deep learning, deep learning methods have gradually been introduced into the field of radio frequency fingerprint recognition. Radio frequency fingerprint recognition methods based on deep learning can directly extract features that reflect the essence of the device from the raw data, as well as some features that cannot be explained in physical terms. This allows them to demonstrate strong recognition capabilities and generalization performance in scenarios with a large number of devices or complex scenarios, as long as there are sufficient and diverse labeled training samples. Due to the complexity of the wireless environment, labeling the collected signals requires a lot of manpower and material resources. Creating a sufficient, high-quality, annotated training set is very time-consuming and expensive. In actual application scenarios, problems such as missing labels and insufficient labeled samples are often encountered, affecting the accuracy of device recognition. However, unlabeled data is abundant and easy to obtain, so being able to effectively use unlabeled samples to assist model training is a direction to solve this problem.
[0004] At present, many scholars have proposed radio frequency fingerprint recognition methods based on semi-supervised learning to solve this problem. This type of method uses a large number of unlabeled samples and a small number of labeled samples to train the model, and the recognition effect can be close to or even on par with the supervised learning model. While greatly reducing the cost of training data annotation, it achieves good recognition accuracy. Existing semi-supervised learning methods generally adopt a step-by-step training method, first pre-training the feature extractor with unlabeled samples, and then training the classification network with labeled samples. However, these methods currently have shortcomings: First, in the pre-training stage of the feature extractor, existing methods often ignore the distribution characteristics of unlabeled samples, resulting in insufficient comprehensiveness and representativeness of feature extraction; second, in the training stage of the classification network, supervised training is performed only by relying on the cross-entropy loss of labeled samples. Under the condition of few samples, it is difficult to fully explore the deep discriminant features of the data, and overfitting will occur, thereby restricting the improvement of the final classification performance of the model. Summary of the Invention
[0005] The purpose of the present invention is to provide a semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo labels, which can effectively improve the recognition effect of the device when the label samples are insufficient.
[0006] The technical solution adopted by the present invention is a semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling, specifically: after the training samples are divided, in the pre-training stage, the variational autoencoder model is trained using unlabeled samples, and the encoder network parameters are saved after pre-training; in the classification network training stage, after the unlabeled samples are input into the classification network to obtain the predicted probability, the samples with high confidence are screened out according to the confidence threshold to generate pseudo-labeled samples, which are then input into the classification network together with the labeled samples to calculate the semi-supervised cross entropy loss and the improved center loss.
[0007] The present invention is also characterized in that: Please follow the steps below to implement: Step 1: Collect signals from wireless devices, construct a training sample set, and divide it into a labeled sample set and an unlabeled sample set; Step 2: Design the encoder and decoder structures based on the structural characteristics of the signal data and build a variational autoencoder model; Step 3: Use the unlabeled sample set in step 1 to train the variational autoencoder model built in step 2. After the network converges, save the encoder parameters to obtain a pre-trained encoder network. Step 4: Input the label sample into the encoder network pre-trained in step 3 for feature extraction to obtain the features of the label sample; Step 5: Input the features of the labeled samples into the classifier to obtain the predicted probability and calculate the classification loss. At the same time, use the features of the labeled samples to calculate the improved central loss to achieve metric learning. Step 6: Build a classification network using steps 3 to 5, then input the unlabeled samples into the classification network to obtain the predicted probability, and generate pseudo-labeled samples based on the confidence level; Step 7: Input the pseudo-label samples and the labeled samples together into the classification network constructed in step 6 for training. Repeat step 6 in each round of training to update the pseudo-label samples until the model loss converges, and obtain the trained classification network. Step 8: Use the test sample to test the classification network performance and obtain the recognition accuracy.
[0008] Step 1 is implemented as follows: Step 1.1, obtaining a signal from a wireless communication device; Step 1.2: Construct a training sample set and divide it into a labeled sample set and an unlabeled sample set.
[0009] The signal of the wireless communication device in step 1.1 is represented as: (1) Where, Indicates the signal received by the receiver; Represents a signal transmitted by a wireless communication device; represents additive white Gaussian noise; Represents the impact of the channel on the transmitted signal; Represents a convolution operation.
[0010] In step 1.2, define is the training sample set of the signal, where the label sample set can be expressed as: , the unlabeled sample set can be expressed as: , ,in: Indicates the labeled samples; Indicates the category label corresponding to the sample; Indicates the unlabeled samples; Indicates the total number of training samples; represents the number of unlabeled samples; Indicates the number of labeled samples.
[0011] Step 5 is implemented as follows: The output result after the label sample is input into the encoder network is used as the sample feature, and the improved center loss is calculated to achieve metric learning and the improved center loss. The calculation formula is: (2) Where, Represents the encoder output, i.e., sample features; Representation sample Feature center corresponding to the class label; and Indicates the feature centers of different categories; represents the square of the Euclidean distance; Indicates that there are a total of training samples kind; Represents the weight coefficient, which is used to adjust the penalty term; No. Class sample feature center The calculation formula is: (3) Where, Indicates that it belongs to A collection of class-labeled samples, Represents the number of elements in the set. In each round of training, the sample feature center will be regenerated according to the above formula.
[0012] Step 6 is implemented as follows: Step 6.1: Unlabeled samples Input classification network to get predicted probability distribution , and estimate the unlabeled sample by the maximum predicted probability Category label , expressed as: (4) (5) Step 6.2: Setting the Threshold As the confidence level, filter out the unlabeled samples whose maximum predicted probability is greater than the threshold, and use the category label Generate pseudo-label samples as pseudo-labels to implement pseudo-label strategies.
[0013] Step 7 is implemented as follows: Based on the pseudo-label strategy and metric learning, a total loss function is designed. The classification network is trained using both unlabeled and labeled samples. The total loss function is expressed as: (6) Where, It represents the semi-supervised cross entropy loss after the pseudo-label strategy is introduced, which is expressed as: (7) Where, Indicates that when the maximum predicted probability is greater than the threshold When , the value is 1, otherwise it is 0, ensuring that only qualified unlabeled samples participate in the training of the classification network. Step 6 is repeated in each round of training to update the pseudo-label samples.
[0014] The beneficial effects of the present invention are: 1) This paper applies the variational autoencoder model to a radio frequency fingerprint recognition method based on semi-supervised learning. By learning the sample distribution, the features proposed by the encoder network are made more comprehensive and effective. 2) By calculating the distance between sample features and the centers of corresponding class features, as well as the distance between the centers of features of different classes, this method achieves the effect of clustering samples of the same class together and separating samples of different classes from each other in the feature center. The introduced metric learning method fully utilizes the limited number of labeled samples and improves the recognition effect of the model. 3) This paper proposes a pseudo-labeling strategy based on confidence threshold, which uses a large number of unlabeled samples to generate pseudo-labeled samples, and uses the confidence threshold to ensure the quality of pseudo-labels. Pseudo-labeled samples are used to assist real labeled samples in training the classification network, effectively alleviating the overfitting problem of the model when there are insufficient labeled samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a model training structure diagram of the semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo labels of the present invention; Figure 2 This is a comparison chart of the recognition accuracy of the semi-supervised RF fingerprint recognition method based on metric learning and pseudo-labeling in the present invention and the existing semi-supervised learning method under different signal-to-noise ratios. DETAILED DESCRIPTION
[0016] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0017] The present invention is based on a semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo labels. Figure 1 As shown in the figure, after the training samples are divided, in the pre-training stage, the variational autoencoder model is trained using unlabeled samples. After pre-training, the encoder network parameters are saved for the subsequent construction of the classification network. In the classification network training stage, after the unlabeled samples are input into the classification network to obtain the predicted probability, the samples with high confidence are screened out according to the confidence threshold to generate pseudo-label samples, which are then input into the classification network together with the labeled samples to calculate the semi-supervised cross entropy loss and the improved center loss to update the network parameters and finally realize device recognition.
[0018] Example 1 The semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling of the present invention is implemented in the following steps: Step 1: Collect signals from wireless devices, construct a training sample set, and divide it into a labeled sample set and an unlabeled sample set; Step 2: Design the encoder and decoder structures based on the structural characteristics of the signal data and build a variational autoencoder model; Step 3: Use the unlabeled sample set in step 1 to train the variational autoencoder model built in step 2. After the network converges, save the encoder parameters to obtain a pre-trained encoder network. Step 4: Input the label sample into the encoder network pre-trained in step 3 for feature extraction to obtain the features of the label sample; Step 5: Input the features of the labeled samples into the classifier to obtain the predicted probability and calculate the classification loss. At the same time, use the features of the labeled samples to calculate the improved central loss to achieve metric learning. Step 6: Build a classification network using steps 3 to 5, then input the unlabeled samples into the classification network to obtain the predicted probability, and generate pseudo-labeled samples based on the confidence level; Step 7: Input the pseudo-label samples and the labeled samples together into the classification network constructed in step 6 for training. Repeat step 6 in each round of training to update the pseudo-label samples until the model loss converges, and obtain the trained classification network. Step 8: Use the test sample to test the classification network performance and obtain the recognition accuracy.
[0019] Example 2 The present invention is based on a semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling, wherein step 1 is specifically implemented according to the following steps: Step 1.1, obtaining the signal of the wireless communication device, is expressed as: (1) Where, Indicates the signal received by the receiver; Represents a signal transmitted by a wireless communication device; represents additive white Gaussian noise; Represents the impact of the channel on the transmitted signal; Represents the convolution operation; Step 1.2: Construct a training sample set and divide it into a labeled sample set and an unlabeled sample set; definition is the training sample set of the signal, where the label sample set can be expressed as: , the unlabeled sample set can be expressed as: , ,in: Indicates the labeled samples; Indicates the category label corresponding to the sample; Indicates the unlabeled samples; Indicates the total number of training samples; represents the number of unlabeled samples; Represents the number of labeled samples, which is much smaller than the number of unlabeled samples.
[0020] Example 3 The present invention is based on a semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling, wherein step 5 is specifically implemented according to the following steps: The output result after the label sample is input into the encoder network is used as the sample feature, and the improved center loss is calculated to achieve metric learning and the improved center loss. The calculation formula is: (2) Where, Represents the encoder output, i.e., sample features; Representation sample Feature center corresponding to the class label; and Indicates the feature centers of different categories; represents the square of the Euclidean distance; Indicates that there are a total of training samples kind; Represents the weight coefficient, which is used to adjust the penalty term; No. Class sample feature center The calculation formula is: (3) Where, Indicates that it belongs to A collection of class-labeled samples, Represents the number of elements in the set. In each round of training, the sample feature center will be regenerated according to the above formula.
[0021] Example 4 The present invention is based on a semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling, wherein step 6 is specifically implemented according to the following steps: Step 6.1: Unlabeled samples Input classification network to get predicted probability distribution , and estimate the unlabeled sample by the maximum predicted probability Category label , expressed as: (4) (5) Step 6.2: Setting the Threshold As the confidence level, filter out the unlabeled samples whose maximum predicted probability is greater than the threshold, and use the category label Generate pseudo-label samples as pseudo-labels to implement pseudo-label strategies.
[0022] Example 5 The present invention is based on a semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling, wherein step 7 is specifically implemented according to the following steps: Based on the pseudo-label strategy and metric learning, a total loss function is designed. The classification network is trained using both unlabeled and labeled samples. The total loss function is expressed as: (6) Where, It represents the semi-supervised cross entropy loss after the pseudo-label strategy is introduced, which is expressed as: (7) Where, Indicates that when the maximum predicted probability is greater than the threshold When , the value is 1, otherwise it is 0, ensuring that only qualified unlabeled samples participate in the training of the classification network. Step 6 is repeated in each round of training to update the pseudo-label samples.
[0023] Example 6 Deep learning methods are currently widely used in the field of RF fingerprint recognition. These methods can directly and effectively extract essential device features with strong characterization capabilities. When sufficient labeled training samples are available, models with good recognition performance and generalization capabilities can be obtained. However, in practice, due to the complexity of the radio electromagnetic environment, creating a sufficient, high-quality, labeled training set is very time-consuming and expensive. Insufficient labeled samples can also lead to reduced recognition performance during model training. Therefore, it is necessary to design RF fingerprint recognition methods for the case of insufficient labeled samples to improve the recognition accuracy and generalization performance of the model.
[0024] The semi-supervised RF fingerprinting method based on metric learning and pseudo-labeling was experimentally compared with several other semi-supervised learning methods at different signal-to-noise ratios. The training data was derived from the WiSig public dataset. Signal samples from 10 devices were selected as the training set. 10% of the training set was treated as labeled samples, and the remaining 90% as unlabeled samples. Figure 2 The experimental results of several methods are shown, among which the proposed method is the method of the present invention. The results show that the recognition accuracy of the method proposed in the present invention reaches the optimal level under different signal-to-noise ratios, and the effect is more obvious under low signal-to-noise ratios, which fully proves the effectiveness of the method proposed in the present invention.
[0025] The present invention is a semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling. A pseudo-labeling strategy based on confidence threshold is proposed. A large number of unlabeled samples are used to generate pseudo-labeled samples, and the confidence threshold is used to ensure the quality of pseudo-labels. Pseudo-labeled samples are used to assist real-labeled samples in training the classification network, effectively alleviating the overfitting problem of the model when there are insufficient labeled samples.
Claims
1. A semi-supervised RF fingerprint recognition method based on metric learning and pseudo-labeling, characterized by: Specifically: after the training samples are divided, in the pre-training stage, the variational autoencoder model is trained using unlabeled samples, and the encoder network parameters are saved after pre-training; in the classification network training stage, after the unlabeled samples are input into the classification network to obtain the predicted probability, the samples with high confidence are screened out according to the confidence threshold to generate pseudo-labeled samples, which are then input into the classification network together with the labeled samples to calculate the semi-supervised cross entropy loss and improved center loss.
2. The semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling according to claim 1, characterized in that: Please follow the steps below to implement it: Step 1: Collect signals from wireless devices, construct a training sample set, and divide it into a labeled sample set and an unlabeled sample set; Step 2: Design the encoder and decoder structures based on the structural characteristics of the signal data and build a variational autoencoder model; Step 3: Use the unlabeled sample set in step 1 to train the variational autoencoder model built in step 2. After the network converges, save the encoder parameters to obtain a pre-trained encoder network. Step 4: Input the label sample into the encoder network pre-trained in step 3 for feature extraction to obtain the features of the label sample; Step 5: Input the features of the labeled samples into the classifier to obtain the predicted probability and calculate the classification loss. At the same time, use the features of the labeled samples to calculate the improved central loss to achieve metric learning. Step 6: Build a classification network using steps 3 to 5, then input the unlabeled samples into the classification network to obtain the predicted probability, and generate pseudo-labeled samples based on the confidence level; Step 7: Input the pseudo-label samples and the labeled samples together into the classification network constructed in step 6 for training. Repeat step 6 in each round of training to update the pseudo-label samples until the model loss converges, and obtain the trained classification network. Step 8: Use the test sample to test the classification network performance and obtain the recognition accuracy.
3. The semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling according to claim 2, characterized in that: The step 1 is specifically implemented according to the following steps: Step 1.1, obtaining a signal from a wireless communication device; Step 1.2: Construct a training sample set and divide it into a labeled sample set and an unlabeled sample set.
4. The semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling according to claim 3, characterized in that: The signal of the wireless communication device in step 1.1 is represented as follows: (1) Where, Indicates the signal received by the receiver; Represents a signal transmitted by a wireless communication device; represents additive white Gaussian noise; Represents the impact of the channel on the transmitted signal; Represents a convolution operation.
5. The semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling according to claim 3, characterized in that: In step 1.2, define is the training sample set of the signal, where the label sample set can be expressed as: , the unlabeled sample set can be expressed as: , ,in: Indicates the labeled samples; Indicates the category label corresponding to the sample; Indicates the unlabeled samples; Indicates the total number of training samples; represents the number of unlabeled samples; Indicates the number of labeled samples.
6. The semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling according to claim 2, characterized in that: The step 5 is specifically implemented according to the following steps: The output result after the label sample is input into the encoder network is used as the sample feature, and the improved center loss is calculated to achieve metric learning and the improved center loss. The calculation formula is: (2) Where, Represents the encoder output, i.e., sample features; Representation sample Feature center corresponding to the class label; and Indicates the feature centers of different categories; represents the square of the Euclidean distance; Indicates that there are a total of training samples kind; Represents the weight coefficient, which is used to adjust the penalty term; No. Class sample feature center The calculation formula is: (3) Where, Indicates that it belongs to A collection of class-labeled samples, Represents the number of elements in the set. In each round of training, the sample feature center will be regenerated according to the above formula.
7. The semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling according to claim 2, characterized in that: The step 6 is specifically implemented according to the following steps: Step 6.1: Unlabeled samples Input classification network to get predicted probability distribution , and estimate the unlabeled sample by the maximum predicted probability Category label , expressed as: (4) (5) Step 6.2: Set the threshold As the confidence level, filter out the unlabeled samples whose maximum predicted probability is greater than the threshold, and use the category label Generate pseudo-label samples as pseudo-labels to implement pseudo-label strategies.
8. The semi-supervised radio frequency fingerprint recognition method based on metric learning and pseudo-labeling according to claim 2, characterized in that: The step 7 is specifically implemented according to the following steps: Based on the pseudo-label strategy and metric learning, a total loss function is designed. The classification network is trained using both unlabeled and labeled samples. The total loss function is expressed as: (6) Where, It represents the semi-supervised cross entropy loss after the pseudo-label strategy is introduced, which is expressed as: (7) Where, Indicates that when the maximum predicted probability is greater than the threshold When , the value is 1, otherwise it is 0, ensuring that only qualified unlabeled samples participate in the training of the classification network. Step 6 is repeated in each round of training to update the pseudo-label samples.