SAR image anti-backdoor classification method and system based on backdoor feature extraction optimization

The particle swarm optimization algorithm is used to build a SAR image anti-backdoor classification model, which solves the robustness and lightweight problems of the SAR image classification model under backdoor attacks, and achieves a high-precision and strong robust SAR image classification model, which is suitable for edge applications. Computing scenarios.

CN118587553AActive Publication Date: 2024-09-03JINAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410623748.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2024-09-03
Estimated Expiration
2044-05-20

AI Technical Summary

Technical Problem

Existing SAR image classification models have poor robustness in the face of backdoor attacks, and it is difficult to balance high classification accuracy, lightweight and model performance. Especially in edge computing scenarios, hardware resources are limited, resulting in complex model structures and difficulty in flexibly converting classification scenarios. , and lacks effective backdoor defense technology.

Method used

Using a method based on backdoor feature extraction and optimization, the particle swarm optimization algorithm is used to construct a SAR image anti-backdoor classification model. Offline and online data sets are combined to optimize the model architecture and parameters to generate a model that takes into account lightweight model, high accuracy and strong backdoor robustness. Deep neural network model.

Benefits of technology

It achieves the compromise optimization of multiple performance indicators in the SAR image classification system, improves the classification accuracy and backdoor robustness of the model, and reduces the number of model parameters, making it suitable for lightweight deployment in edge computing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587553A
    Figure CN118587553A
Patent Text Reader

Abstract

The invention discloses an SAR image anti-backdoor classification method and system based on backdoor feature extraction optimization, and the method comprises the steps: constructing a backdoor feature extraction sub-network and a classification sub-network based on network blocks, carrying out particle position and speed coding on a neural network architecture parameter, a backdoor feature selection parameter and a pruning position parameter of an SAR image anti-backdoor classification model composed of the two sub-networks, and taking the parameter quantity of the SAR image anti-backdoor classification model, the backdoor attack success rate and the classification precision of a normal sample as optimization targets; and designing an off-line optimization platform based on a three-target particle swarm optimization method, and obtaining an SAR image classification on-line deployment model with light weight, high precision and strong back door robustness. According to the method, the automatic optimization design of the SAR image anti-backdoor classification model is realized, the constructed backdoor feature extraction sub-network expands the processing mode of the backdoor features, and the model lightweight, the classification precision and the backdoor robustness are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automatic deep learning technology with optimal comprehensive performance such as model lightweight, high classification accuracy and strong backdoor robustness in the field of information security of synthetic aperture radar image classification models, and in particular to a SAR image anti-backdoor classification method and system based on backdoor feature extraction optimization. Background Art

[0002] Synthetic Aperture Radar (SAR) systems are not affected by weather factors and can provide high-resolution monitoring images of target areas at any time. They have been widely used in battlefield surveillance, fire control, guidance, navigation, resource surveying, mapping, ocean surveillance, environmental remote sensing and other fields. When SAR image classification models in these fields are misclassified or maliciously attacked, they are likely to provide wrong information for the judgment and decision-making of relevant national agencies or departments, leading to catastrophic consequences. Therefore, in these fields involving important national strategic deployments, the classification accuracy and model robustness of SAR image classification models are very important. At the same time, in the face of some edge computing scenarios with limited hardware resources, it is often difficult to achieve a good balance between model lightweight and model performance. Therefore, in the face of more and more SAR application deployment requirements and national strategic security requirements, a SAR image classification system that takes into account high classification accuracy, strong robustness and lightweight is urgently needed.

[0003] In the field of SAR image classification, the deep learning technology that has emerged in recent years has brought new solutions and application prospects to the SAR image classification problem. However, the threat of backdoor attacks has also become a new challenge in the research of SAR image classification, which has seriously affected the application and promotion of SAR image classification models. Backdoor attacks embed backdoors into the model during the training phase, and make the model make the predicted classification results expected by the attacker during the application phase, which seriously threatens the security of the SAR image classification model, and its attack method is very hidden. The backdoor embedded by the backdoor attack usually does not interfere with the classification results of normal samples, which makes it difficult for users to find that the model has been embedded with a backdoor. At the same time, in the research of SAR image classification models, the current model architecture is based on the classic image classification model, which is manually designed and fine-tuned by experts based on experience, and requires more time cost for model trial and error. This leads to the existing SAR image classification models often having complex structures, poor robustness, and difficulty in flexibly converting classification scenes. Although the existing automatic deep learning technology can solve this problem to a certain extent, the characteristics of SAR images themselves, such as large size, physical occlusion, image speckle noise, and imbalanced data sets, increase the difficulty of directly applying traditional automatic machine learning technology to SAR image classification problems. Therefore, the neural architecture search and hyperparameter optimization of SAR image classification models that take into account the characteristics of SAR images while achieving high classification accuracy, robustness to backdoor attacks, and lightweight are still technical challenges that need to be urgently solved in the field of SAR image classification.

[0004] In the existing technology research, backdoor attack technology for SAR image classification models has been reported, but backdoor defense technology for SAR image classification models has not been reported; and the existing automatic deep learning technology for SAR image classification models has not yet involved multi-objective parallel optimization of backdoor defense performance indicators and model lightweight and classification accuracy. Therefore, in view of the engineering requirements of SAR image classification application scenarios for the best comprehensive performance such as model lightweight, high classification accuracy and strong backdoor robustness, automatic deep learning technology for comprehensive model neural architecture search, hyperparameter optimization and multi-feature loss function optimization is urgently needed. Summary of the invention

[0005] The purpose of the present invention is to provide a SAR image anti-backdoor classification method and system based on backdoor feature extraction optimization in view of the deficiencies in the prior art.

[0006] The objective of the present invention is achieved through the following technical solutions: A first aspect of an embodiment of the present invention provides a SAR image anti-backdoor classification method based on backdoor feature extraction optimization, comprising the following steps:

[0007] S1: Construct offline poisoning training dataset, offline poisoning verification dataset and offline normal verification dataset based on the historical database of the SAR system;

[0008] S2: setting a plurality of first parameters to construct an optimization target of a SAR image anti-backdoor classification model;

[0009] S3: According to the first parameter, the architecture of the SAR image anti-backdoor classification model, the backdoor feature extraction position and the pruning position are discretely encoded as particle positions and real number encoded as particle velocities, and an initial particle group Q is generated;

[0010] S4: Record the optimization rounds, calculate the fitness of all particles in Q based on the offline poisoning training data set, offline poisoning verification data set, and offline normal verification data set, and perform fast non-dominated sorting;

[0011] S5: Update the dominant particle repository, calculate the global optimal particle, update the particle position and velocity, calculate the local optimal particle, and generate the next generation particle swarm Q new ;

[0012] S6: Determine whether the optimization round is equal to the maximum optimization round. If the optimization round is equal to the maximum optimization round, perform a comprehensive fitness evaluation operation on the particles in the dominant particle storage library to calculate the optimal particle; otherwise, increase the recorded optimization round by 1 and set Q new Update to Q, and repeat steps S4 to S5;

[0013] S7: Online deployment of SAR image anti-backdoor classification model based on the encoding information of optimal particles;

[0014] S8: Based on the real-time database of the SAR system, an online detection normal data set and an online detection poisoning data set are constructed to calculate the normal sample classification accuracy and backdoor attack success rate of the online deployed model.

[0015] Furthermore, the offline poisoning training data set, offline poisoning verification data set and offline normal verification data set are constructed based on the historical database of the SAR system, specifically including:

[0016]

[0017] First, the SAR image data in the internal historical database of the SAR system is taken as the original data set and marked as O; then, the image data normalization operation is performed on O to obtain the normalized data set X; wherein, the image data normalization operation consists of a segmentation operation and a scaling operation; the segmentation operation divides the SAR image in the data set into regions. When the input SAR image contains multiple classified targets, it is segmented into multiple SAR images so that each SAR image contains only a single classified target. When the input SAR image contains only a single classified target, no operation is performed; the scaling operation resizes the SAR images in the data set so that the size of each image remains consistent; secondly, the image data normalization operation is performed on the normalized data set X using formula (1) to obtain the offline data set X o ; Then, X o Divide into offline training set X o_train and offline normal validation dataset X o_val ; Based on the poisoning rate λ, a backdoor attack strategy is randomly used to attack the offline training set X o_train The image data in the image is embedded with triggers, the backdoor attack strategy used at this time is recorded, and its classification label is set to 0 to obtain the offline poisoning training dataset X poison_train ; Use the same backdoor attack strategy to test the offline normal verification data set X o_val All image data in the trigger embedding, and set its classification label to 0 to obtain the offline poisoning verification dataset X poison_val .

[0018] Furthermore, the first parameters include: particle population size N, the lower limit of the number of starting analysis channels of the SAR image anti-backdoor classification model C low , the upper limit of the number of starting analysis channels of the SAR image anti-backdoor classification model C up , the lower limit of the number of shallow network blocks Sblock low , the upper limit of the number of shallow network blocks Sblock up , Shallow network block architecture parameter lower limit Synotype low , Shallow Network Block Architecture Parameter Upper Limit Sgenotype up , the lower limit of the number of middle-layer network blocks is Mblock low , the upper limit of the number of middle-layer network blocks Mblock up , the lower limit of the middle-level network block architecture parameter Mgenotype low , the upper limit of the parameters of the middle-level network block architecture Mgenotype up , the lower limit of the number of deep network blocks Dblock low , the upper limit of the number of deep network blocks Dblock up , Deep Network Block Architecture Parameter Lower Bound Dgenotypelow , Deep Network Block Architecture Parameter Upper Limit Dgenotype up , the lower limit of the backdoor feature selection parameter Backdoor low , Backdoor feature selection parameter upper limit Backdoor up , Pruning position parameter lower limit low , Pruning position parameter upper limit up , the number of pruning positions g, the number of backdoor model training rounds EP backdoor , clean model training round EP clean , training learning rate lr, particle swarm evolution weight w, acceleration factor c1, acceleration factor c2, dominating particle repository size N par , adaptive grid size N ad And the maximum optimization round E max ;

[0019] The optimization objectives of the SAR image anti-backdoor classification model include: an evaluation value f1 of the SAR image anti-backdoor classification model for normal sample classification accuracy, an evaluation value f2 of the backdoor attack success rate, and an evaluation value f3 of the number of parameters of the SAR image anti-backdoor classification model; wherein f1 and f2 are calculated according to formula (2) and formula (3) respectively, and f3 represents the number of parameters of the SAR image anti-backdoor classification model, which is obtained by directly counting the parameters of each layer of the SAR image anti-backdoor classification model and then performing a summation operation;

[0020]

[0021]

[0022] in, Represents the normal sample classification accuracy, represents the success rate of backdoor attack, which is calculated according to formula (4) and formula (5) respectively;

[0023]

[0024]

[0025] Among them, Num clean_right Represents the number of samples correctly classified in the offline normal verification data set, Num backdoor_right Represents the number of samples classified as the set label in the offline poisoning verification dataset, Num all Represents the total number of samples in the validation set.

[0026] Furthermore, according to the first parameter, the architecture of the SAR image anti-backdoor classification model, the backdoor feature extraction position and the pruning position are discretely encoded as particle positions and real number encoded as particle velocities, and an initial particle group Q is generated. The specific implementation process is:

[0027] The neural network architecture parameters, backdoor feature selection parameters and pruning position parameters of the SAR image anti-backdoor classification model are discretely encoded and used as the particle position encoding Indi p ; Use the random code with the same length as the particle position code as the particle velocity code Indi v ; The encoding form of each particle is Indi=[Indi p ,Indi v ],Indi p =[C,Sblock,Sgenotype,Mblock,Mgenotype,Dblock,Dgenotype,Backdoor,Pruning],Indi v =[C v ,Sblock v ,Sgenotype v ,Mblock v ,Mgenotype v ,Dblock v ,Dgenotype v ,Backdoor v ,Pruning v ];Indi p Indicates the position information of the particle in the particle population, where C, Sblock, Sgenotype, Mblock, Mgenotype, Dblock and Dgenotype together constitute the architecture parameters of the SAR image anti-backdoor classification model. Backdoor indicates the backdoor feature extraction position, and the SAR image anti-backdoor classification model is divided into a backdoor feature extraction subnetwork and a classification subnetwork. Pruning indicates the model position where the pruning operation occurs. v Represents the velocity information of the particle in the particle population, where C v ,Sblock v ,Sgenotype v ,Mblock v ,Mgenotype v ,Dblock v ,Dgenotype v ,Backdoor v and Pruning vThey are all random speed parameters, and their values ​​are between the maximum particle speed Indi vmax and the minimum particle velocity Indi vmin Between; Remember Indi pmax =[C max ,Sblock max ,Sgenotype max ,Mblock max ,Mgenotype max ,Dblock max ,Dgenotype max ,Backdoor max ,Pruning max ],Indi pmin =[C min ,Sblock min ,Sgenotype min ,Mblock min ,Mgenotype min ,Dblock min ,Dgenotype min ,Backdoor min ,Pruning min ],Indi vmax and Indi vmin Calculate according to formula (6) and formula (7);

[0028] Indi vmax =(Indi pmax -Indi pmin )×0.5 (6)

[0029] Indi vmin =-Indi vmax (7)

[0030] Encoding Indi at the particle position p In the model architecture parameters, C provides the number of initial processing channels for model feature analysis, Sblock provides the number of splicing of shallow network blocks, Mblock provides the number of splicing of middle network blocks, and Dblock provides the number of splicing of deep network blocks. The above four parameters are all single integers; Sgenotype, Mgenotype and Dgenotype are all network block codes of different depths, and their encoding forms are consistent, all of which are [(n1 1 ,n2 1 ,n3 1 ,n4 1 ,n5 1 ,n6 1 ,o11 ,o2 1 ,o3 1 ,o4 1 ,o5 1 ,o6 1 ),(n1 2 ,n2 2 ,n3 2 ,n4 2 ,n5 2 ,n6 2 ,o1 2 ,o2 2 ,o3 2 ,o4 2 ,o5 2 ,o6 2 ),...,(n1 s ,n2 s ,n3 s ,n4 s ,n5 s ,n6 s ,o1 s ,o2 s ,o3 s ,o4 s ,o5 s ,o6 s )], record (n1 i ,n2 i ,n3 i ,n4 i ,n5 i ,n6 i ,o1 i ,o2 i ,o3 i ,o4 i ,o5 i ,o6 i ) is the i-th network block, where 1≤i≤s, s is equal to the upper limit of the number of network blocks; for the i-th network block, n1 i ,n2 i ,n3 i ,n4 i ,n5 i ,n6 i Represents the six operation nodes of this network block, o1 i ,o2 i ,o3 i ,o4 i ,o5 i ,o6 i Represents the six specific operations of the network block, among which o1 i Represents n1 i Specific operation, o2 i Represents n2i The corresponding relationship between other operations and nodes can be deduced by analogy. j i is the specific operation of the jth operation node in the i-th network block, where 1≤j≤6, o j i The corresponding relationship with the specific operation is: when o j i =0, set to 0; when o j i =1, average pooling operation is performed; when o j i =2, the maximum pooling operation is performed; when o j i =3, a convolution operation with a convolution kernel size of 7×7 is performed; when o j i =4, a convolution operation with a convolution kernel size of 3×3 is performed; when o j i =5, a convolution operation with a convolution kernel size of 1×1 is performed; when o j i = 6, a double-layer depth-wise separable convolution operation with a convolution kernel size of 3×3 is performed; when o j i =7, a double-layer depth-wise separable convolution operation with a convolution kernel size of 5×5 is performed; when o j i = 8, a depth-separable convolution operation with a convolution kernel size of 3×3 is performed; when o j i = 9, a depth-wise separable convolution operation with a kernel size of 5×5 is performed; when o j i = 10, spatially separable convolution operations with kernel sizes of 1×3 and 3×1 are performed; when o j i = 11, spatially separable convolution operations with kernel sizes of 1×5 and 5×1 are performed; when o j i =12, no operation is performed;

[0031] The correspondence between the network block coding and the network block feature calculation process is as follows: States is the set of intermediate feature values ​​of the model architecture corresponding to the current network block coding, and its initial value is States = [s1], where s1 is the intermediate feature of the model transmitted to the current network block; according to the operation nodes and specific operations in the network block coding, the feature values ​​in States are selected for calculation, and the obtained intermediate features are added to States; finally, all the intermediate features in States that have not been selected for calculation are merged as the output of the model architecture corresponding to the current network block coding;

[0032] Indi p The correspondence between the model architecture parameters and the SAR image anti-backdoor classification model architecture is as follows: the initial processing channel number provided by C is set as the initial analysis channel number of the shallow network, and the corresponding number of network block codes are extracted from the Sgenotype code according to the number of shallow network blocks provided by the Sblock code to form a shallow network architecture; a network reduction layer is used to adjust the number of analysis channels to twice the current number of channels as the initial analysis channel number of the middle network; according to the number of middle network blocks provided by the Mblock code, the corresponding number of network block codes are extracted from the Mgenotype code to form a middle network architecture; a network reduction layer is used to adjust the number of analysis channels to twice the current number of channels as the initial analysis channel number of the deep network; according to the number of deep network blocks provided by the Dblock code, the corresponding number of network block codes are extracted from the Dgenotype code to form a deep network architecture; finally, an output layer is used to calculate the output result of the current network;

[0033] Indi p The Backdoor is encoded as a single integer, which is used to provide the backdoor feature extraction position of the network. When Backdoor=0, the backdoor feature extraction position is the last layer of the shallow network. At this time, the shallow network is regarded as the backdoor feature extraction subnetwork, and the middle network and the bottom network are collectively regarded as the classification subnetwork; when Backdoor=1, the backdoor feature extraction position is the last layer of the middle network. At this time, the shallow network and the middle network are collectively regarded as the backdoor feature extraction subnetwork, and the bottom network is regarded as the classification subnetwork; when Backdoor=2, the backdoor feature extraction position is the last layer of the deep network. At this time, the shallow network, the middle network and the deep network are collectively regarded as the backdoor feature extraction subnetwork, and the classification subnetwork does not consist of network blocks, and only the final output layer is used for classification calculation;

[0034] Indi p The specific form of Pruning encoding is [Prun1, Prun2, Prun3, Prun4, ..., Prun g] is a coded string consisting of {0, 1}, representing the network layer position where the pruning operation occurs; Prun i is the i-th pruning code value, where 1≤i≤g; when Prun i = 0, it means that no pruning operation occurs at the i-th network layer position; when Prun i =1, it means that pruning operation occurs at the i-th network layer position;

[0035] Then, according to the SAR image anti-backdoor classification model, the lower limit of the number of channels C is analyzed. low , the upper limit of the number of starting analysis channels of the SAR image anti-backdoor classification model C up , the lower limit of the number of shallow network blocks Sblock low , the upper limit of the number of shallow network blocks Sblock up , Shallow network block architecture parameter lower limit Synotype low , Shallow Network Block Architecture Parameter Upper Limit Sgenotype up , the lower limit of the number of middle-layer network blocks is Mblock low , the upper limit of the number of middle-layer network blocks Mblock up , the lower limit of the middle-level network block architecture parameter Mgenotype low , the upper limit of the parameters of the middle-level network block architecture Mgenotype up , the lower limit of the number of deep network blocks Dblock low , the upper limit of the number of deep network blocks Dblock up , Deep Network Block Architecture Parameter Lower Bound Dgenotype low , Deep Network Block Architecture Parameter Upper Limit Dgenotype up , backdoor feature selection position parameter lower limit Backdoor low , backdoor feature selection position parameter upper limit Backdoor up , Pruning position parameter lower limit low , Pruning position parameter upper limit up , generate the position code Indi of N initial particles p ,Indi p The integer encoding value of is a random integer whose size is between the lower and upper limits of the corresponding parameter; then, according to Indi vmax and Indi vmin , generate N initial particles with velocity codes Indi v ,Indi v The encoding value is between Indi vmax and Indi vmin Random numbers in the range; finally, N Indi pand N Indi v Combination, as the particle encoding in the initial particle group Q.

[0036] Furthermore, the step S4 includes the following sub-steps:

[0037] S41: Record the current optimization round. If it is the first time to enter this step, the optimization round is set to 0;

[0038] S42: According to Q p The corresponding model architecture parameters generate two deep neural network models with the same architecture, one is denoted as the backdoor model and the other is denoted as the clean model; the cross entropy classification loss l is used for the backdoor model ce As the total loss of the backdoor model, use the training learning rate lr and the Adam optimizer to train the offline poisoning dataset X poison_train The model is trained with SAR image data in EP. backdoor ; l ce Calculate according to formula (8);

[0039]

[0040] Among them, θ represents all the parameters that constitute the current model, x represents the image data sample in the offline training set, and y represents the category corresponding to x, which is obtained by one-hot encoding. The implementation process of one-hot encoding is: the correct category corresponding to the image is y true ,y n is the total number of classification categories; generates a line with a length of y n The all-zero vector y one_hot ; y one_hot Middle y true The value at the position is changed to 1; one_hot That is the category y true One-hot encoding of ;

[0041] In the training of the clean model, we first p The backdoor feature extraction position provided by the Backdoor parameter in the backdoor model is used to obtain the backdoor feature from the corresponding position in the backdoor model, and the backdoor feature is subjected to adaptive average pooling processing; then, the feature output in the training is extracted at the same position of the clean model, and the feature similarity is calculated with the backdoor feature after adaptive average pooling processing, and the calculated result l backdoor and the weighted cross entropy loss l of the clean model wce Combine to form the reconstruction loss l sum Used for training clean models; then use the training learning rate lr and the Adam optimizer to train the offline poisoning training dataset X poison_trainThe model is trained with SAR image data in EP. clean ; where l sum , l wce and l backdoor Calculate according to formula (9), formula (10) and formula (11) respectively;

[0042] l sum = l wce +l backdoor (9)

[0043]

[0044]

[0045] Among them, f backdoor represents the backdoor model, f clean represents the clean model, f backdoor_ex represents the backdoor feature extraction subnetwork in the backdoor model, f clean_ex Represents the backdoor feature extraction subnetwork in the clean model; after training, based on the pruning position parameter, the pruning strategy based on the channel Lipschitz constant is adopted for the network layer where pruning occurs in the clean model, and the selected channel weight is reset to 0;

[0046] S43: Calculate the fitness of all particles in the particle swarm Q according to the optimization target of the SAR image anti-backdoor classification model;

[0047] S44: After calculating the fitness of all particles, a fast non-dominated sorting operation is performed; the fast non-dominated sorting measures the three fitness evaluation indicators of the particles, divides the particles into dominance, and obtains the particles belonging to the Pareto front in the particle group Q; among them, when the particle Indi i The three fitness evaluation indicators of the particle are all smaller than those of another particle Indi j When the particle is i Dominant Particle Indi j ; Remember n i is the number of particles that dominate the i-th particle in the population, S i is the set of particles dominated by the i-th particle; the specific implementation process of fast non-dominated sorting is: first, let F1 be an empty set; traverse the particles in the particle group Q in turn, and calculate the n corresponding to each particle i value, and put the other particles dominated by this particle into the corresponding set S i In; i = 0 are put into set F1; at this time, the particles in F1 are the particles belonging to the Pareto frontier;

[0048] Then let j1 = 1 and let H be an empty set; traverse All particles in u For The set of particles dominated by the u-th particle in , num q To dominate S u The number of particles in the qth particle; get Each particle in the u ; for all S u , traverse each S u All particles in , calculate the num corresponding to each particle q value, and let num q =num q -1; if num q =0, then S u The qth particle in is put into the set H; let j1 = j1 + 1; let Repeat the above steps until you get Is an empty set.

[0049] Furthermore, the step S5 includes the following sub-steps:

[0050] S51: If it is the first time to enter this step, the dominated particle repository is firstly emptied, and then the dominated particle repository operation is updated according to the particle update strategy of the dominated particle repository; the particle update strategy of the dominated particle repository is: when the dominated particle repository is empty, the particles belonging to the Pareto front in the initial particle group Q are directly placed in the dominated particle repository; when the dominated particle repository is not empty, the dominated particle repository is updated according to the domination relationship, and the update strategy is: when the added particle is dominated by the particle in the dominated particle repository, the addition of the particle is abandoned; when there is a particle in the dominated particle repository that is dominated by the added particle, the particle is added and all the particles dominated by it are removed; when there is no domination relationship between the added particle and the particle in the dominated particle repository, the particle is added;

[0051] When the number of particles in the dominated particle repository exceeds the maximum value N par When , some particles in the dominating particle repository are removed based on the adaptive grid method. The specific process is as follows: all particles in the current dominating particle repository are scanned, and the three particles with the maximum f1 value, the maximum f2 value, and the maximum f3 value are taken as boundary particles; according to the location of the boundary particles and the adaptive network size N adConstruct a three-dimensional grid block. Specifically, (0,0,0), (f1,0,0), (0,f2,0), (0,0,f3), (f1,f2,0), (f1,0,f3), (0,f2,f3), (f1,f2,f3) are used as the eight vertex coordinates. Let lenth1 be the length of the first dimension grid block, lenth2 be the length of the second dimension grid block, and lenth3 be the length of the third dimension grid block. Let the grid block Net i is the i-th grid block, and its vertex coordinates are ((i-1)×lenth1, (i-1)×lenth2, (i-1)×lenth3), (i×lenth1, (i-1)×lenth2, (i-1)×l enth3), ((i-1)×lenth1,i×lenth2,(i-1)×lenth3), ((i-1)×lenth1,(i-1)×lenth2,i×lenth3), (i×len th1,i×lenth2,(i-1)×lenth3),(i×lenth1,(i-1)×lenth2,i×lenth3),((i-1)×lenth1,i×lenth2,i×lenth3),(i×lenth1,i×lenth2,i×lenth3); according to the position information of all particles in the particle repository, the number of particles in all grid blocks is counted to obtain the grid block information where particles exist; record Netnum i For Net i The number of particles in the grid block. The number of particles currently dominating the particle repository is Netnum all , then in Net i Randomly delete Netnum del Particles, Netnum del Calculate according to formula (12), where Represents a round-down operation;

[0052]

[0053] S52: Calculate the global optimal particle operation: After updating the dominant particle repository, calculate the current global optimal particle Indi based on the adaptive grid method. gbest ; The specific operation is as follows: first, according to the number of particles in the grid block, the roulette probability is assigned to the grid block, Net i Roulette probability P_Net i Calculate according to formula (13);

[0054]

[0055] According to the roulette probability of all grid blocks, a grid block is randomly selected to obtain the global optimal particle Indi gbest ; The global optimal particle selection strategy is: when the grid block contains only one particle, the particle is Indi gbest ; When the grid block contains multiple particles, one of the particles is randomly selected as the Indi gbest ;

[0056] S53: Update particle operation and calculate local optimal particle: Indi pbest is the local optimal particle corresponding to each particle in the population; if it is the first time to enter this step, the local optimal particle is each particle in the population itself; let rand1 and rand2 be two random numbers between 0 and 1, update the particle position code and particle velocity code in the population according to formula (14) and formula (15), and modify the code that exceeds the boundary value to the boundary value;

[0057] Indi vnew =w×Indi v +c1×rand1×(Indi pbest -Indi p )+c2×rand2×(Indi gbest -Indi p )(14)

[0058] Indi pnew =Indi p +Indi vnew (15)

[0059] Calculate particle index according to the optimization target of SAR image anti-backdoor classification model pnew Three fitness indicators of Indi pnew and Indi p The dominant relationship; when Indi pnew Dominate Indi p When pnew is regarded as the local optimal particle of the particle; when Indi p Dominate Indi pnew When p is regarded as the local optimal particle of the particle; in other cases, Indi is randomly selected pnew and Indi p One of the particles is taken as the local optimal particle;

[0060] S54: Make Indi pnew =Indi p ,Indi vnew =Indiv , complete the update operation of the particles in the particle swarm Q, and regard the new particle swarm as the new particle swarm Q new .

[0061] Furthermore, the step S6 specifically includes:

[0062] The selection operation of the optimal particle needs to first determine whether the current optimization round has reached the maximum optimization round; if the current optimization round has not reached the maximum optimization round, the recorded current optimization round is increased by 1; if the current optimization round has reached the maximum optimization round, the particles in the dominant particle repository are subjected to a comprehensive fitness evaluation operation to select the optimal particle; the specific selection process is: when the dominant particle repository contains only one particle, the particle is selected as the optimal particle Indi best ; When the dominated particle repository contains two or more particles, the fitness comprehensive evaluation value of the i-th particle in the dominated particle repository is calculated according to formula (16): where f1 i represents the f1 fitness evaluation index of the i-th particle, f2 i represents the f2 fitness evaluation index of the i-th particle, f3 i represents the f3 fitness evaluation index of the i-th particle. The smallest particle is the optimal particle Indi best , when there are multiple particles with the smallest When The particle with the higher value is regarded as the optimal particle Indi best ;

[0063]

[0064] Furthermore, the step S8 specifically includes:

[0065] Obtain the real-time monitoring SAR image data from the real-time database of the SAR system, and obtain the online detection normal data set X after image data normalization and image data normalization operations. t , using the same backdoor attack strategy as in the offline poisoning training dataset to detect the normal dataset X online t All image data in the trigger embedding, and set its classification label to 0 to obtain the online poisoning detection dataset X poison_t ; For the deployed SAR image classification model, the normal sample classification accuracy and backdoor attack success rate are calculated according to formula (4) and formula (5) respectively.

[0066] A second aspect of an embodiment of the present invention provides a SAR image anti-backdoor classification system based on backdoor feature extraction optimization, which is used to implement the above-mentioned SAR image anti-backdoor classification method based on backdoor feature extraction optimization. The system includes:

[0067] SAR image data preprocessing module, used to construct the training data set of SAR image anti-backdoor classification model, including offline poisoning training data set, offline poisoning verification data set, offline normal verification data set, online detection normal data set and online detection poisoning data set;

[0068] A setting module, used for setting a plurality of first parameters and an optimization target of a SAR image anti-backdoor classification model;

[0069] A particle swarm initialization module is used to perform discrete encoding of particle positions and real number encoding of particle velocities on the architecture, backdoor feature extraction position and pruning position of the SAR image anti-backdoor classification model according to the first parameter, and generate an initial particle swarm Q;

[0070] The particle swarm fitness evaluation and non-dominated sorting module is used to record the optimization rounds, calculate the fitness of all particles in Q based on the offline poisoning training data set, the offline poisoning verification data set, and the offline normal verification data set, and perform fast non-dominated sorting;

[0071] The new particle swarm performance evaluation and update module is used to update the dominant particle repository, calculate the global optimal particle, update the particle position and velocity, and calculate the local optimal particle to generate the next generation particle swarm Q new ;

[0072] The iterative judgment module is used to judge whether the optimization round is equal to the maximum optimization round. If the optimization round is equal to the maximum optimization round, the fitness comprehensive evaluation operation is performed on the particles in the dominant particle storage library to calculate the optimal particle; otherwise, the recorded optimization round is increased by 1, and Q new Update to Q, repeat the initial particle swarm fitness evaluation and non-dominated sorting module and the new particle swarm performance evaluation and update module;

[0073] An online deployment module for online deployment of a SAR image anti-backdoor classification model based on the encoding information of the optimal particles; and

[0074] The online deployment model performance evaluation module is used to build an online detection normal data set and an online detection poisoning data set based on the real-time database of the SAR system, and calculate the normal sample classification accuracy and backdoor attack success rate of the online deployment model.

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

[0076] (1) The present invention comprehensively considers the classification accuracy of the SAR image classification model for normal samples, the attack success rate of the backdoor attack on the model, and the number of model parameters, and designs a three-objective optimization method based on backdoor feature extraction optimization. Through offline iterative optimization, an online deployment model for SAR image anti-backdoor classification that takes into account model lightweight, high accuracy, and strong backdoor robustness is automatically obtained;

[0077] (2) The present invention not only realizes the automated optimization design and automated generation of the optimal deep neural network model for SAR image classification system with multiple performance indicators compromise, but also constructs a backdoor feature extraction subnetwork that expands the processing method of backdoor features in SAR image classification models. It also greatly reduces the number of model parameters while improving the classification accuracy and backdoor robustness of the model, thus better realizing the lightweight of the model and facilitating the online deployment and engineering implementation of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 It is a flow chart of the SAR image anti-backdoor classification method based on backdoor feature extraction optimization;

[0079] Figure 2 It is a schematic diagram of the depth-wise separable convolution operation, with a convolution kernel size of n×n;

[0080] Figure 3 It is a schematic diagram of a two-layer depth-wise separable convolution operation, with a convolution kernel size of n×n;

[0081] Figure 4 It is a schematic diagram of the spatially separable convolution operation, with convolution kernel sizes of 1×n and n×1;

[0082] Figure 5 is an example diagram of a single particle encoding;

[0083] Figure 6 It is the global optimal particle Indi participating in the particle update operation of the particle swarm. gbest Example diagram of

[0084] Figure 7 is used Figure 6 The global optimal particle Indi gbest right Figure 5 An example diagram of updating the particles in the image;

[0085] Figure 8 is the Pareto front that dominates the particles in the particle repository after 20 optimizations;

[0086] Fig. 9It is a comparison result diagram of the classification accuracy of normal samples of the classification model generated by the present invention, the Resnet18 classification model without backdoor defense strategy, and the classification model using causality-inspired Backdoor Defense (CBD) after four backdoor attacks were carried out on the UCMerced-LandUse dataset; the four backdoor attacks are Badnets attack based on visible triggers, Blend attack based on invisible triggers, SIG attack based on clean labels, and WaNet attack based on distortion;

[0087] Fig.10 The comparison results of the backdoor attack success rates of the classification model generated by the present invention, the Resnet18 classification model without using the backdoor defense strategy, and the classification model using the CBD backdoor defense strategy on the UCMerced-LandUse dataset using four types of backdoor attacks;

[0088] Fig.11 It is the comparison result of the number of parameters of the classification model generated by the present invention, the Resnet18 classification model without using the backdoor defense strategy, and the classification model using the CBD backdoor defense strategy;

[0089] Fig.12 This is a structural diagram of a SAR image anti-backdoor classification system based on backdoor feature extraction optimization. DETAILED DESCRIPTION

[0090] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0091] See also Figure 1 The SAR image anti-backdoor classification method based on backdoor feature extraction optimization of the present invention specifically comprises the following steps:

[0092] S1: Based on the historical database of the SAR system, an offline poisoning training dataset, an offline poisoning verification dataset, and an offline normal verification dataset are constructed.

[0093] In this embodiment, an offline poisoning training data set, an offline poisoning verification data set, and an offline normal verification data set are constructed based on a historical database of a SAR system, specifically comprising: firstly, the SAR image data in the internal historical database of the SAR system is taken as the original data set and marked as O; then, an image data normalization operation is performed on O to obtain a normalized data set X; wherein, the image data normalization operation consists of a segmentation operation and a scaling operation; the segmentation operation divides the SAR image in the data set into regions, and when the input SAR image contains multiple classified targets, it is segmented into multiple SAR images so that each SAR image contains only a single classified target; when the input SAR image contains only a single classified target, no operation is performed; the scaling operation resizes the SAR images in the data set so that the size of each image remains consistent; secondly, the image data normalization operation is performed on the normalized data set X using formula (1) to obtain an offline data set X o ; Then, X o Divide into offline training set X o_train and offline normal validation dataset X o_val ; Based on the poisoning rate λ, a backdoor attack strategy is randomly used to attack the offline training set X o_train The image data in the image is embedded with triggers, the backdoor attack strategy used at this time is recorded, and its classification label is set to 0 to obtain the offline poisoning training dataset X poison_train ; Use the same backdoor attack strategy to test the offline normal verification data set X o_val All image data in the trigger embedding, and set its classification label to 0 to obtain the offline poisoning verification dataset X poison_val .

[0094]

[0095] It should be noted that, in this embodiment, the UCMerced-LandUse image dataset is used as the simulated SAR system historical dataset, and the backdoor attack strategies that can be randomly selected include: Badnets attack, Blend attack and SIG attack.

[0096] S2: Setting multiple first parameters to construct an optimization target for the SAR image anti-backdoor classification model.

[0097] In this embodiment, the first parameters include the particle population size N=30, the lower limit of the number of starting analysis channels of the SAR image anti-backdoor classification model C low =4, the upper limit of the number of starting analysis channels of the SAR image anti-backdoor classification model C up =8, the lower limit of the number of shallow network blocks Sblock low =1, upper limit of shallow network blocks Sblock up=3, Shallow network block architecture parameter lower limit Synotype low =[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], shallow network block architecture parameter upper limit Synotype up =[0,1,2,3,4,5,12,12,12,12,12,12,0,1,2,3,4,5,12,12,12,12,12,12,0,1,2,3,4,5,12,12,12,12,12,12], the lower limit of the number of middle-layer network blocks Mblock low =1, the upper limit of the number of middle-layer network blocks Mblock up =3, the lower limit of the middle-layer network block architecture parameter Mgenotype low =[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], the upper limit of the middle network block architecture parameter Mgenotype up =[0,1,2,3,4,5,12,12,12,12,12,12,0,1,2,3,4,5,12,12,12,12,12,12,0,1,2,3,4,5,12,12,12,12,12,12], the lower limit of the number of deep network blocks Dblock low =1, upper limit of deep network block number Dblock up =2, the lower limit of the deep network block architecture parameter Dgenotype low =[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], upper limit of deep network block architecture parameters Dgenotype up =[0,1,2,3,4,5,12,12,12,12,12,12,0,1,2,3,4,5,12,12,12,12,12,12], backdoor feature selection parameter lower limit Backdoor low =0, backdoor feature selection parameter upper limit Backdoor up =2, pruning position parameter lower limit Pruning low=[0, ... up =[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], number of pruning positions g = 100, number of backdoor model training rounds EP backdoor =5, clean model training round EP clean =20, training learning rate lr = 0.001, particle swarm evolution weight w = 0.8, acceleration factor c1 = 2.0, acceleration factor c2 = 2.0, dominating particle storage library size N par =200, adaptive grid size N ad =20, maximum optimization round E max =20.

[0098] In this embodiment, the optimization objectives of the SAR image anti-backdoor classification model include: an evaluation value f1 of the SAR image anti-backdoor classification model for the classification accuracy of normal samples, an evaluation value f2 of the backdoor attack success rate, and an evaluation value f3 of the number of parameters of the SAR image anti-backdoor classification model; wherein f1 and f2 can be calculated according to formula (2) and formula (3) respectively, and f3 represents the number of parameters of the SAR image anti-backdoor classification model, which can be obtained by directly counting the parameters of each layer of the SAR image anti-backdoor classification model and then performing a summation operation;

[0099]

[0100]

[0101] in, Represents the normal sample classification accuracy, represents the success rate of backdoor attack and is calculated according to formula (4) and formula (5) respectively.

[0102]

[0103]

[0104] Among them, Num clean_right Represents the number of samples correctly classified in the offline normal verification data set, Num backdoor_right Represents the number of samples classified as the set label in the offline poisoning verification dataset, Num all Represents the total number of samples in the validation set.

[0105] It should be noted that the above first parameter can be set according to actual conditions.

[0106] S3: According to the first parameter, the architecture of the SAR image anti-backdoor classification model, the backdoor feature extraction position and the pruning position are discretely encoded as particle positions and real number encoded as particle velocities, and an initial particle swarm Q is generated.

[0107] In this embodiment, according to the first parameter, the architecture of the SAR image anti-backdoor classification model, the backdoor feature extraction position and the pruning position are discretely encoded as particle positions and real number encoded as particle velocities, and an initial particle group Q is generated. The specific implementation process is as follows:

[0108] The neural network architecture parameters, backdoor feature selection parameters and pruning position parameters of the SAR image anti-backdoor classification model are discretely encoded and used as the particle position encoding Indi p ; Use the random code with the same length as the particle position code as the particle velocity code Indi v ; The encoding form of each particle is Indi=[Indi p ,Indi v ],Indi p =[C,Sblock,Sgenotype,Mblock,Mgenotype,Dblock,Dgenotype,Backdoor,Pruning],Indi v =[C v ,Sblock v ,Sgenotype v ,Mblock v ,Mgenotype v ,Dblock v ,Dgenotype v ,Backdoor v ,Pruning v ];Indi pIndicates the position information of the particle in the particle population, where C, Sblock, Sgenotype, Mblock, Mgenotype, Dblock and Dgenotype together constitute the architecture parameters of the SAR image anti-backdoor classification model. Backdoor indicates the backdoor feature extraction position, and the SAR image anti-backdoor classification model is divided into a backdoor feature extraction subnetwork and a classification subnetwork. Pruning indicates the model position where the pruning operation occurs. v Represents the velocity information of the particle in the particle population, where C v ,Sblock v ,Sgenotype v ,Mblock v ,Mgenotype v ,Dblock v ,Dgenotype v ,Backdoor v and Pruning v They are all random speed parameters, and their values ​​are between the maximum particle speed Indi vmax and the minimum particle velocity Indi vmin Between; Remember Indi pmax =[C max ,Sblock max ,Sgenotype max ,Mblock max ,Mgenotype max ,Dblock max ,Dgenotype max ,Backdoor max ,Pruning max ],Indi pmin =[C min ,Sblock min ,Sgenotype min ,Mblock min ,Mgenotype min ,Dblock min ,Dgenotype min ,Backdoor min ,Pruning min ],Indi vmax and Indi vmin Calculate according to formula (6) and formula (7);

[0109] Indi vmax =(Indi pmax -Indi pmin)×0.5 (6)

[0110] Indi vmin =-Indi vmax (7)

[0111] Encoding Indi at the particle position p In the model architecture parameters, C provides the number of initial processing channels for model feature analysis, Sblock provides the number of splicing of shallow network blocks, Mblock provides the number of splicing of middle network blocks, and Dblock provides the number of splicing of deep network blocks. The above four parameters are all single integers; Sgenotype, Mgenotype and Dgenotype are all network block codes of different depths, and their encoding forms are consistent, all of which are [(n1 1 ,n2 1 ,n3 1 ,n4 1 ,n5 1 ,n6 1 ,o1 1 ,o2 1 ,o3 1 ,o4 1 ,o5 1 ,o6 1 ),(n1 2 ,n2 2 ,n3 2 ,n4 2 ,n5 2 ,n6 2 ,o1 2 ,o2 2 ,o3 2 ,o4 2 ,o5 2 ,o6 2 ),...,(n1 s ,n2 s ,n3 s ,n4 s ,n5 s ,n6 s ,o1 s ,o2 s ,o3 s ,o4 s ,o5 s ,o6 s )], record (n1 i ,n2 i ,n3 i ,n4 i ,n5 i ,n6 i ,o1 i ,o2 i ,o3i ,o4 i ,o5 i ,o6 i ) is the i-th network block, where 1≤i≤s, s is equal to the upper limit of the number of network blocks; for the i-th network block, n1 i ,n2 i ,n3 i ,n4 i ,n5 i ,n6 i Represents the six operation nodes of this network block, o1 i ,o2 i ,o3 i ,o4 i ,o5 i ,o6 i Represents the six specific operations of the network block, among which o1 i Represents n1 i Specific operation, o2 i Represents n2 i The corresponding relationship between other operations and nodes can be deduced by analogy. j i is the specific operation of the jth operation node in the i-th network block, where 1≤j≤6, o j i The corresponding relationship with the specific operation is: when o j i =0, set to 0; when o j i =1, average pooling operation is performed; when o j i =2, the maximum pooling operation is performed; when o j i =3, a convolution operation with a convolution kernel size of 7×7 is performed; when o j i =4, a convolution operation with a convolution kernel size of 3×3 is performed; when o j i =5, a convolution operation with a convolution kernel size of 1×1 is performed; when o j i = 6, a double-layer depth-wise separable convolution operation with a convolution kernel size of 3×3 is performed; when o j i =7, a double-layer depth-wise separable convolution operation with a convolution kernel size of 5×5 is performed; when o j i = 8, a depth-separable convolution operation with a convolution kernel size of 3×3 is performed; when o j i = 9, a depth-wise separable convolution operation with a kernel size of 5×5 is performed; when oj i = 10, spatially separable convolution operations with kernel sizes of 1×3 and 3×1 are performed; when o j i = 11, spatially separable convolution operations with kernel sizes of 1×5 and 5×1 are performed; when o j i =12, no operation is performed; Figure 2 A schematic diagram of the depthwise separable convolution operation is given; Figure 3 A schematic diagram of a two-layer depthwise separable convolution operation is given; Figure 4 A schematic diagram of the spatially separable convolution operation is given.

[0112] The correspondence between the network block coding and the network block feature calculation process is as follows: let States be the set of intermediate feature values ​​of the model architecture corresponding to the current network block coding, and its initial value is States = [s1], s1 is the intermediate feature of the model transmitted to the current network block; according to the operation nodes and specific operations in the network block coding, the feature values ​​in States are selected for calculation, and the obtained intermediate features are added to States; finally, all the intermediate features in States that have not been selected for calculation are merged as the output of the model architecture corresponding to the current network block coding.

[0113] Indi p The correspondence between the model architecture parameters and the SAR image anti-backdoor classification model architecture is as follows: the initial processing channel number provided by C is set as the initial analysis channel number of the shallow network, and the corresponding number of network block codes are extracted from the Sgenotype code according to the number of shallow network blocks provided by the Sblock code to form a shallow network architecture; a network reduction layer is used to adjust the number of analysis channels to twice the current number of channels as the initial analysis channel number of the middle network; according to the number of middle network blocks provided by the Mblock code, the corresponding number of network block codes are extracted from the Mgenotype code to form a middle network architecture; a network reduction layer is used to adjust the number of analysis channels to twice the current number of channels as the initial analysis channel number of the deep network; according to the number of deep network blocks provided by the Dblock code, the corresponding number of network block codes are extracted from the Dgenotype code to form a deep network architecture; finally, an output layer is used to calculate the output result of the current network.

[0114] Indi pBackdoor is encoded as a single integer, which is used to provide the backdoor feature extraction position of the network. When Backdoor=0, the backdoor feature extraction position is the last layer of the shallow network. At this time, the shallow network is regarded as the backdoor feature extraction subnetwork, and the middle network and the bottom network are collectively regarded as the classification subnetwork; when Backdoor=1, the backdoor feature extraction position is the last layer of the middle network. At this time, the shallow network and the middle network are collectively regarded as the backdoor feature extraction subnetwork, and the bottom network is regarded as the classification subnetwork; when Backdoor=2, the backdoor feature extraction position is the last layer of the deep network. At this time, the shallow network, the middle network and the deep network are collectively regarded as the backdoor feature extraction subnetwork, and the classification subnetwork is not composed of network blocks, and only the final output layer is used for classification calculation.

[0115] Indi p The specific form of Pruning encoding is [Prun1, Prun2, Prun3, Prun4, ..., Prun g ] is a coded string consisting of {0, 1}, representing the network layer position where the pruning operation occurs; Prun i is the i-th pruning code value, where 1≤i≤g; when Prun i = 0, it means that no pruning operation occurs at the i-th network layer position; when Prun i When =1, it means that pruning operation occurs at the i-th network layer position.

[0116] For example, in this embodiment, the encoding of a particle is as follows: Figure 5Its position encoding information is as follows: [2,3,0,0,1,2,4,4,2,4,4,8,9,12,0,1,2,3,2,3,5,5,1,0,11,6,0,1,1,1,0,4,2,11,8,9,7,7,2,0,1,2,2,2,5,8,8,4,9,3,7,0,1,2, 0,4,5,1,1,2,0,7,8,0,0,0,1,4,5,2,8,9,11,10,2,1,0,1,1,3,3,5,0,0,2,5,7,7,0,1,2,3,3,5,10,5,3,4,8,6,1,0,0,0,0,1,0,1,1,1,0,0,1,0,1, ,1,1,1,0,0,1,1,0,1,1,1,1,0,1,1,1,1,1,0,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1,0,1,1,1,1,0], where [2] is the number of starting analysis channels, [3] is the number of shallow network blocks, and [0,0,1,2,4,4,2,4,4,8,9,12,0,1,2,3,2,3,5,5,1,0,11,6, ,8,9,7,7] are shallow network block architecture parameters, [2] are the number of middle network blocks, [0,1,2,2,2,5,8,8,4,9,3,7,0,1,2,0,4,5,1,1,2,0,7,8,0,0,0,1,4,5,2,8,9,11,10,2] are middle network block architecture parameters, [1] are the number of deep network blocks, [0,1,1,3,3,5,0,0,2,5,7,7,0,1,2,3,3,5,10,5,3,4,8,6] are deep network block architecture parameters, [1] are backdoor feature extraction parameters, [0,0,0,0,1,0,1,1,1,0,0,1,1 ,1,1,1,0,0,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1, 1,0,1,0,1,1,0,0,1,0,1,1,1,0,1,0,0,0,1,1,1,1,0] is the pruning position parameter; its speed encoding information is: [0.5,-0.1,0.0,-0.3,0.9,-0.0,0.6,-2.1,-1.7,3.0,-3.5,1.3,4.6,-4.4,0.0,0.1,-0.4,1.2,0.9,-2.3,2.8,2.7,-2.1,3.7,0.3,-0.2,0.0,-0.3,-0.0,-1.0,-1.0,0.3,3.9,3.7,-2.5,-1.8,-3.9,-2.9,-0.8,0.0,-0.4,-0.5,1.3,0.9,2.0,-1.4,-1.3,0.5,4.5,-0.2,-3.4,0.0,0.5,0.2,-0.1,-0.3,0.7,2.9,-1.8,-2.3,-1. 3,-2.6,5.5,0.0,0.2,0.4,0.7,-0.5,0.5,-1.4,5.7,-5.7,-2.9,-1.6,-0.8,-0.1,0.0,0.3,0.6,0.5,0.8,1.9,0.8,-4.2,4.4,-1.6,4.7,2.6,0.0,0.3,0.3,-0.6,-1.2,0.7,-3.5,-4.3,-3.1,-2.5,4.4,2.7,-0.4,-0.1,0.1,-0.5,-0.3,-0.4,0.1,0.4,- 0.4,-0.4,0.2,0.0,-0.4,0.4,0.1,-0.3,-0.3,0.2,0.4,-0.4,-0.5,-0.5,0.1,0.2,-0.3,0.4,-0.2,0.4,0.4,-0.4,-0.1,0.5,0.5,-0.4,0.4,-0.5,-0.1,0.3,-0.0,-0.2,-0.0,-0.3,-0.4,-0.3,-0.5,0.4,-0.1,-0.2,-0.2,0.3,0.5,-0.3,0.3,-0.1,0. 3,-0.2,-0.1,0.0,-0.1,-0.3,0.4,-0.3,-0.2,-0.3,-0.4,0.2,-0.3,0.0,0.4,0.2,-0.0,-0.3,0.4,0.1,-0.2,0.0,-0.2,-0.4,-0.0,-0.1,0.0,-0.4,-0.1,-0.4,0.2,0.2,-0.2,0.4,0.3,-0.4,-0.3,0.1,0.4,0.2,-0.4,-0.4,0.2,0.5,-0.1,0.2,-0.5].

[0117] Then, according to the SAR image anti-backdoor classification model, the lower limit of the number of channels C is analyzed. low , the upper limit of the number of starting analysis channels of the SAR image anti-backdoor classification model C up , the lower limit of the number of shallow network blocks Sblock low , the upper limit of the number of shallow network blocks Sblockup , Shallow network block architecture parameter lower limit Synotype low , Shallow Network Block Architecture Parameter Upper Limit Sgenotype up , the lower limit of the number of middle-layer network blocks is Mblock low , the upper limit of the number of middle-layer network blocks Mblock up , the lower limit of the middle-level network block architecture parameter Mgenotype low , the upper limit of the parameters of the middle-level network block architecture Mgenotype up , the lower limit of the number of deep network blocks Dblock low , the upper limit of the number of deep network blocks Dblock up , Deep Network Block Architecture Parameter Lower Bound Dgenotype low , Deep Network Block Architecture Parameter Upper Limit Dgenotype up , backdoor feature selection position parameter lower limit Backdoor low , backdoor feature selection position parameter upper limit Backdoor up , Pruning position parameter lower limit low , Pruning position parameter upper limit up , generate the position code Indi of N initial particles p ,Indi p The integer encoding value of is a random integer whose size is between the lower and upper limits of the corresponding parameter; then, according to Indi vmax and Indi vmin , generate N initial particles with velocity codes Indi v ,Indi v The encoding value is between Indi vmax and Indi vmin Random numbers in the range; finally, N Indi p and N Indi v Combination, as the particle encoding in the initial particle group Q.

[0118] S4: Record the optimization rounds, calculate the fitness of all particles in Q based on the offline poisoning training dataset, offline poisoning verification dataset, and offline normal verification dataset, and perform fast non-dominated sorting.

[0119] S41: Record the current optimization round. If this is the first time to enter this step, the optimization round is set to 0.

[0120] S42: According to Q pThe corresponding model architecture parameters generate two deep neural network models with the same architecture, one is denoted as the backdoor model and the other is denoted as the clean model; the cross entropy classification loss l is used for the backdoor model ce As the total loss of the backdoor model, use the training learning rate lr and the Adam optimizer to train the offline poisoning dataset X poison_train The model is trained with SAR image data in EP. backdoor ; l ce Calculate according to formula (8).

[0121]

[0122] Among them, θ represents all the parameters that constitute the current model, x represents the image data sample in the offline training set, and y represents the category corresponding to x, which is obtained using One-Hot Encoding. The implementation process of One-Hot Encoding is: the correct category corresponding to the image is y true ,y n is the total number of classification categories; generates a line with a length of y n The all-zero vector y one_hot ; y one_hot Middle y true The value at the position is changed to 1; one_hot That is the category y true One-hot encoding of .

[0123] In the training of the clean model, we first p The backdoor feature extraction position provided by the Backdoor parameter in the backdoor model is used to obtain the backdoor feature from the corresponding position in the backdoor model, and the backdoor feature is subjected to adaptive average pooling processing; then, the feature output in the training is extracted at the same position of the clean model, and the feature similarity is calculated with the backdoor feature after adaptive average pooling processing, and the calculated result l backdoor and the weighted cross entropy loss l of the clean model wce Combine to form the reconstruction loss l sum Used for training clean models; then use the training learning rate lr and the Adam optimizer to train the offline poisoning training dataset X poison_train The model is trained with SAR image data in EP. clean ; where l sum , l wce and l backdoor Calculate according to formula (9), formula (10) and formula (11) respectively.

[0124] l sum = l wce +l backdoor (9)

[0125]

[0126]

[0127] Among them, f backdoor represents the backdoor model, f clean represents the clean model, f backdoor_ex represents the backdoor feature extraction subnetwork in the backdoor model, f clean_ex Represents the backdoor feature extraction subnetwork in the clean model. After training, based on the pruning position parameter, the channel Lipschitzness based Pruning (CLP) strategy is used to reset the selected channel weights to 0 for the network layers that have been pruned in the clean model.

[0128] S43: Calculate the fitness of all particles in the particle swarm Q according to the optimization target of the SAR image anti-backdoor classification model.

[0129] S44: After calculating the fitness of all particles, a fast non-dominated sorting operation is performed; the fast non-dominated sorting measures the three fitness evaluation indicators of the particles, divides the particles into dominance, and obtains the particles belonging to the Pareto front in the particle group Q; among them, when the particle Indi i The three fitness evaluation indicators of the particle are all smaller than those of another particle Indi j When the particle is i Dominant Particle Indi j ; Remember n i is the number of particles that dominate the i-th particle in the population, S i is the set of particles dominated by the i-th particle; the specific implementation process of fast non-dominated sorting is: first, let F1 be an empty set; traverse the particles in the particle group Q in turn, and calculate the n corresponding to each particle i value, and put the other particles dominated by this particle into the corresponding set S i In; i =0 are put into set F1; at this time, the particles in F1 are the particles belonging to the Pareto front.

[0130] Then let j1 = 1 and let H be an empty set; traverse All particles in u For The set of particles dominated by the u-th particle in , num q To dominate S u The number of particles in the qth particle; get Each particle in the u ; for all S u, traverse each S u All particles in , calculate the num corresponding to each particle q value, and let num q =num q -1; if num q =0, then S u The qth particle in is put into the set H; let j1 = j1 + 1; let Repeat the above steps until you get Is an empty set.

[0131] S5: Update the dominant particle repository, calculate the global optimal particle, update the particle position and velocity, calculate the local optimal particle, and generate the next generation particle swarm Q new .

[0132] S51: If this step is entered for the first time, the dominating particle repository is first emptied, and then the dominating particle repository is updated according to the particle update strategy of the dominating particle repository; the particle update strategy of the dominating particle repository is: when the dominating particle repository is empty, the particles belonging to the Pareto front in the initial particle group Q are directly placed in the dominating particle repository; when the dominating particle repository is not empty, the dominating particle repository is updated according to the domination relationship, and the update strategy is: when the added particle is dominated by the particle in the dominating particle repository, the addition of the particle is abandoned; when there is a particle in the dominating particle repository that is dominated by the added particle, the particle is added and all the particles dominated by it are removed; when there is no domination relationship between the added particle and the particle in the dominating particle repository, the particle is added.

[0133] When the number of particles in the dominated particle repository exceeds the maximum value N par When , some particles in the dominating particle repository are removed based on the adaptive grid method. The specific process is as follows: all particles in the current dominating particle repository are scanned, and the three particles with the maximum f1 value, the maximum f2 value, and the maximum f3 value are taken as boundary particles; according to the location of the boundary particles and the adaptive network size N ad Construct a three-dimensional grid block. Specifically, (0,0,0), (f1,0,0), (0,f2,0), (0,0,f3), (f1,f2,0), (f1,0,f3), (0,f2,f3), (f1,f2,f3) are used as the eight vertex coordinates. Let lenth1 be the length of the first dimension grid block, lenth2 be the length of the second dimension grid block, and lenth3 be the length of the third dimension grid block. Let the grid block Net iis the i-th grid block, and its vertex coordinates are ((i-1)×lenth1, (i-1)×lenth2, (i-1)×lenth3), (i×lenth1, (i-1)×lenth2, (i-1)×l enth3), ((i-1)×lenth1,i×lenth2,(i-1)×lenth3), ((i-1)×lenth1,(i-1)×lenth2,i×lenth3), (i×len th1,i×lenth2,(i-1)×lenth3),(i×lenth1,(i-1)×lenth2,i×lenth3),((i-1)×lenth1,i×lenth2,i×lenth3),(i×lenth1,i×lenth2,i×lenth3); according to the position information of all particles in the particle repository, the number of particles in all grid blocks is counted to obtain the grid block information where particles exist; record Netnum i For Net i The number of particles in the grid block. The number of particles currently dominating the particle repository is Netnum all , then in Net i Randomly delete Netnum del Particles, Netnum del Calculate according to formula (12), where Represents a floor operation.

[0134]

[0135] S52: Calculate the global optimal particle operation: After updating the dominant particle repository, calculate the current global optimal particle Indi based on the adaptive grid method. gbest ; The specific operation is as follows: first, according to the number of particles in the grid block, the roulette probability is assigned to the grid block, Net i Roulette probability P_Net i Calculate according to formula (13).

[0136]

[0137] Then, according to the roulette probability of all grid blocks, a grid block is randomly selected to obtain the global optimal particle Indi gbest ; The global optimal particle selection strategy is: when the grid block contains only one particle, the particle is Indi gbest ; When the grid block contains multiple particles, one of the particles is randomly selected as the Indi gbest .

[0138] S53: Update particle operation and calculate local optimal particle: Indi pbest is the local optimal particle corresponding to each particle in the population; if it is the first time to enter this step, the local optimal particle is each particle in the population itself; let rand1 and rand2 be two random numbers between 0 and 1, update the particle position code and particle velocity code in the population according to formula (14) and formula (15), and modify the code that exceeds the boundary value to the boundary value.

[0139] Indi vnew =w×Indi v +c1×rand1×(Indi pbest -Indi p )+c2×rand2×(Indi gbest -Indi p )(14)

[0140] Indi pnew =Indi p +Indi vnew (15)

[0141] Calculate particle index according to the optimization target of SAR image anti-backdoor classification model pnew Three fitness indicators of Indi pnew and Indi p The dominant relationship; when Indi pnew Dominate Indi p When pnew is regarded as the local optimal particle of the particle; when Indi p Dominate Indi pnew When p is regarded as the local optimal particle of the particle; in other cases, Indi is randomly selected pnew and Indi p One of the particles is taken as the local optimal particle.

[0142] S54: Make Indi pnew =Indi p ,Indi vnew =Indi v , complete the update operation of the particles in the particle swarm Q, and regard the new particle swarm as the new particle swarm Q new .

[0143] For example, in this embodiment, the process of particle swarm particle update operation is as follows: Figure 6 and Figure 7 As shown, Figure 6 The global optimal particle Indi participating in the update is givengbest Example, Figure 7 Use the global optimal particle pair Figure 5 The particles in are updated, and the calculation Figure 5 The particle Indi is regarded as the local optimal particle Indi pbest , where the values ​​of the random calculation parameters are: random parameter rand1=0.2, random parameter rand2=0.6.

[0144] S6: Determine whether the optimization round is equal to the maximum optimization round. If the optimization round is equal to the maximum optimization round, perform a comprehensive fitness evaluation operation on the particles in the dominant particle storage library to calculate the optimal particle; otherwise, increase the recorded optimization round by 1 and set Q new Update to Q and repeat steps S4 to S5.

[0145] Specifically, the selection operation of the optimal particle needs to first determine whether the current optimization round has reached the maximum optimization round; if the current optimization round has not reached the maximum optimization round, the recorded current optimization round is increased by 1; if the current optimization round has reached the maximum optimization round, the particles in the dominant particle repository are subjected to a comprehensive fitness evaluation operation to select the optimal particle; the specific selection process is: when the dominant particle repository contains only one particle, the particle is selected as the optimal particle Indi best ; When the dominated particle repository contains two or more particles, the fitness comprehensive evaluation value of the i-th particle in the dominated particle repository is calculated according to formula (16): where f1 i represents the f1 fitness evaluation index of the i-th particle, f2 i represents the f2 fitness evaluation index of the i-th particle, f3 i represents the f3 fitness evaluation index of the i-th particle. The smallest particle is the optimal particle Indi best , when there are multiple particles with the smallest When The particle with the higher value is regarded as the optimal particle Indi best .

[0146]

[0147] In this embodiment, after 20 optimizations, the Pareto front of the particles in the particle storage is as follows: Figure 8 shown.

[0148] S7: Online deployment of anti-backdoor classification model for SAR images based on the encoding information of optimal particles.

[0149] Specifically, after obtaining the optimal particle, the SAR image classification model is deployed online for online detection according to the encoding information of the optimal particle.

[0150] S8: Based on the real-time database of the SAR system, an online detection normal data set and an online detection poisoning data set are constructed to calculate the normal sample classification accuracy and backdoor attack success rate of the online deployed model.

[0151] Specifically, the real-time monitoring SAR image data is obtained from the real-time database of the SAR system, and the online detection normal data set X is obtained after image data normalization and image data normalization operations. t , using the same backdoor attack strategy as in the offline poisoning training dataset to detect the normal dataset X online t All image data in the trigger embedding, and set its classification label to 0 to obtain the online poisoning detection dataset X poison_t ; For the deployed SAR image classification model, the normal sample classification accuracy and backdoor attack success rate are calculated according to formula (4) and formula (5) respectively.

[0152] In this embodiment, the SAR image classification model deployed by the technology of the present invention is experimentally tested and compared with the existing causality-inspired Backdoor Defense (CBD) technology. In the experiment, the Resnet18 model was selected as the basic SAR image classification model. The attack effects of four types of backdoor attack technologies on the SAR image classification model were tested without adding a backdoor defense strategy to it. The four types of backdoor attack technologies are specifically: Badnets attack, Blend attack, SIG attack and WaNet attack. Then, the defense capability and classification effect of the SAR image classification model obtained by using the CBD backdoor defense technology on these four types of backdoor attack technologies were tested. Finally, the defense capability and classification effect of the SAR image classification model obtained by using the backdoor defense strategy of the present invention on these four types of backdoor attack technologies were tested. For the Resnet18 classification model without a defense strategy, the classification model using the CBD defense method and the classification model generated by the present invention, the classification accuracy of the model for normal samples after the backdoor attack, the attack success rate of the four types of backdoor attacks and the number of parameters of the model are statistically compared. The comparison results of the classification accuracy of normal samples are shown as follows: Fig. 9 As shown in Figure 2, the comparison results of the success rate of backdoor attacks are as follows: Fig.10 As shown in Figure 2, the comparison results of the number of model parameters are as follows: Fig.11As shown. It is not difficult to find that the success rate of the four types of backdoor attacks on the classification model generated by the present invention is much lower than that of the Resnet18 model without a defense strategy and the model based on the CBD defense method, that is, the four types of backdoor attack techniques are difficult to mislead the classification model in the present invention; at the same time, the normal sample classification accuracy in the present invention is at the same level as the Resnet18 model without a defense strategy; and the number of parameters of the SAR image classification model automatically generated by the present invention is the least, that is, the model generated by the present invention is more lightweight.

[0153] In summary, the SAR image anti-backdoor classification method based on backdoor feature extraction optimization described in the present invention not only realizes the automatic generation of a SAR image classification model that takes into account multiple performance indicators, but the constructed backdoor feature extraction subnetwork also expands the processing method of backdoor features in the SAR image classification model; through formula (1) to formula (16) combined with steps S1 to S8 of the present invention, the two performance indicators (normal sample classification accuracy and backdoor attack success rate) and the number of model parameters finally obtained are better in terms of comprehensive performance.

[0154] It is worth mentioning that the present invention also provides a SAR image anti-backdoor classification system based on backdoor feature extraction and optimization, which is used to implement the SAR image anti-backdoor classification method based on backdoor feature extraction and optimization in the above embodiment.

[0155] See also Fig.12 The system includes a SAR image data preprocessing module 10, a setting module 20, a particle swarm initialization module 30, a particle swarm fitness evaluation and non-dominated sorting module 40, a new particle swarm performance evaluation and update module 50, an iteration judgment module 60, an online deployment module 70 and an online deployment model performance evaluation module 80.

[0156] In this embodiment, the SAR image data preprocessing module 10 is used to construct a training data set for the SAR image anti-backdoor classification model, including an offline poisoning training data set, an offline poisoning verification data set, an offline normal verification data set, an online detection normal data set, and an online detection poisoning data set.

[0157] In this embodiment, the setting module 20 is used to set a plurality of first parameters and an optimization target of the SAR image anti-backdoor classification model.

[0158] In this embodiment, the particle swarm initialization module 30 is used to perform discrete encoding of particle positions and real number encoding of particle velocities on the architecture, backdoor feature extraction position and pruning position of the SAR image anti-backdoor classification model according to the first parameter, and generate an initial particle swarm Q.

[0159] In this embodiment, the particle swarm fitness evaluation and non-dominated sorting module 40 is used to record the optimization rounds, calculate the fitness of all particles in Q based on the offline poisoning training data set, the offline poisoning verification data set and the offline normal verification data set, and perform fast non-dominated sorting.

[0160] In this embodiment, the new particle swarm performance evaluation and update module 50 is used to update the dominant particle repository, calculate the global optimal particle, update the position and speed of the particle, and calculate the local optimal particle to generate the next generation particle swarm Q new .

[0161] In this embodiment, the iterative judgment module 60 is used to judge whether the optimization round is equal to the maximum optimization round. If the optimization round is equal to the maximum optimization round, the fitness comprehensive evaluation operation is performed on the particles in the dominant particle storage library to calculate the optimal particle; otherwise, the recorded optimization round is increased by 1, and Q is increased by 1. new Update to Q, repeat the initial particle swarm fitness evaluation and non-dominated sorting module and the new particle swarm performance evaluation and update module.

[0162] In this embodiment, the online deployment module 70 is used to deploy the SAR image anti-backdoor classification model online based on the encoding information of the optimal particles.

[0163] In this embodiment, the online deployment model performance evaluation module 80 is used to construct an online detection normal data set and an online detection poisoning data set based on the real-time database of the SAR system, and calculate the normal sample classification accuracy and backdoor attack success rate of the deployed model.

[0164] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc. Various media that can store program codes.

[0165] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A SAR image anti-backdoor classification method based on backdoor feature extraction optimization, characterized in that: The following steps are involved: S1: Construct offline poisoning training dataset, offline poisoning verification dataset and offline normal verification dataset based on the historical database of the SAR system; S2: setting a plurality of first parameters to construct an optimization target of a SAR image anti-backdoor classification model; S3: According to the first parameter, the architecture of the SAR image anti-backdoor classification model, the backdoor feature extraction position and the pruning position are discretely encoded as particle positions and real number encoded as particle velocities, and an initial particle group Q is generated; S4: Record the optimization rounds, calculate the fitness of all particles in Q based on the offline poisoning training data set, offline poisoning verification data set, and offline normal verification data set, and perform fast non-dominated sorting; S5: Update the dominant particle repository, calculate the global optimal particle, update the particle position and velocity, calculate the local optimal particle, and generate the next generation particle swarm Q new ; S6: Determine whether the optimization round is equal to the maximum optimization round. If the optimization round is equal to the maximum optimization round, perform a comprehensive fitness evaluation operation on the particles in the dominant particle storage library to calculate the optimal particle; otherwise, increase the recorded optimization round by 1 and set Q new Update to Q, and repeat steps S4 to S5; S7: Online deployment of SAR image anti-backdoor classification model based on the encoding information of optimal particles; S8: Based on the real-time database of the SAR system, an online detection normal data set and an online detection poisoning data set are constructed to calculate the normal sample classification accuracy and backdoor attack success rate of the online deployed model.

2. The SAR image anti-backdoor classification method based on backdoor feature extraction optimization according to claim 1 is characterized in that: The offline poisoning training data set, offline poisoning verification data set and offline normal verification data set are constructed based on the historical database of the SAR system, specifically including: First, the SAR image data in the internal historical database of the SAR system is taken as the original data set and marked as O; then, the image data normalization operation is performed on O to obtain the normalized data set X; wherein, the image data normalization operation consists of a segmentation operation and a scaling operation; the segmentation operation divides the SAR image in the data set into regions. When the input SAR image contains multiple classified targets, it is segmented into multiple SAR images so that each SAR image contains only a single classified target. When the input SAR image contains only a single classified target, no operation is performed; the scaling operation resizes the SAR images in the data set so that the size of each image remains consistent; secondly, the image data normalization operation is performed on the normalized data set X using formula (1) to obtain the offline data set X o ; Then, X o Divide into offline training set X otrain and offline normal validation dataset X oval ; Based on the poisoning rate λ, a backdoor attack strategy is randomly used to attack the offline training set X o_train The image data in the image is embedded with triggers, the backdoor attack strategy used at this time is recorded, and its classification label is set to 0 to obtain the offline poisoning training dataset X poison_train ; Use the same backdoor attack strategy to test the offline normal verification data set X o_val All image data in the trigger embedding, and set its classification label to 0 to obtain the offline poisoning verification dataset X poison_val .

3. The SAR image anti-backdoor classification method based on backdoor feature extraction optimization according to claim 1 is characterized in that: The first parameters include: particle population size N, the lower limit of the number of starting analysis channels of the SAR image anti-backdoor classification model C low , the upper limit of the number of starting analysis channels of the SAR image anti-backdoor classification model C up , the lower limit of the number of shallow network blocks Sblock low , the upper limit of the number of shallow network blocks Sblock up , Shallow network block architecture parameter lower limit Synotype low , Shallow Network Block Architecture Parameter Upper Limit Sgenotype up , the lower limit of the number of middle-layer network blocks is Mblock low , the upper limit of the number of middle-layer network blocks Mblock up , the lower limit of the middle-level network block architecture parameter Mgenotype low , the upper limit of the parameters of the middle-level network block architecture Mgenotype up , the lower limit of the number of deep network blocks Dblock low , the upper limit of the number of deep network blocks Dblock up , Deep Network Block Architecture Parameter Lower Bound Dgenotype low , Deep Network Block Architecture Parameter Upper Limit Dgenotype up , the lower limit of the backdoor feature selection parameter Backdoor low , Backdoor feature selection parameter upper limit Backdoor up , Pruning position parameter lower limit low , Pruning position parameter upper limit up , the number of pruning positions g, the number of backdoor model training rounds EP backdoor , clean model training round EP clean , training learning rate lr, particle swarm evolution weight w, acceleration factor c1, acceleration factor c2, dominating particle repository size N par , adaptive grid size N ad And the maximum optimization round E max ; The optimization objectives of the SAR image anti-backdoor classification model include: an evaluation value f1 of the SAR image anti-backdoor classification model for normal sample classification accuracy, an evaluation value f2 of the backdoor attack success rate, and an evaluation value f3 of the number of parameters of the SAR image anti-backdoor classification model; wherein f1 and f2 are calculated according to formula (2) and formula (3) respectively, and f3 represents the number of parameters of the SAR image anti-backdoor classification model, which is obtained by directly counting the parameters of each layer of the SAR image anti-backdoor classification model and then performing a summation operation; in, Represents the normal sample classification accuracy, represents the success rate of backdoor attack, which is calculated according to formula (4) and formula (5) respectively; Among them, Num clean_right Represents the number of samples correctly classified in the offline normal verification data set, Num backdoor_right Represents the number of samples classified as the set label in the offline poisoning verification dataset, Num all Represents the total number of samples in the validation set.

4. The SAR image anti-backdoor classification method based on backdoor feature extraction optimization according to claim 1 is characterized in that: According to the first parameter, the architecture of the SAR image anti-backdoor classification model, the backdoor feature extraction position and the pruning position are discretely encoded as particle positions and real number encoded as particle velocities, and an initial particle group Q is generated. The specific implementation process is: The neural network architecture parameters, backdoor feature selection parameters and pruning position parameters of the SAR image anti-backdoor classification model are discretely encoded and used as the particle position encoding Indi p ; Use the random code with the same length as the particle position code as the particle velocity code Indi v ; The encoding form of each particle is Indi=[Indi p ,Indi v ],Indi p =[C,Sblock,Sgenotype,Mblock,Mgenotype,Dblock,Dgenotype,Backdoor,Pruning],Indi v =[C v ,Sblock v ,Sgenotype v ,Mblock v ,Mgenotype v ,Dblock v ,Dgenotype v ,Backdoor v ,Pruning v ];Indi p Indicates the position information of the particle in the particle population, where C, Sblock, Sgenotype, Mblock, Mgenotype, Dblock and Dgenotype together constitute the architecture parameters of the SAR image anti-backdoor classification model. Backdoor indicates the backdoor feature extraction position, and the SAR image anti-backdoor classification model is divided into a backdoor feature extraction subnetwork and a classification subnetwork. Pruning indicates the model position where the pruning operation occurs. v Represents the velocity information of the particle in the particle population, where C v ,Sblock v ,Sgenotype v ,Mblock v ,Mgenotype v ,Dblock v ,Dgenotype v ,Backdoor v and Pruning v They are all random speed parameters, and their values ​​range from the maximum particle speed Indi vmax and the minimum particle velocity Indi vmin Between; Remember Indi pmax =[C max ,Sblock max ,Sgenotype max ,Mblock max ,Mgenotype max ,Dblock max ,Dgenotype max ,Backdoor max ,Pruning max ],Indi pmin =[C min ,Sblock min ,Sgenotype min ,Mblock min ,Mgenotype min ,Dblock min ,Dgenotype min ,Backdoor min ,Pruning min ],Indi vmax and Indi vmin Calculate according to formula (6) and formula (7); Now vmax =(Now pmax -Now pmin )×0.5 (6) Now vmin =-Now vmax (7) Encoding Indi at the particle position p In the model architecture parameters, C provides the number of initial processing channels for model feature analysis, Sblock provides the number of splicing of shallow network blocks, Mblock provides the number of splicing of middle network blocks, and Dblock provides the number of splicing of deep network blocks. The above four parameters are all single integers; Sgenotype, Mgenotype and Dgenotype are all network block codes of different depths, and their encoding forms are consistent, all of which are [(n1 1 ,n2 1 ,n3 1 ,n4 1 ,n5 1 ,n6 1 ,o1 1 ,o2 1 ,o3 1 ,o4 1 ,o5 1 ,o6 1 ),(n1 2 ,n2 2 ,n3 2 ,n4 2 ,n5 2 ,n6 2 ,o1 2 ,o2 2 ,o3 2 ,o4 2 ,o5 2 ,o6 2 ),...,(n1 s ,n2 s ,n3 s ,n4 s ,n5 s ,n6 s ,o1 s ,o2 s ,o3 s ,o4 s ,o5 s ,o6 s )], record (n1 i ,n2 i ,n3 i ,n4 i ,n5 i ,n6 i ,o1 i ,o2 i ,o3 i ,o4 i ,o5 i ,o6 i ) is the i-th network block, where 1≤i≤s, s is equal to the upper limit of the number of network blocks; for the i-th network block, n1 i ,n2 i ,n3 i ,n4 i ,n5 i ,n6 i Represents the six operation nodes of this network block, o1 i ,o2 i ,o3 i ,o4 i ,o5 i ,o6 i Represents the six specific operations of the network block, among which o1 i Represents n1 i Specific operation, o2 i Represents n2 i The corresponding relationship between other operations and nodes can be deduced by analogy. j i is the specific operation of the jth operation node in the i-th network block, where 1≤j≤6, o j i The corresponding relationship with the specific operation is: when o j i = 0, set to 0; when o j i =1, average pooling operation is performed; when o j i =2, the maximum pooling operation is performed; when o j i =3, a convolution operation with a convolution kernel size of 7×7 is performed; when o j i =4, a convolution operation with a convolution kernel size of 3×3 is performed; when o j i =5, a convolution operation with a convolution kernel size of 1×1 is performed; when o j i = 6, a double-layer depth-wise separable convolution operation with a convolution kernel size of 3×3 is performed; when o j i =7, a double-layer depth-wise separable convolution operation with a convolution kernel size of 5×5 is performed; when o j i = 8, a depth-separable convolution operation with a convolution kernel size of 3×3 is performed; when o j i = 9, a depth-wise separable convolution operation with a kernel size of 5×5 is performed; when o j i = 10, spatially separable convolution operations with kernel sizes of 1×3 and 3×1 are performed; when o j i = 11, spatially separable convolution operations with kernel sizes of 1×5 and 5×1 are performed; when o j i =12, no operation is performed; The correspondence between the network block coding and the network block feature calculation process is as follows: States is the set of intermediate feature values ​​of the model architecture corresponding to the current network block coding, and its initial value is States = [s1], where s1 is the intermediate feature of the model transmitted to the current network block; According to the operation nodes and specific operations in the network block encoding, the feature values ​​in States are selected for calculation, and the obtained intermediate features are added to States; finally, all the intermediate features in States that have not been selected for calculation are merged as the output of the model architecture corresponding to the current network block encoding; Indi p The correspondence between the model architecture parameters and the SAR image anti-backdoor classification model architecture is as follows: the initial processing channel number provided by C is set as the initial analysis channel number of the shallow network, and the corresponding number of network block codes are extracted from the Sgenotype code according to the number of shallow network blocks provided by the Sblock code to form a shallow network architecture; a network reduction layer is used to adjust the number of analysis channels to twice the current number of channels as the initial analysis channel number of the middle network; according to the number of middle network blocks provided by the Mblock code, the corresponding number of network block codes are extracted from the Mgenotype code to form a middle network architecture; a network reduction layer is used to adjust the number of analysis channels to twice the current number of channels as the initial analysis channel number of the deep network; according to the number of deep network blocks provided by the Dblock code, the corresponding number of network block codes are extracted from the Dgenotype code to form a deep network architecture; finally, an output layer is used to calculate the output result of the current network; Indi p The Backdoor is encoded as a single integer, which is used to provide the backdoor feature extraction position of the network. When Backdoor=0, the backdoor feature extraction position is the last layer of the shallow network. At this time, the shallow network is regarded as the backdoor feature extraction subnetwork, and the middle network and the bottom network are collectively regarded as the classification subnetwork; when Backdoor=1, the backdoor feature extraction position is the last layer of the middle network. At this time, the shallow network and the middle network are collectively regarded as the backdoor feature extraction subnetwork, and the bottom network is regarded as the classification subnetwork; when Backdoor=2, the backdoor feature extraction position is the last layer of the deep network. At this time, the shallow network, the middle network and the deep network are collectively regarded as the backdoor feature extraction subnetwork, and the classification subnetwork does not consist of network blocks, and only the final output layer is used for classification calculation; Indi p The specific form of Pruning encoding is [Prun1, Prun2, Prun3, Prun4, ..., Prun g ] is a coded string consisting of {0, 1}, representing the network layer position where the pruning operation occurs; Prun i is the i-th pruning code value, where 1≤i≤g; when Prun i = 0, it means that no pruning operation occurs at the i-th network layer position; when Prun i =1, it means that pruning operation occurs at the i-th network layer position; Then, according to the SAR image anti-backdoor classification model, the lower limit of the number of channels C is analyzed. low , the upper limit of the number of starting analysis channels of the SAR image anti-backdoor classification model C up , the lower limit of the number of shallow network blocks Sblock low , the upper limit of the number of shallow network blocks Sblock up , Shallow network block architecture parameter lower limit Synotype low , Shallow Network Block Architecture Parameter Upper Limit Sgenotype up , the lower limit of the number of middle-layer network blocks is Mblock low , the upper limit of the number of middle-layer network blocks Mblock up , the lower limit of the middle-level network block architecture parameter Mgenotype low , the upper limit of the parameters of the middle-level network block architecture Mgenotype up , the lower limit of the number of deep network blocks Dblock low , the upper limit of the number of deep network blocks Dblock up , Deep Network Block Architecture Parameter Lower Bound Dgenotype low , Deep Network Block Architecture Parameter Upper Limit Dgenotype up , backdoor feature selection position parameter lower limit Backdoor low , backdoor feature selection position parameter upper limit Backdoor up , Pruning position parameter lower limit low , Pruning position parameter upper limit up , generate the position code Indi of N initial particles p ,Indi p The integer encoding value of is a random integer whose size is between the lower and upper limits of the corresponding parameter; then, according to Indi vmax and Indi vmin , generate N initial particles with velocity codes Indi v ,Indi v The encoding value is between Indi vmax and Indi vmin Random numbers in the range; finally, N Indi p and N Indi v Combination, as the particle encoding in the initial particle group Q.

5. The SAR image anti-backdoor classification method based on backdoor feature extraction optimization according to claim 1 is characterized in that: The step S4 comprises the following sub-steps: S41: Record the current optimization round. If it is the first time to enter this step, the optimization round is set to 0; S42: According to Q p The corresponding model architecture parameters generate two deep neural network models with the same architecture, one is denoted as the backdoor model and the other is denoted as the clean model; the cross entropy classification loss l is used for the backdoor model ce As the total loss of the backdoor model, use the training learning rate lr and the Adam optimizer to train the offline poisoning dataset X poison_train The model is trained with SAR image data in EP. backdoor ; l ce Calculate according to formula (8); Among them, θ represents all the parameters that constitute the current model, x represents the image data sample in the offline training set, and y represents the category corresponding to x, which is obtained by one-hot encoding. The implementation process of one-hot encoding is: the correct category corresponding to the image is y true ,y n is the total number of classification categories; generates a line with a length of y n The all-zero vector y one_hot ; y one_hot Middle y true The value at the position is changed to 1; one_hot That is the category y true One-hot encoding of ; In the training of the clean model, we first p The backdoor feature extraction position provided by the Backdoor parameter in the backdoor model is used to obtain the backdoor feature from the corresponding position in the backdoor model, and the backdoor feature is subjected to adaptive average pooling processing; then, the feature output in the training is extracted at the same position of the clean model, and the feature similarity is calculated with the backdoor feature after adaptive average pooling processing, and the calculated result l backdoor and the weighted cross entropy loss l of the clean model wce Combine to form the reconstruction loss l sum Used for training clean models; then use the training learning rate lr and the Adam optimizer to train the offline poisoning training dataset X poison_train The model is trained with SAR image data in EP. clean ; where l sum , l wce and l backdoor Calculate according to formula (9), formula (10) and formula (11) respectively; l sum =l wce +l backdoor (9) Among them, f backdoor represents the backdoor model, f clean represents the clean model, f backdoor_ex represents the backdoor feature extraction subnetwork in the backdoor model, f clean_ex Represents the backdoor feature extraction subnetwork in the clean model; after training, based on the pruning position parameter, the pruning strategy based on the channel Lipschitz constant is adopted for the network layer where pruning occurs in the clean model, and the selected channel weight is reset to 0; S43: Calculate the fitness of all particles in the particle swarm Q according to the optimization target of the SAR image anti-backdoor classification model; S44: After calculating the fitness of all particles, a fast non-dominated sorting operation is performed; the fast non-dominated sorting measures the three fitness evaluation indicators of the particles, divides the particles into dominance, and obtains the particles belonging to the Pareto front in the particle group Q; among them, when the particle Indi i The three fitness evaluation indicators of the particle are all smaller than those of another particle Indi j When the particle is i Dominant Particle Indi j ; Remember n i is the number of particles that dominate the i-th particle in the population, S i is the set of particles dominated by the i-th particle; the specific implementation process of fast non-dominated sorting is: first, let F1 be an empty set; traverse the particles in the particle group Q in turn, and calculate the n corresponding to each particle i value, and put the other particles dominated by this particle into the corresponding set S i In; i = 0 are put into set F1; at this time, the particles in F1 are the particles belonging to the Pareto frontier; Then let j1 = 1 and let H be an empty set; traverse F j1 All particles in u To be F j1 The set of particles dominated by the u-th particle in , num q To dominate S u The number of particles in the qth particle; get F j1 Each particle in the u ; for all S u , traverse each S u All particles in , calculate the num corresponding to each particle q value, and let num q =num q -1; if num q =0, then S u The qth particle is placed in the set H; let j1 = j1 + 1; let F j1 =H; repeat the above steps until the obtained F j1 Is an empty set.

6. The SAR image anti-backdoor classification method based on backdoor feature extraction optimization according to claim 1 is characterized in that: The step S5 comprises the following sub-steps: S51: If it is the first time to enter this step, the dominated particle repository is firstly emptied, and then the dominated particle repository operation is updated according to the particle update strategy of the dominated particle repository; the particle update strategy of the dominated particle repository is: when the dominated particle repository is empty, the particles belonging to the Pareto front in the initial particle group Q are directly placed in the dominated particle repository; when the dominated particle repository is not empty, the dominated particle repository is updated according to the domination relationship, and the update strategy is: when the added particle is dominated by the particle in the dominated particle repository, the addition of the particle is abandoned; when there is a particle in the dominated particle repository that is dominated by the added particle, the particle is added and all the particles dominated by it are removed; when there is no domination relationship between the added particle and the particle in the dominated particle repository, the particle is added; When the number of particles in the dominated particle repository exceeds the maximum value N par When , some particles in the dominating particle repository are removed based on the adaptive grid method. The specific process is as follows: all particles in the current dominating particle repository are scanned, and the three particles with the maximum f1 value, the maximum f2 value, and the maximum f3 value are taken as boundary particles; according to the location of the boundary particles and the adaptive network size N ad Construct a three-dimensional grid block. Specifically, (0,0,0), (f1,0,0), (0,f2,0), (0,0,f3), (f1,f2,0), (f1,0,f3), (0,f2,f3), (f1,f2,f3) are used as the eight vertex coordinates. Let lenth1 be the length of the first dimension grid block, lenth2 be the length of the second dimension grid block, and lenth3 be the length of the third dimension grid block. Let the grid block Net i is the i-th grid block, and its vertex coordinates are ((i-1)×lenth1, (i-1)×lenth2, (i-1)×lenth3), (i×lenth1, (i-1)×lenth2, (i-1)×l enth3), ((i-1)×lenth1,i×lenth2,(i-1)×lenth3), ((i-1)×lenth1,(i-1)×lenth2,i×lenth3), (i×len th1,i×lenth2,(i-1)×lenth3),(i×lenth1,(i-1)×lenth2,i×lenth3),((i-1)×lenth1,i×lenth2,i×lenth3),(i×lenth1,i×lenth2,i×lenth3); according to the position information of all particles in the particle repository, the number of particles in all grid blocks is counted to obtain the grid block information where particles exist; record Netnum i For Net i The number of particles in the grid block. The number of particles currently dominating the particle repository is Netnum all , then in Net i Randomly delete Netnum del Particles, Netnum del Calculate according to formula (12), where Represents a round-down operation; S52: Calculate the global optimal particle operation: After updating the dominant particle repository, calculate the current global optimal particle Indi based on the adaptive grid method. gbest ; The specific operation is as follows: first, according to the number of particles in the grid block, the roulette probability is assigned to the grid block, Net i Roulette probability P_Net i Calculate according to formula (13); According to the roulette probability of all grid blocks, a grid block is randomly selected to obtain the global optimal particle Indi gbest ; The global optimal particle selection strategy is: when the grid block contains only one particle, the particle is Indi gbest ; When the grid block contains multiple particles, one of the particles is randomly selected as the Indi gbest ; S53: Update particle operation and calculate local optimal particle: Indi pbest is the local optimal particle corresponding to each particle in the population; if it is the first time to enter this step, the local optimal particle is each particle in the population itself; let rand1 and rand2 be two random numbers between 0 and 1, update the particle position code and particle velocity code in the population according to formula (14) and formula (15), and modify the code that exceeds the boundary value to the boundary value; Now vnew =w×Now v +c1×rand1×(Now pbest -Now p )+c2×rand2×(Now gbest -Now p )(14) Now pnew =Now p +Now vnew (15) Calculate particle index according to the optimization target of SAR image anti-backdoor classification model pnew Three fitness indicators of Indi pnew and Indi p The dominant relationship; when Indi pnew Dominate Indi p When pnew is regarded as the local optimal particle of the particle; when Indi p Dominate Indi pnew When p is regarded as the local optimal particle of the particle; in other cases, Indi is randomly selected pnew and Indi p One of the particles is taken as the local optimal particle; S54: Make Indi pnew =Indi p ,Indi vnew =Indi v , complete the update operation of the particles in the particle swarm Q, and regard the new particle swarm as the new particle swarm Q new .

7. The SAR image anti-backdoor classification method based on backdoor feature extraction optimization according to claim 1 is characterized in that: The step S6 specifically includes: The selection operation of the optimal particle needs to first determine whether the current optimization round has reached the maximum optimization round; if the current optimization round has not reached the maximum optimization round, the recorded current optimization round is increased by 1; if the current optimization round has reached the maximum optimization round, the particles in the dominant particle repository are subjected to a comprehensive fitness evaluation operation to select the optimal particle; the specific selection process is: when the dominant particle repository contains only one particle, the particle is selected as the optimal particle Indi best When the dominated particle repository contains two or more particles, the fitness comprehensive evaluation value f of the i-th particle in the dominated particle repository is calculated according to formula (16): i all , where f1 i represents the f1 fitness evaluation index of the i-th particle, f2 i represents the f2 fitness evaluation index of the i-th particle, f3 i represents the f3 fitness evaluation index of the i-th particle. Select f i all The smallest particle is the optimal particle Indi best , when there are multiple particles with the smallest f i all When The particle with the higher value is regarded as the optimal particle Indi best ; 8. The SAR image anti-backdoor classification method based on backdoor feature extraction optimization according to claim 1 is characterized in that: The step S8 specifically includes: Obtain the real-time monitoring SAR image data from the real-time database of the SAR system, and obtain the online detection normal data set X after image data normalization and image data normalization operations. t , use the same backdoor attack strategy as in the offline poisoning training dataset to detect the normal dataset X online t All image data in the trigger embedding, and set its classification label to 0 to obtain the online poisoning detection dataset X poison_t ; For the deployed SAR image classification model, the normal sample classification accuracy and backdoor attack success rate are calculated according to formula (4) and formula (5) respectively.

9. A SAR image anti-backdoor classification system based on backdoor feature extraction optimization, used to implement the SAR image anti-backdoor classification method based on backdoor feature extraction optimization according to any one of claims 1 to 8, characterized in that: The system comprises: SAR image data preprocessing module, used to construct the training data set of SAR image anti-backdoor classification model, including offline poisoning training data set, offline poisoning verification data set, offline normal verification data set, online detection normal data set and online detection poisoning data set; A setting module, used for setting a plurality of first parameters and an optimization target of a SAR image anti-backdoor classification model; A particle swarm initialization module is used to perform discrete encoding of particle positions and real number encoding of particle velocities on the architecture, backdoor feature extraction position and pruning position of the SAR image anti-backdoor classification model according to the first parameter, and generate an initial particle swarm Q; The particle swarm fitness evaluation and non-dominated sorting module is used to record the optimization rounds, calculate the fitness of all particles in Q based on the offline poisoning training data set, the offline poisoning verification data set, and the offline normal verification data set, and perform fast non-dominated sorting; The new particle swarm performance evaluation and update module is used to update the dominant particle repository, calculate the global optimal particle, update the particle position and velocity, and calculate the local optimal particle to generate the next generation particle swarm Q new ; The iterative judgment module is used to judge whether the optimization round is equal to the maximum optimization round. If the optimization round is equal to the maximum optimization round, the fitness comprehensive evaluation operation is performed on the particles in the dominant particle storage library to calculate the optimal particle; otherwise, the recorded optimization round is increased by 1, and Q new Update to Q, repeat the initial particle swarm fitness evaluation and non-dominated sorting module and the new particle swarm performance evaluation and update module; Online deployment module, used to deploy SAR image anti-backdoor classification model online based on the encoding information of the optimal particles; The online deployment model performance evaluation module is used to build an online detection normal data set and an online detection poisoning data set based on the real-time database of the SAR system, and calculate the normal sample classification accuracy and backdoor attack success rate of the online deployment model.

Citation Information

Patent Citations

  • Robust SAR (Synthetic Aperture Radar) image recognition system and method fusing feature loss and three-objective optimization

    CN116109926A

  • Method, apparatus, and system for wireless tracking, scanning and monitoring

    EP3739356A1