Disclosure of Invention
The invention aims to provide a sky wave radar sea clutter semi-supervised classification model construction method for improving and generating an anti-network, so as to solve the problems of reducing the cost of adding labels to sea clutter samples and improving the classification precision of the sea clutter samples.
The invention adopts the following technical scheme:
the embodiment of the invention provides a method for constructing a sky wave radar ground sea clutter semi-supervised classification model for improving and generating a countermeasure network, which is characterized by comprising the following steps:
inputting training samples of the ground-sea clutter into a semi-supervised classification model for training, wherein the training samples comprise label samples, label-free samples and generating samples, and the semi-supervised generation countermeasure network comprises a discriminator and a generator;
calculating a first countermeasure loss of the discriminator according to the information entropy of the labeled sample output by the discriminator, wherein the first countermeasure loss represents the full supervision loss of the discriminator;
calculating a second countermeasure loss of the discriminator according to the information entropy of the output unlabeled sample of the discriminator and the information entropy of the generated sample, wherein the second countermeasure loss represents the semi-supervised loss of the discriminator;
calculating combined characteristic loss according to the generated sample characteristics and the label-free sample characteristics in the multilayer network in the discriminator;
weighting the second confrontation loss and the joint characteristic loss to generate a weighted loss of the generator;
and determining the semi-supervised classification model meeting the preset classification precision by repeatedly training the semi-supervised classification model and updating the classification weight of the discriminator based on the first countermeasure loss, the second countermeasure loss and the weighted loss.
Optionally, the first countermeasure loss is calculated as follows:
wherein p is
D The entropy of the labeled sample output by the discriminator, y is a sample label, K represents the K-th sample space, x is a sample feature,
representing expected operators of labeled exemplars, L
supervised Is the first to combat the loss.
Optionally, the second countermeasure loss is calculated as follows:
wherein, log [1-p ]
D (y=K+1|x)]Entropy of information of sample features in the K +1 th sample space in the unlabeled sample, logp, output by the discriminator
D (y = K +1 luminance x) is the entropy of information of the sample feature in the K +1 th sample space of the generated sample output by the discriminator,
for the desired operator of an unlabeled sample, ->
To generate the desired operator for the labeled sample, L
unsupervised Is the second to combat the loss.
Optionally, the calculating the joint feature loss according to the generated sample features and the unlabeled sample features in the multi-layer network in the discriminator comprises:
extracting label-free sample characteristics and generated sample characteristics in each layer of the network from the middle layer network with the preset layer number of the discriminator;
solving the Euclidean distance between the label-free sample characteristics and the generated sample characteristics in each layer of network to obtain the characteristic matching loss of each layer of network;
and carrying out weighted summation on the feature matching loss of each layer of the network to obtain the combined feature matching loss.
Optionally, the joint feature matching loss is calculated as follows:
wherein l
max To represent the sum of the intermediate network of discriminators, l
mul Indicates a selected predetermined number of layers, and
Ch
(l) the number of channels, le, corresponding to the sample feature of the l-th layer
(l) Is the length of the characteristic of the sample,
for feature matching penalty in each tier network>
Generating an expectation of a sample characteristic for the l-th layer>
Expectation of the characteristics of the unlabeled sample of the L-th layer, L
FM The loss is matched for the joint features.
Optionally, the weighting loss is calculated as follows:
L WL-SSGAN =α(-L unsupervised )+βL FM ,
wherein α is a first constant, β is a second constant, L FM For joint feature matching loss, L WL-SSGAN Is a weighted loss.
Optionally, the method further comprises: when only the label sample is used as the input of the semi-supervised classification model, only the discriminator works, and the loss of the discriminator is the sum of the first pair of the anti-loss and the second pair of the anti-loss.
Optionally, the method further comprises: when the labeled sample and the unlabeled sample are input as the semi-supervised classification model, the discriminator and the generator both work, and at the moment, the generated sample is output by adding random noise in the generator.
Optionally, the LeakyReLU activation function is linked to the back of the first convolutional layer of the discriminator, as well as to the back of all convolutional layers.
Optionally, the first convolutional layer of the generator is followed by a ReLU activation function and the last deconvolution layer is followed by a Tanh activation function.
The invention has the beneficial effects that: and screening out the characteristics in the multilayer network by using the intermediate layer network of the discriminator in the semi-supervised generation countermeasure network, and weighting the characteristic matching loss of each layer to obtain the combined characteristic matching loss. Further, the standard confrontation loss and the joint feature matching loss are linearly weighted to obtain a weighted loss. And designing a ground sea clutter classification model WL-SSGAN based on the standard countermeasure loss, the joint characteristic loss and the weighted loss, wherein the ground sea clutter classification model is used for generating a countermeasure network based on improvement. When the input of the WL-SSGAN contains only the tag samples, it is considered as a ground-sea clutter fully supervised classification model that generates a countermeasure network based on the improvement. When the input of the WL-SSGAN contains both label samples and non-label samples, the input is regarded as a sea clutter semi-supervised classification model for generating an antagonistic network based on improvement; on one hand, the characteristics which are beneficial to improving the classification performance of the classifier are extracted from different layer networks of the discriminator, and the weighting loss for weighting the standard countermeasure loss and the combined characteristic matching loss of the multilayer network is calculated, so that the classification performance of the classification model based on the weighting loss is higher compared with the traditional method of simply using the countermeasure loss or the characteristic matching loss of a single layer network; on the other hand, the discriminator and the classifier can be started simultaneously for samples with strong distribution randomness, and the discriminator can extract useful features from non-label samples to generate samples, so that the distribution of the generated samples is the same as that of the initial samples, manual label adding is avoided, the cost of adding labels is saved, and the sorting efficiency is improved.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
The embodiment of the invention provides a method for constructing a sky wave radar ground sea clutter semi-supervised classification model for improving and generating a countermeasure network, which is characterized by comprising the following steps:
step S101, inputting training samples of the ground sea clutter into a semi-supervised classification model for training, wherein the training samples comprise label samples, label-free samples and generating samples, and the semi-supervised generation countermeasure network comprises a discriminator and a generator;
in one embodiment, a training sample set is first established before training the semi-supervised classification model. It should be noted that, after the training of the classification model is finished, the classification performance of the classification model is tested by using the test sample, and therefore, a test sample set needs to be established at the same time.
Specifically, the source of the ground-sea clutter data set is the echo power spectrum of the sky-wave radar target or clutter. The sky wave radar sends out electromagnetic wave signals by a transmitter, the electromagnetic wave signals are refracted to the surface of the ground sea by an ionosphere, and echo signals of targets or clutter return to a receiver along an original path to form the ground sea clutter. And (3) screening and calibrating distance-azimuth unit sea clutter samples meeting the project requirements from a sky wave radar sea clutter distance-Doppler spectrum database, wherein the distance-azimuth unit sea clutter samples comprise sea clutter samples, ground clutter samples and sea boundary clutter samples. The distance-azimuth unit sea clutter samples meet the requirement of project and are symmetrically double peaks at zero frequency, the ground clutter samples are single peaks near the zero frequency, and the sea boundary clutter samples are triple peaks near the zero frequency. Then dividing the ground sea clutter sample into a training set and a testing set;
for example, the total amount of the sea clutter, ground clutter, and ground-sea boundary clutter samples is 1000, wherein the training sample amount is 700 (accounting for 70%) and the testing sample amount is 300 (accounting for 30%). The training samples are randomly divided into two parts, wherein one part is a small number of samples with labels, and the label information is effective; the other part is a large amount of unlabeled samples, and the label information of the unlabeled samples is negligible. Furthermore, the test samples are only used to evaluate the performance of the WL-SSGAN and do not participate in any training process, only the semi-supervised classification model is trained by the training samples.
Step S102, calculating a first countermeasure loss of the discriminator according to the information entropy of the output labeled sample of the discriminator, wherein the first countermeasure loss represents the full supervision loss of the discriminator;
step S103, calculating a second countermeasure loss of the discriminator according to the information entropy of the output unlabeled sample of the discriminator and the information entropy of the generated sample, wherein the second countermeasure loss represents the semi-supervised loss of the discriminator;
in one embodiment, when the training samples only contain labeled samples and unlabeled samples, the model consists of a semi-supervised generation countermeasure network SSGAN, in which only the discriminators are active and the loss function regularization form consists of two parts, namely a supervised loss and a semi-supervised loss:
L SSGAN =L supervised +L unsupervised ,
wherein, the first confrontation loss is the full supervision loss, and the calculation mode is as follows:
wherein p is
D The entropy of the labeled sample output by the discriminator, y is a sample label, K represents the K-th sample space, x is a sample feature,
representing expected operators of labeled exemplars, L
supervised Is the first to combat the loss.
The second confrontation loss is a semi-supervised loss, and is calculated as follows:
wherein, log [1-p ]
D (y=K+1|x)]Entropy of information of sample features in the K +1 th sample space in the unlabeled sample, logp, output by the discriminator
D (y = K +1 luminance x) is the entropy of information of the sample feature in the K +1 th sample space of the generated sample output by the discriminator,
for the desired operator of an unlabeled sample, ->
To generate the desired operator for the labeled sample, L
unsupervised Is the second to combat the loss.
Step S104, calculating the loss of the joint features according to the generated sample features and the label-free sample features in the multilayer network in the discriminator;
in one embodiment, optionally, calculating the joint feature loss from the generated sample features and the unlabeled sample features in the multi-layer network in the discriminator comprises:
extracting label-free sample characteristics and generated sample characteristics in each layer of the network from the middle layer network with the preset layer number of the discriminator;
solving the Euclidean distance between the label-free sample characteristics and the generated sample characteristics in each layer of network to obtain the characteristic matching loss of each layer of network;
and carrying out weighted summation on the feature matching loss of each layer of the network to obtain the combined feature matching loss.
Specifically, a network set with a preset number of layers is screened from an intermediate network of the discriminator, the label-free sample features and the generated sample features are extracted from each layer of the network, and the feature matching loss of each layer of the network is obtained according to the Euclidean distance for calculating the label-free sample features and the generated sample features in each layer of the network:
wherein,
generating a desire for a sample characteristic for layer l>
For the expectation of a no-label sample characteristic of layer I>
Loss of feature matching for the l-th network.
Further, the number of channels corresponding to the joint generation sample and the label-free sample and the length of the sample feature are combined
And performing joint feature matching loss calculation in the following way:
wherein l
max To represent the sum of the intermediate-layer networks of the discriminators, l
mul Indicates a selected predetermined number of layers, and
Ch
(l) is the same as the first layerNumber of channels, le, corresponding to this characteristic
(l) Is the length of the characteristic of the sample,
for feature matching penalty in each tier network>
Generating an expectation of a sample characteristic for the l-th layer>
Expectation of the characteristics of the unlabeled sample of the L-th layer, L
FM The loss is matched for the joint features.
Step S105, weighting the second confrontation loss and the joint characteristic loss to generate a weighted loss of a generator;
in an embodiment, it should be noted that, when the training samples input in the semi-supervised model include both labeled samples and unlabeled samples, the arbiter and the generator in the model both function, and the loss of the generator is a weighted loss, which is calculated as follows:
L WL-SSGAN =α(-L unsupervised )+βL FM ,
wherein α is a first constant, β is a second constant, L FM For joint feature matching loss, L WL-SSGAN For weighting the loss, L unsupervised Is the second to combat the loss.
The values α and β may be set according to actual conditions, and α + β =1, α, β ≧ 0. The specific weight of the weighting factors α and β can be controlled to balance the degree to which the countervailing loss and the feature matching loss contribute to the WL-SSGAN training. In addition to this, l can be controlled
mul The different layers are feature weighted to measure in addition the impact of different signal feature combinations on the performance of the WL-SSGAN classification. In the present embodiment, to improve the generalization capability of the WL-SSGAN model, the signal features extracted from a single layer are not directly used
As the feature matching loss, the multi-layer signals are weighted to obtain the combined feature matching loss L
FM In order to obtain better semi-supervised classification performance.
And S106, repeatedly training the semi-supervised classification model, updating the classification weight of the discriminator based on the first countermeasure loss, the second countermeasure loss and the weighted loss, and determining the semi-supervised classification model meeting the preset classification precision.
In one embodiment, the semi-supervised model is trained for multiple times by adopting a training sample, the classification weight of the classifier is updated by back propagation of the first countermeasure loss, the second countermeasure loss and the weighted loss at the current training time, the classification type and the probability are finally output, the classification precision of the classifier is guided to meet the preset classification precision, and the final semi-supervised classification model is obtained.
With reference to fig. 2, the implementation of the above steps S101 to S106 is described as follows:
the training set sample sizes for the first through ten sets are respectively as follows:
(1) The amount of labeled sample was 15. The amount of the labeled sea clutter samples is 5, the amount of the labeled ground clutter samples is 5, and the amount of the labeled ground-sea boundary clutter samples is 5. The amount of unlabeled sample was 2085. The amount of the unlabeled sea clutter samples is 695, the amount of the unlabeled ground clutter samples is 695, and the amount of the unlabeled ground sea boundary clutter samples is 695;
(2) The amount of labeled sample was 30. The amount of the labeled sea clutter samples is 10, the amount of the labeled ground clutter samples is 10, and the amount of the labeled ground-sea boundary clutter samples is 10. The unlabeled exemplar size is 2070. The amount of the unlabeled sea clutter samples is 690, the amount of the unlabeled ground clutter samples is 690, and the amount of the unlabeled ground sea boundary clutter samples is 690;
(3) The amount of labeled sample was 45. The amount of the labeled sea clutter samples is 15, the amount of the labeled ground clutter samples is 15, and the amount of the labeled ground-sea boundary clutter samples is 15. The amount of unlabeled sample was 2055. Wherein the unlabeled sea clutter sample size is 685, the unlabeled ground clutter sample size is 685, and the unlabeled ground sea boundary clutter sample size is 685; c. C
(4) The amount of labeled sample was 60. The amount of the labeled sea clutter samples is 20, the amount of the labeled ground clutter samples is 20, and the amount of the labeled ground-sea boundary clutter samples is 20. The unlabeled sample size was 2040. The amount of the unlabeled sea clutter samples is 680, the amount of the unlabeled ground clutter samples is 680, and the amount of the unlabeled ground sea boundary clutter samples is 680;
(5) The amount of labeled sample was 75. The amount of the labeled sea clutter samples is 25, the amount of the labeled ground clutter samples is 25, and the amount of the labeled ground-sea boundary clutter samples is 25. The unlabeled sample size was 2025. Wherein the unlabeled sea clutter sample size is 675, the unlabeled ground clutter sample size is 675, and the unlabeled ground sea boundary clutter sample size is 675;
(6) The labeled sample size was 90. The amount of the labeled sea clutter samples is 30, the amount of the labeled ground clutter samples is 30, and the amount of the labeled ground-sea boundary clutter samples is 30. The unlabeled sample size is 2010. The amount of the unlabeled sea clutter samples is 670, the amount of the unlabeled ground clutter samples is 670, and the amount of the unlabeled ground sea boundary clutter samples is 670;
(7) The amount of labeled sample was 105. The amount of the labeled sea clutter samples is 35, the amount of the labeled ground clutter samples is 35, and the amount of the labeled ground-sea boundary clutter samples is 35. The unlabeled sample size was 1995. The amount of the unlabeled sea clutter samples is 665, the amount of the unlabeled ground clutter samples is 665, and the amount of the unlabeled ground sea boundary clutter samples is 665;
(8) The amount of labeled sample was 120. The amount of the labeled sea clutter samples is 40, the amount of the labeled ground clutter samples is 40, and the amount of the labeled ground-sea boundary clutter samples is 40. The unlabeled sample size was 1980. The amount of the unlabeled sea clutter samples is 660, the amount of the unlabeled ground clutter samples is 660, and the amount of the unlabeled ground sea boundary clutter samples is 660;
(9) The labeled sample size was 135. The amount of the labeled sea clutter samples is 45, the amount of the labeled ground clutter samples is 45, and the amount of the labeled ground-sea boundary clutter samples is 45. The unlabeled sample size was 1965. The amount of the unlabeled sea clutter samples is 655, the amount of the unlabeled ground clutter samples is 655, and the amount of the unlabeled ground sea boundary clutter samples is 655;
(10) The amount of labeled sample was 150. The amount of the labeled sea clutter samples is 50, the amount of the labeled ground clutter samples is 50, and the amount of the labeled ground-sea boundary clutter samples is 50. The amount of unlabeled specimen was 1950. The amount of the unlabeled sea clutter samples is 650, the amount of the unlabeled ground clutter samples is 650, and the amount of the unlabeled ground sea boundary clutter samples is 650.
When only the label sample is used as the input of the semi-supervised classification model, only the discriminator works, and the loss of the discriminator is the sum of the first pair of the anti-loss and the second pair of the anti-loss.
At this time, the discriminator loss L of WL-SSGAN D Loss of SSGAN as standard:
L D =L supervised +L unsupervised ,
wherein L is supervised To combat the loss, L unsupervised Is the second to combat the loss.
When the labeled sample and the unlabeled sample are input as the semi-supervised classification model, both the discriminator and the generator work, at the moment, the useful sample characteristics are extracted from the unlabeled sample by adding random noise in the generator, the generated sample is output, and what needs to be explained is that the labeled sample is obtained through manual labeling.
At this point, the producer loss of WL-SSGAN is the proposed weighted loss L WL-SSGAN :
L WL-SSGAN =αL adv +βL FM =α(-L unsupervised )+βL FM
Wherein, alpha + beta =1, alpha, beta is more than or equal to 0.
The feature matching loss of the single-layer network is as follows:
the joint feature matching loss function is then as follows:
to facilitate understanding of L WL-SSGAN By substitution of L with D (x) unsupervis 1-p in (1) D (y = K +1 luminance x), thus L unsupervis Conversion to standard GAN loss form:
further, L WL-SSGAN Can be rewritten as the following more detailed representation:
based on the established ground-sea clutter training set containing a small number of labeled samples and a large number of unlabeled samples, according to the loss part L of the discriminator D Sum generator loss section L supervised And alternately updating the parameters of the constructed ground-sea clutter semi-supervised classification model based on the improvement generation countermeasure network, and performing semi-supervised learning.
And testing the classification performance of the trained ground sea clutter full-supervised classification model according to the test set.
Optionally, the LeakyReLU activation function is linked to the back of the first convolutional layer of the discriminator, as well as to the back of all convolutional layers.
In one embodiment, the discriminator contains seven 1-dimensional convolutional layers and two fully-connected layers, where all convolutional kernels have a size of 4 and step size of 2. The first convolutional layer is connected with an LeakyReLU activation function at the back, all convolutional layers are connected with a 1-dimensional batch normalization and a LeakyReLU activation function at the back, and the first fully-connected layer is connected with a LeakyReLU activation function at the back. In addition to this, all convolutional layers are followed by a residual block and a LeakyReLU activation function. The input of the discriminator is a1 × 512-dimensional signal, and the output is a 3-dimensional classification result.
Optionally, the first convolutional layer of the generator is followed by a ReLU activation function and the last deconvolution layer is followed by a Tanh activation function.
In one embodiment, the generator contains eight 1-dimensional deconvolution layers, with all convolution kernels having a size of 4, a first layer step size of 1 and the remainder of 2. The first seven deconvolution layers are connected with 1-dimensional batch normalization and ReLU activation functions at the back, and the last deconvolution layer is connected with a Tanh activation function at the back. In addition, the first seven deconvolution layers are all followed by a residual block and a ReLU activation function. The input of the generator is 100-dimensional Gaussian distribution random noise, and the output is 1 × 512 signals.
Based on the sky wave radar sea clutter semi-supervised classification model for improving and generating the countermeasure network, the WL-SSGAN semi-supervised classification performance test is carried out.
In the experiment of the present embodiment, the experimental environment and corresponding version number for training the WL-SSGAN model are: system: windows10 (64-bit), GPU: NVIDIAGeForce RTX 3090, CUDA:11.6, python:3.9.0 (in Anaconda 4.11.0), torch:1.11.0, torchvision:0.12.0, numpy:1.22.3.
The parameters for training the WL-SSGAN are configured as: batch size 64, learning Rate 0.0001, leakyReLU 0.2, adma Optimizer beta1-0.5, beta2-0.999, data Normalization-1, weight Initialization.
To evaluate the performance of WL-SSGAN, let the number of labeled samples γ in the training set be: 15,30,45,60,75,90,105,120,135,150, the remainder being the corresponding number of unlabeled specimens. Next, the number of labeled samples γ, the specific gravities of α and β, l are considered mui The impact of these three factors on the performance of the WL-SSGAN classification. In contrast to the WL-SSGAN fully supervised classifier trained with only a small number of labeled samples.
First, assume that all intermediate layers of the arbiter contribute to the loss of the generator, i.e./ mui And (4) = {1,2,3,4,5,6,7}, so that the influence of different specific gravity of alpha and beta on the WL-SSGAN classification performance is measured by fixing a combined feature matching loss function. The results of the experiment are shown in table 1. Wherein base represents the classification accuracy of the WL-SSGAN fully supervised classifier trained with only a small number of labeled samples.
TABLE 1 Classification accuracy of WL-SSGAN under different values of alpha and beta
From table 1, the following conclusions can be drawn: (1) The classification performance of WL-SSGAN is all higher than that of the fully supervised classifier, which indicates that the model can extract potential features related to classification of ground sea clutter from a large number of unlabeled samples by adding a generator. Therefore, the WL-SSGAN can improve the classification performance of the fully supervised model when only a few labeled samples exist. (2) The WL-SSGAN classification performance is improved more obviously along with the reduction of the sample size gamma of the sea clutter on the ground. This is because the fully supervised classifier tends to get stuck in overfitting when the training sample size is small. (3) When joint feature matching loses L FM Number of layers l mul The different specific gravities of alpha and beta at fixation are obviously influential on the classification accuracy, and only the antagonistic loss L is utilized adv Or joint feature matching penalty L FM That is, (α, β) = (1.0,0.0) or (α, β) = (0.0,1.0), the classification accuracy obtained is not the highest. Thus, the proposed weighting loss function L WL-SSGAN Is superior to L adv And L FM 。
Second, assume that the penalty on immunity and the combined feature matching penalty have the same contribution to the penalty on the generator, i.e., (α, β) = (0.5). The contribution of the fixed countermeasure loss and the feature matching loss to WL-SSGAN is used as a measure of l mul The impact of different choices of WL-SSGAN classification performance. The results of the experiment are shown in table 2.
TABLE 2l mul Classification precision of WL-SSGAN under different values
From table 2, the following conclusions can be drawn: while resisting the loss L
adv And joint feature matching penalty L
FM When the contributions of alpha and beta are fixed, l
mul Is obviously influential on classification accuracy and exploits the feature matching penalty of only a single layer
Or a joint feature matching penalty comprising all layers, i.e. /)
mul =1 or l
mul The classification accuracy obtained when = {1-7} is not the highest. This indicates that: (1) Proposed joint feature matching penalty L
FM Loss of feature matching over conventional>
(2) Not all of the intermediate layer features of the joint discriminators can provide the best semi-supervised classification performance. Conversely, some layers of extracted features may inhibit classification performance. Therefore, the optimal classification performance depends on the appropriate combination of the number of layers. Therefore, the proposed WL-SSGAN can realize the semi-supervised classification of the sea clutter, and the proposed weighting loss is superior to the countermeasure loss and the feature matching loss.
As shown in fig. 3, it can be seen that the sea clutter samples are sky wave radar echo signals, and the data distribution thereof has strong randomness, so that it is extremely difficult to train the SSGAN generator using the standard loss-fighting method. In contrast, the improved semi-supervised classification method for generating the sea clutter of the countermeasure network, namely WL-SSGAN, provided by the invention can utilize the randomness to enable the feature matching loss to capture diversified sample features, as shown in FIGS. 4-6, so that the mode collapse of the generator and the overfitting of the discriminator are relieved to a certain extent. Therefore, the middle layer of the SSGAN discriminator of the semi-supervised generation countermeasure network is weighted by features, and the loss of joint feature matching is proposed. Further, the WL-SSGAN weighted loss is proposed by linearly weighting the standard antagonistic loss with the joint feature matching loss. Semi-supervised classification of the sample of the sea clutter is realized, and the proposed weighting loss is superior to the individual countermeasure loss or the feature matching loss.