Adversarial attack method and system for generating uniformly distributed disturbances using pulses as probability

By using Poisson encoding and momentum iteration algorithms in pulsed neural networks to generate invisible adversarial samples, the problem of inefficient adversarial attacks in the existing technology is solved, and stronger attack robustness and defense are achieved, improving The universality of adversarial attacks.

CN114118268BActive Publication Date: 2024-11-01FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111414502.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2024-11-01
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

The existing adversarial attack methods are easily recognized by human eyes in the adversarial samples generated in the pulsed neural network, and the characteristics of the pulse sequence are not fully utilized, resulting in low attack efficiency and insufficient security.

Method used

Adversarial attack method using pulses as the probability to generate uniformly distributed perturbations, and through Poisson encoding conversion, stochastic gradient descent algorithm and optimization objective function, invisible adversarial samples with high attack performance are generated, and priority queue filtering is used. Optimal pulse sequence, optimized perturbation size and attack effect.

Benefits of technology

It improves the robustness and defense of adversarial attacks, reduces the complexity of adversarial sample models, enhances the universality and invisibility of attacks, and effectively resists adversarial attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114118268B_ABST
    Figure CN114118268B_ABST
Patent Text Reader

Abstract

The present invention relates to an adversarial attack method for generating uniformly distributed disturbances with pulses as probabilities, including: preprocessing a data set, converting it into a corresponding pulse sequence through Poisson coding, then constructing a replacement network for the corresponding data set, and using the network as an original classifier; then inputting the pulse sequence and the original sample generated by the original classifier encoding into a filter to filter out the best pulse; then inputting the selected pulse and the original image into an adversarial sample generation network, which is based on the original classifier, and generates noise that obeys uniform distribution by taking pulses as probabilities, thereby generating an initial adversarial sample; then continuously iterating and optimizing the adversarial sample, and finally generating an adversarial sample. The present invention can provide security defense researchers with a low-cost adversarial attack tool for generating spiking neural networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer image recognition and malicious attacks, and in particular to a method and system for generating uniformly distributed disturbances using pulses as probabilities. Background Art

[0002] As the third generation of neural networks, spiking neural networks (SNNs) not only have broad prospects in simulating brain-like features, but also have the advantages of low power consumption and high efficiency when applied to neuromorphic computing systems. SNNs have demonstrated image recognition performance that is no less than that of deep neural networks (DNNs) in the field of image recognition, and because they simulate the processing methods of the human brain, their energy consumption is much lower than that of DNNs. However, some studies have shown that although SNNs have better robustness than DNNs, adversarial samples carefully constructed by adding invisible perturbations to the original images can make it impossible for the human eye to see the difference from the original images, but they will be misclassified by spiking neural network classifiers that already have good performance. Similar attacks can also be used in fields such as unmanned driving, medical diagnosis, and face recognition, which seriously affect the security of important data areas.

[0003] Since SNN has only emerged in recent years, there are relatively few studies on adversarial attacks in this field. Research on current related work has found that existing adversarial attack methods include the use of traditional PGD attacks, FGSM attacks, etc., as well as new attack strategies that increase, decrease, and reverse pulse sequences. However, these methods do not take into account the extreme limitations of the generated samples of adversarial attacks. In other words, the generated adversarial samples can be easily recognized by the human eye due to the large number of modified pixels. Existing attack methods for attacking pulse sequences have not fully utilized their characteristics. Summary of the invention

[0004] In view of this, the object of the present invention is to provide an adversarial attack method for generating uniformly distributed disturbances with pulses as probability, so as to achieve greater robustness, stronger defense, and ability to resist adversarial attacks.

[0005] To achieve the above object, the present invention adopts the following technical solution:

[0006] A method for generating uniformly distributed disturbances using pulses as probabilities, comprising the following steps:

[0007] Step S1: Preprocess the input image X and use the self-compiler F of the spiking neural network to generate the image X. enc The Poisson coding transformation is used to convert it into a sequence of pulse data format γ = (γ1, γ2, ..., γ T ), where T is the simulation time step;

[0008] Step B: Based on the spiking neural network, the collected labeled data sets are used to iteratively update the network parameters until convergence, the model training is completed, and the spiking neural network classifiers of several trained data sets are obtained;

[0009] Step C: Convert the generation of adversarial samples into a constrained optimization problem. When attacking, first describe the corresponding problem for the generated perturbation.

[0010] Step D: Pulse γ selected based on the original image X and the corresponding pulse sequence γ c , through the conversion function g(X,γ c ) and the objective function J(f(X adv ),y) Generate initial adversarial samples;

[0011] Step E: Filter out the best pulse γ from the pulse sequence γ by constructing a filter c ;

[0012] Step F: Perform N iterations of updates based on the momentum iteration stochastic gradient descent algorithm SGD to optimize the objective function and generate adversarial samples X adv ;

[0013] Step G: Use the adversarial sample X generated by the current iteration adv Input into the constructed pulse neural network model f and the unknown black box model f′ to evaluate whether the attack is effective.

[0014] Furthermore, the step A specifically comprises the following steps:

[0015] Step A1: Perform maximum and minimum normalization on the data X input into the spiking neural network, that is, normalize the value of each original pixel point to x∈[0,1];

[0016] Step A2: Set a time step T, and let the pulse emission probability p=x at a time step T, thereby generating a pulse sequence γ with a time step of T.

[0017] Furthermore, the step B specifically comprises the following steps:

[0018] Step B1: Initialize the model using the preset model parameters;

[0019] Step B2: Set the pulse simulation time T and generate the pulse sequence of the labeled data set Where i = (0, 1, ..., N) is the size of the labeled data set N;

[0020] Step B3: Determine the mean square loss function between the result of the input classifier and the label value as the loss function of this method:

[0021] L(f(X),y)=MSE(f(X),y)

[0022] The input is a clean sample X of the label data set, and y is the label corresponding to the sample;

[0023] Step B4: Using the gradient descent algorithm, with the goal of optimizing and minimizing the loss function, the back propagation mechanism is used to update the internal parameters of the neural network;

[0024] Step B5: Obtain the pulse neural network classifier f for several trained data sets.

[0025] Furthermore, the generation of adversarial samples is transformed into a constrained optimization problem. When attacking, the corresponding problem description is first performed for the generated perturbation, specifically:

[0026] Step C1: When conducting adversarial attacks, the attack problem can be divided into two categories: targeted attack and untargeted attack. Untargeted attack can transform the problem into the following optimization problem:

[0027] Where K is the number of categories, f K (X) is the classifier predicting the input X as K;

[0028] Targeted attack transforms the problem into an optimization problem of minimizing the following:

[0029]

[0030] Among them, the targeted attack requires that the output of the generated adversarial sample is the result expected by the attacker, so it is necessary to minimize X and the expected sample X * The distance between

[0031] Step C2: Convert the optimization problem to optimize the replaceable objective function of the spiking neural network, and convert the untargeted attack to maximize the replaceable loss function:

[0032] argmin-J(f(X adv ),y)

[0033] Targeted attack is transformed into minimizing replaceable function:

[0034] argminJ(f(X adv ),y * )

[0035] Generate the adversarial sample X required by the attacker by optimizing different types of objective functions adv ;

[0036] Step C3: Limit the generated disturbance and use the p-norm as the constraint condition ||XX adv || p ≤ε.

[0037] Furthermore, the step D specifically comprises the following steps:

[0038] Step D1: Import the trained spiking neural network classifier;

[0039] Step D2: Based on the original image pulse sequence, construct a disturbance generation function:

[0040] g(X,γ c )=Clip(X+η*γ c , 0, 1)

[0041] The constant η is a preset constant used to accelerate convergence in iterations, and the size of the generated perturbation is specified in the range of [0,1];

[0042] Step D3: Combine the generated perturbation and the original image to form an adversarial sample;

[0043] Step D4: Set the objective function to optimize the invisibility of the generated perturbation to the human eye:

[0044] J(X,X adv )=L(f(X),y)+β||X+η*γ c || 2

[0045] Where L(f(X),y) is the loss function of the original spike network classifier, To increase the weight of the perturbation in the final loss function and use the L2 norm constraint ||XX adv ||2≤ε to limit the perturbation size.

[0046] Furthermore, the step E comprises the following steps:

[0047] Step E1: Calculate each sequence value s in the pulse sequence = (s1, s2, ..., s T ), the calculation formula is:

[0048]

[0049] Where i=(1,2,…,T);

[0050] Step E2: Calculate γ for each pulse i The pre-generated perturbation size value L2 is recorded as

[0051] ω=(ω1,ω2,…,ω i );

[0052] Step E3: When selecting the best pulse, give priority to small disturbance size values, modify the pulse value with more information, and use the priority queue function:

[0053] Priority_spike(ω,s)=priority_queue(ω,s)

[0054] Among them, Priority_spike(ω,s)={(ω1,s1), (ω2,s2),…, (ω T ,s T )}, T = (1, 2, ..., T), where the sequence is reordered according to the minimum perturbation and maximum pulse priority, and finally the pulse γ corresponding to the first sequence (ω1, s1) is selected c .

[0055] Furthermore, the step F comprises the following steps:

[0056] Step F1: Initialize X adv =X;

[0057] Step F2: According to the attack type, maximize the objective function for untargeted attacks under white-box attacks or minimize the objective function for targeted attacks. Use the white-box model as an alternative model under black-box attacks to generate adversarial samples X through untargeted attacks. adv To attack the black box model;

[0058] Step F3: Update adversarial example X adv ;

[0059] Step F4: Continuously execute step F2 and step F3 until good invisibility is achieved and the classifier is misclassified.

[0060] Furthermore, the step G comprises the following steps:

[0061] Step G1: Input the obtained optimal iterative adversarial sample X into the pulse neural network classifier f and the black box classifier f′ built in step A respectively;

[0062] Step G2: Evaluate the attack based on the success rate of targeted, untargeted and black-box attacks, the invisibility of adversarial samples and other evaluation indicators to determine whether the attack is effective.

[0063] An adversarial attack system for generating uniformly distributed perturbations with pulses as probabilities, comprising:

[0064] The alternative network generation module is used to build a classifier structure for generating adversarial samples, including an encoding submodule, a parameter initialization submodule, a training network submodule, and a network parameter update submodule. First, the time step T is set, and the labeled data set is Poisson encoded to generate the corresponding pulse sequence γ. Then, the pulse neural network is initialized through the parameter initialization submodule, and then the pulse neural network is trained through the training submodule. Finally, the network parameter update submodule updates the parameters of the pulse neural network classifier.

[0065] The pulse screening module is used to save the time and energy consumption of adversarial samples, including the pulse value calculation submodule, the perturbation value calculation submodule, and the priority queue submodule; the pulse value s and the perturbation size value L2 are calculated by the pulse value calculation submodule and the perturbation value calculation submodule respectively, and then the calculated values ​​are input into the priority queue submodule to obtain the optimal pulse γ c ;

[0066] The adversarial sample generation module is used to continuously optimize the objective function and finally generate adversarial samples with high attack performance and good invisibility, including perturbation generation submodule, adversarial sample generation submodule, model loading submodule, and objective function optimization submodule; the perturbation generation module generates adversarial perturbations that meet the conditions, and then generates adversarial samples in the adversarial sample generation submodule, and inputs the adversarial samples into the spiking neural network output by the replacement model; then the objective function optimization submodule continuously optimizes the objective function, and after multiple rounds of iterations, the final adversarial sample X is generated. adv ;

[0067] The evaluation module is used to evaluate the untargeted and targeted attacks on the classifier f in the white-box setting, as well as the attack effects on the black-box classifier f′ in the black-box setting; by evaluating the attack success rate and comparing the indistinguishability of the generated adversarial samples with the original images, the attack effects of the generated adversarial samples are comprehensively evaluated.

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

[0069] 1. The present invention improves the efficiency of the method by screening the best pulses while ensuring attack performance and good invisibility, and effectively reduces the complexity of generating adversarial sample models;

[0070] 2. This invention not only solves the problem of low attack efficiency of traditional methods, but also greatly improves the invisibility of adversarial samples;

[0071] 3. The present invention improves the universality of adversarial attacks and guides defense strategies against adversarial attacks, which has theoretical and practical significance. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1The present invention is a flowchart of a method implementation according to an embodiment of the present invention.

[0073] Figure 2 Schematic diagram of the system structure of an embodiment of the present invention. DETAILED DESCRIPTION

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

[0075] Please refer to Figure 1 The present invention provides a method for generating a uniformly distributed disturbance with pulse probability, such as Figure 1 As shown, the following steps are included:

[0076] Step A: First, preprocess the input image X, and then use the self-compiler F of the spiking neural network to enc The Poisson coding transformation is used to convert it into a sequence of pulse data format γ = (γ1, γ2, ..., γ T ), where T is the simulation time step;

[0077] Step A1: Perform maximum and minimum normalization on the data X input into the spiking neural network, that is, normalize the value of each original pixel point to x∈[0,1];

[0078] Step A2: Set a time step T, and let the pulse emission probability p=x at a time step T, thereby generating a pulse sequence γ with a time step of T.

[0079] Step B: Based on the alternative network built in step A, the collected annotated data set is used to iteratively update the network parameters until convergence, completing the model training;

[0080] Step B1: Initialize the model using the preset model parameters;

[0081] Step B2: Set the pulse simulation time T and generate the pulse sequence of the labeled data set Where i = (0, 1, ..., N) is the size of the labeled data set N;

[0082] Step B3: Determine the mean square loss function between the result of the input classifier and the label value as the loss function of this method:

[0083] L(f(X),y)=MSE(f(X),y)

[0084] The input is a clean sample X of the label data set, and y is the label corresponding to the sample;

[0085] Step B4: Using the gradient descent algorithm, with the goal of optimizing and minimizing the loss function, the back propagation mechanism is used to update the internal parameters of the neural network;

[0086] Step B5: Obtain the pulse neural network classifier f for several trained data sets.

[0087] Step C: Convert the generation of adversarial samples into a constrained optimization problem. When attacking, first describe the corresponding problem for the generated perturbation.

[0088] Step C1: When conducting adversarial attacks, the attack problem can be divided into two categories: targeted attack and untargeted attack. Untargeted attack can transform the problem into the following optimization problem:

[0089] Where K is the number of categories, f K (X) is the classifier predicting the input X as K. Untargeted attack only requires the output of the generated sample to be different from the output of the original sample, so it is necessary to maximize X adv The distance between the original sample X and the original sample X; the targeted attack transforms the problem into a minimization optimization problem as follows:

[0090]

[0091] Among them, the targeted attack requires that the output of the generated adversarial sample is the result expected by the attacker, so it is necessary to minimize X and the expected sample X * The distance between

[0092] Step C2: Further transform the optimization problem into optimizing the replaceable objective function of the pulse neural network we designed. The untargeted attack is transformed into maximizing the replaceable loss function:

[0093] argmin-J(f(X adv ),y)

[0094] Targeted attack is transformed into minimizing replaceable function:

[0095] argminJ(f(X adv ),y * )

[0096] Generate the adversarial sample X required by the attacker by optimizing different types of objective functions adv ;

[0097] Step C3: In order to generate adversarial samples that are indistinguishable from the original samples by the human eye, the generated perturbations are restricted. Here, the p-norm is used as the constraint condition ||XX adv || p ≤ε.

[0098] Step D: Pulse γ selected based on the original image X and the corresponding pulse sequence γ c , through a carefully constructed transformation function g(X,γ c ) and the objective function J(f(X adv ),y) Generate initial adversarial samples;

[0099] Step D1: Import the spiking neural network model established in B5;

[0100] Step D2: Based on the original image pulse sequence, construct the perturbation generating function: g(X,γ c )=Clip(X+η*γ c , 0, 1)

[0101] The constant η is a preset constant used to accelerate convergence in iterations, and the size of the generated perturbation is specified in the range of [0,1];

[0102] Step D3: Combine the generated perturbation and the original image to form an adversarial sample;

[0103] Step D4: Set the objective function to optimize the invisibility of the generated perturbation to the human eye:

[0104] J(X,X adv )=L(f(X),y)+βX+η*γ c || 2

[0105] Where L(f(X),y) is the loss function of the original spike network classifier, In order to increase the weight of the perturbation in the final loss function, the L2 norm constraint ||XX is also used adv ||2≤ε is used to limit the perturbation size, and the same is true for other norm constraints.

[0106] Step E: In order to save the time and energy consumption of adversarial samples, the best pulse γ is selected from the pulse sequence γ by constructing a filter c ;

[0107] Step E1: Calculate each sequence value s in the pulse sequence = (s1, s2, ..., s T ), the calculation formula is:

[0108]

[0109] Where i=(1,2,…,T);

[0110] Step E2: Calculate γ for each pulse i The pre-generated perturbation size value L2 is recorded as

[0111] ω=(ω1,ω2,…,ω i );

[0112] Step E3: The goal of this method is to generate adversarial samples with the smallest possible perturbation and greater destructiveness. Therefore, when selecting the best pulse, small perturbation values ​​are given priority, and pulse values ​​with more information are modified. Using the priority queue function:

[0113] Priority_spike(ω,s)=priority_queue(ω,s)

[0114] Among them, Priority_spike(ω,s)={(ω1,s1), (ω2,s2),…, (ω T ,s T )}, T = (1, 2, ..., T), where the sequence is reordered according to the minimum perturbation and maximum pulse priority, and finally the pulse γ corresponding to the first sequence (ω1, s1) is selected c .

[0115] Step F: The momentum-based stochastic gradient descent algorithm SGD is iterated N times to continuously optimize the objective function and finally generate an adversarial sample X with high attack performance and good invisibility. adv ;

[0116] Step F1: Initialize X adv =X;

[0117] Step F2: According to the attack type, maximize (minimize) the objective function for untargeted (targeted) attacks under white-box attacks, use the white-box model as an alternative model under black-box attacks, and generate adversarial samples X through untargeted attacks. adv To attack the black box model;

[0118] Step F3: Update adversarial example X adv ;

[0119] Step F4: Continuously execute step F2 and step F3 until good invisibility is achieved and the classifier is misclassified.

[0120] Step G: Use the adversarial sample X generated by the current iteration adv Input into the constructed pulse neural network model f and the unknown black box model f′ to evaluate whether the attack is effective.

[0121] Step G1: Input the obtained optimal iterative adversarial sample X into the pulse neural network classifier f and the black box classifier f′ built in step A respectively;

[0122] Step G2: Evaluate the attack based on the success rate of targeted, untargeted and black-box attacks, the invisibility of adversarial samples and other evaluation indicators to determine whether the attack is effective.

[0123] The present invention also provides an adversarial attack system that generates uniformly distributed disturbances with pulses as probability, such as Figure 2 As shown, including:

[0124] The alternative network generation module is used to build a classifier structure for generating adversarial samples, including an encoding submodule, a parameter initialization submodule, a training network submodule, and a network parameter update submodule. First, the time step T is set, and the labeled data set is Poisson encoded to generate the corresponding pulse sequence γ. Then, the pulse neural network is initialized through the parameter initialization submodule, and then the pulse neural network is trained through the training submodule. Finally, the network parameter update submodule updates the parameters of the pulse neural network classifier.

[0125] The pulse screening module is used to save the time and energy consumption of adversarial samples, including the pulse value calculation submodule, the perturbation value calculation submodule, and the priority queue submodule; the pulse value s and the perturbation size value L2 are calculated by the pulse value calculation submodule and the perturbation value calculation submodule respectively, and then the calculated values ​​are input into the priority queue submodule to obtain the optimal pulse γ c ;

[0126] The adversarial sample generation module is used to continuously optimize the objective function and finally generate adversarial samples with high attack performance and good invisibility, including perturbation generation submodule, adversarial sample generation submodule, model loading submodule, and objective function optimization submodule; the perturbation generation module generates adversarial perturbations that meet the conditions, and then generates adversarial samples in the adversarial sample generation submodule, and inputs the adversarial samples into the spiking neural network output by the replacement model; then the objective function optimization submodule continuously optimizes the objective function, and after multiple rounds of iterations, the final adversarial sample X is generated. adv ;

[0127] The evaluation module is used to evaluate the untargeted and targeted attacks on the classifier f in the white-box setting, as well as the attack effects on the black-box classifier f′ in the black-box setting; by evaluating the attack success rate and comparing the indistinguishability of the generated adversarial samples with the original images, the attack effects of the generated adversarial samples are comprehensively evaluated.

[0128] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.

Claims

1. A method for generating uniformly distributed disturbances using pulses as probabilities, characterized in that: The following steps are involved: Step A: Preprocess the input image X and then use the spiking neural network self-compiler F enc The Poisson coding transformation is used to convert it into a sequence of pulse data format γ = (γ1, γ2, ..., γ T ), where T is the simulation time step; Step B: Based on the spiking neural network, the collected labeled data sets are used to iteratively update the network parameters until convergence, completing the model training and obtaining the spiking neural network classifiers of several trained data sets; Step C: Convert the generation of adversarial samples into a constrained optimization problem. When attacking, first describe the corresponding problem for the generated perturbation. Step D: Pulse γ selected based on the original image X and the corresponding pulse sequence γ c , through the conversion function g(X,γ c ) and the objective function J(f(X adv ),y) Generate initial adversarial samples; Step E: Filter out pulses γ from the pulse sequence γ by constructing a filter c ; Step F: Perform N iterations of updates based on the momentum iteration stochastic gradient descent algorithm SGD to optimize the objective function and generate adversarial samples X adv ; Step G: Use the adversarial sample X generated by the current iteration adv Input to the constructed spiking neural network classifier f and the unknown black box classifier f′ to evaluate whether the attack is effective; The generation of adversarial samples is converted into a constrained optimization problem. When attacking, the corresponding problem description is first performed for the generated perturbation, specifically: Step C1: When conducting adversarial attacks, the attack problem is divided into two categories: one is a targeted attack and the other is an untargeted attack. The untargeted attack can be transformed into an optimization problem that maximizes the following: Where K' is the number of categories, f K (X) is the classifier predicting the input X as K; Targeted attack transforms the problem into an optimization problem of minimizing the following: Among them, the targeted attack requires that the output of the generated adversarial sample is consistent with the classification result expected by the attacker, so it is necessary to minimize the classifier f K (X adv ) and category y * The distance between Step C2: Convert the optimization problem to optimize the replaceable objective function of the spiking neural network, and convert the untargeted attack to maximize the replaceable loss function: argmin-J(f(X adv ),y) Targeted attack is transformed into minimizing replaceable function: argminJ(f(X adv ),y * ) By optimizing different types of objective functions, we can generate the adversarial samples X required by the attacker. adv ; Step C3: Limit the generated disturbance and use the p-norm as the constraint condition ||XX adv || p ≤ε; The step D specifically comprises the following steps: Step D1: Import the trained spiking neural network classifier; Step D2: Based on the original image pulse sequence, construct a perturbation generating function: g(X,γ c )=Clip(X+η*γ c ,0,1) The constant η is a preset constant used to accelerate convergence in iterations, and the size of the generated perturbation is specified in the range of [0,1]; Step D3: Combine the generated perturbation and the original image to form an adversarial sample; Step D4: Set the objective function to optimize the invisibility of the generated perturbation to the human eye: J(X,X adv )=L(f(X),y)+β||X+η*γ c || 2 Where L(f(X),y) is the loss function of the original spike network classifier, To increase the weight of the perturbation in the final loss function and use the L2 norm constraint ||XX adv ||2≤ε to limit the perturbation size; The step E comprises the following steps: Step E1: Calculate each sequence value s in the pulse sequence = (s1, s2, ..., s T ), the calculation formula is: Where i=(1,2,…,T); Step E2: Calculate γ for each pulse i The pre-generated disturbance size value L2 is denoted as ω=(ω1, ω2, ..., ω i ); Step E3: When selecting the best pulse, give priority to small disturbance size values, modify the pulse value with more information, and use the priority queue function: Priority_spike(ω,s)=priority_queue(ω,s) Among them, Priority_spike(ω,s)={(ω1,s1), (ω2,s2),…, (ω T ,s T )}, T = (1, 2, ..., T), where the sequence is reordered according to the minimum perturbation and maximum pulse priority, and finally the pulse γ corresponding to the first sequence (ω1, s1) is selected c .

2. The adversarial attack method for generating uniformly distributed disturbances with pulses as probability according to claim 1, characterized in that: The step A specifically comprises the following steps: Step A1: Perform maximum and minimum normalization on the image X input to the spiking neural network, that is, normalize the value of each original pixel point to x∈[0,1]; Step A2: Set a simulation time step T, and let the pulse emission probability p=x at a simulation time step T, thereby generating a pulse sequence γ with a simulation time step of T.

3. The adversarial attack method for generating uniformly distributed disturbances with pulses as probability according to claim 2, characterized in that: The step B specifically comprises the following steps: Step B1: Initialize the model using preset model parameters; Step B2: Set the simulation time step T and generate the pulse sequence of the labeled data set Where i = (0, 1, ..., N) is the size of the labeled data set N; Step B3: Determine the mean square loss function between the result of the input classifier and the label value as the loss function of this method: L(f(X),y)=MSE(f(X),y) The input is a clean sample X of the label data set, and y is the label corresponding to the sample; Step B4: Using the gradient descent algorithm, with the goal of optimizing and minimizing the loss function, the back propagation mechanism is used to update the internal parameters of the neural network; Step B5: Obtain the pulse neural network classifier f for several trained data sets.

4. The adversarial attack method for generating uniformly distributed disturbances with pulses as probability according to claim 1, characterized in that: The step F comprises the following steps: Step F1: Initialize X adv =X; Step F2: Depending on the attack type, maximize the objective function for untargeted attacks under white-box attacks or minimize the objective function for targeted attacks. Use the white-box model as an alternative model under black-box attacks to generate adversarial samples X through untargeted attacks. adv To attack the black box model; Step F3: Update adversarial example X adv ; Step F4: Continuously execute step F2 and step F3 until good invisibility is achieved and the classifier is misclassified.

5. The adversarial attack method for generating uniformly distributed disturbances with pulses as probability according to claim 1, characterized in that: The step G comprises the following steps: Step G1: Input the obtained optimal iterative adversarial sample X into the pulse neural network classifier f and the black box classifier f′ built in step A respectively; Step G2: Evaluate the attack based on the success rates of targeted, untargeted, and black-box attacks and the invisibility evaluation index of adversarial samples to determine whether the attack is effective.

6. An adversarial attack system that generates uniformly distributed perturbations with pulse probabilities, characterized in that: The system is implemented by using a confrontation attack method for generating uniformly distributed disturbances with pulses as probability as described in any one of claims 1 to 5, including: The alternative network generation module is used to build a classifier structure for generating adversarial samples, including an encoding submodule, a parameter initialization submodule, a training network submodule, and a network parameter update submodule. First, the simulation time step T is set, and the labeled data set is Poisson encoded to generate the corresponding pulse sequence γ. Then, the pulse neural network is initialized through the parameter initialization submodule, and then the pulse neural network is trained through the training submodule. Finally, the network parameter update submodule updates the parameters of the pulse neural network classifier. The pulse screening module is used to save the time and energy consumption of adversarial samples, including the pulse value calculation submodule, the perturbation value calculation submodule, and the priority queue submodule; the pulse value s and the perturbation size value L2 are calculated by the pulse value calculation submodule and the perturbation value calculation submodule respectively, and then the calculated values ​​are input into the priority queue submodule to obtain the optimal pulse γ c ; The adversarial sample generation module is used to continuously optimize the objective function and finally generate adversarial samples with high attack performance and good invisibility, including perturbation generation submodule, adversarial sample generation submodule, model loading submodule, and objective function optimization submodule; the perturbation generation module generates adversarial perturbations that meet the conditions, and then generates adversarial samples in the adversarial sample generation submodule, and inputs the adversarial samples into the spiking neural network output by the replacement model; then the objective function optimization submodule continuously optimizes the objective function, and after multiple rounds of iterations, the final adversarial sample X is generated. adv ; The evaluation module is used to evaluate the untargeted and targeted attacks on the classifier f in the white-box setting, as well as the attack effects on the black-box classifier f′ in the black-box setting; by evaluating the attack success rate and comparing the indistinguishability of the generated adversarial samples with the original images, the attack effects of the generated adversarial samples are comprehensively evaluated.