Fault suppression type high-reliability CNN quantitative perception training method and system
By simulating the fault generation and propagation of single-particle effects in spacecraft and training the CNN model in a targeted manner, the reliability and robustness issues of the CNN model in spacecraft were solved, and stable operation and efficient data processing were achieved in high-radiation environments.
Patent Information
- Application Number
- CN202411446502.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-09-16
AI Technical Summary
The existing CNN model has poor reliability and safety due to the single-particle effect caused by the high-radiation environment in spacecraft. The existing reinforcement scheme fails to effectively solve the robustness problem of the quantization method in a resource-constrained environment.
By calculating the probability of single-particle upset events, simulating fault generation and propagation, extracting sensitive nodes for targeted training, and iteratively optimizing layer by layer, the model's anti-interference ability and robustness are enhanced.
It improves the reliability and robustness of the CNN model in high-radiation environments, is suitable for resource-constrained spacecraft, reduces computing and storage requirements, and improves system operating frequency and data processing efficiency.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology and relates to a fault-suppressing high-reliability CNN quantitative perception training method and system. Background Art
[0002] Convolutional Neural Networks (CNNs), due to their superior performance in image processing, pattern recognition, and feature extraction, have been widely applied to various tasks, including autonomous driving, medical image analysis, and natural language processing. With the rapid development of commercial spaceflight, the potential application of CNNs in spacecraft has become increasingly significant. CNNs can effectively improve data processing efficiency and decision support capabilities in a variety of application scenarios, including satellite image processing, deep space exploration data analysis, and real-time monitoring systems.
[0003] However, current CNN models typically have enormous computational and storage requirements, posing significant challenges in terms of weight and power consumption for resource-constrained spacecraft. Therefore, data compression for CNN models is crucial in resource-constrained environments. Currently, a commonly used data compression method is fixed-point quantization. This technique significantly reduces computational resource consumption and increases system operating frequency by converting model parameters from floating-point numbers to integers. This quantization method is divided into post-training quantization (PTQ) and quantization-aware training (QAT). Post-training quantization minimizes quantization loss by selecting appropriate quantization and calibration operations based on trained model parameters. Quantization-aware training incorporates quantization and dequantization operations during training to simulate the quantization process. Compared to PTQ, QAT introduces quantization operations during model training, which can better maintain model accuracy, reduce hardware resource consumption and power consumption, increase system operating frequency, and adapt the model to resource-constrained environments. It is a highly versatile and effective data compression strategy that meets the lightweight requirements of aerospace applications.
[0004] However, the high radiation levels in the space environment can cause single-event effects (SEPs), leading to soft errors in node circuits and directly impacting the reliability and safety of the entire system. Therefore, radiation-resistant design for SEPs is particularly important. Currently, common CNN hardening solutions encompass three aspects: model modification, training strategy adjustment, and hardware-level hardening. Model modification involves increasing redundancy and adjusting network structure to improve fault tolerance. Training strategy adjustment involves introducing dropout, noise injection, and weight pruning for retraining to improve the model's robustness to faults. Hardware-level hardening reduces the impact of hardware failures on CNN performance by using error detection and correction codes, algorithm-level radiation-resistant design, and the adoption of approximate computing and network compression techniques in hardware implementation. These hardening solutions improve the robustness and reliability of CNNs in the face of hardware failures from multiple perspectives, including algorithmic and hardware. However, research on the high reliability of general quantization methods remains a gap. Summary of the Invention
[0005] In response to the problems existing in the prior art, the present invention provides a fault-suppressed high-reliability CNN quantization perception training method and system, thereby solving the technical problem of poor reliability of the quantization method in the prior art when used in aerospace devices.
[0006] The present invention is achieved through the following technical solutions: A fault-suppressive and highly reliable CNN quantization-aware training method includes the following steps: Calculate the expected probability of a single event upset event based on the type and size of the CNN network layer; Based on the expected probability of occurrence of the single event upset event, random fault generation is performed during the process of quantization-aware training simulated integer inference; Extract model fault propagation paths, analyze fault propagation impact mechanisms, conduct model fault tolerance node tests, identify sensitive nodes where model accuracy fluctuations exceed preset thresholds, and perform targeted fault generation and training for these sensitive nodes; According to the model structure, fault iterative training is performed layer by layer to obtain convergence results. Each converged training result is used as the pre-training parameter for the next simulated fault training until no sensitive nodes appear, completing the CNN quantization process.
[0007] Preferably, the probability of occurrence of an expected single-particle upset event is calculated based on the type and scale of the CNN network layer, specifically: for the convolution layer, its data volume is calculated using the number of multiplication and addition operations; for the pooling layer, its data volume is calculated based on the size of the input matrix, and the total failure probability of each layer is obtained based on the calculated data volume.
[0008] Preferably, for the convolutional layer, the amount of data is calculated using the number of multiplication and addition operations, specifically:
[0009] For the pooling layer, the amount of data is calculated based on the size of the input matrix, specifically:
[0010] in, as well as are the width and height of the convolution kernel respectively; 、 as well as are the output matrix width, height and depth respectively; 、 as well as are the input matrix width, height, and depth, respectively.
[0011] Preferably, the total probability of failure of each layer is obtained based on the calculated data volume, specifically:
[0012] in, is the total probability of failure at the current network layer, is the total data volume of the current layer, is the total data volume of each layer.
[0013] Failure probability of a single data bit in each layer Expressed as:
[0014] in, 、 and are the number of data in each layer of the network, namely the weight, layer input and layer output.
[0015] Preferably, random fault generation is performed during the process of quantization-aware training simulation of integer inference, and the fault generation includes fault changes to weight data, and the probability of fault occurrence is adjusted by setting a fault generation intensity coefficient.
[0016] Preferably, for sensitive nodes where the model accuracy oscillation exceeds a preset threshold, the preset threshold is 5%. During the training process, each sensitive node is trained until the loss function converges; the loss function is
[0017] Where, is the original loss function, is the fault convergence coefficient, The model accuracy oscillation caused by node fault propagation, is the current training iteration number, Set reps for basic training.
[0018] A fault-suppressing, highly reliable CNN quantitative perception training system, comprising: An expected single event upset event probability acquisition module is used to calculate the expected probability of occurrence of a single event upset event based on the type and scale of the CNN network layer; A random fault generation module, configured to generate random faults during quantization-aware training simulation of integer inference based on the expected probability of occurrence of the single-event upset event; Sensitive node testing and targeted training module, which is used to extract model fault propagation paths, analyze fault propagation impact mechanisms, perform model fault tolerance node testing, identify sensitive nodes where model accuracy oscillation exceeds a preset threshold, and perform targeted fault generation and training for these sensitive nodes; The layer-by-layer fault iterative training module is used to perform layer-by-layer fault iterative training according to the model structure to obtain convergence results. Each converged training result is used as the pre-training parameter for the next simulated fault training until no sensitive nodes appear, completing the CNN quantization process.
[0019] A computer device includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0020] A computer-readable storage medium stores a computer program, wherein the computer program / instructions are executed by a processor to implement the steps of the above method.
[0021] A computer program product comprises a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0022] Compared with the prior art, the present invention has the following beneficial technical effects: The present invention discloses a fault-suppressing, high-reliability CNN quantization-aware training method. This method simulates potential faults in radiation environments (such as single-particle upset events) and introduces fault impact mechanisms during quantization-aware training, thereby enhancing the model's anti-interference capability. Consequently, in practical applications, when the model is deployed in high-radiation environments (such as space and nuclear facilities), its performance will be more stable and less susceptible to radiation interference. Furthermore, by extracting the model's fault propagation paths and analyzing their impact mechanisms, this method enables a deeper understanding of the behavior and characteristics of the neural network model. This in-depth analysis helps identify potential weaknesses in the model, providing strong support for subsequent model optimization and improvement. Furthermore, through model fault-tolerance node testing, this method can accurately identify sensitive nodes where model accuracy oscillations exceed a preset threshold. Targeted fault generation and training for these sensitive nodes can significantly improve the model's robustness and fault tolerance. This strategy of precisely locating and strengthening sensitive nodes enables the model to recover faster and maintain stability in the face of faults. Furthermore, fault-aware iterative training is performed layer by layer based on the model structure, with each converged training result used as pre-training parameters for the next simulated fault training. This layer-by-layer training approach not only facilitates faster model convergence but also improves training efficiency. Furthermore, because each training session is based on the previous results, model performance is gradually optimized until no sensitive nodes are present, completing the quantization process. This method is applicable to all lightweight modeling scenarios targeting high-radiation environments and is highly portable and versatile. This broad applicability holds great potential for practical applications. In summary, this fault-suppressing, highly reliable CNN quantization-aware training method significantly improves the reliability and robustness of the model in high-radiation environments by simulating potential faults in radiation environments, deeply analyzing the model's fault propagation mechanism, precisely locating and strengthening sensitive nodes, performing layer-by-layer fault-aware iterative training, and achieving high portability and versatility. This significantly improves the reliability and robustness of the model in high-radiation environments, which is of great significance for promoting the application of neural network models in these environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 Schematic diagram of the basic quantification scheme.
[0025] Figure 2 Schematic diagram of quantization-aware training.
[0026] Figure 3Schematic diagram for fault generation and transmission analysis. DETAILED DESCRIPTION
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0028] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.
[0029] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0030] In the description of the embodiments of the present invention, it should be noted that if the terms "upper," "lower," "horizontal," "inner," etc. appear, the orientation or positional relationship indicated is based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the inventive product is typically placed when in use. These terms are merely for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or component referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on the present invention. In addition, the terms "first," "second," etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0031] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0032] In the description of the embodiments of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0033] The present invention is described in further detail below with reference to the accompanying drawings: Example 1 The present invention provides a fault-suppressed high-reliability CNN quantitative perception training method, comprising the following steps: (1) Calculate the expected probability of a single-event upset event based on the type and size of the CNN network layer; Specifically: for the convolution layer, the data volume is calculated using the number of multiplication and addition operations; for the pooling layer, the data volume is calculated based on the size of the input matrix, and the total failure probability of each layer is obtained based on the calculated data volume.
[0034] For the convolutional layer, the amount of data is calculated using the number of multiplication and addition operations, specifically:
[0035] For the pooling layer, the amount of data is calculated based on the size of the input matrix, specifically:
[0036] in, as well as are the width and height of the convolution kernel respectively; 、 as well as are the output matrix width, height and depth respectively; 、 as well as are the input matrix width, height, and depth, respectively.
[0037] The total probability of failure of each layer is obtained based on the calculated data volume, specifically:
[0038] in, is the total probability of failure at the current network layer, is the total data volume of the current layer, is the total data volume of each layer.
[0039] Failure probability of a single data bit in each layer Expressed as:
[0040] in, 、 and are the number of data in each layer of the network, namely the weight, layer input and layer output.
[0041] (2) generating random faults during the process of quantization-aware training simulation of integer inference based on the expected probability of occurrence of the single-particle upset event; The random fault generation is performed during the process of quantization-aware training simulation integer inference, wherein the fault generation includes fault changes to weight data and adjusting the probability of fault occurrence by setting a fault generation intensity coefficient.
[0042] (3) Extract the model fault propagation path, analyze the fault propagation impact mechanism, conduct model fault tolerance node testing, identify sensitive nodes where the model accuracy oscillation exceeds the preset threshold, and perform targeted fault generation and training for the sensitive nodes; For sensitive nodes where the model accuracy oscillation exceeds a preset threshold, the preset threshold is 5%. During the training process, each sensitive node is trained until the loss function converges; the loss function is
[0043] Where, is the original loss function, is the fault convergence coefficient, The model accuracy oscillation caused by node fault propagation, is the current training iteration number, Set reps for basic training.
[0044] (4) According to the model structure, iterative fault training is performed layer by layer to obtain convergence results. Each converged training result is used as the pre-training parameter for the next simulated fault training until no sensitive nodes appear, completing the quantization process of CNN.
[0045] That is, the present invention provides a high-reliability CNN quantization perception training method that analyzes the random fault impact mechanism of multi-bit integer numbers such as weights, layer inputs and layer outputs based on the probability of single-particle upset events at the module level and performs repeated iterative training, so as to promote the parameter construction of the quantization model to be biased towards high anti-interference ability.
[0046] In order to explain the scheme in the present invention, the following examples are used. The scheme of the present invention includes: (1) Basic quantitative methods The basic quantization method of the present invention adopts a linear quantization scheme, in which the batch normalization operation is integrated into the convolution operation process through a layer fusion strategy. For the fused floating-point convolution layer operation, the quantization method of the present invention first divides the input feature data by a scaling factor, and after truncation and rounding, maps the original floating-point domain input data to the integer domain. Similarly, the same operation is performed on the weights. After the convolution operation is completed, the integer result obtained is multiplied by the scaling factor, and the integer operation result is mapped back to the floating-point domain, so that the original floating-point operation can be replaced by the integer operation. Since the input and weights are quantized, the quantized operation results have certain errors. The output feature map data of the previous convolution layer will be used as the input feature map data of the next convolution layer. Before being input to the next layer, it must be multiplied by a new scaling factor again to quantize it to an integer. The two scaling operations between the two convolution layers are fused into one scaling operation, thereby simplifying the operation process.
[0047] (2) Implementation of Quantization-aware Training The present invention adds quantization and dequantization operations during the training process to simulate the precision loss during integer inference, allowing the network to learn to reduce the loss during quantization. Feature data and weights are quantized symmetrically, with feature data quantized layer by layer and weights quantized channel by channel.
[0048] (3) Fault impact mechanism analysis and training optimization methods Based on the characteristics of single-event upset events at the CNN module level, this method establishes and analyzes fault impact mechanisms for multi-bit integers such as weights, layer inputs, and layer outputs. The method calculates expected single-event upset event characteristics, impact patterns, node location rules, and occurrence probabilities. The fault impact mechanism is then introduced during quantization-aware training to simulate integer inference. Iterative training of fault propagation and impact patterns is performed layer by layer, resulting in a stable quantization model with strong anti-interference capabilities.
[0049] The present invention proposes an innovative high-reliability CNN quantization-aware training method, which simulates potential faults that may occur in a radiation environment, and performs random fault generation and transmission on the weights, layer inputs, and layer outputs of the CNN model, thereby enhancing the model's anti-interference ability and robustness. The present invention adopts a linear quantization scheme, and combines batch normalization operations with convolution operations through a layer fusion strategy, thereby achieving an efficient mapping from floating-point numbers to integers, and by adding quantization and dequantization operations during the training process, the network can learn and reduce losses in the quantization process, thereby maintaining model accuracy. In addition, the present invention also proposes a fault generation and transmission law analysis method based on the probability of single-particle flip events at the CNN module level, by randomly generating faults for multi-bit integers, analyzing the model fault transmission law, extracting fault-sensitive nodes, and performing targeted fault generation and training, while keeping the model accuracy controlled within the expected loss threshold, considering the iterative training time and reliability capability balance coefficient, and finally obtaining a stable quantization model with strong anti-interference ability. It has the following advantages, 1. Use fixed-point quantization technology to convert the model from floating-point numbers to integers, effectively reducing the amount of calculation and storage requirements and lowering power consumption.
[0050] 2. Quantized models reduce resource consumption, increasing system operating frequency and improving data processing efficiency. Fault generation and propagation pattern calculations are integrated into the training process and combined with quantization-aware training, without introducing additional time and resource consumption.
[0051] 3. By simulating potential failures in radiation environments during training, the model's anti-interference ability is enhanced and its reliability in high-radiation environments is improved.
[0052] 4. Deeply analyzing the model fault propagation mechanism, extracting the model fault-sensitive nodes, and conducting targeted fault generation iterative training can enhance the structural understanding of the neural network model and reversely guide the effective construction of the model.
[0053] 5. This method is highly portable and versatile, and is suitable for all lightweight model scenarios facing high radiation environments.
[0054] Example 2 In order to further explain the technical solution of the present invention, the following examples are provided: The fault-suppressive, highly reliable CNN quantization-aware training method described in the present invention includes three parts: a basic quantization method, quantization-aware training implementation, and a fault impact mechanism analysis and training optimization method. The details of each part are as follows.
[0055] 1. Basic Quantitative Methods The basic quantification method of the present invention is as follows Figure 1As shown. Using a linear quantization scheme, a linear mapping is established between integer values and floating-point values. In the following formula derivation, we use f to represent a floating-point real number and q to represent a quantized fixed-point integer. The conversion formula is:
[0056]
[0057] Among them, S stands for scale, which indicates the proportional relationship between real numbers and integers. Z is the zero point, which indicates the integer corresponding to the quantized 0 in the real number. The calculation method is:
[0058]
[0059] in, 、 are the maximum and minimum values of f, respectively. 、 Same thing.
[0060] Based on the above quantization formula, the quantization implementation method of the convolution layer, batch normalization layer and average pooling layer is as follows.
[0061] (1) Quantization implementation of convolutional layer First, let's look at the quantization implementation of the convolutional layer. The conversion between floating-point operations and quantized integer operations is shown below. 、 、 are floating point representations of weights, inputs, and outputs, respectively, and their matrix multiplication is in the form of:
[0062] Assumptions 、 、 are the fixed-point representations of weights, inputs, and outputs after quantization, 、 、 are the weight, input and output scale and zero point respectively. From the above formula we can deduce
[0063]
[0064] in This is the quantized integer convolution calculation result. In quantized integer inference, it can be used directly Perform calculations on subsequent layers.
[0065] When symmetric quantization is used, the zero point is 0, and the above formula can be simplified to
[0066]
[0067] When this is implemented on hardware, only multiplication operations are required without addition operations, which can save hardware resources.
[0068] When a convolution layer includes a bias, the quantization scale of the bias is determined by the scale of the input and the scale of the weight. The floating-point result of the convolution operation when the bias is included is as follows:
[0069] Now available and The corresponding relationship is
[0070]
[0071] Therefore, the quantization scale of the bias .
[0072] At the same time, it can be seen that in addition to All calculations except for The floating-point operations can be replaced by multiplication and shift operations as shown below:
[0073] in is a non-negative integer, such as when hour, This is a very large floating-point number, and rounding it off has very little impact on the calculation result. With this design approach, after completing the convolution layer operation and obtaining an integer result, integer multiplication and shift operations can be used to cleverly replace floating-point multiplication operations, simplifying the calculation requirements and the hardware circuit design.
[0074] Since the activation layer ReLU itself does not perform any mathematical operations and is just a truncation function, the same scale and zero point can be used before and after ReLU.
[0075] (2) Batch Normalization Layer Fusion In neural network algorithms, the Batch Normalization (BN) layer is located after the convolutional layer and before the ReLU layer. It is used to normalize the calculation results of the convolutional layer to prevent the output data range of the convolutional layer from varying too much.
[0076] During the network inference phase, the operations of the BN layer can be integrated into the Conv layer to reduce the amount of computation and accelerate inference. This essentially modifies the parameters of the convolution kernel, omitting the computational effort of the BN layer without increasing the computational effort of the Conv layer.
[0077] The calculation formula of the batch normalization layer is shown below.
[0078]
[0079] After the CNN network model training is completed, 、 、 、 、 All five parameters are constants. The convolution operation formula is shown below, and the weight is , the bias is .
[0080]
[0081] Substituting the convolution operation formula into the batch normalization layer calculation formula, we can get:
[0082] The above formula can be written as follows:
[0083] Therefore, the above formula realizes the fusion operation of convolution layer and batch normalization layer, and the new weight is , the new bias is . Before quantizing the neural network algorithm, the weights and biases of the convolutional layer are first preprocessed according to the new weights and biases. This can eliminate the batch normalization layer and reduce the computational complexity of CNN inference.
[0084] (3) Quantization implementation of average pooling layer The average pooling module is used to sum the input feature maps within the pooling window and then calculate the average. Calculating the average requires floating-point division, producing a floating-point result. Implementing division circuits consumes significant circuit resources, and floating-point calculation circuits are even more complex. Therefore, floating-point division should be avoided when designing the pooling module.
[0085]
[0086]
[0087] When designing the quantization method of the average pooling layer, the present invention uses integer multiplication and shift operations to replace floating-point operations. The specific design method is shown in the above formula. and is the width and height of the pooling window. After summing the input feature maps within the pooling window, divide by The operation requires floating point division to ensure the calculation accuracy. The operation is transformed into, first multiply ), and then divided by .take ) operation, by ) rounded to an integer, converting it to integer multiplication, dividing by This can be accomplished directly using shift operations. This converts floating-point division into integer multiplication and shift operations. This allows only integer operations to be used in the calculation of the average pooling layer, thus achieving full integer quantization of the average pooling layer.
[0088] 2. Quantization-aware training implementation During network training, quantization-aware training incorporates quantization and dequantization operations into the forward propagation, simulating the precision loss during integer inference. This allows the neural network to learn and minimize quantization losses. Both feature data and weights are quantized symmetrically to integer values; feature data is quantized layer by layer, and weights are quantized channel by channel. Batch normalization layers are integrated into convolutions for computation. The derivation of subsequent formulas assumes these conditions.
[0089] like Figure 2 The figure below shows the process of quantization-aware training simulating integer inference. The simulated quantization operation in quantization-aware training quantizes floating-point results to their corresponding integer values and then dequantizes them back to floating-point values, simulating the quantization loss in integer calculations.
[0090] Taking the quantization and dequantization of weights as an example, the formula for weight quantization is
[0091] The round() function represents the rounding operation on the data, and the clip() function represents the truncation operation on the data. For N-bit symmetric quantization, the data will be truncated to [- , ] interval.
[0092] The weight dequantization formula is:
[0093] After quantization and dequantization, the weights return to floating-point representation and already include the quantization error.
[0094] In integer inference, inputs, outputs, and weights are all stored using N bits. Because batch normalization is integrated into the convolutional layer for computation, the convolutional layer after BN integration has new weights and biases. In hardware implementation, to prevent overflow of the convolutional calculation results, intermediate results are stored using 32 bits. Compared to weights, biases account for a small portion, but they must be added to each output, and their error significantly impacts the final result. Therefore, we use 32 bits to store biases.
[0095] 3. Fault generation and transmission law analysis and calculation method The fault generation and transmission law analysis calculation method of the present invention performs random fault generation and transmission law analysis on multi-bit integers such as weights, layer inputs and layer outputs based on the probability of occurrence of single-particle upset events at the CNN module level and performs repeated iterative training, such as Figure 3 The specific description is as follows: (1) First, calculate the expected probability of a single-particle upset event based on the current network layer type and size. If the current task network layer type is a convolutional layer, the amount of data Z required to be calculated can be measured by the number of multiplication and addition operations. If the current task network layer type is a pooling layer, the total amount of data calculated is only related to the size of the input matrix. The specific formula is:
[0096]
[0097] Among them, the input matrix width ,high and depth , the width of the convolution kernel (or filter for pooling layers) ,high , output matrix width ,high and depth The total probability of network layer failure P is expressed as:
[0098] in Indicates the total data volume of the current layer. Indicates the total data volume of each layer.
[0099] Each layer of the network has weights, layer inputs, and layer outputs, and the number of data is 、 and , assuming that the quantization is N bits, the failure probability of a single bit of data in each layer is Expressed as:
[0100] (2) Based on the above calculated fault probability, random fault generation is performed in the process of quantization-aware training simulating integer inference. Taking weight data as an example, in the quantization-aware training simulating quantization operation, Perform a fault change to , we can get:
[0101] in For the simulation value of integer data fault, the fault generation intensity coefficient k can be set according to the strength of the simulated irradiation environment, so that It can be expressed as:
[0102] in , which conforms to the Bernoulli distribution, indicating that the probability of a single bit failure in a single data is . According to the flip type, it is expressed as the flip difference of the corresponding bit. The specific formula is:
[0103] (3) Based on the quantitative training results generated by fixed-point faults, the model fault propagation path is extracted and the fault propagation impact mechanism is analyzed. The model fault tolerance node test is carried out to find sensitive nodes where the model accuracy oscillation exceeds 5%, and targeted fault generation and training are carried out while keeping the model accuracy within the expected loss threshold. Considering the iterative training time and reliability capacity balance coefficient, assuming that the original loss function is E0, the model accuracy oscillation caused by node fault propagation is , the current training iteration number is T, the basic training number is set to T0, and the fault convergence coefficient is k, then the new loss function Loss formula is expressed as:
[0104] When the number of iterations is less than T0, T=T0 by default. For each sensitive node, training is performed until the above loss function converges, ensuring the strongest model anti-interference ability and minimum accuracy loss within a limited number of training times.
[0105] (4) Repeat steps (1) to (3) and perform fault iterative training layer by layer according to the model structure to obtain convergence results. Each converged training result is used as the pre-training parameter for the next simulated fault training. Finally, no sensitive nodes appear and a stable quantitative model with strong anti-interference ability is obtained.
[0106] Example 3 In addition, a fault-suppressing, highly reliable CNN quantization perception training system is provided, including: An expected single event upset event probability acquisition module is used to calculate the expected probability of occurrence of a single event upset event based on the type and scale of the CNN network layer; A random fault generation module, configured to generate random faults during quantization-aware training simulation of integer inference based on the expected probability of occurrence of the single-event upset event; Sensitive node testing and targeted training module, which is used to extract model fault propagation paths, analyze fault propagation impact mechanisms, perform model fault tolerance node testing, identify sensitive nodes where model accuracy oscillation exceeds a preset threshold, and perform targeted fault generation and training for these sensitive nodes; The layer-by-layer fault iterative training module is used to perform layer-by-layer fault iterative training according to the model structure to obtain convergence results. Each converged training result is used as the pre-training parameter for the next simulated fault training until no sensitive nodes appear, completing the CNN quantization process.
[0107] In addition, a schematic diagram of a terminal device is provided in one embodiment of the present invention. The terminal device in this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of each of the aforementioned method embodiments are implemented. Alternatively, when the processor executes the computer program, the functions of each module / unit in each of the aforementioned device embodiments are implemented.
[0108] The computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to accomplish the present invention.
[0109] The terminal device may be a computing device such as a desktop computer, a notebook computer, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0110] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0111] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.
[0112] If the module / unit integrated in the terminal device is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the process steps in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content of the computer-readable medium can be appropriately increased or decreased based on the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunication signals. The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
[0113] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A fault-suppressive, highly reliable CNN quantitative perception training method, characterized in that: The following steps are involved: Calculate the expected probability of a single event upset event based on the type and size of the CNN network layer; Based on the expected probability of occurrence of the single event upset event, random fault generation is performed during the process of quantization-aware training simulated integer inference; Extract model fault propagation paths, analyze fault propagation impact mechanisms, conduct model fault tolerance node tests, identify sensitive nodes where model accuracy fluctuations exceed preset thresholds, and perform targeted fault generation and training for these sensitive nodes; According to the model structure, fault iterative training is performed layer by layer to obtain convergence results. Each converged training result is used as the pre-training parameter for the next simulated fault training until no sensitive nodes appear, completing the CNN quantization process.
2. A fault-suppressed high-reliability CNN quantitative perception training method according to claim 1, characterized in that: The method calculates the expected probability of a single-event upset event based on the type and size of the CNN network layer. Specifically, for the convolutional layer, the data volume is calculated using the number of multiplication and addition operations. For the pooling layer, the data volume is calculated based on the size of the input matrix. The total failure probability of each layer is obtained based on the calculated data volume.
3. A fault-suppressed high-reliability CNN quantitative perception training method according to claim 2, characterized in that: For the convolutional layer, the amount of data is calculated using the number of multiplication and addition operations, specifically: For the pooling layer, the amount of data is calculated based on the size of the input matrix, specifically: in, as well as are the width and height of the convolution kernel respectively; 、 as well as are the output matrix width, height and depth respectively; 、 as well as are the input matrix width, height, and depth, respectively.
4. A fault-suppressed high-reliability CNN quantitative perception training method according to claim 2, characterized in that: The total probability of failure of each layer is obtained based on the calculated data volume, specifically: in, is the total probability of failure at the current network layer, is the total data volume of the current layer, is the total data volume of each layer; Failure probability of a single data bit in each layer Expressed as: in, 、 and are the number of data in each layer of the network, namely the weight, layer input and layer output.
5. The fault-suppressive high-reliability CNN quantitative perception training method according to claim 1, characterized in that: The random fault generation is performed during the process of quantization-aware training simulation integer inference, wherein the fault generation includes fault changes to weight data and adjusting the probability of fault occurrence by setting a fault generation intensity coefficient.
6. A fault-suppressed high-reliability CNN quantitative perception training method according to claim 3, characterized in that: For sensitive nodes where the model accuracy oscillation exceeds a preset threshold, the preset threshold is 5%. During the training process, each sensitive node is trained until the loss function converges; the loss function is Where, is the original loss function, is the fault convergence coefficient, The model accuracy oscillation caused by node fault propagation, is the current training iteration number, Set reps for basic training.
7. A fault-suppressing, highly reliable CNN quantitative perception training system, characterized in that: include: An expected single event upset event probability acquisition module is used to calculate the expected probability of occurrence of a single event upset event based on the type and scale of the CNN network layer; A random fault generation module, configured to generate random faults during quantization-aware training simulation of integer inference based on the expected probability of occurrence of the single-event upset event; Sensitive node testing and targeted training module, which is used to extract model fault propagation paths, analyze fault propagation impact mechanisms, perform model fault tolerance node testing, identify sensitive nodes where model accuracy oscillation exceeds a preset threshold, and perform targeted fault generation and training for these sensitive nodes; The layer-by-layer fault iterative training module is used to perform layer-by-layer fault iterative training according to the model structure to obtain convergence results. Each converged training result is used as the pre-training parameter for the next simulated fault training until no sensitive nodes appear, completing the CNN quantization process.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory, wherein: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.