Image confrontation sample cleaning method based on pixel reconstruction

Through pixel reconstruction and Gaussian noise addition of texture maps, a lightweight neural network model is designed, which solves the problems of large calculation overhead and poor effectiveness of unknown attacks by existing adversarial sample cleaning algorithms, and realizes efficient and generalized adversarial sample cleaning. Significantly improves the defense capabilities of the counter samples.

CN119048376APending Publication Date: 2024-11-29SICHUAN UNIV
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411140150.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing adversarial sample cleaning algorithm has high computational overhead and poor cleaning effect on unknown adversarial attacks. It is easy to overfit the known attack mode of the training set and cannot effectively defend against unknown adversarial attacks.

Method used

Using the pixel reconstruction-based image adversarial sample cleaning method, transform samples are generated through adversarial sample attacks, and the image adversarial sample cleaning network is trained, and feature reconstruction is performed using encoder and decoder. Combining Gaussian noise addition and random transformation of texture maps, it is designed. Lightweight neural network model, optimize the network to improve generalization and cleaning effect.

Benefits of technology

The anti-sample sample cleaning with low computational overhead is realized to prevent overfitting, improve the cleaning effect of unknown anti-sample samples, significantly improve the defense ability of the anti-sample, and take into account the classification task performance and purification sample quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048376A_ABST
    Figure CN119048376A_ABST
Patent Text Reader

Abstract

The invention discloses an image adversarial sample cleaning method based on pixel reconstruction, samples are cleaned through an image pixel reconstruction network, the robustness facing unknown attacks is improved by using random transformation operation, and the cleaning effect is improved by using a network optimization target aiming at the cleaning effect and task performance. The purified sample is a cleaned sample, and counterdisturbance in the sample is cleaned. According to the invention, a lightweight neural network model is adopted to realize an image pixel reconstruction process, and an adversarial sample cleaning network is formed. According to the cleaning network provided by the invention, the output result can be obtained without multiple denoising processes, and only one cleaning process is needed, so that the calculation overhead is greatly reduced. The invention also designs a random transformation operation of Gaussian noise addition based on the texture map, which can effectively destroy adversarial noise, prevent the cleaning network from generating overfitting to a known adversarial disturbance mode during training, and further improve generalization of unknown adversarial sample cleaning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of adversarial sample cleaning, and in particular to an image adversarial sample cleaning method based on pixel reconstruction. Background Art

[0002] With the rapid development of artificial intelligence, great technological progress has been made in fields such as computer vision. Deep learning is an important technology in the field of artificial intelligence. It has been successfully applied in fields such as image classification, object detection, semantic segmentation, and natural language processing, and has attracted widespread attention in academia and industry. Deep Neural Networks (DNN) are the core component technology of deep learning. However, due to the black box characteristics of deep neural networks, they face more and more security threats. Among them, adversarial attacks have attracted much attention due to their wide range of threats and diverse forms. Szegedy et al. found that deep neural networks are vulnerable to image samples with specific perturbations. Such samples with adversarial perturbations are called "adversarial samples". Adversarial samples are one of the most typical attacks on deep neural networks. Attackers can make deep neural network models make wrong judgments by adding specific small perturbations.

[0003] Researchers have proposed a series of defense techniques around adversarial samples, which can be mainly divided into: adversarial training, adversarial sample detection, adversarial sample cleaning, etc. Specifically, adversarial training enhances the model's defense against such adversarial attacks by introducing adversarial samples during the training process. This method has significant defense performance against specific attacks, but it is difficult to defend against unknown adversarial attacks. On the other hand, adversarial sample detection aims to screen samples with adversarial perturbations, and it also has the problem of being difficult to resist unknown adversarial attacks. In addition, adversarial sample cleaning filters and removes adversarial perturbations in samples as much as possible by analyzing the properties of adversarial samples, so that the deep neural network model can operate normally.

[0004] For adversarial sample cleaning technology, the early focus was on using image processing technology for cleaning, which often damages the classification accuracy of clean samples. Therefore, the existing methods introduce deep learning to design adversarial sample cleaning solutions to achieve clean sample reconstruction or adversarial sample denoising to achieve defense purposes. The document "Magnet: a two-pronged defense against adversarial examples" trains an autoencoder on a clean sample set to restore adversarial samples, but can only handle adversarial perturbations of weak intensity. The document "Defense against adversarial attacks using high-level representation guided denoiser" proposes an improved denoising autoencoder, which uses the difference between adversarial samples and clean samples in the high-level features of the target model to guide denoiser training and improve denoising stability. In order to retain the useful semantic features in the purified samples as much as possible, "CN202110831879.4 A method, system and data processing terminal for defending against adversarial samples in image classification" proposes a denoising network based on edge feature enhancement. By adding an edge feature enhancement module and a multi-scale feature extraction module, the adversarial loss function guided by vision and category is used as the training target to optimize the denoising network. With the introduction of diffusion models, researchers began to introduce them into adversarial sample cleaning tasks. The paper "Diffusion models for adversarial purification" uses a denoising diffusion probability model to purify adversarial samples, taking adversarial samples as input and restoring clean samples through the reverse generation process of the diffusion model.

[0005] However, the above methods still have shortcomings:

[0006] 1) Sample cleaning algorithm has high computational overhead

[0007] Existing algorithms begin to use diffusion models to clean adversarial samples. The model operations are complex and computationally intensive, and cannot be deployed on devices with limited computing resources.

[0008] 2) Poor cleaning effect against unknown adversarial attacks

[0009] Due to the differences between adversarial attacks, existing deep learning-based adversarial sample cleaning algorithms are prone to overfitting to the known attack patterns of the training set. When the cleaning object contains adversarial perturbations generated by unknown adversarial attacks, the defense effect is poor. Summary of the invention

[0010] The purpose of the present invention is to provide an image adversarial sample cleaning method based on pixel reconstruction.

[0011] The technical solution for achieving the purpose of the present invention is as follows:

[0012] An image adversarial sample cleaning method based on pixel reconstruction, comprising:

[0013] Step 1: Use the adversarial sample attack method to attack the clean image Attack and obtain adversarial sample images Where i = 1,…,N, N is the total number of clean images, H and W represent the height and width of the clean image, respectively. With clean image The height and width are the same;

[0014] Step 2: N adversarial sample images Perform random transformation to obtain N transformed sample images Transform the sample image With adversarial sample images The height and width are the same;

[0015] Step 3, training the image adversarial sample cleaning network;

[0016] 3.1 The image adversarial sample cleaning network is:

[0017] 3.1.1 Transform the sample image Input encoder E and get feature map M i ,Right now

[0018] The encoder E is composed of A residual blocks cascaded, A is greater than or equal to 2; each residual block is composed of a convolutional layer, a ReLU layer and another convolutional layer cascaded; C is the number of channels of the feature map;

[0019] 3.1.2 Selecting the purified sample image Query the coordinates (u, v) of the pixel and obtain its normalized coordinates p = (m, n);

[0020] The purified sample image is the image cleaned by the image adversarial sample cleaning network, which is different from the adversarial sample image

[0021] The height and width are the same; (u, v) means that the coordinate system is established with the upper left corner of the image as the origin and in pixels.

[0022] u∈{0,1,…,W-1}, v∈{0,1,…,H-1};

[0023] The normalized coordinates p=(m,n) of the query pixel are: m=u / W, n=v / H;

[0024] 3.1.3 Extracting feature map M i The coordinates corresponding to the normalized coordinates p of the query pixel The feature vector of the k×k region centered on the local feature in, Indicates rounding down;

[0025] 3.1.4 Local feature z l All element vectors in z l (I, J, :) are connected in series to obtain the rearranged feature z * ;

[0026] The element vector z l (I,J,:) is the local feature z l The feature vector of the C channels in the I-th row and J-th column,

[0027] I, J∈{0,1,…,k-1}; the concatenation is: concatenating the element vectors of each row in sequence according to the column number, and then concatenating all the concatenated rows in sequence according to the row number;

[0028] 3.1.5 Rearrange feature z * and the normalized coordinates p = (m, n) to form a dimension of (k 2 C+2) vector, and then input it into the decoder to obtain the purified sample image Query the RGB value of a pixel in def ,g def ,b def ];

[0029] The decoder is composed of two or more fully connected layers in cascade;

[0030] 3.1.6 Obtain the purified sample image according to 3.1.2-3.1.5 The RGB values ​​of all query pixels in the , thereby obtaining the purified sample

[0031] This image

[0032] 3.2 Training the image adversarial sample cleaning network: The N transformed sample images obtained in step 2 Input the image adversarial sample cleaning network to obtain N purified sample images Calculate the target loss function L total ; Use back propagation to train the network and update the network parameters of the image adversarial sample cleaning network;

[0033] The target loss function L of the image adversarial sample cleaning network total as follows:

[0034] L total =L rec +λL cls ;

[0035] Where, L rec represents the image reconstruction loss, L cls represents the image classification performance loss, and λ is the preset weight parameter;

[0036] Image reconstruction loss L rec as follows:

[0037]

[0038] In the formula, ‖·‖ c represents the Lc norm, c is 1 or 2;

[0039] The image classification performance loss is as follows:

[0040]

[0041] Where CE(·) represents the calculation of the cross entropy loss based on the input data and its classification labels; y i express The corresponding correct classification label, Indicates the use of classifier f for Classification; the classifier f is pre-trained on clean images and its parameters are frozen;

[0043] Step 4: After randomly transforming the image to be cleaned according to the random transformation method in step 2, the trained image is input into the adversarial sample cleaning network for cleaning to obtain a cleaned sample image.

[0044] In a preferred technical solution, in step 2, the random transformation is Gaussian noise addition based on the texture map, as follows:

[0045]

[0046] In the formula, k is the noise intensity factor, η is the standard Gaussian noise; α is Texture map,

[0047]

[0048] In the formula, S(·) represents the Sigmoid function, l and p are the preset cutoff parameters; σ represents the standard deviation graph,

[0049] If u∈U, v∈V;

[0050] Where s represents the local window size and is an odd number, U = {(s-1) / 2, (s+1) / 2, …, W-1-(s-1) / 2}, V = {(s-1) / 2, (s+1) / 2, …, H-1-(s-1) / 2}.

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

[0052] 1. The present invention uses a lightweight neural network model to implement the image pixel reconstruction process and construct an adversarial sample cleaning network. Different from the existing cleaning algorithm based on the diffusion model, the cleaning network proposed in the present invention does not need to go through multiple denoising processes to obtain the output result, but only requires one cleaning process, which greatly reduces the computational overhead.

[0053] 2. The present invention also designs a random transformation operation based on the addition of Gaussian noise to the texture image, which can effectively destroy the adversarial noise and prevent the cleaning network from overfitting to the known adversarial perturbation patterns during training, thereby improving the generalization of cleaning unknown adversarial samples.

[0054] 3. The design of the present invention comprehensively considers the network optimization goal of the cleaning effect and the classification task performance, takes the task performance of the classification model as a guide, takes into account the quality of the purified samples and the interference with the original classification model performance, and achieves a better defense effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 Schematic diagram of calculating the standard deviation diagram in the embodiment.

[0056] Figure 2 It is an overall framework diagram of the image adversarial sample cleaning method based on pixel reconstruction in the embodiment.

[0057] Figure 3 Schematic diagram of the structure of the adversarial sample cleaning network in the embodiment.

[0058] Figure 4 Schematic diagram of the process of obtaining rearrangement features by serial connection in the embodiment. DETAILED DESCRIPTION

[0059] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0060] A pixel-reconstruction-based image adversarial sample cleaning method uses an image pixel reconstruction network to clean samples, and uses random transformation operations to improve robustness against unknown attacks. Then, a network optimization target for cleaning effect and task performance is used to improve the cleaning effect. The purified sample is a cleaned sample in which adversarial perturbations are cleaned.

[0061] A. Training phase (e.g. Figure 2 shown):

[0062] Step 1. Construct a clean sample set for training, containing N clean images i=1,…,N, H and W represent the height and width of the color image sample, respectively. Select an adversarial sample attack method to attack each clean image, such as the Fast Gradient Sign Method (FGSM), and generate the corresponding adversarial sample image. Constructing clean-adversarial image pairs In this example, N is 128.

[0063] Step 2. Pair the clean and adversarial image Adversarial examples in Perform random transformation to obtain clean-transformed sample image pairs i=1,…,N. Random transformation can also be performed by adding Gaussian noise or randomly masking image blocks.

[0064] The random transformation used in this embodiment is a Gaussian noise addition operation based on the texture image, which aims to improve the generalization of unknown attacks. Specifically, a Gaussian noise vector η with a dimension of H×W×3 is generated. Each element in the vector is sampled from a Gaussian distribution with a mean of 0 and a variance of 1. Then, an adversarial sample is generated. If the image sample is a color image, it is first converted into a grayscale image, and then the standard deviation map σ is generated as follows:

[0065] If u∈U,v∈V

[0066] Among them, a coordinate system (u, v) in pixels is established with the upper left corner of the image as the origin. The horizontal coordinate u and vertical coordinate v of the pixel are the column number and row number of the pixel in the image array, u∈{0,1,…,W-1}, v∈{0,1,…,H-1}. U={(n-1) / 2,(n+1) / 2,…,W-1-(n-1) / 2}, V={(n-1) / 2,(n+1) / 2,…,H-1-(n-1) / 2}. std(·) represents the operation of calculating the standard deviation. The operation x(a1:a2,a3:a4) means taking the elements of the rectangular area with coordinates (a1,a3) as the upper left corner and (a2,a4) as the lower right corner in the input data x. n is the local window size, which is 7 in this example. The generation process of the standard deviation map is as follows Figure 1 shown.

[0067] Then, generate adversarial examples The texture map α has a size of H×W×1 and a value range between 0 and 1. The specific generation method is as follows:

[0068]

[0069] Where S(·) represents the Sigmoid function, l and p are the preset truncation parameters. In this example, l and p are 1 and 5 respectively.

[0070] The transformed sample is calculated based on the standard Gaussian noise η, texture map α and adversarial sample

[0071]

[0072] Among them, u∈{0,1,…,W-1}, v∈{0,1,…,H-1}, k is the noise intensity factor, which is taken as 0.1 in this example.

[0073] Step 3. Select the query pixel position coordinates (u, v). The query pixel refers to the pixel with coordinates (u, v) in the cleaned sample output by the adversarial sample cleaning network. Define the normalized coordinate position p = (m, n) of the query pixel as:

[0074] m=u / W,n=v / H

[0075] Step 4. Input into encoder E to get feature map Among them, the encoder E can be composed of N k The residual blocks are cascaded. In this example, N k = 15. Each residual block consists of a convolutional layer, a ReLU layer, and another convolutional layer in cascade. C is the number of channels of the feature map, which is 64 in this example.

[0076] Step 5. Transform the feature map M i After local feature positioning, the local feature z is obtained l Specifically, local feature localization refers to finding the feature map M according to the normalized coordinate position p of the query pixel. i The eigenvectors of the corresponding coordinates in in, Indicates floor operation. Then, extract The coordinates are the elements of the center k×k area, and the local features are obtained In this example, k is 3.

[0077] Step 6. Transform the local feature z l The element vector z for each spatial position in l (I, J, :) are connected in series to obtain the rearranged feature z * , where I,J∈{0,1,…,k-1}. The local feature z l The rearrangement feature obtained after rearrangement is recorded as The rearrangement concatenation method is to put different element vectors z l (I,J,:) is used to connect the head and tail, and the connection order is based on the row number I first. For example: z l (I,J,:) then concatenate z l (I+1,J,:). And z l Since (I,k-1,:) is the last element of row I, we concatenate the element vector corresponding to the first element of the next row, i.e. z l (I+1,0,:). The specific process of feature rearrangement is as follows Figure 4 shown.

[0078] Step 7. Rearrange the features z * The normalized coordinate position of the query pixel p = (m, n) is concatenated to form a pixel with dimension (k 2 C+2) vector, which is input into decoder L. Decoder L outputs the RGB value of the pixel with coordinate (u,v) in the cleaned sample [r def ,g def ,b def ].

[0079] [r def ,g def ,b def ]=L([z * ,p])

[0080] Considering the computational efficiency, the decoder L has a multi-layer perceptron structure, which is composed of multiple fully connected layers in cascade. In this example, the decoder L consists of 4 fully connected layers, and the number of neurons is [256, 256, 256, 3]. The structure of the adversarial sample cleaning network is as follows: Figure 3 shown.

[0081] Step 8. For the cleaned sample, select the query pixel from left to right and from top to bottom and repeat steps 3 to 7 until the adversarial sample cleaning network outputs the cleaned sample. The RGB values ​​of all pixels in the sample are collected, and the sample cleaning is completed.

[0082] Step 9. In order to train and update the network parameters in the cleaning network G, the following objective loss function is constructed:

[0083] L total =L rec +λL cls

[0084] Where L rec represents the image reconstruction loss, L cls represents the image classification performance loss, L totalRepresents the overall loss function, λ is the preset weight parameter. In this example, λ is taken as 0.001.

[0085] Among them, the reconstruction loss L rec The specific calculation formula is as follows:

[0086]

[0087] in Represents the purified sample, represents a clean sample, ‖·‖ c Indicates calculation of Lc norm, c is 1 or 2, that is, calculation of L1 or L2 norm. In this embodiment, L1 norm is used.

[0088] Calculate the classification loss L cls When the sample is purified Input to the classifier model f that has been pre-trained with clean sample data and whose model parameters are frozen. The specific formula is as follows:

[0089]

[0090] Where CE(·) represents the calculation of the cross entropy loss based on the input data and its classification labels. i Indicates a clean sample The corresponding correct classification label, Represents a purified sample.

[0091] Step 10. According to the objective loss function L total , combined with the back propagation algorithm, update the parameters of the adversarial sample cleaning network G to obtain the trained adversarial sample cleaning network G * .

[0092] B. Testing phase:

[0093] Step 1. Take the sample x in the test set and execute step 2 to obtain the transformed sample x RT .

[0094] Step 2. Transform sample x RT Input to the trained adversarial sample cleaner G * , after executing steps 3 to 8, we get the purified sample x def .

[0095] When used, the sample to be cleaned is randomly transformed according to the method in step 2 and then input into the trained adversarial sample cleaner G. * , after executing steps 3 to 8, a cleaned sample is obtained.

[0096] In order to illustrate the performance of the above-mentioned inventive solution, relevant experiments were carried out.

[0097] Experimental settings: The dataset uses CIFAR-10. The data preprocessing method is as follows: its training set contains 50,000 clean image samples. For each image sample, the ResNet18 image classification model pre-trained on the CIFAR-10 dataset and the FGSM adversarial sample algorithm are used to generate the corresponding adversarial sample. Finally, there are 50,000 pairs of adversarial samples and clean samples. Its test set contains 10,000 clean image samples. In the test phase, the adversarial sample algorithm is used to generate the corresponding adversarial sample for each clean image sample. The training set is used to train the adversarial sample cleaning network, and the test set is used to evaluate the performance of the adversarial sample cleaning network. In the test phase, the classification loss is calculated using the ResNet50 classifier trained on CIFAR-10. The loss weight hyperparameter λ=0.001. In the training phase, the FGSM adversarial sample algorithm is used to generate adversarial samples. Each time the parameters of the cleaning network are updated, 64 pairs (i.e., 128 samples) are randomly selected from the 50,000 pairs of adversarial samples and clean samples, and the learning rate is set to 1×10 -4 The process is repeated 1000 times to obtain a trained adversarial sample cleaning network. The experimental indicators are standard accuracy (SA) and robust accuracy (RA), which represent the classification accuracy of clean samples after cleaning and the classification accuracy of adversarial samples after cleaning, respectively. The higher the value of the above two indicators, the better the cleaning effect. Select the adversarial sample attack algorithm AutoAttackl ∞ (Adversarial sample strength: ∈=8 / 255) and AutoAttackl2 (Adversarial sample strength: ∈=1) are used as adversarial attack methods in the testing phase. The experiment will be compared with the existing adversarial sample cleaning algorithm.

[0098] Table 1 Cleaning performance test of adversarial sample cleaning algorithm against unknown attacks (%)

[0099]

[0100] Table 1 shows the comparative experimental results of Example 1 of the present invention and other methods, and the best results are in bold. The comparative results in the table are divided into four parts: the first part is the performance of the classifier when no defense method is used. It can be seen that there is no resistance to the adversarial attack algorithm, and all classifications are wrong; the second part is to use the adversarial training method as a defense method, and lists the method in the document "Perceptual adversarial robustness: Defense against unseenthreat models" and the use of AutoAttackl ∞The performance of the classifier after adversarial training and AutoAttackl2. Adversarial training can improve the defense effect against known attacks to a certain extent, but the defense effect against unknown attacks is poor; Part III: PAT-self refers to the adversarial training method proposed by Laidlaw et al. in the paper "Perceptual adversarial robustness: Defense against unseen threat models"; Adv. CRAIG is the paper " and beyond: Unleashing efficient adversarial training. The experimental results show that the proposed method is superior to the existing typical methods in terms of standard accuracy and robust accuracy. Overall, the proposed method achieves the best defense effect, which proves that the proposed method has stronger defense generalization against unknown attacks. In addition, the proposed method has good computational efficiency, and it only takes 9.9 milliseconds to process a picture with a resolution of 128×128.

Claims

1. A method for cleaning adversarial samples of images based on pixel reconstruction. It is characterized in that include: Step 1: Use the adversarial sample attack method to attack the clean image Attack and obtain adversarial sample images Where i = 1, ..., N, N is the total number of clean images, H and W represent the height and width of the clean image, respectively. With clean image The height and width are the same; Step 2: N adversarial sample images Perform random transformation to obtain N transformed sample images Transform the sample image With adversarial sample images The height and width are the same; Step 3, training the image adversarial sample cleaning network; 3.1 The image adversarial sample cleaning network is: 3.1.1 Transform the sample image Input encoder E and get feature map M i ,Right now The encoder E is composed of A residual blocks cascaded, A is greater than or equal to 2; each residual block is composed of a convolutional layer, a ReLU layer and another convolutional layer cascaded; C is the number of channels of the feature map; 3.1.2 Selecting the purified sample image Query the coordinates (u, v) of the pixel in the image, and obtain its normalized coordinates p = (m, n); The purified sample image is the image cleaned by the image adversarial sample cleaning network, which is different from the adversarial sample image The height and width are the same; (u, v) means that a coordinate system in pixels is established with the upper left corner of the image as the origin, u∈{0, 1, ..., W-1}, v∈{0, 1, ..., H-1}; The normalized coordinates p=(m, n) of the query pixel are: m=u / W, n=v / H; 3.1.3 Extracting feature map M i The coordinates corresponding to the normalized coordinates p of the query pixel ( ) is the feature vector of the k×k region centered on the local feature in, Indicates rounding down; 3.1.4 Local feature z l All element vectors in z l (I, J, :) are connected in series to obtain the rearrangement feature z * ; The element vector z l (I, J, :) is the local feature z l The characteristic vectors of the C channels in the ,th row and the Jth column, I, J∈{0, 1, ..., k-1}; the concatenation is: concatenating the element vectors of each row in sequence according to the column number, and then concatenating all the concatenated rows in sequence according to the row number; 3.1.5 Rearrange feature z * and the normalized coordinates p = (m, n) to form a dimension of (k 2 C+2) vector, and then input it into the decoder to obtain the purified sample image Query the RGB value of a pixel in def , g def , b def ]; The decoder is composed of two or more fully connected layers in cascade; 3.1.6 Obtain the purified sample image according to 3.1.2-3.1.5 The RGB values ​​of all query pixels in the image are obtained to obtain the purified sample image. 3.2 Training the image adversarial sample cleaning network: The N transformed sample images obtained in step 2 Input the image adversarial sample cleaning network to obtain N purified sample images Calculate the target loss function L total ; Use back propagation to train the network and update the network parameters of the image adversarial sample cleaning network; The target loss function L of the image adversarial sample cleaning network total as follows: THE total =L rec +λL cls ; Where, L rec represents the image reconstruction loss, L cls represents the image classification performance loss, and λ is the preset weight parameter; Image reconstruction loss L rec as follows: In the formula, ||·|| c represents the Lc norm, c is 1 or 2; The image classification performance loss is as follows: Where CE(·) represents the calculation of the cross entropy loss based on the input data and its classification labels; yi represents The corresponding correct classification label, Indicates the use of classifier f for Classification; the classifier f is pre-trained on clean images and its parameters are frozen; Step 4: After randomly transforming the image to be cleaned according to the random transformation method in step 2, the trained image is input into the adversarial sample cleaning network for cleaning to obtain a cleaned sample image.

2. The image adversarial sample cleaning method based on pixel reconstruction as claimed in claim 1, It is characterized in that In step 2, the random transformation is the addition of Gaussian noise based on the texture map, as follows: In the formula, k is the noise intensity factor, η is the standard Gaussian noise; α is Texture map, In the formula, S(·) represents the Sigmoid function, l and p are the preset cutoff parameters; σ represents the standard deviation graph, In the formula, std(·) represents the calculated standard deviation, s represents the local window size and is an odd number, U={(s-1) / 2, (s+1) / 2,..., W-1-(s-1) / 2}, V={(s-1) / 2, (s+1) / 2,..., H-1-(s-1) / 2}.

Citation Information

Cited By

  • Sample purification method and device and computer equipment

    CN120510029A

  • Sample purification method, device, and computer equipment

    CN120510029B

  • Robustness improvement method and system for target detection in complex power scene

    CN121033401A

  • A method and system for robustness improvement of target detection in complex power scenarios

    CN121033401B

  • Self-adaptive confrontation image defense method based on intensity perception and related equipment

    CN121961928A