A radar signal class incremental open set identification method based on metric learning
By constructing a normalized feature space through metric learning and employing a combination of backbone network and cosine classifier, retraining-free incremental identification of radar signals is achieved. This solves the problems of feature space expansion and catastrophic forgetting in radar radiation source signal identification technology in dynamic electromagnetic environments, and meets the requirements of lightweight and real-time response for edge deployment.
Patent Information
- Application Number
- CN202611418562.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-11-27
AI Technical Summary
Existing radar radiation source signal identification technologies face challenges in dynamic, open electromagnetic environments, including insufficient feature space scalability, reliance on retraining for incremental updates, catastrophic forgetting, and limited resources for edge deployment, making it difficult to achieve rapid access and accurate identification of new categories.
An incremental open set recognition method for radar signal classes based on metric learning is adopted. By constructing a normalized feature space with high discriminative power, the backbone network is frozen as a feature extractor after training. When adding a new category, only the class prototype vector needs to be calculated and recognition is completed by nearest neighbor matching, avoiding backpropagation and network reconstruction.
It achieves retraining-free incremental open set recognition, with high recognition accuracy, low storage overhead and strong deployment flexibility, adapting to the actual needs of the dynamic evolution of modern radar signals, and improving the robustness and reliability of the recognition system in open dynamic electromagnetic environments.
Smart Images

Figure CN123179083A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of radar signal processing technology, and specifically to a radar signal class incremental open set recognition method based on metric learning. Background Technology
[0002] With the increasing urgency of modern electromagnetic spectrum control, intelligent identification of radar radiation source signals has become a core technology in electronic situational awareness systems. In complex and ever-changing electromagnetic environments, radar radiation source signals exhibit diverse types, varying configurations, and overlapping parameters. Traditional identification methods based on manual feature extraction and template matching are no longer sufficient to meet the dual requirements of real-time performance and accuracy. In recent years, deep learning methods, with their powerful nonlinear representation capabilities, have demonstrated significant advantages in the field of radar radiation source signal identification, becoming a research hotspot in this area.
[0003] Currently, most deep learning-based radar emission source signal identification methods employ a closed-set identification paradigm. A typical approach involves using convolutional neural networks to extract signal features and then mapping these features to a pre-defined set of fixed categories using a Softmax classification head. While this method achieves high accuracy on closed datasets with fixed categories, its classification head is strongly bound to the pre-defined categories used during training. If a novel radar signal, unseen during training, appears in the electromagnetic environment, the system cannot effectively identify and classify it, necessitating modifications to the network structure and a time-consuming full retraining. Furthermore, these methods typically rely on traditional inner product operations for feature-category matching, resulting in insufficient cohesion in the extracted feature space and ambiguous distribution boundaries between different categories, making it difficult to support generalization and expansion to new categories.
[0004] To address the challenges posed by the continuous emergence of new radar signals in dynamic electromagnetic environments, researchers have begun exploring incremental learning strategies. Some methods mitigate the catastrophic forgetting problem during incremental updates by introducing regularization constraints, enabling the model to retain its ability to recognize old categories while learning new ones. However, these methods still require unfreezing network layers and performing complex backpropagation fine-tuning operations when introducing new categories. This not only increases the computational and storage burden on edge deployment devices and hinders immediate responses to sudden signals, but also gradually erodes the decision boundaries of old categories in long-term, high-frequency scenarios where new categories are introduced. Consequently, the overall deployment flexibility of the model in open, dynamic environments is severely limited.
[0005] In summary, existing radar radiation source signal identification technologies generally face prominent problems when dealing with open and dynamic electromagnetic environments, including insufficient feature space scalability, reliance on retraining for incremental updates, difficulty in fundamentally avoiding catastrophic forgetting, and limited resources for edge deployment. How to achieve rapid access and accurate identification of new categories without modifying existing network parameters, and how to construct a feature representation space with high cohesion to support smooth category expansion, have become key technical challenges that urgently need to be addressed in this field. Summary of the Invention
[0006] The purpose of this invention is to address the problems of slow response, catastrophic forgetting, and high edge deployment costs in existing radar radiation source signal identification methods when faced with new and unknown signals in dynamic open electromagnetic environments, due to reliance on network retraining or parameter fine-tuning. This invention provides a radar signal class incremental open set identification method based on metric learning. It constructs a highly discriminative normalized feature space through metric learning, and after training, freezes the backbone network as a general feature extractor. When a new category is added, only the class prototype vector needs to be calculated, and identification is completed using nearest neighbor matching, without the need for backpropagation or network reconstruction. This invention achieves retraining-free class incremental open set identification, combining high identification accuracy, low storage overhead, and strong deployment flexibility, effectively adapting to the actual needs of the dynamic evolution of modern radar signals.
[0007] The present invention employs the following technical solutions to achieve its objective: An incremental open-set recognition method for radar signal classes based on metric learning, comprising the following steps: S1. Obtain a dataset containing time-frequency images of multiple types of radar radiation source signals, and perform preprocessing operations such as size adjustment and numerical normalization on the time-frequency images to obtain standardized input data. S2. Divide the standardized input data into a training set and a test set, select some categories from the training set as base class data, and construct a metric learning training data loader. S3. Construct a feature extraction and classification network based on metric learning. The feature extraction and classification network includes a backbone network and a cosine classifier. The cosine classifier performs normalization operations on the input feature vector and classification weight vector respectively, and transforms the matching relationship between features and categories into cosine similarity calculation in the normalized space. S4. Based on the metric learning training data loader, the feature extraction and classification network is trained using the base class data in a closed-set metric learning manner. The network parameters are updated using a preset loss function and optimization strategy until the preset convergence condition is met. S5. After training is completed, the cosine classifier is removed and the backbone network is retained as the feature extractor. The training samples of each category are input into the feature extractor to obtain the corresponding feature vectors. The mean of the feature vectors of the same category is calculated and normalization is performed to generate the class prototype vectors corresponding to each category. S6. When a new category is added, the sample of the new category is input into the feature extractor to obtain the corresponding feature vector. The cosine similarity between the feature vector and the class prototype vector of each known category is calculated. The category corresponding to the class prototype vector with the largest cosine similarity is taken as the recognition result, and the class incremental open set recognition is completed.
[0008] Specifically, in step S1, the types of radar radiation source signals include: linear frequency modulation (LFM) signals, frequency-modulated continuous wave (FM) signals, pulse LFM signals, step frequency signals, sinusoidal frequency modulation (SFM) signals, hyperbolic frequency modulation (HFM) signals, phase-coded LFM signals, polynomial frequency modulation (PMM) signals, continuous wave signals, triangular wave continuous LFM signals, noise frequency modulation (FM) signals, frequency shift keying (FSK) signals, phase shift keying (PSK) signals, pulse amplitude modulation (PAM) signals, and quadrature amplitude modulation (QAM) signals.
[0009] Specifically, in step S1, the preprocessing operation includes: scaling the time-frequency image to a preset fixed resolution size; performing a numerical normalization operation on the scaled time-frequency image to linearly map the pixel values of each channel in the image to a preset numerical range to obtain the standardized input data.
[0010] Preferably, in step S3, the backbone network adopts a residual network structure. The residual network includes an input convolutional layer, multiple residual module groups, and a global average pooling layer connected in sequence. Each residual module group contains several residual units, and each residual unit contains a convolutional layer, a batch normalization layer, and an activation function layer. It is also provided with skip connections to directly superimpose the input of the residual unit onto the output of the residual unit. The output of the global average pooling layer is mapped to a feature vector of a preset dimension through a fully connected layer.
[0011] Preferably, in step S3, the cosine classifier performs L2 normalization on the feature vector output by the backbone network to obtain a unit feature vector; the cosine classifier also performs L2 normalization on each weight vector in the classification weight matrix to obtain a unit weight vector; the inner product between the unit feature vector and each unit weight vector is calculated to obtain a cosine value, and the cosine value is multiplied by a preset temperature scaling factor to obtain a classification score; finally, the cosine classifier inputs the classification score into the Softmax function to output the probability distribution of each category.
[0012] Preferably, in step S4, the loss function is a weighted combination of the main classification loss and the metric learning auxiliary loss; the main classification loss is the cross-entropy loss based on the classification score output by the cosine classifier and the true class label; the metric learning auxiliary loss is used to constrain the feature vectors of samples of the same class to be close to each other in the normalized feature space, while constraining the feature vectors of samples of different classes to be far apart.
[0013] Preferably, in step S4, the optimization strategy includes: using a stochastic gradient descent optimizer with momentum to update the network parameters; using a cosine annealing learning rate scheduling strategy during training to gradually decay the learning rate from a preset initial value to a preset minimum value according to the cosine function curve; the preset convergence condition is that the number of training iterations reaches a preset maximum number of iterations, or the classification accuracy on the validation set no longer improves within a certain number of consecutive iterations.
[0014] Preferably, in step S5, all samples of each category in the training set are input into the feature extractor one by one to obtain the feature vector corresponding to each sample; the arithmetic mean of the feature vectors of all samples in the same category is calculated element by element to obtain the original mean vector of the category; L2 normalization is performed on the original mean vector and it is projected onto the unit hypersphere to obtain the class prototype vector of the category; the class prototype vector is separated from the cosine classifier and stored together in the category prototype library.
[0015] Preferably, in step S6, when a new category is added, several labeled samples of the new category are input into the feature extractor to obtain the feature vector corresponding to each sample; the arithmetic mean of each feature vector of the new category is calculated element by element and L2 normalization is performed to generate the class prototype vector of the new category, and it is appended and stored in the class prototype library; in the inference stage, the sample to be identified is input into the feature extractor to obtain the corresponding feature vector and L2 normalization is performed, the cosine similarity between the feature vector and all class prototype vectors in the class prototype library is calculated, and the category corresponding to the class prototype vector with the largest cosine similarity is selected as the recognition result.
[0016] Preferably, in step S6, a preset open set recognition threshold is set. During the inference stage, if the maximum cosine similarity between the feature vector of the sample to be identified and all class prototype vectors in the category prototype library is lower than the open set recognition threshold, the sample to be identified is determined to belong to an unknown category, it is marked as an unknown signal, and the recognition result of the known category is refused. The open set recognition threshold is determined based on the cosine similarity distribution statistics of known category samples on the base class validation set.
[0017] In summary, due to the adoption of this technical solution, the beneficial effects of this invention are as follows: This invention constructs a normalized feature space through a metric learning framework, which ensures that samples of the same class are tightly clustered in the embedding space while samples of different classes are kept far apart, significantly enhancing the discriminative power and cohesion of the feature representation. The highly discriminative metric space provides a good generalization foundation for the subsequent inclusion of new categories, enabling the model to still possess effective differentiation and recognition capabilities when faced with radar signal types not seen during the training phase.
[0018] This invention employs a design strategy that decouples the classification head from the backbone network. After training, only the backbone network is retained as a general feature extraction module. When adding a new category, only the class prototype vectors of a small number of samples need to be calculated and added to the prototype library to complete the recognition expansion. Backpropagation and network parameter updates are not required throughout the process. This mechanism fundamentally eliminates the catastrophic forgetting problem caused by parameter fine-tuning in traditional incremental learning methods, ensuring the model maintains stable accuracy in recognizing existing categories as it continuously expands its categories.
[0019] This invention achieves classification inference through nearest neighbor matching of class prototype vectors. During the inference phase, only the normalized prototype vectors corresponding to each class need to be stored; there is no need to save the complete classification network weights or historical training data. This significantly reduces the storage and computational overhead of the model when continuously adding new signal classes. This characteristic makes this invention particularly suitable for deployment on resource-constrained embedded edge platforms, meeting the engineering requirements of electronic equipment for lightweight design and real-time response.
[0020] The open-set recognition threshold mechanism introduced in this invention can proactively classify a sample as an unknown category and refuse to output incorrect classification results when the maximum similarity between the sample to be identified and all known class prototypes is lower than a preset threshold. This mechanism effectively avoids the problem of traditional closed-set classifiers forcibly classifying unknown signals into known categories, thus improving the robustness and reliability of the recognition system in open dynamic electromagnetic environments. Attached Figure Description
[0021] The present invention is described in detail with reference to the following figures, specifically including 5 figures as follows: Figure 1 This is a schematic diagram illustrating the overall description of the radar signal incremental open set identification method of the present invention; Figure 2 A schematic diagram of 15 simulated radar signal datasets generated as an example of the method of the present invention; Figure 3 This is a schematic diagram of the architecture of the reconstructed MobileNetV2 model, which is an example of the method of the present invention. Figure 4 A schematic diagram of 15 types of radar signal confusion matrices as an example of the method of the present invention; Figure 5 This is a schematic diagram of the overall network architecture of RK3588 to which the method of the present invention can be applied. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The parts of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0023] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0024] An incremental open-set recognition method for radar signal classes based on metric learning. Figure 1 The method is briefly described in three main steps, which can be consulted simultaneously; the key steps of the method can be summarized as follows: Steps S1 to S6: S1. Obtain a dataset containing time-frequency images of signals from multiple types of radar radiation sources, and perform preprocessing operations such as size adjustment and numerical normalization on the time-frequency images to obtain standardized input data. S2. Divide the standardized input data into training set and test set, select some categories from the training set as base class data, and construct a metric learning training data loader. S3. Construct a feature extraction and classification network based on metric learning. The feature extraction and classification network includes a backbone network and a cosine classifier. The cosine classifier performs normalization operations on the input feature vector and classification weight vector respectively, transforming the matching relationship between features and categories into cosine similarity calculation in the normalized space. S4. Based on the metric learning training data loader, the feature extraction and classification network is trained using base class data in closed-set metric learning. The network parameters are updated through a preset loss function and optimization strategy until the preset convergence condition is met. S5. After training, the cosine classifier is removed and the backbone network is retained as the feature extractor. The training samples of each category are input into the feature extractor to obtain the corresponding feature vectors. The mean of the feature vectors of the same category is calculated and normalized to generate the class prototype vectors corresponding to each category. S6. When a new category is added, the sample of the new category is input into the feature extractor to obtain the corresponding feature vector. The cosine similarity between the feature vector and the class prototype vector of each known category is calculated. The category corresponding to the class prototype vector with the largest cosine similarity is taken as the recognition result, and the class increment open set recognition is completed.
[0025] This embodiment will use a detailed example to illustrate the details and preferred aspects of the above six steps. In this embodiment, the exemplary summary of the above six steps is as follows: In step S1, a dataset containing 15 types of radar time-frequency images is obtained, and standard image preprocessing operations are performed on it, including scaling and cropping, and it is converted to tensor format and mapped to... The space is used to complete the data normalization process; In step S2, the dataset containing 15 types of radar signals is divided into training set and test set in an 8:2 ratio. Then, the top 10 basic data are selected from them to build a metric learning baseline data loader, while the data loader containing all 15 types of data is retained for subsequent calculations. In step S3, a feature extraction and classification network MetricNet based on metric learning is constructed. This network uses a truncated MobileNetV2 as its backbone network and connects a cosine classifier with a scaling factor of 30. L2 normalization is performed on the input feature tensor and weights to convert the inner product operation into cosine similarity calculation in spherical space. In step S4, closed-set metric learning training is performed on the first 10 base class samples; cross-entropy loss is used as a supervision signal, and SGD optimizer is used for optimization, setting the initial learning rate, momentum, and weight decay; at the same time, a cosine annealing learning rate scheduler is introduced to dynamically decay the learning rate according to the number of training epochs, ensuring that the network converges to a better global minimum. In step S5, the retraining-free incremental open set recognition for new categories is realized. The trained backbone network is used as a general feature extractor to extract high-dimensional features of the full 15 training sets. By summing and averaging within each class and performing L2 normalization, a "class prototype vector" representing each category is generated. In step S6, the cosine similarity between the validation set samples and each prototype is calculated first during the test evaluation phase. The "nearest neighbor prototype matching" method is used to obtain the inference classification. Finally, the overall recognition rate of 15 categories and the independent recognition rate of the 5 newly added unknown signals are statistically analyzed. After the test and verification are completed, it can be applied to the recognition process of the signal to be recognized.
[0026] The following section provides a detailed explanation of each step.
[0027] like Figure 2 As shown, the simulated radar signal dataset generated in step S1 includes 15 types: linear frequency modulation (LFM) signal, frequency-modulated continuous wave (FM) signal, pulse LFM signal, stepped frequency signal, sinusoidal frequency modulation (FM) signal, hyperbolic frequency modulation (FM) signal, phase-coded LFM signal, polynomial frequency modulation (FM) signal, continuous wave signal, triangular wave continuous LFM signal, noise frequency modulation (FM) signal, frequency shift keying (FPS) signal, phase shift keying (PSK) signal, pulse amplitude modulation (PAM) signal, and quadrature amplitude modulation (QAM) signal. In this embodiment, these are labeled as Label 0 to Label 14, and are described below: Label 0: Linear Frequency Modulation (LFM) signal instantaneous frequency from linear change to The signal expression is:
[0028] In the formula, The starting frequency; The termination frequency; For time.
[0029] Label 1: Frequency Modulated Continuous Wave (FMCW) signal The frequency is swept using a periodic triangular sweep pattern, with a single sweep period of 1000°C. The sweep bandwidth is The starting frequency is The signal expression within a single period is:
[0030] Multiple cycles are spliced together and truncated to a length. ; Parameters in the formula: , , .
[0031] Label 2: Pulsed LFM signal A rectangular pulse window is superimposed on the linear frequency modulated signal, retaining only the... The signal for a time period is expressed as:
[0032] In the formula, This is an indicator function; the parameters in the formula are: , , .
[0033] Label 3: Stepped Frequency Signal Divide the signal Each time period is of equal length and uses a fixed frequency. The signal is a splicing of cosine waves from different time periods, and its expression is:
[0034] In the formula, For the first Local time axis for each period; parameters in the formula: , The length of each segment is .
[0035] Label 4: Sinusoidal Frequency Modulation (SFM) signal The instantaneous frequency varies with the sine wave, and the signal expression is:
[0036] In the formula, For carrier frequency, For frequency offset, The modulation frequency is denoted by ; where the parameters are: , , .
[0037] Label 5: Hyperbolic Frequency Modulation (HFM) Signal The instantaneous frequency varies hyperbolically with time, and the phase is logarithmic. The signal expression is:
[0038] Parameters in the formula: , , .
[0039] Label 6: Phase-coded linear frequency modulation (Barker code modulation) First, generate the basic linear frequency modulation signal. Then divide it into Segments, each multiplied by a Barker code sequence The signal expression is:
[0040] The formula uses a 7-bit Barker code: ; parameter: , .
[0041] Label 7: Polynomial frequency modulation signal (second / third frequency modulation) The phase is a cubic polynomial of time, and the signal expression is:
[0042] Parameters in the formula: , , .
[0043] Label 8: Continuous Wave (CW) signal A single-frequency sinusoidal signal has the following expression:
[0044] Parameters in the formula: .
[0045] Label 9: Triangular Chirp Continuous Linear Frequency Modulation Signal A cycle is formed by splicing together two segments, "upward frequency sweep" and "downward frequency sweep," and then repeating and expanding. The signal expression is:
[0046] Parameters in the formula: , , .
[0047] Label 10: Noise FM signal First, a smooth random frequency sequence is generated, and then the phase is obtained through integration. The signal expression is:
[0048] Parameters in the formula: , The smooth window length is 101, and the polynomial order is 3.
[0049] Label 11: Frequency Shift Keying (FSK) signal random bit sequence Mapped to two cosine waves of different frequencies, the signal expression is:
[0050] Parameters in the formula: , Each bit is 128.
[0051] Label 12: Phase Shift Keying (BPSK) signal random bit sequence Mapped to sign ±1, then multiplied by the carrier wave, the signal expression is:
[0052] Parameters in the formula: Each bit is 128.
[0053] Label 13: Pulse Amplitude Modulation (PAM) signal Random level sequence Multiplying by a rectangular pulse, and then by a carrier wave, the signal expression is:
[0054] Parameters in the formula: The pulse length is 128.
[0055] Label 14: Quadrature Amplitude Modulation (16QAM) Signal random symbols Mapped to points in the complex plane, and then multiplied by a complex carrier wave, the signal expression is:
[0056] Parameters in the formula: Each symbol is 128 characters long.
[0057] Next, in the preprocessing of the signal time-frequency image, the noise addition formula is first introduced. This implementation calculates the clean signal power. For a real-valued radar baseband signal, its average power is equal to the average of the squares of the amplitudes at all time-domain sampling points, which physically corresponds to the average signal power per unit resistance. The formula is as follows:
[0058] In the formula, Represents the signal length (i.e., the number of sampling points); This represents the clean radar signal without added noise. The signal-to-noise ratio is then converted to a linear value: This implementation uses an additive noise model, where the noise and the original radar signal are independent of each other. The noise quality is degraded only through time-domain superposition, without altering the modulation pattern, phase characteristics, or timing structure of the original radar signal. The required noise power is then calculated. As shown in the following formula:
[0059] The instantaneous amplitude of the noise follows a normal distribution with a mean of 0, and does not change the baseline level of the original signal. For a Gaussian distribution with a mean of 0, its variance is exactly equal to the average power of the noise. Gaussian white noise is thus generated and superimposed, as shown in the following equation:
[0060] The previously mentioned Specifically, set it to 0. Then, for the noisy signal... Perform STFT transformation to obtain the time-frequency matrix. As shown in the following formula:
[0061] The formula uses scipy.signal.stft, with parameter nperseg=128; This is the default window function. The STFT amplitude is taken and normalized to... As shown in the formula below:
[0062] In the formula, This is the time-frequency matrix obtained from the short-time Fourier transform; The normalized amplitude value. , These are the minimum and maximum values of the amplitude of the time-frequency matrix, respectively. To normalize the amplitude to The grayscale image obtained after grading the interval.
[0063] Finally, the image size is converted to 128×128 and saved in RGB format. In this implementation, the radar target recognition problem is transformed into the mature image pattern recognition problem in the field of deep learning.
[0064] In step S2 of this embodiment, the total number of samples in the dataset is ,in The total number of categories, ; The number of samples in each class. The validation set ratio is 20%, and the training set ratio is 80%.
[0065] In step S3 of this embodiment, MetricNet, a feature extraction and classification network based on metric learning, is constructed. (See [link to documentation]). Figure 3 This implementation breaks through the limitations of traditional linear fully connected layers in open set recognition and feature stretching, transforming the classification task into a feature measurement and clustering process in a high-dimensional spherical space. The network uses a truncated MobileNetV2 backbone network, which, through its lightweight inverse residual structure, transforms radar time-frequency images from raw pixels into 128-dimensional high-dimensional semantic space features. The nonlinear mapping is then fed into the core cosine classifier, CosineClassifier.
[0066] This section describes the deep learning model used in the method formation process. The MetricNet network structure employed by this model is an inverted residual structure. The inverted residual block consists of three core components: a 1x1 dilated convolution → a 3x3 depthwise convolution → a 1x1 projective convolution, combined with shortcut connections. The input features are defined as follows: ,in, , It refers to the spatial dimensions. This refers to the number of input channels. The composition and distribution at this point are analyzed in this implementation as follows: 1x1 Dilated Convolution: This method first "expands" the number of input channels, allowing subsequent depthwise convolutions to extract features in a higher-dimensional space. A standard 1x1 convolution is used to increase the number of channels from... Upgraded to , It is the expansion factor. It is followed by BatchNorm and ReLU6 activation, and its formula is: .
[0067] 3x3 depthwise convolution: Extracts features in high-dimensional space, but significantly reduces computational cost using depthwise separable convolution. Using 3x3 depthwise convolution ( Features are processed by convolution (each channel is convolved separately), and the spatial size may be reduced by stride (i.e., when stride=2). , Halve, , (This refers to the spatial dimensions after convolution, determined by the stride). It is followed by BatchNorm and ReLU6 activation, with the formula as follows: .
[0068] 1x1 projective convolution: "project" (reduces) the number of channels back to the target dimension. Feature information is preserved using linear activation (without ReLU). The number of channels is reduced from [previous value] using a 1x1 standard convolution. Down to Only use BatchNorm, without ReLU (to avoid destroying features), its formula is: .
[0069] Shortcut connections: Make gradients propagate more easily, and should only be used when the following two conditions are met: The spatial size remains constant; stride=1 matches the number of channels. The formula is as follows:
[0070] It should be noted here that traditional fully connected classification layers rely on linear inner product operations. Their output score is not only related to the angle between the feature and class weights, but also significantly influenced by the absolute magnitudes of both, causing similar features to easily diverge radially in the feature space. To achieve rigorous metric learning, the network in this implementation uses a 128-dimensional feature tensor as input. With classifier weight matrix Execute separately Normalization. This operation eliminates the influence of vector norm (length), forcing all features and class centers to be projected onto a high-dimensional unit sphere, as follows:
[0071] In the formula, The input feature vector; This is the classifier weight matrix; , They are respectively , The unit eigenvector and unit weight vector obtained after L2 normalization; This represents the L2 norm of a vector.
[0072] In this spherical space, the matching degree between sample features and the weight centers of each class is purely transformed into angular distance. The network learns the angular distribution characteristics of "compact intra-class features and repulsive inter-class features" on the hypersphere.
[0073] After completing the spherical projection, the features With category weight The inner product operation is equivalent to the angle between the two. cosine similarity However, the domain of the standard cosine value is only... If the values are directly input into the Softmax function, the predicted probability distribution will be too smooth, making it difficult to differentiate between classes and failing to generate sufficient gradients to optimize the backbone network. Therefore, this implementation introduces a fixed temperature scaling factor into the cosine classifier. This factor is physically equivalent to enlarging the radius of a unit sphere to [a value]. This provides a steeper gradient at the classification boundary. The classification network's... The class output formula is as follows:
[0074] In the formula, the temperature scaling factor is fixed. Set it to 30.0.
[0075] Finally, combining the cross-entropy loss function, the metric learning optimization objective (Loss) based on spherical space can be expressed as follows:
[0076] In the formula, The true category label of the sample; For the number of base classes (here) This implementation, through this angular metric constraint, enables the model to not only move beyond simply fitting known categories but also truly master the generalization ability to "distinguish subtle time-frequency differences between radar signals." This gives the high-dimensional features extracted by the backbone network extremely strong discriminative power, establishing an absolute feature foundation for subsequently identifying the five newly added unknown signal categories using "nearest neighbor prototype matching" without retraining.
[0077] In step S4 of this embodiment, the loss function is a weighted combination of the main classification loss and the metric learning auxiliary loss; the main classification loss is the cross-entropy loss between the classification score output by the cosine classifier and the true category label, i.e., the cross-entropy loss function described above; the metric learning auxiliary loss is used to constrain the feature vectors of samples of the same category to be close to each other in the normalized feature space, while constraining the feature vectors of samples of different categories to be far apart.
[0078] In the optimization strategy that continues in this step, a training and evaluation script based on MetricNet for 10 base class data metrics is written to drive the network to complete intra-class clustering and inter-class repulsion of features in the hyperspherical feature space. The specific processing flow is as follows: (1) Code initialization and log construction: The code first imports the required basic libraries and custom modules, and selects the computing hardware device (GPU or CPU). Then, it checks and creates a folder in the local directory to save the model weights, and initializes the TensorBoard logger to record and visualize the dynamic trend of loss decrease and accuracy increase in real time during training.
[0079] (2) Set initial parameters and network configuration: Call the data processing module to extract the first 10 basic data, configure a unified image preprocessing strategy and a multi-threaded data loader. Then instantiate the MetricNet model to the target device; if pre-trained weights are loaded, the original linear classification layer parameters are automatically filtered, and the backbone network is frozen according to the setting of freeze_layers.
[0080] (3) Configure the loss function and SGD optimizer: Extract all parameters in the network that are set to require_grad=True, and use the stochastic gradient descent (SGD) optimizer for optimization. Set the initial learning rate to args.lr, momentum to 0.9, and weight decay to 5e-5. Since the model uses a cosine classifier to output log odds, the optimization objective is essentially to minimize the metric distance in spherical space. The improved cross-entropy loss formula is as follows:
[0081] (4) Configure the cosine annealing learning rate scheduler: To prevent the network from oscillating in local optima and to promote smooth convergence in the later stages of training, a cosine annealing scheduler based on the LambdaLR mechanism is introduced. Let... This is the current training round number. The total number of training rounds. The minimum retention factor for the preset learning rate (default 0.1), and the multiplication factor for the current learning rate. The decay scheduling formula is as follows:
[0082] (5) Setting up training and evaluation cycles: The cycle iterates according to the preset epochs. In a single cycle, forward inference, backpropagation, and optimizer stepping are first performed in training mode to calculate the current training loss and accuracy; then, the system switches to evaluation mode to calculate the validation set metrics without calculating gradients. After a single cycle, the learning rate is updated step by step, monitoring logs are recorded to the terminal and TensorBoard, the current loss and accuracy metrics are output, and the model weights of the current cycle are persistently saved, along with the overall recognition accuracy. The formula is as follows:
[0083] In the formula, The total number of samples, For indicator functions, when the first Predicted label for each sample With real labels The value is 1 if they are equal, otherwise it is 0.
[0084] Therefore, after the above optimization, the preset convergence condition is met, that is, the number of training iterations reaches the preset maximum number of iterations, or the classification accuracy on the validation set no longer improves within a certain number of consecutive iterations.
[0085] In step S5 of this embodiment, the process of performing retraining-free feature aggregation and prototype construction for new category expansion is described. At this stage, the MetricNet, which has converged after training on 10 base classes, already possesses the ability to extract highly discriminative features in the hyperspherical space. The specific processing flow is described below: First, remove the cosine classification heads from the network, keeping only the backbone network and setting it to evaluation mode (specifically, by enabling...). And the gradient map calculation is cut off, making it a pure general feature extractor. Then, the full training set samples containing 15 classes (10 known classes + 5 new classes) are input into the backbone network, mapping to generate high-dimensional features of dimension 128. Let... There are a total of radar-like signals The sample, targeting the first The class of Input Samples The feature vector extracted by the backbone network is denoted as The initial feature centers of a class are calculated by accumulating spatial tensors within the class and taking the mean. As shown in the following formula:
[0086] To ensure that the newly extracted class centers remain strictly consistent with the hyperspherical geometric manifold from the previous metric learning training phase, the feature mean vectors of each class need to be... implement Norm normalization is then applied to generate "class prototype vectors" representing each radar signal category. As shown in the following formula:
[0087] The 15 generated prototype vectors form a class prototype matrix with dimensions of 15×128. This is then persistently saved locally as a dictionary, thus forming a category prototype library.
[0088] Finally, in step S6 of this embodiment, we first introduce the class prototype matrix based on the constructed prototype matrix. In cases where full validation set testing is conducted, classification reasoning and generalization ability assessment can be performed using a non-parametric metric mechanism. The specific process is as follows: During the testing phase, input any validation set test samples. Features are extracted from the frozen backbone network and immediately processed. Normalization process yields unit eigenvectors Next, tensor matrix multiplication is used to efficiently calculate the inner product of the test features and all 15 class prototype vectors, thereby deriving the cosine similarity score vector. As shown in the following formula:
[0089] In the formula, Each component This means that the feature of the test sample falls within the first... The projection length (i.e., similarity) along the prototype direction. Therefore, the model adopts the "nearest neighbor prototype matching" principle, directly using the category index corresponding to the highest similarity score as the final prediction output. As shown in the following formula:
[0090] Statistical evaluation was performed on the above tests, and a Boolean mask mechanism was introduced to perform hierarchical separation of the prediction results. First, all results were compared. With real labels The overall recognition rate for 15 classes was calculated. Then, the system generated new class mask constraints and performed ground truth comparisons separately on sample slices with label thresholds greater than or equal to 10. This independently outputs the prediction accuracy and recognition precision for the five newly added unknown signal samples. The confusion matrix can be viewed in the documentation. Figure 4 This is an illustration. The hierarchical statistical method used here can intuitively and accurately quantify the model's performance in small-sample incremental recognition under conditions where retraining is not required.
[0091] In summary, when performing step S6, if a new category is added, several labeled samples of the new category are input into the feature extractor to obtain the feature vectors corresponding to each sample; the arithmetic mean of each feature vector of the new category is calculated element by element and L2 normalization is performed to generate the class prototype vector of the new category, which is then appended and stored in the class prototype library; during the inference phase, the sample to be identified is input into the feature extractor to obtain the corresponding feature vector and L2 normalization is performed, the cosine similarity between the feature vector and all class prototype vectors in the class prototype library is calculated, and the category corresponding to the class prototype vector with the largest cosine similarity is selected as the recognition result.
[0092] Furthermore, as a preferred embodiment of this implementation, an open set recognition threshold can be preset. During the inference stage, if the maximum cosine similarity between the feature vector of the sample to be identified and all class prototype vectors in the category prototype library is lower than the open set recognition threshold, the sample to be identified is determined to belong to an unknown category, it is marked as an unknown signal, and the recognition result of the known category is refused. The open set recognition threshold is determined based on the statistical distribution of the cosine similarity of known category samples on the base class validation set.
[0093] The method described in this embodiment addresses the engineering constraints of edge deployment. By non-uniform scaling of the number of channels and optimization of the expansion ratio, it significantly reduces model FLOPs and the number of parameters. This method is well-suited to the L2 cache capacity of domestic embedded platforms such as the RK3588. The overall network architecture of the RK3588 can be found in [reference needed]. Figure 5 The illustration shows that it meets the requirements of the method of this embodiment, thereby providing reliable technical support for the dynamic and intelligent identification of radar radiation sources in complex electromagnetic environments.
Claims
1. A radar signal class incremental open set recognition method based on metric learning, characterized in that, The method includes the following steps: S1. Obtain a dataset containing time-frequency images of multiple types of radar radiation source signals, and perform preprocessing operations such as size adjustment and numerical normalization on the time-frequency images to obtain standardized input data. S2. Divide the standardized input data into a training set and a test set, select some categories from the training set as base class data, and construct a metric learning training data loader. S3. Construct a feature extraction and classification network based on metric learning. The feature extraction and classification network includes a backbone network and a cosine classifier. The cosine classifier performs normalization operations on the input feature vector and classification weight vector respectively, and transforms the matching relationship between features and categories into cosine similarity calculation in the normalized space. S4. Based on the metric learning training data loader, the feature extraction and classification network is trained using the base class data in a closed-set metric learning manner. The network parameters are updated using a preset loss function and optimization strategy until the preset convergence condition is met. S5. After training is complete, the cosine classifier is removed, and the backbone network is retained as a feature extractor. The training samples of each category are input into the feature extractor to obtain the corresponding feature vectors. The mean of the feature vectors of the same category is calculated and normalization is performed to generate the class prototype vectors corresponding to each category. S6. When a new category is added, the sample of the new category is input into the feature extractor to obtain the corresponding feature vector. The cosine similarity between the feature vector and the class prototype vector of each known category is calculated. The category corresponding to the class prototype vector with the largest cosine similarity is taken as the recognition result, and the class incremental open set recognition is completed.
2. The radar signal class incremental open set identification method according to claim 1, characterized in that, In step S1, the types of radar radiation source signals include: linear frequency modulation (LFM) signals, frequency-modulated continuous wave (FM) signals, pulse LFM signals, step frequency signals, sinusoidal frequency modulation (FM) signals, hyperbolic frequency modulation (FM) signals, phase-coded LFM signals, polynomial frequency modulation (FM) signals, continuous wave signals, triangular wave continuous LFM signals, noise frequency modulation (FM) signals, frequency shift keying (FSK) signals, phase shift keying (PSK) signals, pulse amplitude modulation (PAM) signals, and quadrature amplitude modulation (QAM) signals.
3. The radar signal class incremental open set identification method according to claim 2, characterized in that, In step S1, the preprocessing operation includes: scaling the time-frequency image to a preset fixed resolution size; performing a numerical normalization operation on the scaled time-frequency image to linearly map the pixel values of each channel in the image to a preset numerical range to obtain the standardized input data.
4. The radar signal class incremental open set identification method according to claim 1, characterized in that: In step S3, the backbone network adopts a residual network structure. The residual network includes an input convolutional layer, multiple residual module groups, and a global average pooling layer connected in sequence. Each residual module group contains several residual units. Each residual unit contains a convolutional layer, a batch normalization layer, and an activation function layer, and is provided with skip connections to directly superimpose the input of the residual unit onto the output of the residual unit. The output of the global average pooling layer is mapped to a feature vector of a preset dimension through a fully connected layer.
5. The radar signal class incremental open set identification method according to claim 4, characterized in that: In step S3, the cosine classifier performs L2 normalization on the feature vector output by the backbone network to obtain a unit feature vector; The cosine classifier also performs L2 normalization on each weight vector in the classification weight matrix to obtain a unit weight vector. The inner product between the unit feature vector and each of the unit weight vectors is calculated to obtain the cosine value, and the cosine value is multiplied by a preset temperature scaling factor to obtain the classification score; the cosine classifier finally inputs the classification score into the Softmax function to output the probability distribution of each category.
6. The radar signal class incremental open set identification method according to claim 1, characterized in that: In step S4, the loss function is a weighted combination of the main classification loss and the metric learning auxiliary loss; the main classification loss is the cross-entropy loss based on the classification score output by the cosine classifier and the true class label; the metric learning auxiliary loss is used to constrain the feature vectors of samples of the same class to be close to each other in the normalized feature space, while constraining the feature vectors of samples of different classes to be far apart.
7. The radar signal incremental open set identification method according to claim 6, characterized in that, In step S4, the optimization strategy includes: using a stochastic gradient descent optimizer with momentum to update the network parameters; using a cosine annealing learning rate scheduling strategy during training to gradually decay the learning rate from a preset initial value to a preset minimum value according to the cosine function curve; the preset convergence condition is that the number of training iterations reaches a preset maximum number of iterations, or the classification accuracy on the validation set no longer improves within a certain number of consecutive iterations.
8. The radar signal class incremental open set identification method according to claim 1, characterized in that: In step S5, all samples of each category in the training set are input into the feature extractor one by one to obtain the feature vector corresponding to each sample; the arithmetic mean of the feature vectors of all samples in the same category is calculated element by element to obtain the original mean vector of the category; L2 normalization is performed on the original mean vector and it is projected onto the unit hypersphere to obtain the class prototype vector of the category; the class prototype vector is separated from the cosine classifier and stored together in the category prototype library.
9. The radar signal class incremental open set identification method according to claim 1, characterized in that: In step S6, when a new category is added, several labeled samples of the new category are input into the feature extractor to obtain the feature vectors corresponding to each sample; the arithmetic mean of each feature vector of the new category is calculated element by element and L2 normalization is performed to generate the class prototype vector of the new category, which is then appended and stored in the class prototype library; in the inference stage, the sample to be identified is input into the feature extractor to obtain the corresponding feature vector and L2 normalization is performed, the cosine similarity between the feature vector and all class prototype vectors in the class prototype library is calculated, and the category corresponding to the class prototype vector with the largest cosine similarity is selected as the recognition result.
10. The radar signal class incremental open set identification method according to claim 9, characterized in that: In step S6, a preset open set recognition threshold is set. During the inference stage, if the maximum cosine similarity between the feature vector of the sample to be identified and all class prototype vectors in the category prototype library is lower than the open set recognition threshold, the sample to be identified is determined to belong to an unknown category, it is marked as an unknown signal, and the recognition result of the known category is refused. The open set recognition threshold is determined based on the cosine similarity distribution statistics of known category samples on the base class validation set.
