A method for unknown target classification based on zero-shot learning

By constructing a semantic space based on zero-shot learning and using dynamic thresholds and distance metrics to optimize the discriminant model, the shortcomings of unknown signal recognition methods in generalization ability and computational complexity are solved, and signal recognition that efficiently distinguishes between known and unknown categories is achieved.

CN119691507BActive Publication Date: 2025-09-30NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411766584.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-09-30
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

Existing unknown signal recognition methods have deficiencies in generalization ability and resource utilization, and traditional methods have high computational complexity and cannot effectively distinguish between known and unknown categories.

Method used

A zero-shot learning-based method is adopted to construct a semantic space through the transformer encoder and decoder, combining the self-attention mechanism and the fully connected neural network, using dynamic thresholds and distance metrics, introducing center loss and cross entropy loss, and optimizing the discriminant model to distinguish known and unknown categories.

Benefits of technology

It improves the generalization ability and robustness of the model, reduces the computational complexity, can effectively distinguish between known and unknown categories, and enhances the adaptability to noise and classification efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691507B_ABST
    Figure CN119691507B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for classifying unknown targets based on zero-shot learning, comprising: obtaining known unknown signal data; constructing a semantic space for the signal through an encoder F, a classifier C, and a decoder D; finding a distance metric for the trained semantic space, establishing a discriminant model, and using the discriminant model to distinguish the signal categories of the test signal, where the signal categories include n known classes and n R The present invention can distinguish how many unknown classes there are in the test set, rather than just marking the test samples as unknown. It can also solve the problems of the existing unknown signal recognition methods' shortcomings in generalization ability and the waste of resources caused by the global use of Mahalanobis distance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal recognition, and in particular to a method for classifying unknown targets based on zero-shot learning. Background Art

[0002] Signal recognition is an important and challenging task in signal processing and communications. It's common for some signal classes to lack accessible training data for recognition. Therefore, zero-shot learning, a learning method widely used in image processing, is also crucial for signal recognition. Unfortunately, due to the unexplained semantics of signals, little research has been conducted in this area.

[0003] "SR2CNN: Zero-Shot Learning for Signal Recognition" published in "Institute of Electrical and Electronics Engineers" (2021: 2316-2329) can not only identify known category signals, but also unknown category signals by performing distance measurement on the extracted semantic attribute features. However, the global use of Mahalanobis distance wastes a lot of computing time, resulting in a waste of resources. The invention with publication number CN114839613A discloses a method for unknown signal recognition based on zero-shot learning, which proposes improvements on SR2CNN, deepens the network depth, and supplements the recognition effect under low signal-to-noise ratio, but still does not break away from the traditional convolutional neural network architecture, and the generalization performance is not strong. At the same time, a commonly used loss function was selected, and the loss function was not optimized according to the specific task. Summary of the Invention

[0004] The purpose of this invention is to propose an unknown target classification method based on zero-shot learning, which can solve the problems of the existing unknown signal recognition methods' shortcomings in generalization ability and the waste of resources caused by the global use of Mahalanobis distance.

[0005] In order to achieve the above technical objectives, the technical solution adopted by the present invention is:

[0006] A method for classifying unknown targets based on zero-shot learning, comprising the following steps:

[0007] S1, obtain known and unknown signal data;

[0008] S2, constructs a semantic space for the signal through an encoder F, a classifier C, and a decoder D. The encoder F is modeled by a transformer encoder architecture, which projects the input signal into a latent semantic space representation. The classifier C is modeled by a fully connected neural network, which takes the latent semantic space representation as input and determines the label of the data. The decoder D is modeled by a transformer decoder and is used to generate a reconstructed signal, which is expected to be close to the input signal.

[0009] S3, find the distance metric for the semantic space of training, build a discriminant model, and use the discriminant model to distinguish the signal categories of the test signal. The signal categories include n known classes and n R unknown class; the differentiation process specifically includes the following sub-steps:

[0010] For each known class k, calculate the corresponding semantic center vector S k ;

[0011] For each known class k, calculate the test signal The measurement vector With S k difference;

[0012] Compare the first threshold Θ1 with the given minimum distance d1 to distinguish between known and unknown classes:

[0013]

[0014] Among them, c1 is the control parameter, called the discrimination coefficient; is the average distance of known categories; S is the set of known semantic center vectors; express prediction; if d1<Θ1, then otherwise

[0015] If the test signal Belongs to a known class and is labeled using the following formula

[0016] If the test signal Belongs to the unknown class, use R to represent the recorded unknown class, and define S R is the set of semantic center vectors of R; add a new signal label R1 in R, set is the semantic center vector The unknown signal Save in set middle, Compare the second threshold Θ2 with the minimum distance d2:

[0017]

[0018] where λ2 is used to balance the two distances d1 and d med ;d med The candidate set is composed of k' centers with the smallest distance from F(I) K 'Calculate the median of the distance;

[0019] Let n R is the number of signal labels recorded in R. If d2>Θ2, a new signal label is added to R. set up If d2≤Θ2, the label is obtained using the following formula And the signal Save in collection middle.

[0020] Furthermore, in step S2, the encoder F consists of 6 encoder layers, each of which contains a self-attention mechanism layer and a feedforward neural network layer; the encoder F is represented by a mapping from the input space X to the latent semantic space Z; the central loss of the encoder F is expressed as:

[0021]

[0022] Where N is the batch size, x i ∈X,y i is x i The label, z i =F(x i )∈Z; Represents class y in Z i The semantic center vector of With class y i Updated based on changes in semantic features.

[0023] Furthermore, in step S2, the classifier C uses the cross entropy loss L ce Control the error of the classifier C and assign adaptive weights w to different categories or samples i ; Cross entropy loss L of classifier C ce for:

[0024]

[0025] Where C(F(x i )) is x i The predicted value of .

[0026] Furthermore, in step S2 , the decoder D uses reconstruction loss to evaluate the difference between the original signal data and the reconstructed signal data.

[0027]

[0028] Where D(F(x i )) is the signal x i Reconstruction.

[0029] Furthermore, the total loss function of the semantic space is:

[0030] L t =L ce +λ ct L ct +λ r L r .

[0031] Furthermore, the first threshold θ1 is dynamically updated using the following formula:

[0032] Θ1=β×Θ1 prev +(1-β)×Θ1 new

[0033] where β is the smoothing factor.

[0034] Furthermore, the second threshold is dynamically updated using the following formula:

[0035]

[0036] where δ is the learning rate.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] First, the unknown target classification method based on zero-shot learning of the present invention introduces regularization for the center loss to prevent overfitting, avoid excessive deviation of the center point, and enhance the generalization ability of the model; for the cross-entropy loss, adaptive weights are given to different categories or samples, and the weights can be dynamically adjusted according to the difficulty of the sample or category imbalance, and adversarial training is added to improve the robustness of the model to noise.

[0039] Second, the unknown target classification method based on zero-shot learning of the present invention introduces a new discrimination criterion, reduces the number of samples for median calculation through pre-screening, reduces computational complexity, enhances adaptability, and improves classification efficiency.

[0040] Third, the unknown target classification method based on zero-shot learning of the present invention is different from the traditional open set recognition method which only divides the test samples into n+1 classes. Instead, it divides the test samples into n+n R Class, where n R The number of unknown classes identified for the discriminator, so that it can distinguish how many unknown classes are in the test set, rather than just labeling the test samples as unknown. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a schematic diagram of the unknown target classification method based on zero-shot learning according to an embodiment of the present invention;

[0042] Figure 2 This is a diagram of the transformer model architecture of an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The embodiments of the present invention are described in further detail below with reference to the accompanying drawings.

[0044] The present invention discloses a method for classifying unknown targets based on zero-shot learning, the method comprising the following steps:

[0045] S1, obtain known and unknown signal data.

[0046] S2 constructs a semantic space for the signal through an encoder F, a classifier C, and a decoder d; wherein the encoder F is modeled by the transformer encoder architecture, which projects the input signal into a latent semantic space representation; the classifier C is modeled by a fully connected neural network, which takes the latent semantic space representation as input and determines the label of the data; the decoder D is modeled by the transformer decoder and is used to generate a reconstructed signal, and it is expected that the reconstructed signal is close to the input signal.

[0047] S3, find the distance metric for the semantic space of training, build a discriminant model, and use the discriminant model to distinguish the signal categories of the test signal. The signal categories include n known classes and n R An unknown class.

[0048] Signals are a special type of data that is very different from images. Although the semantic attributes of images are given from the perspective of visual information, it is almost impossible to extract the semantic features of signals without relying on any calculations. Therefore, a natural way to automatically extract the semantic information of signal data is to use a feature extractor network. Considering the unique characteristics of the signal, the input shape of the feature extractor network should be a 1-dimensional signal rather than a square matrix. In our scheme, the encoder F consists of 6 encoder layers, each of which contains a self-attention mechanism layer and a feedforward neural network layer such as Figure 2 The encoder F is represented by a mapping from the input space X to the latent semantic space Z. In order to minimize the intra-class variation in the space Z while keeping the semantic features between classes well separated, the center loss is used. Let x i ∈X,y i is x i The label of z i =F(xi )∈Z. To prevent the center point from being overly biased towards a certain type of sample or individual samples, L2 regularization constraints are added to the center point to prevent overfitting, avoid excessive deviation of the center point, and enhance the generalization ability of the model. Assuming the batch size is N, the center loss is expressed as:

[0049]

[0050] in Represents class y in Z i The semantic center vector of Need to follow class y i Ideally, the entire training dataset should be considered and the features of each class should be averaged in each iteration. In practice, it can be updated based on For each batch Learning rate update, where α is the update parameter;

[0051] and Calculated by the following formula:

[0052]

[0053] Among them, if the condition inside () is met, then δ(·)=1, otherwise δ(·)=0.

[0054] The classifier C will distinguish the labels of samples based on semantic features. It consists of several fully connected layers. Further using the cross entropy loss L ce Control the error of the classifier C and assign adaptive weights w to different categories or samples i , the weights can be dynamically adjusted according to the difficulty or class imbalance of the sample, and adversarial training is added to improve the model's robustness to noise. A small perturbation δ is applied to the input, requiring the model to still give the same prediction results under the perturbed input. The loss is defined as:

[0055]

[0056] Where C(F(x i )) is x i The predicted value of .

[0057] In order to retain the effective semantic information in Z, this embodiment uses an autoencoder. Specifically, a decoder D is used to reconstruct X from Z. The decoder D consists of a transformer decoder with the following structure: Figure 2 In addition, the reconstruction loss is used to evaluate the difference between the original signal data and the reconstructed signal data. The reconstruction loss is expressed as:

[0058]

[0059] Where D(F(x i )) is the signal x i The more complete the reconstructed signal is, the more effective information Z carries. Therefore, the autoencoder greatly helps the model generate appropriate semantic features.

[0060] The total loss function combines the cross entropy loss, center loss, and reconstruction loss as:

[0061] L t =L ce +λ ct L ct +λ r L r

[0062] The weight λ ct and λ r To balance these three loss functions, we carefully design the total loss function. The cross-entropy loss is used to learn information from the labels. The center loss minimizes the change in the semantic space within a class while maintaining a good separation of semantic features between classes, which also helps separate unknown classes. The reconstruction loss enables the model to learn more information about the signal data because the data is well reconstructed.

[0063] The total loss function L is summarized in Algorithm 1 t The entire learning process, where θ F ,θ C ,θ D They represent the model parameters of encoder F, classifier C and decoder D respectively.

[0064]

[0065]

[0066] The encoder F is the tail of the proposed framework, but it is the core. It distinguishes known and unknown classes based on the latent semantic space Z. For each known class k, the encoder F extracts and calculates the corresponding semantic center vector S k for:

[0067]

[0068] Where m is the number of all training samples. get When each k measurement vector With S k The difference between F and S k The generalized distance is defined as follows:

[0069]

[0070] Among them A k is the transformation matrix associated with class k, Represents the matrix A k The inverse of k When A is the covariance matrix ∑ of the semantic features of k-type signals, d(·,·) is called the Mahalanobis distance. k When it is the identity matrix I, d(·,·) is simplified to the Euclidean distance. k It can also be Λ and σ 2 I, where Λ is composed of ∑ and The diagonal matrix composed of the diagonal elements of S k The dimension of A k =Λ and A k =σ 2 The distances corresponding to I are called the second distance and the third distance. Note that when applying the Mahalanobis distance, the second distance, and the third distance, the covariance matrix of each known class needs to be calculated in advance.

[0071] With the above distance metric, we can build a discriminant model. The discriminant model's workflow is divided into two steps: the first step is to distinguish between known and unknown classes; the second step is to determine which known or unknown classes the test signal belongs to. The first step is accomplished by comparing the first threshold Θ1 with the given minimum distance d1.

[0072]

[0073] Where S is a set of known semantic center vectors. express If d1<Θ1, then otherwise Since the center loss is used in training, it is assumed that the semantic features of the k-class signal obey the multivariate Gaussian distribution. Based on the historical classification data, the average distance of the known categories is calculated. And the standard deviation σk, set the first threshold Θ1 as follows:

[0074]

[0075] Where c1 is the control parameter, called the discrimination coefficient.

[0076] When the distribution of input data changes, the model may not be able to adapt to a fixed Θ1. In some tasks, the statistical characteristics of the input data itself may change over time or location. For example, in a multi-sensor system, different sensors may be affected by different interference sources, resulting in increased or decreased measurement errors. In this case, Θ1 needs to be dynamically adjusted to better adapt to the new environmental conditions. If comparative evaluation finds that the model's performance under the current settings is not ideal (for example, the misclassification rate is too high, the prediction is inaccurate, etc.), dynamically updating Θ1 can serve as an adaptive optimization method to help the model improve its accuracy.

[0077] To this end, the following formula is used to dynamically update the first threshold Θ1:

[0078] Θ1=β×Θ1 prev +(1-β)×Θ1 new

[0079] where β is the smoothing factor.

[0080] In the loss function of this embodiment, a central loss component is provided, the goal of which is to minimize the central loss component relative to the semantic layer.

[0081]

[0082] Due to the monotonicity of the exponential function, we have:

[0083]

[0084] Where t is the dimension of Gaussian distribution and I is the unit matrix. and The above equation can be equivalently written as:

[0085]

[0086] in This indicates that the output of the semantic layer is likely to follow a Gaussian distribution.

[0087] The second step is more complicated. If the test signal Belongs to a known class, its label It can be obtained by the following formula:

[0088]

[0089] The main difficulty lies in handling In the first step, the case is classified as unknown. Specifically, R represents the recorded unknown class and defines S R is the set of semantic center vectors of R. When , add a new signal label R1 in R, set is the semantic center vector The unknown signal Save in set In when When , the second threshold Θ2 is compared with the minimum distance d2, and the minimum distance d2 is calculated by the following formula:

[0090]

[0091] According to F(x) and S k The distance between d1 and d2 is a good choice for the second threshold θ2. d1 is the minimum distance first used in the test for selecting the second threshold θ2. In fact, this embodiment tests a set of choices for the second threshold θ2 and numerically finds that when the second threshold θ2 is set between d1 and d med The unknown class can usually be correctly identified when d med is F(x) and each S k The median distance between .

[0092] In order to reduce the complexity, all d(F(I),S k ), the following optimization strategy is used:

[0093] 1. Pre-screening candidate centers:

[0094] According to the simple Euclidean distance, the k' centers with the smallest distance to F(I) are selected as the candidate set K'.

[0095] Usually |K'|=ceil(α·K),α∈(0,1).

[0096] Compute the approximate median distance:

[0097] 2. For the candidate set K 'Calculate the median distance:

[0098] d med ≈median({d(F(I),S k' )} k'∈K' )

[0099] Where p is the empirical coefficient.

[0100] Therefore, the second threshold Θ2 is finally set to

[0101]

[0102] In practical applications, as signals change or training data differ, a static λ2 may not be able to adapt to these changes. Therefore, dynamically adjusting λ2 can enhance the model's flexibility, allowing the model to adjust its signal classification criteria based on actual conditions. This adjustment mechanism is often used to balance the ability of a classification system to recognize known classes and distinguish unknown signals, especially when the data environment or system requirements change.

[0103] where λ2 is used to balance the two distances d1 and d med , the dynamic adjustment method is as follows:

[0104]

[0105] where δ is the learning rate.

[0106] Next, let n R is the number of signal labels recorded in R. If d2>Θ2, a new signal label is added to R. set up This embodiment does not have any R The value of (the size of the set R) does not impose any prior restrictions, that is, the model of this embodiment can never know the number of unknown classes to be judged. If d2≤Θ2, this embodiment is set as follows:

[0107]

[0108] And the signal Save in In. Accordingly, Calculated by the following formula:

[0109]

[0110] in Representing a collection Therefore, as the number of unknown signal predictions increases, the discriminant model will be refined way to gradually improve itself.

[0111] The workflow of the discriminator is summarized in Algorithm 2.

[0112]

[0113]

[0114] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiment of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal translation scripting language JavaScript, etc.

[0115] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0116] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0117] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions for executing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0118] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0119] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A method for unknown target classification based on zero-shot learning, characterized in that: The method comprises the following steps: S1, obtain known and unknown signal data; S2, constructs a semantic space for the signal through an encoder F, a classifier C, and a decoder D. The encoder F is modeled by a transformer encoder architecture, which projects the input signal into a latent semantic space representation. The classifier C is modeled by a fully connected neural network, which takes the latent semantic space representation as input and determines the label of the data. The decoder D is modeled by a transformer decoder and is used to generate a reconstructed signal, which is expected to be close to the input signal. S3, find the distance metric for the semantic space of training, build a discriminant model, and use the discriminant model to distinguish the signal categories of the test signal. The signal categories include n known classes and n R unknown class; the differentiation process specifically includes the following sub-steps: For each known class k, calculate the corresponding semantic center vector S k ; For each known class k, calculate the test signal The measurement vector With S k difference; Compare the first threshold Θ1 with the given minimum distance d1 to distinguish between known and unknown classes: Among them, c1 is the control parameter, called the discrimination coefficient; d() represents the generalized distance function; is the average distance of known categories; F() is the output function of encoder F; S is the set of known semantic center vectors, σ k is the standard deviation of the known class k; if d1<Θ1, then otherwise K is the set of known classes, and U is the set of unknown classes; If the test signal Belongs to a known class, test signal Label for: If the test signal Belongs to the unknown class, use R to represent the recorded unknown class, and define S R is the set of semantic center vectors of R; when When , add a new signal label R1 in R, set is the semantic center vector The unknown signal Save in set middle, when When , the second threshold Θ2 is compared with the minimum distance d2: where R u is the semantic center vector of the unknown category, and λ2 is used to balance the two distances d1 and d med , d med Calculate the median of the distance of the candidate set K' consisting of the k' centers with the smallest distance to F(I); Let n R is the number of signal labels recorded in R. If d2>Θ2, a new signal label is added to R. set up If d2≤Θ2, the label is obtained using the following formula And the signal Save in collection middle; In step S2, the encoder F consists of 6 encoder layers, each of which contains a self-attention mechanism layer and a feedforward neural network layer. The encoder F is represented by a mapping from the input space X to the latent semantic space Z. The central loss of the encoder F is expressed as: Where N is the batch size, x i ∈X,y i is x i The label, z i =F(x i )∈Z; Represents class y in Z i The semantic center vector of With class y i The semantic features are updated accordingly, M is the total number of parameters in the model, c j is the jth parameter, λ is the regularization coefficient, which is used to control the strength of the regularization term; In step S2, the classifier C uses the cross entropy loss L ce Control the error of the classifier C and assign adaptive weights w to different categories or samples i ; Cross entropy loss L of classifier C ce for: Where C(F(x i )) is x i The predicted value of , α is the constraint parameter, and δ1 is the adversarial disturbance.

2. The unknown target classification method based on zero-shot learning according to claim 1, characterized in that In step S2, the decoder D uses the reconstruction loss to evaluate the difference between the original signal data and the reconstructed signal data: Where D(F(x i )) is the signal x i Reconstruction.

3. The unknown target classification method based on zero-shot learning according to claim 1, characterized in that The total loss function of the semantic space is: L t =L ce +λ ct L ct +λ r L r where λ ct ,λ r is the weight ratio of the corresponding loss function.

4. The unknown target classification method based on zero-shot learning according to claim 1, characterized in that The first threshold θ1 is dynamically updated using the following formula: Θ1=β×Θ1 prev +(1-β)×Θ1 new Where β is the smoothing factor, v1 prev is the value of Θ1 at the previous moment, Θ1 new Calculates a new value for the current.

5. The unknown target classification method based on zero-shot learning according to claim 1, characterized in that The second threshold is dynamically updated using the following formula: Where δ2 is the learning rate, λ max To calculate the upper bound.