An open set radio frequency fingerprint identification method based on feature space optimization

By converting radio frequency signals into single-channel grayscale images and constructing a feature space optimization model, combined with the hybrid center loss function and the OpenMax algorithm, the problem of insufficient radio frequency fingerprint recognition capability in open set environments is solved, enabling effective identification and security assurance of unknown devices.

CN120892930BActive Publication Date: 2026-02-06NAVAL UNIV OF ENG PLA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511430128.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-09
Publication Date
2026-02-06
Estimated Expiration
2045-10-09

AI Technical Summary

Technical Problem

Existing radio frequency fingerprinting methods have weak feature recognition capabilities in open set environments, making it difficult to effectively distinguish unknown devices, leading to misjudgments and security risks.

Method used

An open-set radio frequency fingerprinting method based on feature space optimization is adopted. By converting the radio frequency signal into a single-channel grayscale image, a fingerprint recognition model including a feature extraction module and an open-set classification module is constructed. The feature space is optimized using a hybrid center loss function, and the OpenMax algorithm is combined for unknown category detection.

Benefits of technology

It significantly enhances the discriminative power of features, enabling better identification of radio frequency fingerprints from different communication devices, improving the detection capability for unknown categories, and reducing the requirements for training data and computational resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120892930B_ABST
    Figure CN120892930B_ABST
Patent Text Reader

Abstract

The application provides an open set radio frequency fingerprint identification method based on feature space optimization, comprising the following steps: converting a fingerprint radio frequency signal into a single-channel grayscale image, taking the single-channel grayscale image as a training set; constructing a fingerprint identification model comprising a feature extraction module and an open set classification module, inputting the training set into the feature extraction module, calculating the intra-class distance mean and the inter-class distance mean of a feature space output by the feature extraction module, taking the ratio of the intra-class distance mean to the inter-class distance mean as a hybrid center loss function of the fingerprint identification model, and updating the parameters of the feature space and the feature extraction module by using the hybrid center loss function; extracting an activation vector of a to-be-detected sample by using the updated feature extraction module, and outputting a fingerprint classification and identification result according to the updated feature space and the activation vector of the to-be-detected sample by the open set classification module.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of radio frequency fingerprint identification, and particularly relates to an open set radio frequency fingerprint identification method based on feature space optimization. BACKGROUND

[0002] Radio frequency fingerprint identification is a key technology for identifying the identity of a communication device transmitter. Its core principle lies in that each communication device forms unique radio frequency characteristics similar to human fingerprints during manufacturing and use. These subtle characteristics are contained in the radio frequency signals transmitted by the device. By analyzing these characteristics, radio frequency fingerprint identification technology can achieve accurate identification of the device, effectively distinguish different transmitters, prevent counterfeit and imitation attacks, and ensure communication security.

[0003] At present, radio frequency fingerprint identification methods mainly include two categories: manual feature extraction combined with classification algorithm identification and deep learning-based methods. Traditional manual feature extraction methods rely on expert experience, extract specific subtle features in the signal, and then combine threshold judgment or traditional machine learning classification algorithms to achieve identification. However, this method has significant limitations: on the one hand, transient features are easily affected by channel environment and have extremely short duration, requiring high cost and precision of the acquisition device; on the other hand, the feature extraction process is complex and highly dependent on expert experience, making it difficult to adapt to large-scale, diverse, and dynamically changing actual application scenarios. Therefore, deep learning technology with strong automatic feature extraction and learning capabilities, especially convolutional neural networks (CNN), has gradually become a research hotspot and more commonly used method in this field.

[0004] Although deep learning methods have made significant progress in radio frequency fingerprint identification, they still face some key problems that need to be solved: most existing solutions can achieve high accuracy in a closed set, i.e., only containing samples of known categories, but this does not match the actual application scenario. In the real open space, there are unknown devices, and the closed set model will incorrectly classify unknown categories into known categories, leading to system misjudgment and security risks. SUMMARY

[0005] The application proposes an open set radio frequency fingerprint identification method based on feature space optimization, which solves the problem of weak feature recognition ability of existing technologies in an open set environment.

[0006] To solve the above technical problems, the application provides an open set radio frequency fingerprint identification method based on feature space optimization, including the following steps:

[0007] Step S1: convert the fingerprint radio frequency signal into a single-channel grayscale image, and use the single-channel grayscale image as a training set;

[0008] Step S2: constructing a fingerprint recognition model comprising a feature extraction module and an open set classification module, inputting the training set into the feature extraction module, calculating the intra-class distance mean and inter-class distance mean of the feature space output by the feature extraction module, taking the ratio of the intra-class distance mean to the inter-class distance mean as a hybrid center loss function of the fingerprint recognition model, and updating the parameters of the feature space and the feature extraction module using the hybrid center loss function;

[0009] Step S3: extracting the activation vector of the to-be-detected sample using the updated feature extraction module, and outputting a fingerprint classification recognition result according to the updated feature space and the activation vector of the to-be-detected sample by the open set classification module.

[0010] Preferably, the conversion of the fingerprint radio frequency signal into a single-channel grayscale image in step S1 comprises the following steps: converting the fingerprint radio frequency signal into a frequency spectrum graph using short-time Fourier transform, taking the absolute value of the complex spectrum matrix in the frequency spectrum graph to obtain an amplitude spectrum, normalizing the amplitude spectrum using the global mean and standard deviation, and converting the normalized amplitude spectrum into a single-channel grayscale image.

[0011] Preferably, the input channel number of the convolution layer of the feature extraction module in step S2 is 1, and the output channel number of the full connection layer is the number of known categories in the training set.

[0012] Preferably, the loss function of the fingerprint recognition model in step S2 further comprises a cross-entropy loss, and the expression of the loss function of the fingerprint recognition model is:

[0013] ;

[0014] ;

[0015] ;

[0016] ;

[0017] In the above formula, is the loss function of the fingerprint recognition model; is the cross-entropy loss function; is a weight coefficient; is the hybrid center loss function; is the intra-class distance mean; is the inter-class distance mean; is a constant for preventing the denominator from being zero; is the number of categories; is the number of samples of the category ; is all samples in the category ; For category The first in One sample; For category The center; This indicates the search for L2 normal form; , Categories and categories The center.

[0018] Preferably, in step S2, the loss function is updated using a dynamic gradient update algorithm, thereby updating the parameters of the feature space and the feature extraction module. The expression for the dynamic gradient update algorithm is:

[0019] ;

[0020] ;

[0021] In the formula, The weight parameters of the feature extraction module Update rules; Indicates category center Update rules; , These are the learning rates for the weight parameters and the class centers, respectively. This indicates the partial derivative.

[0022] Preferably, the open set classification module in step S3 outputs the fingerprint classification and recognition result of the sample to be detected based on the updated feature space and the features of the sample to be detected, including the following steps:

[0023] Step S31: Calculate the mean activation vector for each known category in the updated feature space;

[0024] Step S32: Calculate the mixture distance between the activation vector of the sample to be detected and the mean activation vector of each known class;

[0025] Step S33: Calculate the probability of the sample to be detected belonging to an unknown category based on the mixed distance, adjust the activation vector of the sample to be detected based on the probability of the probability of the sample to be detected belonging to each category based on the adjusted activation vector;

[0026] Step S34: If the category corresponding to the highest probability in the probabilities is an unknown category, or the highest probability is less than the set probability threshold, then the input of the sample to be detected is rejected; otherwise, the category corresponding to the highest probability is taken as the fingerprint classification and recognition result.

[0027] Preferably, the abnormal probability of the to-be-detected sample belonging to the unknown category is calculated in step S33 by the pre-fitted Weibull distribution parameters and the mixed distance, and the expression for calculating the abnormal probability is:

[0028] ;

[0029] wherein, is the abnormal probability of the to-be-detected sample belonging to the category ; is the center of the category ; is the location parameter in the Weibull distribution parameters; is the scale parameter in the Weibull distribution parameters; is the shape parameter in the Weibull distribution parameters.

[0030] Preferably, the Weibull distribution parameters are determined in step S33 by grid search and Bayesian optimization, including the following steps:

[0031] Step S331: constructing an optimization objective function, setting an initial search space for the number of tail samples of each category, searching for a grid that maximizes the value of the optimization objective function in the initial search space by using a grid search method, and taking the grid that maximizes the value of the optimization objective function as the optimization search space of each category, and the expression of the optimization objective function is:

[0032] ;

[0033] wherein, is the optimization objective function; , , are weight coefficients of the classification accuracy, the open set recognition rate, and the closed set accuracy, respectively; is the classification accuracy; is the open set recognition rate; is the closed set accuracy;

[0034] Step S332: in the optimization search space of each category, searching for a tail sample number that maximizes the value of the optimization objective function by using a Bayesian optimization algorithm ;

[0035] Step S333: in each category, selecting samples with the largest mixed distance as tail extreme samples, and fitting Weibull distribution parameters according to the mixed distance and the tail extreme samples.

[0036] Preferably, the expression for fitting the Weibull distribution parameters according to the mixed distance and the tail extreme samples in step S333 is:

[0037] ;

[0038] wherein, is the Weibull distribution parameter; is the parameter fitting function; is the maximum value of the distance between the sample and the MAV of each category, i.e., the tail distance.

[0039] Preferably, the expression for calculating the probability of the to-be-detected sample belonging to each category according to the adjusted activation vector in step S33 is:

[0040] ;

[0041] ;

[0042] wherein, is the probability of the to-be-detected sample belonging to the category ; is the adjusted activation vector; is the activation vector; is the abnormal probability; is the number of categories.

[0043] The beneficial effects of the present application at least include: the hybrid center loss function of the present application utilizes the ratio of the mean value of the intra-class distance and the mean value of the inter-class distance in the feature space to update the parameters of the feature space and the feature extraction module, so that the model can actively reduce the distribution range of the radio frequency fingerprint features of the same category in the feature space during the training process, while expanding the distance between different categories; compared with the traditional deep learning method, the feature discrimination can be more effectively enhanced, so that the model can better identify the radio frequency fingerprints of different communication devices; at the same time, by constructing a fingerprint identification model including an open set classification module, and using the feature space optimized by the hybrid center loss function, the detection of unknown categories can be better handled. BRIEF DESCRIPTION OF DRAWINGS

[0044] Figure 1 is a method flowchart of an embodiment of the present application;

[0045] Figure 2 is a flowchart of optimizing the parameters of openmax in an embodiment of the present application;

[0046] Figure 3 is a feature distribution graph after the training set and the test set are subjected to PCA dimension reduction by different methods in an embodiment of the present application;

[0047] Figure 4 is a feature distribution graph after the training set and the test set are subjected to t-SNE dimension reduction by different methods in an embodiment of the present application;

[0048] Figure 5 Fig. 16 is a diagram showing fluctuations of classification accuracy and F1 score of an embodiment of the present application with respect to parameters of openmax;

[0049] Figure 6 Fig. 17 is a diagram showing performance comparison of different methods for optimizing parameters of openmax in an embodiment of the present application;

[0050] Figure 7 Fig. 18 is a ROC curve of three methods under strategy 1 of an embodiment of the present application;

[0051] Figure 8 Fig. 19 is a diagram showing confusion matrix comparison of models under different open ratios in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.

[0053] As shown in Figure 1 Fig. 1, an open set radio frequency fingerprint identification method based on feature space optimization is provided in an embodiment of the present application, which includes the following steps:

[0054] Step S1: converting a fingerprint radio frequency signal into a single-channel grayscale image, and taking the single-channel grayscale image as a training set.

[0055] Specifically, in the embodiment of the present application, a short-time Fourier transform (STFT) is used to convert an original radio frequency IQ signal into a frequency spectrum graph, an absolute value is taken for a complex frequency spectrum matrix to obtain an amplitude spectrum, a global mean and a standard deviation are used to normalize the amplitude spectrum, and the normalized amplitude spectrum is converted into a single-channel grayscale image. The single-channel grayscale image is resized by bilinear interpolation, and is input into a model after being converted into a tensor.

[0056] Step S2: constructing a fingerprint identification model including a feature extraction module and an open set classification module, inputting the training set into the feature extraction module, calculating an intra-class distance mean and an inter-class distance mean of a feature space output by the feature extraction module, taking a ratio of the intra-class distance mean to the inter-class distance mean as a hybrid center loss function of the fingerprint identification model, and updating parameters of the feature space and the feature extraction module by using the hybrid center loss function.

[0057] Specifically, the feature extraction module of the embodiment of the present application adopts a ResNet18 model. Since the original ResNet18 model is pre-trained on an ImageNet data set, the input is an image containing three channels of RGB, and the frequency spectrum graph converted by STFT is a single-channel gray image. In order to avoid memory occupation and resource waste, the input channel number of the initial convolution layer of the original ResNet18 model is modified to 1. After the original IQ signal is preprocessed, the size of the time-frequency graph input into the model is 224x224x1. These time-frequency graphs are divided into a training set and a test set at a ratio of 8:2.

[0058] At the same time, the output of the fully connected layer of the original ResNet18 model is modified to correspond to the number of known categories of the current data set, so as to adapt to the current radio frequency fingerprint identification project.

[0059] The training set is used to perform parameter fine-tuning training on the feature extraction module. In this process, the hybrid center loss function is initialized and integrated into the model training process, which is specifically manifested as follows: the hybrid center loss value is calculated in each training iteration period, and the model parameters and the hybrid center loss parameters are updated at the same time through back propagation. This joint optimization mechanism minimizes the intra-class feature distance and maximizes the inter-class feature distance, reshapes the feature space distribution, so that the same class features are more compactly gathered in the embedding space, and the different class features are obviously separated. The model performance is evaluated through the validation set, the hyperparameter optimization selection is completed based on the validation set accuracy index, and the overfitting prevention strategy is implemented, and finally the model parameter version reaching the highest classification precision on the validation set is reserved.

[0060] Although the current radio frequency fingerprint identification method based on deep learning performs excellently, it faces two major problems: first, the traditional center loss function only focuses on reducing the distance between the same class samples, lacks an explicit constraint mechanism to increase the inter-class distance, and is easy to cause confusion between different class samples; second, the existing method relies on large-scale training data or complex data enhancement strategy, and there is a problem of large training overhead and high resource consumption in open set identification under the condition of few samples. The embodiment of the present application is inspired by the OpenMax open set algorithm and the center loss function, and a combined center loss function (Combined Center Loss, CCL) is designed by improving the loss function structure. The function breaks through the limitation of the traditional center loss, and simultaneously compresses the intra-class distance and explicitly enhances the inter-class distinguishability: specifically, the original center loss realizes intra-class aggregation by constraining the Euclidean distance between the sample and the class center, while the CCL directly expands the distance between different class centers by introducing a cross-class center repulsion mechanism. Compared with the contrast loss and the triplet loss which need to construct sample pairs, the CCL avoids complex sample pairing design, optimizes the feature space distribution while maintaining low computational complexity.

[0061] The core of the original center loss function lies in learning a class center for each class and penalizing the distance between sample features and the corresponding class center, thereby forcing features of the same class to be more compact. However, it does not explicitly separate samples from different classes, and may still lead to confusion between similar samples from different classes. While contrastive loss and triplet loss consider increasing the distance between different classes, they require designing and selecting contrastive samples for learning, increasing the complexity of the model. Building on previous research, this paper designs a new loss function, CCL, which explicitly increases inter-class discriminability while reducing intra-class distance, thereby optimizing the feature space distribution.

[0062] The hybrid center loss function constructed in this embodiment of the invention , defined as the ratio of the mean intra-class distance to the mean inter-class distance:

[0063] ;

[0064] In the formula, It is the mean of the intra-class distance; It is the mean distance between classes; It is a very small constant used to prevent division by zero.

[0065] Mean intra-class distance The calculation formula is:

[0066] ;

[0067] In the formula, Indicates the number of categories; Indicate category All samples in; For category The number of samples; It is a category The first in One sample; It is a category The center.

[0068] Mean distance between classes The calculation formula is:

[0069] ;

[0070] In the formula, and Categories and categories The center.

[0071] For category center The gradient is:

[0072] .

[0073] The gradient of the mixed center loss with respect to the class center is:

[0074] .

[0075] The gradient of the mixed center loss with respect to the class center is:

[0076] .

[0077] The gradient of the mixed center loss with respect to the sample feature is:

[0078] .

[0079] Only affected by the class center, therefore The gradient of the mixed center loss with respect to the sample feature is 0, and according to the chain rule, the gradient of the mixed center loss with respect to the sample feature is:

[0080] .

[0081] In the model training process, the cross-entropy loss and the newly designed mixed center loss are jointly supervised, that is:

[0082] ;

[0083] At all times, is a weight coefficient for balancing the cross-entropy loss and the mixed center loss.

[0084] According to the above formula, the update rule of the neural network weight parameter and the update rule of the class center can be obtained, which are respectively:

[0085] ;

[0086] ;

[0087] In the formula, , are the learning rates of the weight parameter and the class center, respectively, for controlling the step size of parameter update.

[0088] Under the joint supervision of the cross-entropy loss and the mixed center loss, the radio frequency fingerprint classification and recognition feature learning is carried out, including the following steps: ​​​​​

[0089] S1: input training dataset , initial weights of neural network and each class center , hyperparameters , , weight coefficient .

[0090] S2: sample a batch from training data, extract features by neural network, calculate cross-entropy loss and mixed center loss:

[0091] .

[0092] S3: calculate gradient by back propagation, update neural network parameters with optimizer :

[0093] ;

[0094] .

[0095] S4: for each class , if the current batch contains samples of this class, calculate the average value of the features of these samples, and update the class center with the exponential moving average strategy:

[0096] .

[0097] S5: repeat S2-S4 until the model converges, output the trained neural network weight parameters and class centers .

[0098] At the same time, the embodiment of the application establishes an open set radio frequency fingerprint recognition framework based on transfer learning, which significantly reduces the training data demand by using the ImageNet pre-trained ResNet18 network for feature extraction and cooperating with a small amount of signal sample fine-tuning strategy.

[0099] Migratory learning is a machine learning method that improves the performance of a target domain task by migrating the knowledge learned from a source domain to the target domain. This method can achieve a more efficient learning process on the target domain by migrating general features in the source domain: it not only accelerates the learning speed of the task, but also enhances the model generalization ability, while avoiding the high computational resource consumption caused by training the model from scratch. The embodiment of the present invention selects ResNet18 network as the pre-training model basis of the radio frequency fingerprint identification. Since the original model performs a 1000-class classification task based on the ImageNet dataset, its input is designed as RGB three-channel data, while the radio frequency fingerprint spectrum graph belongs to single-channel data. If the single-channel spectrum graph is simply copied as three-channel input, it will cause information redundancy and waste of computing resources. Therefore, the embodiment of the present invention performs channel adaptation modification and parameter fine-tuning on the ResNet18 network structure on the basis of retaining the advantages of migratory learning, wherein Conv1 is a convolutional layer, Maxpool is a maximum pooling layer, Avgpool is an average pooling layer, and FC is a fully connected layer. The network structure parameters after modification are shown in Table 1.

[0100] Table 1 ResNet18 structure parameters

[0101]

[0102] Step S3: Extract the activation vector of the to-be-detected sample using the updated feature extraction module, and output the fingerprint classification recognition result according to the updated feature space and the activation vector of the to-be-detected sample.

[0103] Specifically, the open set classification module of the embodiment of the present invention adopts OpenMax, which is a deep network open set recognition algorithm. The core idea of the algorithm is to improve the SoftMax activation function layer by introducing the meta-recognition concept, so as to solve the limitation of the deep model when dealing with unknown categories. The algorithm uses the activation vector (Activation Vector, AV) of the second-to-last layer of the neural network to estimate the probability that the input sample belongs to an unknown category.

[0104] The open set recognition process can be divided into a training phase and a testing phase. The main task of the training phase is to select a feature space and extract the AV of all training samples, calculate the mean activation vector of the correctly classified samples of each category, and fit the Weibull distribution of the tail data of each category based on the extreme value theory. At the same time, the mean of the AV of the correctly classified training samples in each category is calculated, which is called the mean activation vector (Mean Activation Vector, MAV). The specific formula for calculating the mean activation vector is:

[0105] ;

[0106] In the formula, is the center of the class; represents the activation vector of the sample correctly classified in the class

[0107] After obtaining the MAV of each class, the distance between the training sample and the MAV is calculated, and the parameters of the Weibull distribution are fitted using these distances, and the specific formula is:

[0108]

[0109] wherein, is the shape parameter; is the scale parameter; is the location parameter; FitHigh is a function in the libMR library for fitting the parameters of the Weibull distribution; is a parameter for selecting the maximum value of the distance; is the maximum value of the distance between the sample and the MAV of each class.

[0110] The main task of the test phase is to extract the activation vector of the sample to be tested, estimate the abnormal probability of the input sample belonging to an unknown class using the Weibull distribution, and adjust the activation score according to the abnormal probability, and calculate the OpenMax probability based on the adjusted activation score. For the input sample , extract its activation vector in the second-to-last layer. , and calculate the abnormal probability. For each class, the distance between the AV of the input sample and the MAV of the class is calculated, and the cumulative distribution function (CDF) of the Weibull distribution is used to estimate the probability that the input belongs to an unknown class:

[0111]

[0112]

[0113] In the above formula, represents the abnormal probability of belonging to the class ; is the activation score of each class after adjustment according to the abnormal probability.

[0114] At the same time, the pseudo-activation score of the unknown unknown class is introduced:

[0115]

[0116] The OpenMax probability is calculated using the adjusted activation score:​​​​​​​

[0117] ;

[0118] wherein, unknown class.

[0119] The class corresponding to the maximum OpenMax probability is selected as the prediction result. If the class corresponding to the maximum probability is the unknown class , or the maximum probability is less than a certain threshold , the input is rejected, and the sample is judged as the unknown class.

[0120] The above process can be summarized as the following steps:

[0121] S1: input the activation vector , the average activation vector of each known class , the Weibull distribution parameters , , the hyperparameters , the number of top classes with the largest activation values for score adjustment, the threshold , for judging whether to reject the input.

[0122] S2: sort the activation vector , and obtain the index sequence , wherein , is the class index of the ith largest activation value; initialize the weight vector, i.e., set for all classes .

[0123] S3: for each i from 1 to , calculate the weight of the class .

[0124] S4: calculate the adjusted activation vector .

[0125] S5: calculate the pseudo-activation value of the unknown class .

[0126] S6: calculate the probability distribution .

[0127] S7: determine the predicted class .

[0128] S8: if or , reject the input; otherwise, output .

[0129] From the above steps, the effect of the OpenMax open set recognition algorithm is related to , and Weibull distribution parameters, mainly the number of tail extreme values for fitting Weibull distribution and the distance type. At present, these parameters are manually set, which requires certain experience or consumes a lot of time and computing resources to determine. In addition, in the existing OpenMax open set recognition algorithm, the same number of tails is used for Weibull distribution fitting for each known class, but the distribution of each class after the network model is different, some classes may be relatively compact, and some classes may still have some discrete points, so it is necessary to determine the best tail number for fitting Weibull distribution according to the distribution of each class. In the embodiment of the present application, a hybrid search strategy based on grid search and Bayesian optimization (BO) is proposed to improve the OpenMax algorithm, which can adaptively determine the corresponding parameters and thresholds of the original OpenMax algorithm. The original OpenMax algorithm uses the determined parameters and thresholds for open set recognition, and the improved OpenMax algorithm uses a hybrid distance composed of Euclidean distance and cosine distance in a certain ratio for distance measurement, and allows each class to have different tail sizes, so as to better fit the Weibull distribution and improve the recognition ability of unknown classes.

[0130] The grid search method has a certain blindness and is easy to waste computing resources by exhaustive search in a given search range with a pre-set step size. The BO algorithm uses a Bayesian network to establish a solution space probability model, which can display and reflect the relationship between variables in the optimization problem, and is an effective global optimization method, especially suitable for processing complex design and optimization problems such as multi-peak, non-convex, high-dimensional, large decision space, black box, high evaluation cost, etc. At present, it is widely used in hyperparameter optimization in the field of deep learning. However, the performance of the BO algorithm is also easily affected by the initial evaluation point and falls into local optimum, so in the improved OpenMax algorithm designed in the embodiment of the present application, the grid search method is first used to preliminarily search the key parameters in the OpenMax algorithm in a large range, and the target function value is calculated on each grid point to find the approximate area where the better parameter combination is located. After determining the initial range of the parameters, the BO algorithm is further used for fine optimization in a small range, and the specific process is as shown in Figure 2 .

[0131] BO algorithm uses existing evaluation information to select the next evaluation point through the probability agent model and the acquisition function, thereby efficiently finding the global optimal solution. The principle of BO algorithm is to select the next evaluation point according to the information obtained by the target function, so that the optimal solution can be obtained through a small number of evaluations. The framework of BO algorithm is an iterative process, mainly including two core contents: probability agent model and acquisition function. In the optimization process, the algorithm first randomly selects the evaluation point in the given range and calculates the target function value for initialization and construction of the agent model, then obtains the next evaluation point by maximizing the acquisition function, and after evaluating the target function value, the new observation data is added to the observation set and the probability agent model is updated until the iteration number or the function value converges.

[0132] The embodiment of the application designs a target function in view of the characteristics of the open set, and optimizes the BO-OpenMax algorithm, uses Gaussian Process Regression (GPR) as the agent model to approximate the behavior of the target function, and selects the Expected Improvement (EI) as the acquisition function to guide the selection and evaluation of the next parameter combination. The target function of the embodiment of the application is:

[0133] ;

[0134] In the formula, 、 、 respectively represent the classification accuracy, the open set recognition rate and the closed set accuracy; 、 、 are weight coefficients, respectively representing the relative importance of the classification accuracy, the open set recognition rate and the closed set accuracy in the optimization target.

[0135] By adjusting these weights, the target function can flexibly control the emphasis on different performance indicators, thereby better adapting to the open set recognition requirements under different scene and task requirements.

[0136] GPR is a non-parametric Bayesian method that can make probabilistic predictions of the target function output based on known data, providing a basis for subsequent optimization decisions. It is assumed that sampling points have been observed, where and . For a new input point , the prediction distribution of its target value is:

[0137] ;

[0138] ;

[0139] ;

[0140] wherein, , are the mean and variance of the target value respectively; is the kernel function matrix between the existing input points; is the kernel function matrix between the existing input points; denotes the unit matrix; is the target value vector, representing the predicted output value in the data set; denotes the calculation result of the kernel function at the new input point with itself.

[0141] The kernel function is the core of Gaussian process regression, which is a matrix, and the element can be used to measure the similarity between two input points. The kernel function used in the Gaussian process of the embodiment of the present application is the square exponential kernel, that is:

[0142] ;

[0143] wherein, is a length scale parameter, used to control the similarity range of the input space.

[0144] EI as the acquisition function can help the algorithm balance between exploration and utilization by calculating the improvement that the candidate point may bring, so as to efficiently find the global optimal solution. The calculation formula is:

[0145] ;

[0146] wherein, is the value of the objective function at the point ; is the best function value that has been observed at present; denotes expectation.

[0147] According to the prediction distribution of GPR , the expectation formula is expanded as:

[0148] ;

[0149] ;

[0150] wherein, is the cumulative distribution function of the standard normal distribution; is the probability density function of the standard normal distribution.

[0151] ​For a new set of candidate points, the acquisition function selects the point with the maximum expected value for evaluation and calculation until the target converges or the number of iterations is reached.

[0152] Finally, the model performance is evaluated using the validation set data, the best hyperparameters are selected to prevent overfitting, and the model parameters with the highest classification accuracy on the validation set are saved. The trained model is tested using the test set, the activation vector is extracted, and the OpenMax is used to adjust the activation score to output the classification recognition result.

[0153] To verify the effectiveness of the method proposed in the embodiment of the application, the prediction effects of different methods are evaluated through experiments. Principal Component Analysis (PCA) and t-distributed Stochastic Neighbor Embedding (t-SNE) are two commonly used dimension reduction methods. Among them, the PCA method is a linear dimension reduction method, which can preserve the global structure information of the data and has fast calculation speed, can quickly show the overall distribution of the data, and help to observe the aggregation degree of different categories of data points, but the sensitivity to local structure of high-dimensional data is low, and the nonlinear feature relationship cannot be captured, so the PCA method may not be effective when analyzing the local difference between data points, that is, the feature separation degree. The t-SNE method is a nonlinear dimension reduction method, which can better preserve the local structure information and can effectively reveal the separation between different categories, but may overemphasize the local structure, resulting in the loss of global structure information, and may not be accurate enough when showing the overall compactness of the data. The embodiments of the application use these two methods to comprehensively analyze the feature space visualization results, mainly use the PCA method to analyze the intra-class compactness, and use the t-SNE method to analyze the inter-class separation degree.

[0154] The original OpenMax method without feature space optimization, the OpenMax method after feature space optimization by center loss, and the OpenMax method after feature space optimization by hybrid center loss are compared through experiments, and the PCA and t-SNE methods are used to visualize the high-dimensional features of the training set and the test set, respectively, as shown in Figure 3 Figure 4 Figure 3 ​​As can be seen, the feature space distribution of the test set under different methods maintains a high degree of consistency with the training set, indicating that the model has a strong generalization ability in learning the deep features of RF fingerprints. Comparing the results of the three methods after PCA dimensionality reduction, it can be found that the feature space of each class is more compact than the feature space of the original OpenMax method after using center loss and hybrid loss. In addition, the intra-class compactness of each class is more balanced after using hybrid loss to optimize the feature space, while the intra-class compactness of the original method is large and abrupt in categories 1 and 2, and the intra-class compactness of the center loss method is large in categories 1, 3, and 4, indicating insufficient intra-class compactness; from the scatter distribution, the center loss method has fewer scatter points after optimization. Figure 4 The visualization results show that after t-SNE dimensionality reduction using the same method, the feature distributions of the test set and the training set remain highly consistent, reflecting the model's good learning performance and strong generalization ability. Analyzing the results of the three methods after t-SNE dimensionality reduction reveals that all three methods can generally distinguish different categories. However, the original OpenMax method and the center loss method both exhibit feature overlap and crossover issues in both the training and test sets. Specifically, the original OpenMax method confuses a few unknown class samples with class 2 and class 4 samples in the test set, while the center loss method, after optimizing the feature space, confuses even more unknown samples with class 2 and class 4 samples, and even shows a small amount of overlap between the feature spaces of class 0, class 1, and unknown samples. Analyzing the visualization results under the hybrid loss method shows that only a few class 4 samples overlap with the feature spaces of unknown samples; furthermore, the separation between different categories is clearer and more balanced. The reason for this may be that all three methods use cross-entropy loss to effectively classify samples during training. However, the original method only considers classification and does not consider feature space optimization, while the center loss only considers intra-class compactness and ignores inter-class separation. The hybrid loss proposed in this embodiment of the invention reduces intra-class distance while increasing inter-class distance, making the feature distribution more conducive to classification tasks.

[0155] Subsequently, grid search and Bayesian optimization algorithms were used to find the optimal parameter set, and the values ​​of other parameters within the optimal parameter set were fixed, as shown in the figure. Figure 5 The accuracy and F1 score are shown as they change with the threshold and the ratio of Euclidean cosine distance. Analysis Figure 5 It can be seen that different parameters have a significant impact on the performance of the OpenMax open set recognition algorithm. Manually selecting the corresponding parameters is time-consuming, labor-intensive, and requires certain experience. Therefore, this embodiment of the invention introduces grid search and BO algorithm into the original OpenMax algorithm for adaptive optimization, thus solving the problem of manually setting parameters.

[0156] The method of this invention is compared with the method using the Otsu method to determine OpenMax parameters. The performance of different optimization methods is compared, for example... Figure 6 As shown.

[0157] From Figure 6 It can be seen that the OpenMax algorithm improved using BO is better than the Otsu method in terms of F1 score, accuracy and recall. And in terms of resource use and consumption, the BO improved method is also better than the Otsu improved method, wherein the operation time of the BO improved method is 91.85 seconds, and the operation time of the Otsu method is as high as 235.9 seconds. The CPU usage and memory usage of the BO improved method are not much different from those of the Otsu method, indicating that the method of the embodiment of the application can find the optimal parameters in a shorter time, and the resource consumption does not increase significantly, and the performance is excellent.

[0158] Since the number of input channels of the original ResNet18 structure is modified in the embodiment of the application, i.e., from the original three-channel image to the single-channel grayscale image, the initial convolution layer weight parameters are not loaded during the model migration process, but are randomly initialized and continuously updated during training. In order to compare the model performance under different fine-tuning strategies, three migration strategies are designed:

[0159] Strategy 1: unfreeze the initial convolution layer and the fourth residual layer, and freeze other layers;

[0160] Strategy 2: unfreeze the initial convolution layer and the third and fourth residual layers, and freeze other layers;

[0161] Strategy 3: unfreeze all layers.

[0162] Strategy 1, i.e., unfreezing the initial convolution layer and the fourth residual layer, is used as the standard method. The test set includes 5 known classes, each including 200 samples, and 1000 samples of unknown classes, totaling 2000 samples for experiments. The original OpenMax method and the OpenMax method optimized by center loss are used for comparison, and the accuracy, F1 score and recall of different methods under different migration strategies are compared. The index performance of the three methods under different migration strategies is shown in Table 2.

[0163] Table 2 Model performance under different migration strategies

[0164]

[0165] Analyzing the two open-set recognition methods incorporating loss functions, both performed well under strategy 1, but fluctuated under strategies 2 and 3. This may be because the original ResNet18 model had already been pre-trained on the ImageNet dataset containing tens of millions of images, possessing good feature extraction capabilities. Therefore, after unfreezing only 4 residual layers and optimizing the feature space using the loss function, it can converge quickly and adapt to new tasks. However, unfreezing more layers or even all layers requires adjusting more parameters, increasing the instability of the feature space. With smaller datasets, the model needs more time to stabilize the feature distribution, thus affecting model performance.

[0166] Overall, the experimental results show that optimizing the feature space using center loss and mixed loss before OpenMax open set recognition is not significantly affected by the unfreezing strategy. Even with only a portion of the residual layers unfrozen, the accuracy, F1 score, and recall remain high. In contrast, the original OpenMax method is significantly affected by the unfreezing strategy; all three metrics are significantly improved after fully unfreezing compared to unfreezing only a portion of the residual layers. This indicates that the original method's feature extraction capability is limited when only a portion of the residual layers is unfrozen, making it unable to accurately learn class features. Combining the loss function with open set recognition allows the loss function to directly act on the high-dimensional feature space, optimizing the feature space distribution and significantly improving model performance.

[0167] Figure 7 The ROC curves are for the three methods under Strategy 1. Figure 7 It can be seen that all three methods achieve high AUC values ​​under the ROC curve for known categories. In particular, the method in this embodiment of the invention has an AUC value of 1 for both known and unknown categories, indicating that the model has excellent recognition performance. However, the original method has a low AUC for unknown categories, especially in the small false positive rate range where it cannot correctly identify any unknown samples, indicating that the model has weak recognition performance for unknown categories. The fundamental reason for this is that the model in the original method has poor feature extraction and distribution learning for known and unknown categories.

[0168] Meanwhile, this embodiment of the invention also compares the model performance at openness ratios of 1 / 2, 1 / 3, and 1 / 6. The known class samples number 200 per class, totaling 1000 samples. In the three cases, the number of unknown class samples accounts for 1 / 2, 1 / 3, and 1 / 6 of the total test set samples, respectively, i.e., the number of unknown samples is set to 1000, 500, and 200. The confusion matrices for the three openness ratios are shown below. Figure 8 As shown. Analysis Figure 8 The confusion matrix reveals that under the three openness ratios, the model only misclassifies a few unknown samples as class 2 and class 4 samples, or misclassifies a few class 0, 1, and 4 samples as unknown class samples. This reflects that the model maintains a certain stability and has strong generalization ability even under different openness ratios.

[0169] In addition, comparative experiments are still carried out using the original OpenMax method and the OpenMax method optimized by the center loss, and the performances of the three methods under different open proportions are shown in Table 3.

[0170] Table 3 Model performance under different open proportions

[0171]

[0172] As can be seen from Table 3, the model performances of the three methods fluctuate to varying degrees with the change of the proportion of unknown class samples, among which, the accuracy and F1 score of the original OpenMax method fluctuate greatly, more than 6% and 3%, while the center loss optimization and the mixed loss optimization method fluctuate less, especially the performance indicators of the method fluctuate less than 0.3%, and the stability is the best among the three methods. In addition, combined with the confusion matrix analysis, when the unknown examples are 500 and 1000, the number of samples misidentified by the proposed model is 5, the robustness of the method is better, and the performance is improved significantly.

[0173] The method for performing transfer learning based on the ResNet18 network model and realizing radio frequency fingerprint classification and identification by combining feature space optimization can solve the problems of difficult signal collection and less training data, and can also alleviate the gradient disappearance, information loss and model degradation phenomenon caused by deepening the network layer.

[0174] The technical features of the above embodiments can be combined arbitrarily, in order to make the description simple, not all possible combinations of the technical features in the above embodiments are described, only the preferred embodiments of the present application are expressed, and the description is more specific and detailed, but it cannot be understood as limiting the scope of the present application. As long as the combination of these technical features does not exist contradictory, it should be considered as the scope of the present application.

[0175] It should be noted that for those skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are within the scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. An open-set radio frequency fingerprint recognition method based on feature space optimization, characterized in that, Includes the following steps: Step S1: Convert the fingerprint radio frequency signal into a single-channel grayscale image, and use the single-channel grayscale image as a training set; Step S2: Build A fingerprint recognition model including a feature extraction module and an open set classification module is provided. The training set is input into the feature extraction module, and the mean intra-class distance and mean inter-class distance of the feature space output by the feature extraction module are calculated. The ratio of the mean intra-class distance to the mean inter-class distance is used as the mixture center loss function of the fingerprint recognition model. The parameters of the feature space and the feature extraction module are updated using the mixture center loss function. The loss function of the fingerprint recognition model also includes cross-entropy loss, and the expression for the loss function of the fingerprint recognition model is as follows: ; ; ; ; In the above formula, This is the loss function for the fingerprint recognition model; The cross-entropy loss function; These are the weighting coefficients; The loss function is the mixing center function. The mean of the intra-class distance; The mean distance between classes; It is a constant used to prevent the denominator from being zero; Number of categories; For category The number of samples; For category All samples in; For category The first in One sample; For category The center; This indicates the search for L2 normal form; , Categories and categories The center; Step S3: Extract the activation vector of the sample to be detected using the updated feature extraction module. The open set classification module outputs the fingerprint classification and recognition result based on the updated feature space and the activation vector of the sample to be detected, including the following steps: Step S31: Calculate the mean activation vector for each known category in the updated feature space; Step S32: Calculate the mixture distance between the activation vector of the sample to be detected and the mean activation vector of each known class; Step S33: Calculate the probability of the sample to be detected belonging to an unknown category based on the mixed distance, adjust the activation vector of the sample to be detected based on the probability of the probability of the sample to be detected belonging to each category based on the adjusted activation vector; Step S34: If the category corresponding to the highest probability in the probabilities is an unknown category, or the highest probability is less than the set probability threshold, then the input of the sample to be detected is rejected; otherwise, the category corresponding to the highest probability is taken as the fingerprint classification and recognition result.

2. The open-set radio frequency fingerprinting method based on feature space optimization according to claim 1, characterized in that: The step S1 of converting the fingerprint radio frequency signal into a single-channel grayscale image includes the following steps: using short-time Fourier transform to convert the fingerprint radio frequency signal into a spectrum, taking the absolute value of the complex spectrum matrix in the spectrum to obtain the amplitude spectrum, normalizing the amplitude spectrum using the global mean and standard deviation, and converting the normalized amplitude spectrum into a single-channel grayscale image.

3. The open set radio frequency fingerprinting method based on feature space optimization according to claim 1, characterized in that: In step S2, the convolutional layer of the feature extraction module has 1 input channel, and the fully connected layer has the number of output channels equal to the number of known categories in the training set.

4. The open set radio frequency fingerprinting method based on feature space optimization according to claim 1, characterized in that: In step S2, the loss function is updated using a dynamic gradient update algorithm, thereby updating the parameters of the feature space and the feature extraction module. The expression for the dynamic gradient update algorithm is: ; ; In the formula, The weight parameters of the feature extraction module Update rules; Indicates category center Update rules; , These are the learning rates for the weight parameters and the class centers, respectively. This indicates the partial derivative.

5. The open-set radio frequency fingerprinting method based on feature space optimization according to claim 1, characterized in that: In step S33, the anomaly probability of the sample to be detected belonging to the unknown category is calculated using the pre-fitted Weibull distribution parameters and the mixing distance. The expression for calculating the anomaly probability is: ; In the formula, The sample to be tested Category The probability of an anomaly; For category The center; This refers to the location parameter in the Weibull distribution parameters; The scaling parameter in the Weibull distribution parameters; This refers to the shape parameter in the Weibull distribution parameters.

6. The open-set radio frequency fingerprinting method based on feature space optimization according to claim 5, characterized in that: Step S33 determines the Weibull distribution parameters through grid search and Bayesian optimization, including the following steps: Step S331: Construct an optimization objective function. Set an initial search space based on the number of tail samples for each class. Use a grid search method to search for the grid that maximizes the value of the optimization objective function within the initial search space. Use the grid that maximizes the value of the optimization objective function as the optimization search space for each class. The expression for the optimization objective function is: ; In the formula, To optimize the objective function; , , These are the weighting coefficients for classification accuracy, open set recognition rate, and closed set accuracy, respectively. For classification accuracy; For open set recognition rate; For closed set accuracy; Step S332: Within the optimization search space of each category, use the Bayesian optimization algorithm to search for the number of tail samples that maximize the value of the optimization objective function. ; Step S333: Within each category, select the category with the largest mixing distance. Each sample is used as a tail extreme value sample, and the Weibull distribution parameters are fitted based on the mixed distance and the tail extreme value samples.

7. The open set radio frequency fingerprinting method based on feature space optimization according to claim 6, characterized in that: In step S333, the expression for fitting the Weibull distribution parameters based on the mixing distance and the tail extreme value samples is as follows: ; In the formula, These are the parameters of the Weibull distribution; For fitting functions to parameters; This represents the maximum distance between the sample and the MAV of each class.

8. The open set radio frequency fingerprinting method based on feature space optimization according to claim 1, characterized in that: In step S33, the expression for calculating the probability that a sample to be detected belongs to each category based on the adjusted activation vector is as follows: ; ; In the formula, The sample to be tested Category The probability of; The adjusted activation vector; The activation vector; This represents the probability of an anomaly. This represents the number of categories.

Citation Information

Patent Citations

  • Open set radio frequency fingerprint identification method based on layered auto-encoder

    CN117095254A

  • Radar radiation source open set identification method based on adversarial reciprocity point learning

    CN120630119A