CN-121997990-A - Pulse neural network model fault tolerance method based on dynamic neurons
Abstract
The application discloses a pulse neural network model fault tolerance method based on dynamic neurons, which belongs to the technical field of neural network models, takes pulse distribution of the model under a fault-free condition as a reference baseline, continuously monitors pulse peak quantity and time sequence characteristics of each channel of each layer in the operation process, and carries out targeted adjustment on key channels through a dynamic neuron parameter iteration mechanism when serious abnormality is detected, thereby effectively inhibiting the diffusion and accumulation of abnormal pulses. The application realizes fault tolerance enhancement on the premise of not introducing redundant weight storage and not depending on additional hardware modules.
Inventors
- ZHAN JINYU
- LI TIANYUAN
- CHEN LETIAN
- JIANG WEI
- YAN WENJIE
- WANG SEN
- CAI PEIZHI
- Dou Jiaxiang
- ZHANG ZIHAN
- Quan Boran
Assignees
- 电子科技大学
Dates
- Publication Date
- 20260508
- Application Date
- 20260202
Claims (7)
- 1. A dynamic neuron-based impulse neural network model fault tolerance method applied to an already deployed SNN impulse neural network-based computer vision application, the method comprising: Running a verification data set, counting the total amount of pulse peaks generated in fixed time and the first pulse generation time on each channel dimension of each layer of neurons according to channel levels, and obtaining baseline data; Acquiring initial SNN model weights, replacing neuron weight parameters from hierarchical granularity to channel-level granularity, and replacing modified model weights with original SNN model weights; and the operation model is used for judging whether an error occurs according to the pulse peak distribution characteristics in the operation process, and triggering a dynamic neuron parameter iterative algorithm when the error occurs, wherein the dynamic neuron parameter iterative algorithm comprises the following steps: And updating parameters of a front top-k layer with the maximum deviation loss by comparing the deviation values of the current layers and the baseline data so as to enable the peak times and the pulse time to approach to the baseline state, wherein the top-k is a preset natural number.
- 2. The method for fault tolerance of a dynamic neuron-based impulse neural network model according to claim 1, wherein counting the total amount of impulse spikes generated in a fixed time and the time of first impulse generation in each channel dimension of neurons of each layer according to channel levels, and obtaining baseline data comprises: Setting a fixed reasoning time window and a batch size; Registering a first function for each pulse neuron layer inside the model to obtain pulse output tensors of each layer; under the condition of not injecting faults, running an application program to complete forward reasoning on the verification data set; counting the total channel pulse peak in a fixed time window for the output of the pulse of each channel of each layer in time step and space dimension; And on the baseline data, carrying out cumulative average on a plurality of batches, respectively forming baseline pulse peak statistics and baseline first pulse delay statistics of each channel of each layer, and obtaining channel-level baseline average value and standard deviation by aggregating the verification set.
- 3. The dynamic neuron-based impulse neural network model fault-tolerant method of claim 2, further comprising: if the error weight data set with the bit turned is required to be additionally generated, converting the data format of the model into a target network applicable format; Selecting error strategy injection according to the error type; And converting the data string after the error injection into a model applicable format, and writing back the model and storing.
- 4. The dynamic neuron-based impulse neural network model fault-tolerant method of claim 1, wherein replacing the neuron weight parameters from a hierarchical granularity to a channel-level granularity comprises: and replacing scalar parameters with vector parameters, and initializing according to original values of the parameters to make parameters before and after replacement functionally equivalent.
- 5. The dynamic neuron-based impulse neural network model fault tolerance method of claim 1, wherein the determining whether an error has occurred based on an impulse spike distribution feature comprises: for any input sample or input batch, calculating the channel discharge rate and the channel first pulse delay; comparing the current statistics with baseline data to construct a channel relative deviation; Setting a discharge rate deviation threshold and a delay deviation threshold, marking the current channel as an abnormal channel when the relative deviation of the channel is larger than the discharge rate deviation threshold or the delay deviation threshold, calculating an abnormal indication quantity, and judging that an error occurs if the abnormal indication quantity meets a preset judgment condition.
- 6. The dynamic neuron-based impulse neural network model fault tolerance method of claim 1, wherein updating parameters of the top-k layer prior to maximum deviation loss to bring the number of spikes and the time of impulses to a baseline condition comprises: When the peak of a channel is too many, the threshold is raised to inhibit discharge, when the peak of the channel is too few, the threshold is lowered to recover the discharge, when the first pulse of a certain channel is obviously lagged or advanced, the integral and the decline speed of the membrane potential are changed by adjusting the time constant, so that the discharge time sequence approaches to the base line.
- 7. The dynamic neuron-based impulse neural network model fault-tolerant method of claim 1, further comprising coupling compensation for parameter adjustment of a front top-k layer, in particular comprising: after each round of updating is completed, if the deviation loss is reduced and the proportion of the abnormal channels is synchronously reduced, coupling compensation is executed, statistics are restarted, the deviation loss is recalculated, and if the loss is increased or the abnormal expansion occurs, the updating step length or the rollback parameter is reduced.
Description
Pulse neural network model fault tolerance method based on dynamic neurons Technical Field The application belongs to the technical field of neural network models, and particularly relates to a pulse neural network model fault-tolerant method based on dynamic neurons. Background Along with the gradual landing of the impulse neural network in the edge intelligent system and the safety key application scene, the reliability problem of the impulse neural network in the actual running environment is increasingly prominent, and the impulse neural network gradually becomes an important factor for restricting engineering application. Compared with the traditional deep neural network, the impulse neural network is generally deployed on a hardware platform with limited power consumption, smaller process scale and long-term continuous operation, and is more easily influenced by factors such as environmental noise, voltage fluctuation, device aging and the like, so that soft errors or unexpected disturbance are caused. In such cases, it is common for bit flipping to occur in the weight storage unit, and once this occurs, significant anomalies in network behavior during reasoning are very likely to occur. Aiming at the problem of suppressing errors in the deployment period, the existing method mostly adopts error clipping or error blocking strategies, and suppresses the propagation of abnormal values by introducing upper limit or boundary constraint in an activation layer. However, such methods typically use a hierarchy as a basic regulatory unit, and use a uniform threshold setting for different channels within the same layer, making it difficult to characterize significant differences between channels in terms of weight distribution, pulse rate, and functional sensitivity. In the residual network and the deep structure, the channel heterogeneity is more obvious, and the unified threshold value often cannot simultaneously give consideration to robustness and precision, so that the threshold value deviates from the optimal setting, the fault-tolerant gain is limited, and even new performance loss is introduced. Unlike traditional deep neural networks which rely mainly on static activation functions, the nonlinear mapping process of impulse neural networks is dominated by neuron dynamics mechanisms, and the core behavior of the nonlinear mapping process is represented by integration, leakage and discharge processes of membrane potential. Taking a common LIF neuron as an example, parameters such as threshold voltage, membrane time constant and the like directly determine the response mode and pulse output characteristic of the neuron to input disturbance. This time-based dynamic mechanism gives the impulse neural network a certain potential for abnormal suppression and self-tuning in theory, but this potential is highly dependent on the matching relationship between the neuron parameters and the current input distribution. When weight bit flipping causes sudden distribution drift, neurons configured by adopting fixed parameters often have difficulty in timely adapting to new input scales, so that pulse rate imbalance or information transmission efficiency is obviously reduced. Disclosure of Invention The application aims to overcome the defects of the prior art, provides a pulse neural network model fault tolerance method based on dynamic neurons, and aims to utilize dynamic adjustment of neuron parameters to adjust SNN neuron pulse distribution characteristics to a state similar to that of an original model so as to realize fine-granularity error blocking. The aim of the application is achieved by the following technical scheme: A dynamic neuron-based impulse neural network model fault tolerance method applied to an already deployed SNN impulse neural network-based computer vision application program, the method comprising: Running a verification data set, counting the total amount of pulse peaks generated in fixed time and the first pulse generation time on each channel dimension of each layer of neurons according to channel levels, and obtaining baseline data; Acquiring initial SNN model weights, replacing neuron weight parameters from hierarchical granularity to channel-level granularity, and replacing modified model weights with original SNN model weights; and the operation model is used for judging whether an error occurs according to the pulse peak distribution characteristics in the operation process, and triggering a dynamic neuron parameter iterative algorithm when the error occurs, wherein the dynamic neuron parameter iterative algorithm comprises the following steps: And updating parameters of a front top-k layer with the maximum deviation loss by comparing the deviation values of the current layers and the baseline data so as to enable the peak times and the pulse time to approach to the baseline state, wherein the top-k is a preset natural number. Further, counting the total pulse peak amount and the first