Fault vulnerability assessment method for neural network accelerator based on hardware feature information

By building a closed-loop evaluation architecture that integrates software and hardware, using fault distribution and probability simulation, combined with inter-layer search, we solve the problems of low accuracy of hardware fault evaluation and insufficient layer-by-layer robustness verification in the existing technology, and achieve neural network performance. Highly accurate assessment and security of network hardware failures.

CN114547966BInactive Publication Date: 2024-09-24ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210022402.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-10
Publication Date
2024-09-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The fault model in the existing neural network hardware accelerator fault assessment framework is simple, and the software and hardware parts are severely fragmented, resulting in low assessment accuracy and a lack of verification of the layer-by-layer robustness of the network.

Method used

By extracting hardware feature information, we build a closed-loop evaluation architecture that integrates software and hardware. We use fault distribution simulation and fault probability simulation, combined with inter-layer search, to construct a neural network fault vulnerability model to evaluate the performance degradation of each layer when facing fault attacks.

Benefits of technology

It improves the accuracy and fine-grainedness of neural network hardware fault assessment, provides a systematic complex fault simulation method, and ensures the security of hardware neural networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114547966B
    Figure CN114547966B
Patent Text Reader

Abstract

The present invention discloses a method for evaluating the fault vulnerability of a neural network accelerator based on hardware feature information, including: extracting hardware information features of a neural network running on a hardware accelerator, the information features including features of the neural network under normal operation and its information features when it is attacked by a fault; using the extracted information features to model the fault attack, predicting the impact of the fault on the actual neural network hardware accelerator through fault distribution simulation and fault probability simulation methods, and judging the vulnerability of the neural network when facing a fault attack through an inter-layer search method. The present invention improves the existing hardware fault vulnerability evaluation framework, and improves the accuracy of fault simulation through a method of hardware and software integrated verification while optimizing fine granularity. The improved method has a better effect in evaluating common hardware fault attacks and has certain application value in the field of hardware fault evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of hardware fault safety assessment and the like, and in particular relates to a neural network accelerator fault vulnerability assessment method based on hardware feature information. Background Art

[0002] Deep learning powers a wide variety of edge devices, and the widespread use of neural network hardware accelerators has raised concerns about their security and robustness. Although deep neural network (DNN) models have evolved to surpass humans in prediction, their prediction behavior involves a complex training process and the adaptation of a large number of weight parameters, which makes the calculation of neural networks unexplainable. When errors occur in the calculation of DNN models deployed on hardware (such as FPGAs, ASICs, etc.) (whether they are man-made or naturally occurring), the reasoning process of the neural network will be disrupted. This has made the fault tolerance of different DNN models a topic of much concern and debate in recent years.

[0003] Fault injection attacks are one of the main methods that cause errors in neural network hardware accelerators. Various fault attacks, such as laser injection, temperature change, electromagnetic injection, and Rowhammer, affect the circuit operation in the neural network from various levels. At present, most existing deep learning fault attacks focus on model parameter (weights) operations, activation function (activation function) modification and other fields. In order to evaluate the robustness of DNN models under faults, the existing fault vulnerability assessments for neural networks can be mainly divided into two categories: fault injection simulation and fault space exploration, including: fault location analysis methods based on white box testing; study of the propagation, controllability and observability of hardware faults in data paths and memories of different hardware devices and architectures.

[0004] Although these traditional hardware fault assessment schemes differ in search and location strategies, the fault models in most assessment frameworks are relatively simple and assume that the errors caused by hardware faults are uniformly distributed in the neural network. This simplistic assumption is likely to not match the actual fault attack scenarios on DNN hardware, resulting in low accuracy in the results given by these assessment schemes. In addition, most of the current fault assessment schemes evaluate the overall robustness of the network for the entire neural network, while there is relatively little work on verifying the robustness of each layer of the network. Summary of the invention

[0005] The purpose of the present invention is to provide a neural network accelerator fault vulnerability assessment method based on hardware feature information to address the shortcomings of the fault assessment framework of neural network hardware accelerators in the prior art, which has simple fault models and serious separation of software and hardware. The present invention extracts certain information features from the attacked hardware neural network and inputs them into the software model, thereby constructing a closed-loop assessment framework that integrates software and hardware, improves the accuracy of hardware neural network vulnerability assessment, and optimizes the granularity of the assessment through inter-layer search.

[0006] The object of the present invention is achieved through the following technical solution: A method for evaluating the fault vulnerability of a neural network accelerator based on hardware feature information, comprising the following steps:

[0007] 1) Extraction of hardware feature information of the neural network to be evaluated;

[0008] First, deploy the original target neural network in the hardware accelerator and input a batch of data input , so that the target neural network completes a complete reasoning process and obtains the final result, extracting the intermediate value result R of the neural network operation in the hardware memory pristine And the network's prediction accuracy for this batch of data Acc pristine .

[0009] Next, the same batch of data is re-input to inject faults into the hardware accelerator, and the target neural network is made to complete a complete reasoning process and obtain the final result, and the intermediate value result R of the neural network operation in the hardware memory is extracted. fault .

[0010] 2) Fault behavior modeling;

[0011] Using the extracted hardware feature information R before and after hardware fault injection pristine , Acc pristine With R fault , the behavioral characteristics of the fault are modeled, and the modeling includes fault distribution simulation and fault probability simulation.

[0012] Through fault distribution simulation and fault probability simulation, we deduce the distribution of damaged data blocks in the entire memory and the degree of damage of each damaged data block when the fault is injected into the internal calculation process of the neural network.

[0013] 3) Neural network fault vulnerability assessment;

[0014] The vulnerability assessment of the entire neural network is carried out at the software level, and the performance degradation caused by each layer of the neural network when it is attacked by a fault is confirmed through the inter-layer search method.

[0015] Specifically, for each layer in the neural network, the hardware feature information extraction and fault modeling of steps 1) to 2) are repeated to finally obtain a hardware fault vulnerability model of the entire neural network.

[0016] After the model is built, the inter-layer vulnerability search of the neural network is performed to obtain the damaged classification accuracy Acc of all layers of the network when facing fault attacks. fault .

[0017] Use Acc pristine With Acc fault The difference between the two can be used to quantitatively evaluate the vulnerability of each layer of the network.

[0018] Furthermore, in step 2), for the fault distribution simulation, by comparing R pristine With R fault The distribution of different data in the neural network is simulated to simulate the distribution effect of damaged data blocks caused by hardware failure in all intermediate value calculation results of the neural network. Two simulation forms of fault distribution are proposed: scattered distribution and band distribution. Through the extracted hardware information features, the proportion of damaged data in the total data is estimated:

[0019]

[0020] Among them, D fault For R fault The total amount of damaged data in D all For R fault The total amount of data.

[0021] Furthermore, in step 2), for the fault distribution simulation:

[0022] In the scattered point distribution, the probability of the faulty data block appearing in the total data block must satisfy:

[0023] P fault =r fault (2)

[0024] In the band distribution, in addition to the failure probability satisfying the requirements in formula (2), it is also required that whenever a faulty data block occurs, there are always N adjacent data blocks that are damaged at the same time, where N is the band distribution coefficient that is independently set according to the hardware type and fault type.

[0025] Furthermore, scattered point distribution means that the fault data is scattered in the hardware memory in the form of points; band distribution means that the fault data set is clustered in the form of bands in the hardware memory.

[0026] Further, in step 2):

[0027] For the failure probability simulation, by comparing R pristine With Rfault The degree of damage to each damaged data block in the simulation is used to simulate the probability of data block damage caused by hardware failure. Specifically:

[0028] For R fault For each damaged data block, calculate the difference between it and the original data block, and finally calculate the probability of each difference:

[0029]

[0030]

[0031] Among them, d fault (i) represents the value of the i-th damaged data block, d pristine (i) indicates the same as d fault (i) The value of the corresponding original data block, diff represents the difference between a specific damaged data block and the original data block.

[0032] In order to better infer the probability of each diff, P(diff) is fitted with Johnson's SU distribution. The Johnson's SU formula is used to deduce the probability of various diffs appearing when a data block is damaged.

[0033] Furthermore, in step 2), for the failure probability simulation, Johnson's SU formula is as follows:

[0034]

[0035] Among them, δ is the first shape parameter, λ is the scale parameter, ξ is the location parameter, and γ is the second shape parameter.

[0036] Furthermore, in step 3), inter-layer vulnerability search is performed on the neural network, including the following sub-steps:

[0037] 3.1) Data input Input into the neural network and inject the fault into the jth neural network target layer layer j .

[0038] 3.2) Let the neural network run a complete reasoning process.

[0039] 3.3) Get the final network j-th layer damaged classification accuracy Acc fault,j .

[0040] 3.4) Repeat steps 3.1) to 3.3) to finally obtain the damaged classification accuracy Acc of all layers of the network when facing fault attacks fault .

[0041] The beneficial effects of the present invention are:

[0042] (1) The present invention fills the gap in hardware fault vulnerability assessment for neural networks and systematic simulation and assessment methods for complex faults, further ensuring the security of hardware neural network accelerators;

[0043] (2) The present invention provides a specific and systematic method for simulating complex hardware faults through software. By combining fault distribution simulation with fault probability simulation, the fault assessment framework is not limited to fault models based on uniform distribution or random distribution, thus making it possible to assess complex faults.

[0044] (3) Based on the entire analysis process, the present invention provides an evaluation standard for the vulnerability of a neural network when facing hardware failures, provides a systematic and complete evaluation framework, and refines the granularity of the evaluation. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0046] Figure 1 It is a flow chart of a method for evaluating the fault vulnerability of a neural network accelerator based on hardware feature information of the present invention;

[0047] Figure 2 Schematic diagram of two simulation forms of fault distribution proposed by the present invention; a is a scattered point distribution, b is a band distribution; white data blocks represent data damaged by fault attacks, and black data blocks represent data not affected by fault attacks;

[0048] Figure 3 This is a result diagram of the vulnerability assessment method of an embodiment of the present invention being used to analyze the impact of clock glitch failure on the VGG16 neural network; wherein a is the effect of fitting the probability of data block damage using Johnson's SU formula, b is the difference between the performance of software simulated failure and the performance of hardware failure in actual scenarios, and c is the result of inter-layer search on VGG16. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments and drawings of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0050] The present invention discloses a neural network accelerator fault vulnerability assessment method based on hardware feature information, which utilizes information features extracted from a neural network hardware accelerator to model the fault distribution and fault probability of hardware faults; thereby improving the existing fault attack framework, realizing the simulation of complex fault injection, verifying the vulnerability of each layer of the neural network through inter-layer search, and searching for the more vulnerable parts in the network.

[0051] like Figure 1 As shown, the method comprises the following steps:

[0052] 1) Extraction of hardware feature information of the neural network to be evaluated.

[0053] 1.1) First, deploy the original target neural network in the hardware accelerator and input a batch of data input , so that the target neural network completes a complete reasoning process and obtains the final result; extracts the intermediate value result R of the neural network operation in the hardware memory pristine , and the network's prediction accuracy for this batch of data Acc pristine , and save it.

[0054] 1.2) Then, re-enter the same batch of data input , inject faults into the hardware accelerator, and make the target neural network complete a complete reasoning process and obtain the final result; extract the intermediate value result R of the neural network operation in the hardware memory fault , and save it.

[0055] 2) Fault behavior modeling.

[0056] Using the hardware feature information R before and after hardware fault injection extracted in step 1) pristine 、Acc pristine , R fault , modeling the behavioral characteristics of the fault; modeling includes fault distribution simulation and fault probability simulation. Through fault distribution simulation and fault probability simulation, it can be deduced that when the fault is injected into the internal calculation process of the neural network, the distribution of its damaged data blocks in the entire memory and the degree of damage of each damaged data block can be derived.

[0057] 2.1) For fault distribution simulation, by comparing R pristine With R fault The distribution of different data can simulate the distribution effect of damaged data blocks caused by hardware failure in all intermediate value calculation results of the neural network.

[0058] like Figure 2 a and Figure 2As shown in FIG. 2 , the two fault distribution simulation forms proposed by the present invention are scattered point distribution and strip distribution; the white data blocks represent the data damaged by the fault attack, and the black data blocks represent the data not affected by the fault attack. The scattered point distribution means that the fault data are scattered in the hardware memory in the form of dots, and the strip distribution means that the fault data are clustered in the form of strips in the hardware memory.

[0059] By extracting the hardware information features, we can estimate the proportion of damaged data in the total data. fault :

[0060]

[0061] Among them, D fault For R fault The total amount of damaged data in D all For R fault The total amount of data.

[0062] 2.1.1) In the scattered point distribution, determine the probability P of the faulty data block appearing in the total data block fault Need to meet:

[0063] P fault =r fault (2)

[0064] 2.1.2) In the band distribution, in addition to the failure probability satisfying the requirements in formula (2), it is also required that whenever a faulty data block occurs, there are always N adjacent data blocks that are damaged at the same time, where N is the band distribution coefficient that is independently set according to the hardware type and fault type.

[0065] 2.2) For the failure probability simulation, by comparing R pristine With R fault The degree of damage to each damaged data block in the data can simulate the probability of data block damage caused by hardware failure.

[0066] Specifically, for R fault For each damaged data block, calculate the difference between it and the original data block, and finally calculate the probability P(diff) of each difference:

[0067]

[0068]

[0069] Among them, d fault (i) represents the value of the i-th damaged data block, d pristine (i) indicates the same as d fault(i) The value of the corresponding original data block, diff represents the difference between a damaged data block and the original data block, v fault (i) indicates d pristine (i) and d fault (i) is exactly the difference of diff d fault The value of (i).

[0070] In order to better infer the probability of each diff, P(diff) is fitted with Johnson's SU distribution. The Johnson's SU formula is as follows:

[0071]

[0072] Among them, δ is the first shape parameter, λ is the scale parameter, π is the circumference of a circle, ξ is the position parameter, and γ is the second shape parameter.

[0073] By fitting P(diff), Johnson's SU formula can be used to deduce the probability of various differences appearing when a data block is damaged.

[0074] 3) Neural network fault vulnerability assessment.

[0075] The vulnerability assessment of the entire neural network is carried out at the software level, and the performance degradation caused by each layer of the neural network when it is attacked by a fault is confirmed through the inter-layer search method.

[0076] Specifically, due to the different structures and parameters of each layer of the neural network, the robustness and hardware feature information shown when attacked by hardware failures are also different. Therefore, for each layer of the neural network, the hardware feature information extraction and fault modeling of steps 1) to 2) are repeated to finally obtain the hardware failure vulnerability model of the entire neural network.

[0077] After completing the construction of the hardware fault vulnerability model, the inter-layer vulnerability search of the neural network is carried out as follows:

[0078] 3.1) Data input Input into the neural network and inject the fault into the jth neural network target layer layer j .

[0079] 3.2) Let the neural network run a complete reasoning process.

[0080] 3.3) Get the final network j-th layer damaged classification accuracy Acc fault,j .

[0081] 3.4) Repeat steps 3.1) to 3.3) to finally obtain the damaged classification accuracy Acc of all layers of the network when facing fault attacks fault .

[0082] By comparing Acc pristine With Acc fault The difference between them can reveal the vulnerability of each layer of the network. pristine With Acc fault The difference between represents the degradation of neural network performance before and after fault injection. The vulnerability of the network can be reflected by the difference value. The larger the difference, the greater the performance degradation and the stronger the vulnerability. The difference is used to quantify the vulnerability, and the two are positively correlated.

[0083] Example

[0084] In order to verify the effectiveness of the neural network accelerator fault vulnerability assessment method based on hardware feature information of the present invention, an experiment was carried out. Figure 3 ,The target neural network is selected as VGG16, and the fault type is clock glitch fault.

[0085] Figure 3 a is the effect of fitting the data block damage probability using Johnson's SU formula. It can be seen from the figure that Johnson's SU can perfectly fit the actual hardware data block damage probability distribution. Figure 3 b is the difference between the performance of software simulated faults and the performance of hardware faults in actual scenarios. It can be seen that the differences between most layers in VGG16 are within 0.1, which illustrates the accuracy of software simulated faults. Figure 3 c is the result of inter-layer search for VGG16. It can be seen that VGG16 has high vulnerability in layers 1, 14, and 16. An attacker can easily destroy the performance of the network by injecting faults in these layers. The search results verify the effectiveness of the neural network accelerator fault vulnerability assessment method based on hardware feature information extraction.

[0086] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for evaluating the fault vulnerability of neural network accelerators based on hardware feature information. It is characterized in that The following steps are involved: 1) Extraction of hardware feature information of the neural network to be evaluated; First, deploy the original target neural network in the hardware accelerator and input a batch of data input , so that the target neural network completes a complete reasoning process and obtains the final result, extracting the intermediate value result R of the neural network operation in the hardware memory pristine And the network's prediction accuracy for this batch of data Acc pristine; Next, the same batch of data is re-input to inject faults into the hardware accelerator, and the target neural network is made to complete a complete reasoning process and obtain the final result, and the intermediate value result R of the neural network operation in the hardware memory is extracted. fault ; 2) Fault behavior modeling; Using the extracted hardware feature information R before and after hardware fault injection pristine , Acc pristine With R fault , modeling the behavioral characteristics of faults, including fault distribution simulation and fault probability simulation; Through fault distribution simulation and fault probability simulation, we can deduce the distribution of damaged data blocks in the entire memory and the degree of damage of each damaged data block when the fault is injected into the internal calculation process of the neural network. 3) Neural network fault vulnerability assessment; Conduct vulnerability assessment of the entire neural network at the software level, and use inter-layer search to identify the performance degradation of each layer of the neural network when it is attacked by a fault. Specifically, for each layer of the neural network, the hardware feature information extraction and fault modeling of steps 1) to 2) are repeated, and finally the hardware fault vulnerability model of the entire neural network is obtained; After the model is built, the inter-layer vulnerability search of the neural network is performed to obtain the damaged classification accuracy Acc of all layers of the network when facing fault attacks. fault ; Use Acc pristine With Acc fault The difference between the two can be used to quantitatively evaluate the vulnerability of each layer of the network.

2. The method for evaluating the fault vulnerability of a neural network accelerator based on hardware feature information as claimed in claim 1, It is characterized in that In step 2), for the fault distribution simulation, by comparing R pristine With R fault The distribution of different data in the neural network is simulated to simulate the distribution effect of damaged data blocks caused by hardware failure in all intermediate value calculation results of the neural network; two simulation forms of fault distribution are proposed: scattered point distribution and band distribution; through the extracted hardware information features, the proportion of damaged data in the total data is estimated: Among them, D fault For R fault The total amount of damaged data in D all For R fault The total amount of data.

3. The method for evaluating the fault vulnerability of a neural network accelerator based on hardware feature information as claimed in claim 2, It is characterized in that In step 2), for the fault distribution simulation: In the scattered point distribution, the probability of the faulty data block appearing in the total data block must satisfy: P fault =r fault (2) In the band distribution, in addition to the failure probability satisfying the requirements in formula (2), it is also required that whenever a faulty data block occurs, there are always N adjacent data blocks that are damaged at the same time, where N is the band distribution coefficient that is independently set according to the hardware type and fault type.

4. The method for evaluating the fault vulnerability of a neural network accelerator based on hardware feature information as claimed in claim 2, It is characterized in that Scattered distribution means that the fault data is scattered in the hardware memory in the form of points; band distribution means that the fault data set is clustered in the form of bands in the hardware memory.

5. The method for evaluating the fault vulnerability of a neural network accelerator based on hardware feature information as claimed in claim 2, It is characterized in that In step 2): For the failure probability simulation, by comparing R pristine With R fault The degree of damage to each damaged data block in the simulation is used to simulate the probability of data block damage caused by hardware failure; specifically: For R fault For each damaged data block, calculate the difference between it and the original data block, and finally calculate the probability of each difference: Among them, d fault (i) represents the value of the i-th damaged data block, d pristine (i) indicates the same as d fault (i) The value of the corresponding original data block, diff represents the difference between a specific damaged data block and the original data block; In order to better infer the probability of each diff, P(diff) is fitted with Johnson's SU distribution. The Johnson's SU formula is used to deduce the probability of various diffs appearing when a data block is damaged.

6. The method for evaluating the fault vulnerability of a neural network accelerator based on hardware feature information as claimed in claim 5, It is characterized in that In step 2), for the failure probability simulation, Johnson's SU formula is as follows: Among them, δ is the first shape parameter, λ is the scale parameter, ξ is the location parameter, and γ is the second shape parameter.

7. The method for evaluating the fault vulnerability of a neural network accelerator based on hardware feature information as claimed in claim 1, It is characterized in that In step 3), the inter-layer vulnerability search of the neural network is performed, including the following sub-steps: 3.1) Data input Input into the neural network and inject the fault into the jth neural network target layer layer j ; 3.2) Let the neural network run the reasoning process completely; 3.3) Get the final network j-th layer damaged classification accuracy Acc fault,j; 3.4) Repeat steps 3.1) to 3.3) to finally obtain the damaged classification accuracy Acc of all layers of the network when facing fault attacks fault .