An open set identification method for individual radiation sources with small samples based on generative adversarial networks

By combining the generative adversarial network and the self-attention ResNet18 network, the problem of unknown sample recognition in individual recognition of small sample radiation source is solved, and the open-set recognition of radiation source individuals under small sample conditions is realized, which improves the recognition accuracy and stability .

CN119026000BActive Publication Date: 2025-01-17CHANGSHA FENGYUAN DEFENSE TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411505528.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-17
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

The traditional radiation source individual recognition method is insufficient in small sample conditions, especially in non-cooperative scenarios, and the open set recognition method based on the generative model cannot fully characterize the fitted distribution of unknown samples.

Method used

Using the small sample radiation source individual open set recognition method based on the generative adversarial network, we generate known samples by generating adversarial networks, and explicit and implicit feature splicing to generate unknown samples, combining the maximum loss of self-attention ResNet18 network, output results and settings Comparison of fixed thresholds to realize open set recognition.

Benefits of technology

Improve the accuracy and stability of individual recognition of radiation sources, can correctly process data under small sample conditions, identify known categories and reject unknown samples, effectively solve the problem of open set identification, and improve through data amplification and pseudo-closed set conversion. Identification performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026000B_ABST
    Figure CN119026000B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for open set identification of individual radiation sources with small samples based on a generative adversarial network. The method first obtains time series data of individual radiation sources of different radiation sources and converts them into time-frequency graphs to construct a time-frequency graph data set. Secondly, the time-frequency graph is normalized by RGB channels and then input into a generative adversarial network for reconstruction training. Then, the trained adversarial network is used to generate known samples and unknown samples, and the known samples and unknown samples are added to the time-frequency graph data set for expansion, and the generative adversarial network is fine-tuned and trained using known samples. Finally, the expanded time-frequency graph data set is input into a self-attention ResNet18 network based on maximum loss, and the open set identification of radiation sources is realized by combining the reconstruction loss of the input and output of the generative adversarial network. The present invention solves the small sample problem and the open set identification problem in the individual identification of radiation sources, and better realizes the open set identification of radiation sources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal processing technology, and in particular to an individual open set identification method for small sample radiation sources based on a generative adversarial network. Background Art

[0002] Individual identification and refined analysis of radiation sources are key tasks of cognitive electronic warfare. Faced with increasingly complex electromagnetic backgrounds and non-cooperative and strong confrontational battlefield environments, traditional methods for identifying individual radiation sources are not reliable enough to meet actual needs. Although artificial intelligence methods such as deep learning have achieved certain results, they are driven by big data and contradict the reality of small samples in actual engineering. In addition, most of the previous research on individual radiation source identification is based on a closed set assumption, that is, the types of radiation sources to be identified have all appeared in the training samples. In actual classification tasks, especially in non-cooperative scenarios, sample collection becomes particularly difficult. Under normal circumstances, the collected sample set will be far from covering all radiation source categories, and the closed set assumption will no longer hold. Therefore, the open set identification technology of radiation sources under small sample conditions not only needs to correctly process the data, but also needs to be able to reject unknown samples while correctly realizing the recognition of known categories, which is more meaningful for research.

[0003] At present, there are fewer studies on open set identification of radiation sources at home and abroad compared with closed set identification. For open set identification problems, these studies can be roughly divided into two categories: open set identification based on discriminant models and open set identification based on generative models. However, the open set identification method based on discriminant models is highly dependent on the discriminant threshold, and the choice of threshold will have a great impact on the open set identification performance; the unknown samples generated by the open set identification method based on generative models are often resampled training samples, which cannot fully characterize the fitting distribution of unknown samples. Summary of the invention

[0004] In view of the above analysis, in order to solve the problem of open set identification of individual radiation sources with small samples, the present invention proposes a method for open set identification of individual radiation sources with small samples based on a generative adversarial network. The core technology of the present invention has two parts: first, in view of the problem of small samples, a generative adversarial network with sample reconstruction function is constructed, known samples are generated by the generative adversarial network, and unknown samples are generated by explicit and implicit feature splicing, thereby realizing data amplification; second, in view of the problem of open set identification, the generated unknown class samples and the reconstruction function of the generative adversarial network are combined to train the self-attention ResNet18 network based on the maximum loss, and the output result is compared with the set threshold to realize open set identification.

[0005] The technical solution of the present invention is:

[0006] A small sample radiation source individual open set identification method based on a generative adversarial network comprises the following steps:

[0007] Step 1: Obtain the time series data of different radiation source individuals, use short-time Fourier transform to convert the time series data into time-frequency diagrams, and construct a time-frequency diagram dataset from the time-frequency diagrams. The transformation uses a Hanning window to generate time-frequency diagrams as inputs for generative adversarial networks and classification networks.

[0008] Step 2: First, normalize the RGB channels of the time-frequency graph, and then input it into the generative adversarial network consisting of the encoder, decoder, and discriminator for reconstruction training until the model converges.

[0009] The training process is as follows: first, freeze the network parameters of the discriminator, unfreeze the network parameters of the encoder and decoder, input the original time-frequency graph into the encoder and decoder, obtain the reconstructed time-frequency graph, calculate the loss function, perform reverse gradient propagation, and update the network parameters of the encoder and decoder. Then, freeze the network parameters of the encoder and decoder, unfreeze the network parameters of the discriminator, input the reconstructed time-frequency graph into the discriminator, obtain the mapped feature vector, calculate the loss function, perform reverse gradient propagation, and update the network parameters of the discriminator. The above process is repeated, and the units composed of the encoder and decoder and the discriminator are trained against each other until the model converges.

[0010] The basic unit of the encoder is composed of a spectrally normalized convolutional layer and a LeakyReLU layer in cascade; the basic unit of the decoder is composed of a spectrally normalized deconvolutional layer, a batch normalization layer, and a ReLU layer in cascade; the basic unit of the discriminator is composed of a spectrally normalized convolutional layer and a LeakyReLU layer in cascade. The gradient penalty strategy is used during training to improve the stability of model training.

[0011] Among them, a self-attention layer is added after the last two basic units of the encoder and the discriminator, and a self-attention layer is added after the second and third basic units of the decoder; the encoder compresses the 256×256×3 time-frequency image into a one-dimensional vector with a length of 128; the discriminator network structure is based on the encoder, and uses two fully connected layers to connect with the last self-attention layer respectively, and maps the features output by the self-attention layer into one-dimensional vectors with a length of 1 and a length of N for loss calculation.

[0012] The training loss of the generative adversarial network consists of four parts: the pixel-level loss before and after the time-frequency image reconstruction, the feature-level loss of the features extracted by the VGG19 pre-trained model before and after the time-frequency image reconstruction, the supervised adversarial loss of the discriminator to determine whether the reconstructed image is true, and the cross-entropy classification loss of the discriminator to judge the sample classification results.

[0013] The pixel-level loss before and after the reconstruction of the time-frequency image is calculated by calculating the L1 norm of the pixels of the original time-frequency image and the pixels of the time-frequency image reconstructed by the generative adversarial network, and then taking the batch average. The feature-level loss of the features extracted by the VGG19 pre-trained model before and after the reconstruction of the time-frequency image is calculated by calculating the L1 norm of the feature vector extracted by the VGG19 pre-trained model of the original time-frequency image and the feature vector extracted by the VGG19 pre-trained model of the time-frequency image reconstructed by the generative adversarial network, and then taking the batch average. The supervised adversarial loss used by the discriminator to determine whether the reconstructed image is true is calculated by calculating the batch average Wasserstein distance between the feature vector with a one-dimensional length of 1 output by the discriminator of the original time-frequency image and the feature vector with a one-dimensional length of 1 output by the discriminator of the time-frequency image reconstructed by the generative adversarial network. The calculation method of the cross entropy classification loss of the discriminator to judge the sample classification result is as follows: after reconstructing the original time-frequency graph through the generative adversarial network, the cross entropy is calculated through the one-dimensional feature vector of length N output by the discriminator and the sample label encoded by the one-hot code, and the batch average is obtained.

[0014] Step 3: Use the trained generative adversarial network to generate known samples and unknown samples to expand the number of samples.

[0015] The known samples are generated by randomly selecting a time-frequency graph, multiplying it by a random weight factor in a preset range, inputting it into the trained generative adversarial network, and generating and reconstructing known samples through the encoder and decoder until the generated samples are expanded to the required number.

[0016] There are two schemes for generating unknown samples: one is to split two different types of time-frequency graphs horizontally at the same time, take the upper and lower parts of the two images respectively, and splice them into a complete time-frequency graph; the other is to split two different types of time-frequency graphs vertically at the same time, take the left and right parts of the two images respectively, and splice them into a complete time-frequency graph; the other is to obtain the time-frequency graphs of four different types of samples through the feature vectors output by the encoder, calculate the mean and variance of the four feature vectors respectively, and perform weighted superposition of four Gaussian noises that meet the corresponding mean and variance, input them into the decoder, and reconstruct them into samples of unknown classes.

[0017] After the unknown sample expansion is completed, the sample needs to be cleaned, that is, the generated unknown sample is input into the generative adversarial network to obtain the reconstructed sample, and the original unknown sample and the reconstructed sample are input into the discriminator respectively, and the output difference of the discriminator is obtained as the reconstruction loss, and then the sample that does not match the reconstruction loss is reconstructed.

[0018] Step 4: Add known samples and unknown samples to the time-frequency graph dataset for expansion, and use the known samples to fine-tune the generative adversarial network. Since the known samples are expanded, they need to be added to the original dataset and the model is trained again using a smaller learning rate.

[0019] Step 5: Input the expanded time-frequency graph dataset into the maximum loss-based self-attention ResNet18 network, and combine the reconstruction loss of the input and output of the generative adversarial network to achieve open set recognition of the radiation source.

[0020] Since the expanded samples include known samples and unknown class samples, the known samples are classified as the first N class samples, and the unknown class is classified as the N+1 class samples, thereby converting the open set recognition problem into a pseudo-closed set problem, and the expanded time-frequency graph dataset is input into the self-attention ResNet18 network based on the maximum loss for training. The network training loss consists of two parts: cross entropy classification loss and maximum loss, which respectively achieve the functions of label sample matching and intra-class feature clustering and different class feature alienation, thereby improving the network classification performance.

[0021] In the recognition stage, the time-frequency graph is first input into the generative adversarial network to obtain the output result after the sample passes through the encoder and decoder. The original time-frequency graph and the time-frequency sample obtained after decoding are respectively input into the discriminator, and the output difference of the discriminator is calculated to obtain the reconstruction error of the image before and after the reconstruction of the generative adversarial network. The upper and lower limits of the reconstruction judgment threshold are set. If the error is greater than the upper limit of the threshold or the error is less than the lower limit of the threshold, the sample is identified as an unknown sample; otherwise, it means that the sample is more similar to the training sample. The time-frequency sample is input into the self-attention ResNet18 network based on the maximum loss to obtain the classification result, thereby realizing the recognition of open and closed set targets.

[0022] Compared with the prior art, the present invention has the following advantages:

[0023] The generative adversarial network constructed by the present invention, which combines the self-attention mechanism, spectral normalization, and gradient penalty strategy, has the characteristics of high quality of generated samples and stable training, and has sample reconstruction and sample generation functions. The generation of known and unknown samples is realized by feature processing of the encoder output vector, and the small sample problem and open set recognition problem in the individual identification of radiation sources are solved to a certain extent. It converts the open set problem into a pseudo-closed set problem, and through the training of the pseudo-closed set classification network and the joint confidence judgment of the generative adversarial network, the open set recognition of the radiation source is better realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a flowchart of the present invention;

[0025] Figure 2 is a system block diagram of the present invention;

[0026] Figure 3 Generate a schematic diagram of an adversarial network for the present invention;

[0027] Figure 4 Schematic diagram of the unknown sample horizontal splicing method;

[0028] Figure 5 Schematic diagram of vertical splicing method for unknown samples;

[0029] Figure 6 The closed set recognition rate curves for different networks / different numbers of samples;

[0030] Figure 7 The confusion matrix for the open set identification of radiation source individuals with an openness of 0.0299;

[0031] Figure 8 This is the individual open set identification confusion matrix for the radiation source with an openness of 0.0572;

[0032] Fig. 9 This is the confusion matrix for individual open set identification of radiation sources with an openness of 0.0823;

[0033] Fig.10 The confusion matrix for open set identification of radiation source individuals with an openness of 0.106;

[0034] Fig.11 This is the confusion matrix for the open set identification of radiation sources with an openness of 0.127. DETAILED DESCRIPTION

[0035] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0036] The present invention proposes a small sample radiation source individual open set identification method based on generative adversarial network. The flowchart is as follows: Figure 1 As shown, the system block diagram is as follows Figure 2 As shown. Based on the problems of small sample learning difficulties and open set identification risks in the current identification of individual radiation sources, it is proposed to use generative adversarial networks to generate samples of known and unknown radiation sources to achieve data augmentation and convert open sets into pseudo-closed set problems. In addition, combined with the idea of ​​anomaly detection, through the reconstruction loss and auxiliary judgment of the identification samples, the open set identification of individual radiation sources is better realized. Specifically, the following steps are included:

[0037] Step 1: Obtain the time series data of different radiation source individuals, convert the time series data into time-frequency diagrams, and construct a time-frequency diagram dataset from the time-frequency diagrams.

[0038] Step 2: Normalize the RGB channels of the time-frequency graph and input it into the generative adversarial network consisting of the encoder, decoder, and discriminator for reconstruction training until convergence.

[0039] Step 3: Use the trained adversarial network to generate known samples and unknown samples.

[0040] Step 4: Add known samples and unknown samples to the time-frequency graph dataset for expansion, and use the known samples to fine-tune the generative adversarial network.

[0041] Step 5: Input the expanded time-frequency graph dataset into the maximum loss-based self-attention ResNet18 network, and combine the reconstruction loss of the input and output of the generative adversarial network to achieve open set recognition of the radiation source.

[0042] The transformation in step 1 adopts a Hanning window and uses short-time Fourier transform to generate a time-frequency diagram as the input of the network.

[0043] The network structure in step 2 is as follows Figure 3 As shown, the introduction is as follows:

[0044] The basic unit of the encoder consists of a spectrally normalized convolutional layer and a LeakyReLU layer; the basic unit of the decoder consists of a spectrally normalized deconvolutional layer, a batch normalization layer, and a ReLU layer; the basic unit of the discriminator consists of a spectrally normalized convolutional layer and a LeakyReLU layer. The gradient penalty strategy is used during training to improve the stability of model training.

[0045] The basic layer unit of the encoder consists of a convolutional layer with a kernel size of 4, a padding size of 2, a stride of 1 after spectral normalization, and a LeakyRelu unit with a parameter of 0.1. The size of the input image after passing through each layer is shown in Table 1:

[0046] Table 1 Encoder network table

[0047]

[0048] The basic layer unit of the decoder consists of a deconvolution layer with a convolution kernel size of 4, a padding size of 2, and a stride of 1 after spectral normalization, a batch normalization layer, and a ReLU unit. The size of the input feature vector after passing through each layer is shown in Table 2:

[0049] Table 2 Decoder network table

[0050]

[0051] The Adam optimizer is used in the training network, the discriminator learning rate is 0.0004, the decoder learning rate is 0.0001, and beta is (0.0, 0.9). The input time-frequency image size is cropped to 256×256×3, and normalized with a mean of 0.5 and a variance of 0.5 in each channel. As shown in Tables 1 and 2, a self-attention layer is added after the last two basic units of the encoder and the discriminator, and a self-attention layer is added after the last second and third basic units of the decoder; the encoder encodes the 256×256×3 time-frequency image into a one-dimensional vector of length 128; the discriminator network structure is based on the encoder, and uses two fully connected layers to connect to the last self-attention layer respectively, and maps the features output by the self-attention layer into one-dimensional vectors of length 1 and one-dimensional vectors of length N respectively.

[0052] The self-attention mechanism is introduced as follows:

[0053] The output of the previous hidden layer Through two feature space conversion functions , Calculate the correlation degree of specific pixels, where is the number of channels, is the pixel size of the entire feature map. , , They are all 1×1 convolution operations, and then the activation function introduces stronger nonlinearity without changing the input size, thus enhancing the fitting expression ability of the neural network.

[0054] , . , , Is the weight matrix that needs to be learned during training. The output of is transposed and The outputs of .

[0055] (1)

[0056] After Softmax normalization, a weight feature map is obtained, which is calculated as follows:

[0057] (2)

[0058] in, Indicates that in the synthesis When the model is used for the first The influence of each position is essentially a quantification of the pixels in the image. Relative to The importance of the feature map and Multiply pixel by pixel to get the feature map with enhanced features .

[0059] (3)

[0060] Then further output With the scale parameter Weighted and added back to the input feature map , output:

[0061] (4)

[0062] In order to take into account both domain information and long-distance feature correlation, a transition ratio parameter is introduced , the initial value is 0, so that the feature enhancement module starts from learning local domain information and gradually distributes weights to long-distance feature details, thereby achieving self-attention feature enhancement.

[0063] The spectral normalization method is introduced as follows:

[0064] For a network layer with a weight matrix , and define its Lipschitz norm as:

[0065] (5)

[0066] (6)

[0067] In the formula is the weight matrix of the network layer, It is the network layer The input vector is Represents the weight matrix The L2 norm of The maximum singular value of Represents the calculation of the Lipschitz norm, which can be converted into the L2 norm of the weight matrix. Spectral normalization is to make the weight matrix of each layer of the network Divide by the L2 norm of the layer parameter matrix At this time, the maximum singular value Normalized to 1, weight matrix are all less than 1. The final weight matrix after spectral normalization is:

[0068] (7)

[0069] Gradient penalty is used in the training process of generative adversarial networks. The method is described as follows:

[0070] The gradient penalty is achieved by directly setting an additional gradient penalty term to ensure that the gradient of the discriminator does not exceed , in order to achieve the effect of training stability, expressed as:

[0071] (8)

[0072] in represents the discriminator, Represents a decoder, Represents the feature vector obtained after the original time-frequency image passes through the encoder, represents the original time-frequency image, is the mean square error; To sample feature vectors from the entire joint distribution space, represents the gradient operator, represents the P norm, that is, the gradient penalty term is to find the entire joint distribution space correspond The gradient of The mean square error of .

[0073] The gradient penalty term needs to be sampled from the joint space of the reconstructed image and the original image. For the entire sample space, it is necessary to capture the concentrated area of ​​the reconstructed image, the concentrated area of ​​the original image, and the area in between them. That is, first randomly select a random number from 0 to 1, and let a pair of image samples be added according to the ratio of the random number to generate The sampling is expressed as:

[0074] (9)

[0075] in is a random number ranging from 0 to 1. Represents the reconstructed time-frequency samples.

[0076] The network training loss consists of four parts: the pixel-level loss before and after the time-frequency image reconstruction, the feature-level loss of the features extracted by the VGG19 pre-training model before and after the time-frequency image reconstruction, the supervised adversarial loss of the discriminator to determine whether the reconstructed image is true, and the cross-entropy classification loss of the discriminator to judge the sample classification results.

[0077] The pixel-level loss is:

[0078] (10)

[0079] in represents the L1 norm, represents the original sample, represents the reconstructed sample, Represents the sample batch mean.

[0080] The feature level loss is:

[0081] (11)

[0082] in Represents the pre-trained VGG19 feature extractor.

[0083] The adversarial loss is:

[0084] (12)

[0085] in Represents the output value of the original sample through the discriminator, Represents the output value of the reconstructed sample passing through the discriminator, and the output vector length is 1.

[0086] The cross entropy classification loss is:

[0087] (13)

[0088] in is the number of sample batches, is the vector length. In the present invention, the output vector length is , For sample The eigenvector of After one-hot encoding The sample labels of the indexes, For sample The feature vector of The probability value of the index, Represents logarithmic operation.

[0089] Then the loss function of the generated adversarial network is expressed as:

[0090] (14)

[0091] (15)

[0092] in represents the loss function of the encoder and decoder, represents the loss function of the discriminator, , , , Represents the weight factor.

[0093] The sample generation process in step 3 is described as follows:

[0094] The known sample generation method is: for a certain type of time-frequency image, randomly select a randomly weighted time-frequency image and input it into the generative adversarial network to generate and reconstruct known samples through the encoder and decoder until the generated samples are expanded to the required number.

[0095] There are two schemes for unknown sample generation: one is to split two different types of time-frequency graphs horizontally at the same time, take the upper and lower parts of the two images respectively, and splice them into a complete time-frequency graph; the other is to split two different types of time-frequency graphs vertically at the same time, take the left and right parts of the two images respectively, and splice them into a complete time-frequency graph; the specific splicing method is as follows Figure 4 , Figure 5 As shown; the second is to obtain the time-frequency diagram of four different types of samples through the feature vector output by the encoder, calculate the mean and variance of the four feature vectors respectively, and perform weighted superposition of four Gaussian noises that meet the corresponding mean and variance, input them into the decoder, and reconstruct them into samples of unknown classes.

[0096] The reconstruction solution output is expressed as:

[0097] (16)

[0098] Which meets:

[0099] (17)

[0100] is a Gaussian noise with corresponding distributions of means and variances of various types, represents the decoder network, represents the weighted sum of Gaussian noise under different features, represents random weights, Indicates the number of sample classes taken.

[0101] When the unknown samples are expanded to the specified number, the generated unknown samples are input into the generative adversarial network to obtain the reconstructed samples. The original unknown samples and the reconstructed samples are input into the discriminator respectively, and the output difference of the discriminator is obtained as the reconstruction loss. Only the samples with an absolute value of the reconstruction loss greater than of unknown samples.

[0102] In step 4, due to the expansion of known samples, it is necessary to add them to the original data set and retrain the model. Since the model has converged, a smaller learning rate is required for retraining. , fine-tune the model.

[0103] The specific process in step 5 is:

[0104] Table 3 Self-attention ResNet18 network table

[0105]

[0106] Since the expanded samples include known samples and unknown class samples, the known samples are classified as the first N class samples, and the unknown class is classified as the N+1 class samples. The open set recognition problem is converted into a pseudo-closed set problem, which is input into the ResNet18 network combined with the self-attention mechanism for training. The network training loss includes two parts: cross entropy classification loss and maximum loss, which respectively achieve the functions of label sample matching and intra-class feature clustering and different class feature alienation, thereby improving the network classification performance.

[0107] The layers of the classifier network are shown in Table 3. The Adam optimizer is used in the training network, with a learning rate of 0.0001 and beta of (0.5, 0.999).

[0108] Layer1, Layer2, Layer3 and Layer4 are composed of two residual blocks. The residual block is composed of the input through the convolution layer, normalization layer, Relu layer, the output of the convolution layer and normalization layer and the original input jump addition to form the basic network unit.

[0109] The cross entropy loss is:

[0110] (18)

[0111] in is the number of sample batches, is the vector length. In the present invention, the output vector length is , For sample The eigenvector of After one-hot encoding The sample labels of the indexes, For sample The feature vector of The probability value of the index, Represents logarithmic operation.

[0112] The maximum loss is:

[0113] First, we define the average maximum intra-class distance in feature representation for:

[0114] (19)

[0115] in represents the L2 norm, represents the number of classes in the dataset, is the average representation of various features, that is:

[0116] (20)

[0117] in Represents the number of instances in a class. represents a feature vector.

[0118] Average minimum inter-class distance Defined as the distance between the two closest categories:

[0119] (twenty one)

[0120] The maximum distance is expressed as:

[0121] (twenty two)

[0122] Then the classifier training loss is:

[0123] (twenty three)

[0124] in Represents weight.

[0125] In the recognition stage, the time-frequency samples are first input into the generative adversarial network to obtain the output results after the samples pass through the encoder and decoder. The original time-frequency samples and the decoded time-frequency samples are respectively input into the discriminator, and the output difference of the discriminator is calculated to obtain the reconstruction error of the image before and after the generative adversarial network reconstruction. . Set the upper limit of reconstruction judgment threshold , lower threshold ,if Greater than threshold or Less than threshold , the sample is identified as an unknown sample; otherwise, it means that the sample is similar to the training sample. The time-frequency sample is input into the self-attention ResNet18 network based on the maximum loss to obtain the classification result. Since the vector index is N+1, the recognition of open and closed set targets is achieved.

[0126] The specific embodiments are:

[0127] 1: Get the data set, specifically:

[0128] The WiSig dataset is a large-scale public WiFi signal dataset that is dedicated to the identification of individual radiators when the channel and receiver are unknown. The transmitters all comply with the 802.11a / g standard and work with WiFi access points on WiFi channel 11 with a center frequency of 2462MHz and a bandwidth of 20MHz. The receiver sampling rate is 25Msps, and the data format is I / Q data with 256 sampling points for each sample. In this specific embodiment, 8 types of individual data in the SingleDay part of the dataset are selected as the training set.

[0129] 2: Data preprocessing, specifically:

[0130] Use the Hanning window to perform STFT on each I / Q data, convert it into image data, and mark it with numbers respectively.

[0131] 3: Train the Generative Adversarial Network, specifically:

[0132] Take the number of training samples of each category as 50, input the prepared image training data into the generative adversarial network, train for 50 epochs, set the batch to 1, use WGAN-GP as the training architecture of the generative adversarial network, the penalty parameter is 10, combine the self-attention mechanism for channel weighting, and use spectral normalization to limit the convolution layer parameters. The parameters are set as follows: use the Adam optimizer in the training network, the learning rate of the encoder and decoder is 0.0004, the learning rate of the discriminator is 0.0001, and beta is (0.0, 0.9). The loss function of the reconstruction part of the generative adversarial network composed of the encoder and decoder is the feature-level loss and pixel-level loss of the image data reconstruction measured by the L1 norm, where the weight of the feature-level loss is 0.2. The loss function of the discriminator is the image before and after reconstruction under the WGAN architecture. Classification loss measured by distance and cross entropy, where the weight of cross entropy classification loss is 0.3.

[0133] 4: Use the training model to expand the data, specifically:

[0134] First, eight categories of individual data are input into the generative adversarial network, and known samples corresponding to each category are generated through the encoder and decoder, with the random weight factor ranging from 0.85 to 1.15; then, two categories are randomly selected from the eight categories of individuals through horizontal splicing and vertical splicing methods to splice into unknown samples; then, four different categories of samples are randomly input to obtain the feature vector output after passing through the encoder, and the noise of the mean and variance distribution of the four corresponding feature vectors is weighted superimposed and input into the decoder to reconstruct the unknown sample; finally, the constructed unknown sample is cleaned. When the unknown samples are expanded to the specified number, the generated unknown samples are input into the generative adversarial network to obtain the reconstructed samples, and the original unknown samples and the reconstructed samples are respectively input into the discriminator to obtain the output difference of the discriminator as the reconstruction loss, and only the reconstruction loss with an absolute value greater than 1 is retained. of unknown samples.

[0135] Through the above process, the number of known samples of each category is expanded to 100, and a total of 800 unknown samples are generated, where the sample ratios of horizontal splicing, vertical splicing, and Gaussian noise weighting are 3:3:2. Therefore, the total number of samples is 1600, including 800 known samples and 800 unknown samples.

[0136] In order to illustrate the improvement of closed set recognition rate by sample augmentation and the network used in the present invention, Figure 6 As shown in the figure, the ResNet18+Atten network, ResNet18 network and ordinary CNN network are used to perform closed set recognition of 8 types of samples. The training loss functions of each network are consistent, which are classification loss and maximum loss. From the experimental results, it can be seen that the Atten mechanism improves the recognition accuracy by about 5%. When the number of training samples of each type is 100, the recognition accuracy is improved by about 3% compared with the number of training samples of 50.

[0137] 5: Model fine-tuning, specifically:

[0138] The expanded known samples are input into the network again for model fine-tuning and training for 5 epochs with a learning rate of 0.00005.

[0139] 6: Open set network training, specifically:

[0140] The known 8 categories of individual samples are labeled as 0, 1, 2, 3, 4, 5, 6, 7; the generated unknown samples are labeled as 8, and N+1 classification training is performed for 30 epochs. The Adam optimizer is used in the training network with a learning rate of 0.0004 and beta of (0.5, 0.999). The training loss function includes the classification cross entropy and the maximum loss of clustering, and the weight of the maximum loss is 0.3.

[0141] 7: Open set recognition, specifically:

[0142] First, openness is introduced to describe the difficulty of open set recognition under different experimental conditions, which is expressed as:

[0143] (twenty four)

[0144] in Indicates the number of classes that will appear in training; Indicates the number of classes that will appear in the test. The larger the openness value, the more difficult it is to identify the open set.

[0145] Five categories of individuals were selected from the data set as unknown samples, which were confused with the original training set and used as test sets for open set recognition, with 10 samples in each category. In order to ensure the rationality of the experiment, in each batch of test sets, the training samples and unknown samples were different samples of the same type.

[0146] In open set recognition, comparisons were made with a variety of commonly used open set recognition methods, specifically: the SoftMax method based on threshold setting; the OpenMax method based on centroid distance extreme value fitting; the ResNet18 network recognition method under the self-attention mechanism based on maximum loss without combining reconstruction loss; the self-attention ResNet18 network based on maximum loss combined with reconstruction loss, which is the method proposed in the present invention.

[0147] The open set recognition method proposed in the present invention first inputs the time-frequency sample into the generative adversarial network to obtain the output result after the sample passes through the encoder and decoder. The original time-frequency sample and the time-frequency sample obtained after decoding are respectively input into the discriminator, and the output difference of the discriminator is calculated to obtain the reconstruction error of the image before and after the reconstruction of the generative adversarial network. The upper and lower limits of the reconstruction judgment threshold are set. If the error is greater than the upper limit of the threshold or the error is less than the lower limit of the threshold, the sample is identified as an unknown sample; otherwise, it means that the sample has a large similarity with the training sample. The time-frequency sample is input into the self-attention ResNet18 network based on the maximum loss to obtain the classification result, thereby realizing the recognition of open and closed set targets.

[0148] The open set recognition results are shown in Table 4:

[0149] Table 4 Open set recognition results

[0150]

[0151] The recognition confusion matrix under each openness is as follows Figure 7 , Figure 8 , Fig. 9 , Fig.10 and Fig.11In summary, it can be seen that without much loss in closed set classification, the open set classification method obtains better open set classification performance of radiation source individuals and can realize the classification of unknown classes.

[0152] The above is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any simple modification, change and equivalent change made to the above embodiment according to the technical essence of the invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A method for identifying individual open sets of small sample radiation sources based on generative adversarial networks, characterized in that: The following steps are involved: Step 1: Obtain the time series data of different radiation source individuals, convert the time series data into time-frequency graphs, and construct a time-frequency graph dataset from the time-frequency graphs; Step 2: Normalize the RGB channels of the time-frequency graph and then input it into the generative adversarial network consisting of the encoder, decoder, and discriminator for reconstruction training until convergence; Step 3: Use the trained adversarial network to generate known samples and unknown samples; the specific process is as follows: The known samples are generated by randomly selecting a time-frequency graph, multiplying it by a random weight factor in a preset range, and inputting it into the trained generative adversarial network. The encoder and decoder are used to generate and reconstruct the known samples until the generated samples are expanded to the required number. There are two ways to generate unknown samples: One is to split two different types of time-frequency images horizontally at the same time, take the upper and lower parts of the two images respectively, and splice them into a complete time-frequency image; the two different types of time-frequency images are split vertically at the same time, take the left and right parts of the two images respectively, and splice them into a complete time-frequency image; Second, the time-frequency graph of four different classes of samples is obtained by outputting the feature vectors of the encoder, calculating the mean and variance of the four feature vectors respectively, and performing weighted superposition of four Gaussian noises that meet the corresponding mean and variance, inputting them into the decoder, and reconstructing them into samples of unknown classes; Step 4: Add known samples and unknown samples to the time-frequency graph dataset for expansion, and use the known samples to fine-tune the generative adversarial network; Step 5: Input the expanded time-frequency graph dataset into the maximum loss-based self-attention ResNet18 network, and combine the reconstruction loss of the input and output of the generative adversarial network to realize the open set recognition of the radiation source; The known samples are classified as the first N samples, and the unknown samples are classified as the N+1 samples. The open set recognition problem is converted into a pseudo-closed set problem. The expanded time-frequency graph dataset is input into the self-attention ResNet18 network based on the maximum loss for training. The training loss includes two parts: cross entropy classification loss and maximum loss, which respectively realize the functions of label sample matching and intra-class feature clustering and feature alienation of different classes. In the recognition stage, the time-frequency graph is first input into the generative adversarial network to obtain the output result of the sample after passing through the encoder and decoder; the original time-frequency graph and the time-frequency sample obtained after decoding are respectively input into the discriminator, and the output difference of the discriminator is calculated to obtain the reconstruction error of the image before and after reconstruction by the generative adversarial network; the upper and lower limits of the reconstruction judgment threshold are set. If the error is greater than the upper limit of the threshold or the error is less than the lower limit of the threshold, the sample is identified as an unknown sample; otherwise, the time-frequency sample is input into the self-attention ResNet18 network based on maximum loss to obtain the classification result, thereby realizing the recognition of open and closed set targets.

2. According to the method for individual open set identification of small sample radiation sources based on generative adversarial network in claim 1, it is characterized in that: The conversion of the time series data into a time-frequency diagram is specifically implemented as follows: the time series data is converted into a time-frequency diagram using a short-time Fourier transform; the short-time Fourier transform uses a Hanning window.

3. The method for identifying individual open sets of small sample radiation sources based on generative adversarial networks according to claim 2 is characterized in that: The specific implementation process of the generative adversarial network is as follows: The basic unit of the encoder is composed of a cascade of spectrally normalized convolutional layers and LeakyReLU layers; the basic unit of the decoder is composed of a cascade of spectrally normalized deconvolutional layers, batch normalization layers, and ReLU layers; the basic unit of the discriminator is composed of a cascade of spectrally normalized convolutional layers and LeakyReLU layers, and the gradient penalty strategy is used during training; A self-attention layer is added after the last two basic units of the encoder and the discriminator, and a self-attention layer is added after the second and third basic units of the decoder; the encoder compresses the time-frequency image into a one-dimensional vector; the discriminator network structure is based on the encoder, and uses two fully connected layers to connect with the last self-attention layer respectively, and maps the features output by the self-attention layer into one-dimensional vectors with a length of 1 and a length of N for loss calculation.

4. The method for identifying individual open sets of small sample radiation sources based on generative adversarial networks according to claim 3 is characterized in that: The generative adversarial network training loss includes four parts: pixel-level loss before and after time-frequency image reconstruction, feature-level loss of features extracted by VGG19 pre-training model before and after time-frequency image reconstruction, supervised adversarial loss of discriminator to determine whether the reconstructed image is true, and cross-entropy classification loss of discriminator to judge sample classification results.

5. The open set identification method for individual radiation sources with small samples based on generative adversarial networks according to claim 4 is characterized in that: The step 3 also includes: after the unknown sample expansion is completed, the sample is cleaned, that is, the generated unknown sample is input into the generative adversarial network to obtain the reconstructed sample, the original unknown sample and the reconstructed sample are respectively input into the discriminator, the output difference of the discriminator is obtained as the reconstruction loss, and then the sample that does not match the reconstruction loss is reconstructed.

Citation Information

Patent Citations

  • Zero sample image classification method based on combination of variational autocoder and adversarial network

    CN108875818A

  • Radar radiation source signal classification and identification method adopting ICGAN and ResNet networks

    CN112966544A

  • Radiation source open set identification method and device based on auto-encoder and contrast learning

    CN118468123A