Adversarial patch generation method for visual classification networks considering data privacy

CN114863184BActive Publication Date: 2024-09-27JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210583999.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-27
Publication Date
2024-09-27
Estimated Expiration
2042-05-27

AI Technical Summary

Technical Problem

In data privacy-sensitive applications, existing adversarial patch generation methods cannot effectively utilize training data sets, resulting in inability to be applied to dynamically changing physical scenarios, increasing attack difficulty and security risks.

Method used

A method of generating adversarial patches for visual classification networks that considers data privacy is proposed. By selecting the target attack network, collecting public visual data sets, selecting proxy data sets based on APS indicators, and using EoT and DF-EoT algorithms to generate adversarial patches, the adversarial approach is achieved. Patch generation and attack performance evaluation.

Benefits of technology

This method can generate effective adversarial patches in data privacy-sensitive applications, expose security vulnerabilities in visual networks, improve network security, and provide sample support for defense strategies, simplifying the implementation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114863184B
    Figure CN114863184B
Patent Text Reader

Abstract

A method for generating adversarial patches for visual classification networks considering data privacy belongs to the field of deep network security technology. The purpose of the present invention is to take a typical visual network - a classification network as the target attack network, and propose a method for generating adversarial patches for visual classification networks considering data privacy. The steps of the present invention are: selection of target attack network, collection of available data sets, selection of proxy data sets based on APS indicators, and patch generation of DF‑EoT algorithm. The method adopted by the present invention is easy to implement and can be widely used in security vulnerability detection of visual networks in privacy-sensitive applications. The generated adversarial patches can be used for the development of defense strategies based on vulnerability remediation, and promote the development of secure visual networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of deep network security. Background Art

[0002] With the popularity of deep visual classification networks in applications such as autonomous driving and face recognition, network security has received widespread attention from academia and industry. In this context, adversarial patch generation technology for security vulnerability detection has emerged. Adversarial patches are artificially synthesized low-dimensional "patch" images that cause network failures by replacing local pixels of high-dimensional input images, exposing visual network security vulnerabilities, and thus providing sample support for the development of defense strategies based on vulnerability patching. Figure 1 As shown, the visual classification network classifies the perturbed image with the adversarial patch as the attacker's preset target category - "gibbon", thereby interfering with the correct identification of "panda" and causing the network to fail.

[0003] As attached Figure 2 As shown in the figure, in order to apply the adversarial patch to physical scenes where the network input changes dynamically, patch generation often requires the use of the network's training data. The attacker will iteratively place the patch on different training data set images and update the pixels so that the patch (foreground) is not affected by background changes. Then, the patch will be printed and pasted on the object to be disturbed, and sent to the visual network by means of camera shooting, thereby realizing adversarial attacks in physical scenes.

[0004] CN112241790A discloses a method for generating small adversarial patches, which places patches on images of different training data sets and optimizes patch pixel values ​​according to a feature enhancement loss function, thereby generating adversarial patches that can be applied to physical scenes.

[0005] CN112364915A discloses an imperceptible adversarial patch generation method. The method uses Grad-Cam technology to calculate the feature contribution area in the input image and interferes with the visual network by adding subtle perturbations to the sensitive area. Since the training data set is not fully utilized and the sensitive areas of different input images are often different, the patches generated by this method cannot be applied to dynamically changing physical scenes.

[0006] In summary, training data is the key to whether adversarial patches can be applied to visual network security vulnerability detection in physical scenarios. However, in data privacy-sensitive applications such as face recognition and military vehicle detection, network training data sets are usually strictly protected and difficult to obtain, which increases the difficulty of attacks and makes security risks difficult to detect. Therefore, it is urgent to explore adversarial patch generation methods for visual network security vulnerability detection in data privacy-sensitive applications, and to develop defense strategies based on this method to improve network security. Summary of the invention

[0007] The purpose of this invention is to target the typical visual network - classification network and propose a method for generating adversarial patches for visual classification network considering data privacy.

[0008] The steps of the present invention are:

[0009] S1. Selection of target attack network: Select the visual network that needs to be used for security vulnerability detection as the target attack network. Given a training dataset Any image X∈[0,1] d and its actual category digital encoding y∈{1,2,…,m}, classification network Classify X according to the following formula:

[0010]

[0011] in Table Network Estimated category of input image X; Represents an m-dimensional vector The jth component of The confidence that X belongs to the jth class;

[0012] S2. Collection of available datasets: Collecting public visual datasets as a set of available datasets In order to select a suitable proxy dataset Used to replace training data sets Provide background images for adversarial patch generation;

[0013] S3. Selection of proxy datasets based on APS indicators, including the following processes:

[0014] The proxy dataset is selected according to the following formula:

[0015]

[0016] in, is the selected proxy dataset; It is the proxy data set selection index APS designed by the present invention; Representative Selection Network When attacking a network, based on the dataset The average attack performance of the generated patch is calculated for each available dataset. The APS value of the dataset with the largest APS value is selected as the proxy dataset. The specific steps are as follows:

[0017] S3.1. Generation of adversarial patch groups for the EoT algorithm

[0018] Initialize m patches {P1,P2,…,P m}, one by one, taking the initialization patches as input, and using Sampled images to generate adversarial patches in, The target category {y'1,y'2,…,y' m} and target attack classification network The category codes {1,2,…,m} are equal one by one;

[0019] Adversarial patch P * The generation can be transformed into

[0020]

[0021] Among them, the patch P∈[0,1] n The dimension n is much smaller than Medium Image The dimension d of y' is the target category of the patch; Z represents the set of all possible locations of the patch in the image, z is a position uniformly randomly sampled from Z; the R set represents the set of natural transformations that may exist on the patch in the physical scene, r is a natural transformation obtained by uniform random sampling from R; the objective function is defined as:

[0022]

[0023] Represents the network prediction perturbation image X P Negative log probability value of belonging to target category y'; perturbation image X P ∈[0,1] d for:

[0024]

[0025] in is the paste operation function that pastes the patch P on the original image X; the paste operation first uses the natural transformation r Transform the patch P, where r = (r1, r2, ...), and the patch transformation includes rotating the patch Degree, zoom times, etc.; then, the paste operation pastes the transformed patch P' to the position of image X z On the top, where z = (z1, z2), we get the perturbation image X P , where (z1,z2) is the horizontal and vertical coordinates of the position of P' in the image X;

[0026] The EoT algorithm is selected to solve the optimization problem corresponding to formula (3). In the EoT algorithm, is the projection operator,

[0027] It can be regarded as the solution of the following optimization problem:

[0028]

[0029] EoT algorithm:

[0030] Input: Dataset Position set Z, natural transformation set R, target category y', perturbation update step size α, paste operation function Objective Function Projection operator Total number of iterations T;

[0031] Output: Adversarial patch P *

[0032] 1. Initialize the patch P with uniform random noise in the range [0,1] 0 , t←0

[0033] 2.for t<Tdo

[0034] 3.

[0035] 4.

[0036] 5.

[0037] 6.

[0038] 7.t←t+1

[0039] 8.end for

[0040] 9.P * ←P T

[0041] 10.returnC

[0042] S3.2. Acquisition of APS

[0043] Utilize the generated adversarial patch set The data set is calculated according to the following formula APS value:

[0044]

[0045] in, Patch Saliency is a performance metric for patch attacks.

[0046] Adversarial patch P * The PS value calculation process is divided into three steps:

[0047] a. Paste operation function Patch P * Paste the picture on the black background The center of the perturbation picture is obtained

[0048] b. Integral gradient function Will disturb the picture and the target category y' of the patch as input, and output a saliency map G F (X ( P * ,S),y′), where the saliency map measure The importance of each pixel in y';

[0049] c. Adversarial patch P * The PS value is obtained by the following formula:

[0050]

[0051] in:

[0052]

[0053] symbol[.] b Represents the b-th dimension component of the internal vector; is the adversarial patch P * exist The mask on ; the operator ⊙ represents the Hadamard product between two vectors;

[0054] S3.3. Stopping conditions for APS calculation

[0055] If available dataset group If the APS value of any dataset in is known, the dataset with the largest APS value is selected as the proxy dataset. Otherwise, return to S3.1;

[0056] S4. Patch generation of DF-EoT algorithm

[0057] S4.1. Adversarial patch initialization

[0058] Initialize the adversarial patch with uniform random noise in the pixel value range [0,1]

[0059] S4.2. Transformation sampling

[0060] First, the proxy dataset The patch position set Z and the natural transformation set R are uniformly randomly sampled to obtain the background image X, position coordinates z , natural transformation r ; Then, paste the operation The transformed patch will be pasted at position X of the background image z Then we get the disturbance image X P ;

[0061] S4.3. Background Update

[0062] Get the perturbation image X P Then, the image background X is calculated according to the following formula back To update:

[0063]

[0064] Among them, X back is the perturbation image X P The remaining pixels except patch P in the objective function See equation (4); the optimization problem is solved by X back Pixel update suppression X P Classify it as the target category y', simulating an interfering picture background;

[0065] S4.4, patch update

[0066] For the perturbation image X P Background X back After the update, P The pixels of patch P are updated to solve the following optimization problem:

[0067]

[0068] Among them, the objective function See equation (4), the optimization problem (10) is to promote X by updating the pixel value of patch P P Classify into target category y';

[0069] S4.5. Patch update stop conditions

[0070] Determine the number of updates of patch P; if the number is greater than or equal to β total Then proceed to the next step, otherwise return to step S4.2 to perform the next round of iterative update of patch P;

[0071] S4.6. Patch generation stop condition

[0072] Assume that the number of existing adversarial patches is i, save P obtained in step S4.5, and express it as If i+1≥k holds, proceed to the next step, otherwise return to step 4.1 to generate a new adversarial patch;

[0073] S4.7. Restart selection based on PS index

[0074] Select the most aggressive patch from the k patches saved in step S4.6 as the final output; restart the selection step to calculate the k patches separately The PS value of the patch with the largest PS value is selected as the output patch P of the DF-EoT algorithm. * .

[0075] The method adopted by the present invention is easy to implement and can be widely used in security vulnerability detection of visual networks in privacy-sensitive applications. The generated adversarial patches can be used for the development of defense strategies based on vulnerability remediation, thus promoting the development of secure visual networks. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 is a schematic diagram of adversarial patch attack;

[0077] Figure 2 is a schematic diagram of patch attack in a physical scenario;

[0078] Figure 3 is a flow chart of a method for generating adversarial patches for a visual classification network considering data privacy according to the present invention;

[0079] Figure 4 It is a schematic diagram of the design of the method for generating adversarial patches for a visual classification network considering data privacy of the present invention;

[0080] Figure 5 It is the selection of the proxy data set based on the APS indicator in step 3 of the present invention;

[0081] Figure 6 It is a schematic diagram of APS calculation;

[0082] Figure 7 is a schematic diagram of the paste operation;

[0083] Figure 8 It is a schematic diagram of PS calculation;

[0084] Fig. 9 is the integrated gradient function;

[0085] Fig.10 is the Hadamard product of the original image and the mask;

[0086] Fig.11 It is the patch generation based on the DF-EoT algorithm in step 4 of the present invention;

[0087] Fig.12 It is the classification result diagram of some frames in the patch attack test video. DETAILED DESCRIPTION

[0088] First, when the training data is unknown, the APS (Average Patch Saliency) indicator is used to select a proxy dataset suitable for patch generation from publicly available datasets; then the DF-EoT (Data-Free Expectation over Transformation) algorithm is used to generate adversarial patches; finally, the network is judged whether there is a security vulnerability by checking whether the network can be misled by the patch.

[0089] The present invention is achieved through the following technical solutions:

[0090] Step 1: Selection of target attack network: Select the visual network that needs to be tested for security vulnerabilities as the target attack network.

[0091] Step 2: Collection of available datasets: Collect public visual datasets as a set of available datasets.

[0092] Step 3: Selection of proxy dataset based on APS indicators, including the following process:

[0093] Step 3.1 Generation of adversarial patch groups based on the EoT algorithm: Select any dataset with unknown APS value from the available dataset group collected in step 2 to provide a background image for patch generation, and use the EoT (Expectation over Transformation) algorithm to generate a set of adversarial patches.

[0094] Step 3.2 APS calculation: Calculate the PS (Patch Saliency) value of each adversarial patch in the patch group generated in step 3.1, and select the average PS value of the patch group as the APS value of the data set selected in step 3.1.

[0095] Step 3.3 Stopping condition for proxy data selection: If the APS value of any dataset in the available dataset group is known, select the dataset with the largest APS value as the proxy dataset and proceed to the next step, otherwise return to step 3.1.

[0096] Step 4: Generate adversarial patches based on the DF-EoT algorithm, including the following processes:

[0097] Step 4.1 Initialization of adversarial patches: Initialize the pixel values ​​of adversarial patches using uniform random noise.

[0098] Step 4.2 Transformation Sampling: Uniformly randomly sample the proxy dataset, the set of patch locations, and the set of natural transformations. Then, the pasting operation function takes the adversarial patch, the sampled image, the sampled location, and the sampled transformation as input and outputs the perturbed image.

[0099] Step 4.3 Background update: Update the background pixels of the perturbed image obtained in step 4.2 to suppress the perturbed image from being classified as a patch target category by the target attack network, thereby achieving the purpose of interfering background simulation.

[0100] Step 4.4 Patch update: Based on the background update in step 4.3, the adversarial patch pixels in the perturbed image are further updated, so that the perturbed image is classified as the patch target category, thereby achieving the purpose of enhancing the aggressiveness of the patch.

[0101] Step 4.5 Patch update stop condition: Determine the number of iterative updates of the adversarial patch. If the number is equal to the preset value, proceed to the next step; otherwise, return to step 4.2 and execute the next iterative update of the patch.

[0102] Step 4.6 Patch generation stop condition: Save the adversarial patch updated in step 4.5. If the number of saved patches reaches the preset value, proceed to the next step, otherwise return to step 4.1 to generate a new adversarial patch.

[0103] Step 4.7 Restart selection based on PS metric: Calculate the PS value of each patch in step 4.6 and select the patch with the largest PS value as the output patch of step 4.

[0104] Step 5: Evaluation of the attack performance of the adversarial patch: The evaluation experiment will first place the patch displayed on an electronic screen or paper next to the object to be interfered with. Then use a camera to take a picture of the adversarial patch and the object to be interfered with, and input the captured digital picture into the target attack network. Finally, based on the network output results, it is determined whether the generated patch is a network security vulnerability.

[0105] The following is combined with Figure 3 The preferred embodiments of the present invention are given to explain the technical solution of the present invention in detail:

[0106] Step 1: Selection of target attack network

[0107] This example selects the industry-leading visual classification network, VGG-19, as the target attack network. Given a training data set Any image X∈[0,1] d and its actual category digital encoding y∈{1,2,...,m}, classification network Classify X according to the following formula:

[0108]

[0109] in Representative Network Estimated category of input image X; Represents an m-dimensional vector The jth component of The confidence that X belongs to the jth class.

[0110] Step 2: Collection of available data sets

[0111] As attached Figure 4 As shown, the inventive method collects public visual datasets on the Internet as a set of available datasets In order to select a suitable proxy dataset Used to replace training data sets Provide background images for counter-patch attacks.

[0112] This example collects 5 kinds of Datasets with different semantic content similarities are used as available dataset groups (see Table 1) to simulate various types of accessible datasets that may exist. Similar datasets are IMAGENET, MSCOCO and KITTI datasets, and datasets that are significantly different from the training dataset are UNIFORM and WHITE datasets.

[0113] Table 1 Available datasets

[0114]

[0115] Step 3: Selection of proxy dataset based on APS indicators

[0116] As attached Figure 5 As shown, given the available dataset set Step 3: Select the proxy dataset according to the following formula:

[0117]

[0118] in, is the selected proxy dataset; It is the proxy data set selection index APS designed by the present invention; Representative Selection Network When attacking a network, based on the dataset The average attack performance of the generated patch. To solve the optimization problem (2), step 3 calculates the available data sets The APS value of the dataset with the largest APS value is selected as the proxy dataset. The specific steps are as follows.

[0119] Step 3.1 Generation of adversarial patch groups based on EoT algorithm

[0120] The calculation process of APS is shown in the attached Figure 6 First, given the available dataset set A dataset with unknown APS value Step 3.1 initializes m patches {P1,P2,…,P m}. Then, the EoT algorithm takes the initialization patches as input one by one and uses the Sampled images to generate adversarial patches in, The target category {y′1,y′2,…,y′ m} and target attack classification network The category codes {1,2,…,m} are equal one by one.

[0121] Specifically, the adversarial patch P * The generation of can be transformed into the solution of the following optimization problem:

[0122]

[0123] Among them, the patch P∈[0,1] n The dimension n is much smaller than Medium Image dimension d; y′ is the target category of the patch; Z represents the set of all possible positions of the patch in the image, and z is the position obtained by uniform random sampling from Z; the R set represents the set of natural transformations that may exist on the patch in the physical scene (such as illumination changes, rotations, and camera noise, etc.), and r is the natural transformation obtained by uniform random sampling from R.

[0124] Objective Function is defined as:

[0125]

[0126] It represents the network prediction of the perturbation image X P The negative log probability of belonging to the target class y′.

[0127] Disturbance ImageX P ∈[0,1] d for:

[0128]

[0129] in is the paste operation function that pastes the patch P on the original image X. Figure 7As shown, the pasting operation first transforms the patch P using the natural transformation r (r = (r1, r2, ...)). The patch transformation includes rotating the patch Degree, zoom Then, the pasting operation pastes the transformed patch P′ to the position z (z = (z1, z2)) of the image X, thus obtaining the perturbed image X P , where (z1,z2) is the horizontal and vertical coordinates of the position of P′ in the image X.

[0130] As shown in Table 2, the present invention selects the EoT algorithm to solve the optimization problem corresponding to formula (3), where is the projection operator, It can be regarded as the solution of the following optimization problem:

[0131]

[0132] Where t is the index value of the iteration number when updating the patch pixels.

[0133] Table 2 EoT algorithm

[0134]

[0135]

[0136] Step 3.2 Calculation of APS

[0137] As attached Figure 6 As shown, step 3.2 uses the adversarial patch set generated in step 3.1 The data set is calculated according to the following formula APS value:

[0138]

[0139] in, This is the patch attack performance measurement indicator proposed by the present invention - PS (Patch Saliency).

[0140] Adversarial patch P * The PS value calculation process is shown in the attached Figure 8 As shown, it can be divided into the following three steps: In step 1, paste the operation function Patch P * Paste the picture on the black background The center of the perturbation picture is obtained In step 2, the integral gradient function Will disturb the picture and the target category y′ of the patch as input, and output a saliency map The significant figure measure The importance of each pixel to y′. Fig. 9 For example, when a picture of a bird and the category "bird" are used as input, The output saliency map represents the input image pixels for the network Make a category estimate of the importance of "bird"; in step three, the adversarial patch P * The PS value can be calculated as follows:

[0141]

[0142] in,

[0143]

[0144] symbol[·] b Represents the b-th dimension component of the internal vector; is the adversarial patch P * exist The operator ⊙ represents the Hadamard product between two vectors. Fig.10 The Hadamard product result of a "train" image and its mask is shown.

[0145] Step 3.3 Stopping conditions for APS calculation

[0146] If available dataset group If the APS value of any dataset in is known, the dataset with the largest APS value is selected as the proxy dataset. Otherwise return to step 3.1.

[0147] Step 4: Patch generation based on DF-EoT algorithm

[0148] As attached Fig.11 As shown, in step 3, the proxy dataset is selected After that, step 4 will further use the DF-EoT algorithm designed by the present invention to generate an adversarial patch. The specific steps are as follows.

[0149] Step 4.1 Adversarial patch initialization

[0150] Step 4.1 Initialize the adversarial patch using uniform random noise with pixel values ​​in the range [0,1]

[0151] Step 4.2 Transform sampling

[0152] Step 4.2 First, the proxy dataset The patch position set Z and natural transformation set R are uniformly randomly sampled to obtain the background image X, position coordinate z, and natural transformation r. Then, the paste operation The transformed patch is pasted on the background image X at position z, and the perturbed image X is obtained. P .

[0153] Step 4.3 Background Update

[0154] In step 4.2, we get the perturbed image X P Then, step 4.3 calculates the image background X according to the following formula: back To update:

[0155]

[0156] Among them, X back is the perturbation image X P The remaining pixels except patch P in the objective function The definition of is shown in equation (4); the optimization problem (10) is solved by X back Pixel update suppression X P Classify it as the target category y′ and simulate the distracting image background.

[0157] 4.4 Patch Update

[0158] In step 4.3, the perturbed image X P Background X back After the update, step 4.4 will be done on X P The pixels of patch P are updated to solve the following optimization problem:

[0159]

[0160] Among them, the objective function See equation (4); the optimization problem (10) is to promote X by updating the pixel value of patch P P Classify into target category y′.

[0161] Step 4.5 Patch update stop conditions

[0162] Step 4.5 determines the update times of patch P. If the update times are greater than or equal to β total Then proceed to the next step, otherwise return to step 4.2 to perform the next round of iterative update of patch P.

[0163] Step 4.6 Patch generation stop condition

[0164] Assume that the number of existing adversarial patches is i. Step 4.6 saves P obtained in step 4.5 and expresses it as If i+1≥k holds, proceed to the next step, otherwise return to step 4.1 to generate a new adversarial patch.

[0165] Step 4.7 Restart selection based on PS index Since the attack performance of the patch is sensitive to the initial value selection, the restart selection step 4.7 selects the most aggressive patch from the k patches saved in step 4.6 as the final output. The restart selection step will calculate the k patches separately. The PS value of the patch with the largest PS value is selected as the output patch P of the DF-EoT algorithm. * .

[0166] Attack performance evaluation against patches

[0167] The evaluation experiment is performed by placing the patch P * The effectiveness of the attack in physical scenarios is verified by displaying it on electronic screens and paper. The experiment places the patch next to the object to be disturbed, shoots a set of videos, and then uses the VGG-19 classification network to classify the video frame by frame, so as to achieve the purpose of testing the performance of the patch attack. In order to highlight the threat of the patch attack, the experiment selects "banana" with clear edges, bright colors and easy to be correctly identified by the network as the object to be disturbed, and selects "butterfly" with low semantic similarity to the "banana" category as the target category y′ of the adversarial patch.

[0168] The classification results of some video frames are shown in the attached Fig.12 As shown, the results show that the generated patches can mislead the output of the network with extremely high confidence, thereby proving that the invented method can be used for visual network security vulnerability detection in data privacy sensitive applications.

[0169] By generating adversarial patches through the present invention, security vulnerabilities of visual classification networks in data privacy-sensitive applications are discovered, providing sample support for the development of defense strategies based on vulnerability patching, and contributing to the improvement of the security and robustness of visual networks. This method is inspiring for improving the security and security detection of privacy-sensitive applications, and the implementation method is simple, the idea is clear, and it is easy to implement.

[0170] The present invention proposes a patch generation framework based on "proxy dataset selection-adversarial patch generation". In view of the proxy dataset selection problem in patch generation, the APS indicator is proposed, which can select a proxy dataset that maximizes the average attack performance of the adversarial patch from the available dataset group when the training data is unknown, so that the data-dependent patch attack can be applied to data privacy-sensitive scenarios. In view of the problem of measuring patch attack performance in privacy-sensitive applications, the PS indicator is proposed, which can compare the relative attack performance between adversarial patches with the same target category when the training data is unknown, and can be used to alleviate the sensitivity of patch initial values. In view of the patch generation problem in privacy-sensitive applications, the DF-EoT algorithm is proposed, which can improve the patch attack performance by introducing interference background simulation and restart selection technology, exposing the adversarial patch security vulnerabilities of visual networks, thereby providing sample support for vulnerability-based defense strategies and improving the security of visual networks in data privacy-sensitive applications.

[0171] The present invention Figure 3 illustrate:

[0172] S1 Selection of target attack network: Select the visual classification network that needs to be tested for security vulnerabilities as the target attack network;

[0173] S2 Collection of available datasets: Collect public visual datasets as a set of available datasets;

[0174] S3 proxy dataset selection based on APS indicators, including:

[0175] S3.1 Generation of adversarial patch groups based on the EoT algorithm: Select any dataset with unknown APS value from the available dataset group collected in S2 to provide a background image for patch generation, and use the EoT algorithm to generate a set of adversarial patches;

[0176] S3.2 APS calculation: Calculate the PS value of the patches generated in S3.1, and select the average PS value of the patch group as the APS value of the data set selected in S3.1;

[0177] S3.3 Stop condition for proxy data selection: If the APS value of any dataset in the available dataset group is known, select the dataset with the largest APS value as the proxy dataset and proceed to the next step, otherwise return to S3.1;

[0178] S4 generates adversarial patches based on the DF-EoT algorithm, including:

[0179] S4.1 Initialization of adversarial patches: Initialize adversarial patch pixel values ​​using uniform random noise;

[0180] S4.2 Transformation Sampling: Uniformly randomly sample the proxy dataset, the set of patch positions, and the set of natural transformations. Then, the paste operation function takes the adversarial patch, the sampled image, the sampled position, and the sampled transformation as input, and outputs the perturbed image;

[0181] S4.3 Background update: Update the background pixels of the perturbed image obtained in S4.2 to prevent the perturbed image from being classified as a patch target by the target attack network;

[0182] S4.4 Patch update: Update the adversarial patch pixels in the perturbed image so that the perturbed image is classified as the patch target category;

[0183] S4.5 Patch update stop condition: determine the number of iterative updates of the adversarial patch. If the number is equal to the preset value, proceed to the next step; otherwise, return to S4.2 and perform the next iterative update of the patch.

[0184] S4.6 Patch generation stop condition: Save the adversarial patches updated in S4.5. If the number of saved patches reaches the preset value, proceed to the next step, otherwise return to S4.1 to generate a new adversarial patch;

[0185] S4.7 Restart selection based on PS index: calculate the PS value of each patch in S4.6, and select the patch with the largest PS value as the output patch of step S4;

[0186] S5 Evaluation of the attack performance of the adversarial patch: Place the patch displayed on the electronic screen or paper next to the object to be interfered with, and use a camera to take a picture of the adversarial patch and the object to be interfered with. Then input the captured digital picture into the target attack network, and verify whether the generated patch is a network security vulnerability based on whether the network output can be misled.

[0187] The present invention Figure 5 illustrate:

[0188] In this figure, Representative Dataset APS value, step 3 selects the dataset with the largest APS value from the available datasets as the proxy dataset

[0189] The present invention Figure 6 illustrate:

[0190] In this figure, the APS calculation uses the embedded EoT algorithm to convert the uniform random noise initialized patches {P1, P2, …, P m} as input, and the output target category is {y′1,y′2,…,y′ m}Anti-patch group Dataset APS indicator for The average PS value

[0191] The present invention Figure 8 illustrate:

[0192] In this figure, the paste operation The input is the adversarial patch P * , background image Patch position z and natural transformation r; symbol represents the integrated gradient function; the symbol ⊙ represents the Hadamard product between two vectors.

[0193] The present invention Fig.12 illustrate:

[0194] First, from the (a) column of the figure, we can see that the target attack network can correctly classify "banana" with extremely high confidence and has a certain anti-interference ability. Secondly, from the (b) column, we can see that after placing the adversarial patch next to "banana", the network's classification result changes from "banana" to "butterfly" with a classification confidence of more than 95%. Finally, the (c) column shows that in certain specific frames, even if there are ghosting and partial occlusion on the patch, the patch can achieve an attack result with a confidence of more than 78%.

Claims

1. A method for generating adversarial patches for a visual classification network considering data privacy, characterized in that the steps are: S1. Selection of target attack network: Select the visual network that needs to be tested for security vulnerabilities as the target attack network. Given a training dataset Any image X∈[0,1] d and its actual category digital encoding y∈{1,2,...,m}, classification network Classify X according to the following formula: in Table Network Estimated category of input image X; Represents an m-dimensional vector The jth component of The confidence that X belongs to the jth class; S2. Collection of available datasets: Collecting public visual datasets as a set of available datasets In order to select a suitable proxy dataset Used to replace training data sets Provide background images for adversarial patch generation; S3. Selection of proxy datasets based on APS indicators, including the following processes: The proxy dataset is selected according to the following formula: in, is the selected proxy dataset; is the proxy dataset selection indicator APS; Representative Selection Network When attacking a network, based on the dataset The average attack performance of the generated patch is calculated for each available dataset. ...and select the dataset with the largest APS value as the proxy dataset The specific steps are as follows: S3.

1. Generation of adversarial patch groups for the EoT algorithm Initialize m patches {P1,P2,...,P m}, one by one, taking the initialization patches as input, and using Sampled images to generate adversarial patches in, The target category {y'1,y'2,...,y' m} and target attack classification network The category codes {1,2,...,m} are equal one by one; Adversarial patch P * The generation can be transformed into Among them, the patch P∈[0,1] n The dimension n is much smaller than Medium Image The dimension d of the patch; y' is the target category of the patch; Z represents the set of all possible locations of the patch in the image, and z is the location uniformly randomly sampled from Z; the R set represents the set of natural transformations that may exist on the patch in the physical scene, and r is the natural transformation uniformly randomly sampled from R; the objective function is defined as: Represents the network prediction perturbation image X P Negative log probability value of belonging to target category y'; perturbation image X P ∈[0,1] d for: in is the paste operation function that pastes the patch P on the original image X. The paste operation first transforms the patch P using the natural transformation r, where r = (r1, r2, ...). The patch transformation includes rotating the patch Degree, zoom times; then, the paste operation pastes the transformed patch P' to the position z of the image X, where z = (z1, z2), and the perturbed image X is obtained. P , where (z1,z2) is the horizontal and vertical coordinates of the position of P' in the image X; The EoT algorithm is selected to solve the optimization problem corresponding to formula (3). is the projection operator, It can be regarded as the solution of the following optimization problem: EoT algorithm: Input: Dataset Position set Z, natural transformation set R, target category y', perturbation update step size α, paste operation function Objective Function Projection operator Total number of iterations T; Output: Adversarial patch P * 1. Initialize the patch P with uniform random noise in the range [0,1] 0 , t←0 2.for t<T do 3.

4.

5.

6. 7.t←t+1 8.end for 9.P * ←P T 10.return C S3.

2. Acquisition of APS Utilize the generated adversarial patch set The data set is calculated according to the following formula APS value: in, Patch Saliency is a performance metric for patch attacks. Adversarial patch P * The PS value calculation process is divided into three steps: a. Paste operation function Patch P * Paste the picture on the black background The center of the perturbation picture is obtained b. Integral gradient function Will disturb the picture and the target category y' of the patch as input, and output a saliency map The significant figure measure The importance of each pixel in y'; c. Adversarial patch P * The PS value is obtained by the following formula: in: symbol[.] b Represents the b-th dimension component of the internal vector; is the adversarial patch P * exist The mask on ; the operator ⊙ represents the Hadamard product between two vectors; S3.

3. Stopping conditions for APS calculation If available dataset group If the APS value of any dataset in is known, the dataset with the largest APS value is selected as the proxy dataset. Otherwise, return to S3.1; S4. Patch generation of DF-EoT algorithm S4.

1. Adversarial patch initialization Initialize the adversarial patch with uniform random noise in the pixel value range [0,1] S4.

2. Transformation sampling First, the proxy dataset The patch position set Z and the natural transformation set R are uniformly randomly sampled to obtain the background image X, position coordinate z, and natural transformation r; then, the pasting operation The transformed patch is pasted on the background image X at position z, and the perturbed image X is obtained. P ; S4.

3. Background Update Get the perturbation image X P Then, the image background X is calculated according to the following formula back To update: Among them, X back is the perturbation image X P The remaining pixels except patch P in the objective function See equation (4); the optimization problem is solved by X back Pixel update suppression X P Classify it as the target category y', simulating an interfering picture background; S4.4, patch update For the perturbation image X P Background X back After the update, P The pixels of patch P are updated to solve the following optimization problem: Among them, the objective function See equation (4), the optimization problem is to update the pixel value of patch P to drive X P Classify into target category y'; S4.

5. Patch update stop conditions Determine the number of updates of patch P; if the number is greater than or equal to β total Then proceed to the next step, otherwise return to step S4.2 to perform the next round of iterative update of patch P; S4.

6. Patch generation stop condition Assume that the number of existing adversarial patches is i, save P obtained in step S4.5, and express it as If i+1≥k holds, proceed to the next step, otherwise return to step 4.1 to generate a new adversarial patch; S4.

7. Restart selection based on PS index Select the most aggressive patch from the k patches saved in step S4.6 as the final output; restart the selection step to calculate the k patches separately The PS value of the patch with the largest PS value is selected as the output patch P of the DF-EoT algorithm. * .