Image classification model training method, image classification method and system
By employing multi-valued pulse generation and membrane potential residual compensation, the problems of information loss above the threshold and residual truncation below the threshold in spiking neural networks are solved, thereby improving image classification accuracy and feature representation capability while maintaining low power consumption.
Patent Information
- Application Number
- CN202611250710.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-11-27
AI Technical Summary
Existing spiking neural networks suffer from problems of losing suprathreshold information and truncating subthreshold residuals when classifying images, leading to a decrease in classification accuracy.
By using a multi-valued pulse firing mechanism and an attention mechanism to compensate for membrane potential residuals, the quantization error of the spiking neural network model is synergistically optimized, thereby improving the accuracy of image classification.
It significantly improves image classification accuracy and feature representation capability under low time step conditions, while maintaining the sparse computation characteristics and low power consumption performance of spiking neural networks.
Smart Images

Figure CN123181983A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to an image classification model training method, an image classification method, and a system. Background Technology
[0002] Spiking Neural Networks (SNNs), as the third generation of artificial neural networks, draw on the event-driven mechanism of biological nervous systems. They transmit information through discrete pulse sequences and trigger computation and communication only when spiking neurons generate pulses. They have extremely low inference power consumption on neuromorphic computing hardware and can be well adapted to low-latency and low-power intelligent sensing scenarios.
[0003] Existing spiking neural networks (SNNs) typically compare continuous membrane potentials with a single firing threshold when performing image classification. They output a pulse with a value of 1 when the membrane potential exceeds the threshold, and a pulse with a value of 0 otherwise. This results in a large number of suprathreshold membrane potentials with different amplitudes being uniformly compressed into the same pulse symbol, creating suprathreshold quantization truncation error. Furthermore, under finite time step expansion, membrane potentials that have not yet exceeded the firing threshold in the last time step, although accumulating some discriminative information, are directly truncated and discarded as the time window closes, resulting in truncation loss at the time window boundary and structural information waste. Consequently, the image classification accuracy of this spiking neural network model decreases under low time step conditions. Summary of the Invention
[0004] This invention provides an image classification model training method, an image classification method, and a system to address the shortcomings of existing spiking neural network models, such as the loss of suprathreshold information and the truncation of subthreshold residuals, which lead to a decrease in the classification accuracy of the spiking neural network model. It achieves synergistic optimization of the quantization error of the spiking neural network model from two dimensions: suprathreshold multi-value encoding and subthreshold residual reuse, thereby improving the image classification accuracy.
[0005] This invention provides a method for training an image classification model, comprising: For the current network layer in the spiking neural network to be trained, the input information of the current network layer is input into the current network layer to obtain the membrane potential of each spiking neuron in the current network layer at each time step; the membrane potential is used to characterize the cumulative calculation result of the image features of the sample image time series data by each spiking neuron at each time step; The membrane potential is compared with multiple different preset thresholds to obtain the pulse level of each spiking neuron at each time step, and the output pulse sequence of the current network layer is determined based on the pulse level. In the case where a target network layer exists in the spiking neural network to be trained, and a target residual connection is established between the target network layer and the current network layer, the input features of the target network layer are obtained based on the output pulse sequence of the current network layer. Then, based on an attention mechanism, the input features are modulated with the residual membrane potential of the current network layer at the last time step to obtain modulated residual features. The residual membrane potential is used to characterize the membrane potential accumulated by the spiking neurons in the current network layer that have not fired pulses. The target residual connection is used to trigger membrane potential residual compensation. Based on the modulation residual features and the input features, the input information of the target network layer is obtained, and the input information of the target network layer is continued to be input into the target network layer until the output pulse sequence of the last network layer in the spiking neural network to be trained is obtained; Based on the output pulse sequence of the last network layer, the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step, and the classification labels of the sample image time series data, the spiking neural network to be trained is iteratively trained to obtain an image classification model.
[0006] According to the image classification model training method provided by the present invention, the method involves modulating the input features with the residual membrane potential of the current network layer at the last time step based on an attention mechanism to obtain modulated residual features, including: The residual film potential is normalized. The normalized residual membrane potential is aligned and mapped with the input feature to obtain the aligned residual membrane potential. The aligned residual membrane potential and the input features are input into the attention model to obtain a weight map; each element in the weight map is used to characterize the value of the residual information at each position in the aligned residual membrane potential to the task to be performed by the target network layer. Based on the weighted graph, the residual information at each position in the aligned residual film potential is weighted and fused to obtain the modulation residual features.
[0007] According to the image classification model training method provided by the present invention, the step of aligning and mapping the normalized residual membrane potential with the input features to obtain the aligned residual membrane potential includes: When the output dimensions of the current network layer and the target network layer are inconsistent, the normalized residual membrane potential is input to the channel projection convolution layer for channel dimension projection to obtain the first residual feature; the number of channels of the first residual feature is the same as the number of channels of the input feature. The spatial resolution of the first residual feature is adjusted to obtain the aligned residual membrane potential; the spatial resolution of the aligned residual membrane potential is the same as the spatial resolution of the input feature; the spatial resolution adjustment includes upsampling or downsampling.
[0008] According to the image classification model training method provided by the present invention, the step of inputting the aligned residual membrane potential and the input features into an attention model to obtain a weight map includes: The aligned residual membrane potential is concatenated with the input feature in the channel dimension to obtain the first joint feature; Based on the attention convolutional layer in the attention model, the residual information at each position in the aligned residual membrane potential is evaluated according to the first joint feature to determine the value of the residual information at each position in the aligned residual membrane potential for the task to be performed by the target network layer, and the evaluation value corresponding to the residual information at each position in the aligned residual membrane potential is obtained. Based on the activation function in the attention model, the evaluation value is mapped to a preset numerical range to obtain the weight map; the preset numerical range is a range of values greater than 0 and less than 1.
[0009] According to the image classification model training method provided by the present invention, the step of obtaining the input information of the target network layer based on the modulation residual features and the input features includes: The modulation residual features and the input features are concatenated along the channel dimension to obtain the second joint feature; The second joint feature is input into the fusion convolutional layer for joint encoding to obtain the input information of the target network layer.
[0010] According to the image classification model training method provided by the present invention, the multiple different preset thresholds are determined by any of the following methods: For the kth preset threshold among the plurality of different preset thresholds, the product between the base threshold and k is determined as the kth preset threshold; where k is an integer greater than or equal to 1 and less than or equal to the number of the plurality of different preset thresholds; Calculate the product between the difference between k and 1 and the preset dynamic range, and the ratio between the product and the number of the multiple different preset thresholds to obtain the first increment. The sum of the base threshold and the first increment is determined as the kth preset threshold. The product of the preset interval coefficient and the difference between k and 1 is used as the exponent for power operation. The product of the difference between the power operation result and 1 and the preset scaling coefficient is determined as the second increment. The sum of the basic threshold and the second increment is determined as the kth preset threshold.
[0011] According to the image classification model training method provided by the present invention, the step of iteratively training the spiking neural network to be trained based on the output pulse sequence of the last layer of the network, the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step, and the classification label of the sample image time series data to obtain an image classification model includes: The surrogate gradient is obtained based on the difference between the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step and each preset threshold. The classification loss is obtained based on the classification result corresponding to the output pulse sequence of the last network layer and the classification label; The image classification model is obtained by iteratively training the spiking neural network to be trained based on the surrogate gradient and the classification loss.
[0012] According to the image classification model training method provided by the present invention, for each spiking neuron in the current network layer, the step of obtaining the membrane potential of the spiking neuron at the current time step includes: The reset codeword is reconstructed based on the pulse level of the spiking neuron in the previous time step; According to the reset codeword, the membrane potential of the spiking neuron at the previous time step is softly reset to obtain the reset membrane potential; Based on the reset membrane potential, the membrane potential of the spiking neuron at the current time step is obtained.
[0013] The present invention also provides an image classification method, comprising: Acquire the temporal data of the image to be processed; The time series data of the image to be processed is input into the image classification model to obtain the image classification result corresponding to the time series data of the image to be processed. The image classification model is trained based on the image classification model training method described in any of the above-mentioned methods.
[0014] The present invention also provides an image classification system, the system comprising a training module and an application module; The training module is used to execute the image classification model training method as described in any of the above. The application module is used to execute the image classification method as described above.
[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the image classification model training method or the image classification method described above.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image classification model training method or the image classification method described above.
[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the image classification model training method or the image classification method described above.
[0018] The image classification model training method, image classification method, and system provided by this invention obtain pulse levels by comparing membrane potential with multiple different preset thresholds. This allows spiking neurons to output pulses of different levels depending on the degree to which the membrane potential exceeds the threshold, significantly improving the information carrying capacity of a single time step without increasing the number of time steps. This effectively alleviates the on-threshold quantization truncation error caused by the irreversible collapse of on-threshold amplitude information within a single time step under the binary firing mechanism. Furthermore, by triggering membrane potential residual compensation through target residual connections, the residual membrane potential accumulated by spiking neurons that did not fire pulses in the last time step is selectively modulated and recovered based on the attention mechanism, compensating for the truncation loss at the time window boundary and realizing the reuse of sub-threshold residual discrimination information. Thus, the quantization loss of the spiking neural network is synergistically suppressed from two dimensions: on-threshold encoding accuracy and sub-threshold residual utilization. This allows the trained image classification model to still have high classification accuracy and feature representation ability under low time step conditions, while maintaining the event-driven sparse computation characteristics and low power consumption performance of the spiking neural network. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is one of the flowcharts illustrating the image classification model training method provided by the present invention.
[0021] Figure 2 This is the second flowchart illustrating the image classification model training method provided by this invention.
[0022] Figure 3 This is one of the schematic diagrams of the structure of the spiking neural network to be trained provided by the present invention.
[0023] Figure 4 This is the second schematic diagram of the structure of the spiking neural network to be trained provided by the present invention.
[0024] Figure 5 This is a schematic diagram of the process for membrane potential residual compensation based on the attention mechanism provided in the embodiments of this application.
[0025] Figure 6 This is a schematic diagram of the threshold distribution and membrane potential distribution of the three multi-level threshold strategies provided by the present invention.
[0026] Figure 7 This is one of the schematic diagrams of the distribution of the proxy gradient provided by the present invention.
[0027] Figure 8 This is the second schematic diagram of the distribution of the proxy gradient provided by the present invention.
[0028] Figure 9 This is a flowchart illustrating the image classification method provided by the present invention.
[0029] Figure 10 This is a schematic diagram of the image classification system provided by the present invention.
[0030] Figure 11 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0032] All actions involving the acquisition of signal information or data in this application are carried out in accordance with the relevant data protection laws and regulations of the locality and with the authorization of the relevant device owner.
[0033] In related technologies, spiking neural networks built based on Leaky Integrate-and-Fire (LIF) neurons map continuous membrane potentials as binary pulses during training. The upper limit of the output entropy of a single time step is only 1 bit. A large number of suprathreshold membrane potentials with different amplitudes are uniformly compressed into the same pulse symbol, forming suprathreshold quantization truncation error. Furthermore, under the condition of finite time step expansion, the residual membrane potential that has not yet been fired in the last time step is forcibly discarded when the time window closes, forming truncation loss at the time window boundary. The above two aspects of quantization loss lead to a decrease in classification accuracy and limited feature representation ability of the trained image classification model under low time step conditions.
[0034] In response, this application provides an image classification model training method, which is a spiking neural network quantization error suppression method that combines multi-valued pulse emission and attention membrane potential residual compensation. This method can achieve synergistic optimization of the quantization error of the spiking neural network model from two dimensions: above-threshold multi-valued encoding and below-threshold residual reuse, thereby improving image classification accuracy.
[0035] Figure 1 This is one of the flowcharts illustrating the image classification model training method provided by the present invention. Figure 2 This is the second flowchart illustrating the image classification model training method provided by this invention.
[0036] It should be noted that the subject executing this method can be a server, a terminal device, or a processor in an electronic device with data processing capabilities, and this application embodiment does not limit this.
[0037] like Figure 1 As shown, the method includes the following steps: Step 110: For the current network layer in the spiking neural network to be trained, input information of the current network layer is input to the current network layer to obtain the membrane potential of each spiking neuron in the current network layer at each time step; the membrane potential is used to characterize the cumulative calculation result of the image features of the sample image time series data by each spiking neuron at each time step.
[0038] In this context, a spiking neural network to be trained refers to a spiking neural network whose parameters have not yet been fully trained and is used to train an image classification model. A spiking neural network to be trained consists of multiple network layers connected in sequence, with each network layer containing multiple spiking neurons.
[0039] like Figure 2 As shown, it should be noted that the backbone structure of the spiking neural network to be trained can adopt a residual network (ResNet) structure, a visual geometry group (VGG) structure, or other network structures containing spiking neurons. For example, a 20-layer residual network, also known as ResNet-20, or a 16-layer visual geometry group network, also known as VGG-16, can be used as the backbone network. The specific network structure of the spiking neural network to be trained is not limited in this embodiment. The initial parameters of the spiking neural network to be trained can be obtained by random initialization, initialization based on pre-trained parameters, etc., and this embodiment is not limited in this respect either.
[0040] Among them, sample image time series data refers to image data used as training samples and expanded into multiple time steps in the time dimension.
[0041] like Figure 2As illustrated, for example, for static image data, the normalized static image can be copied along the time dimension into an input sequence of length T, and temporal encoding or encoder encoding can be completed using constant input copying to obtain sample image temporal data, where T is the total number of time steps. For neuromorphic event data, the asynchronous event stream acquired by the event camera can be divided into T time slices according to a fixed time window, and the events in each time slice can be aggregated into a temporal tensor to obtain sample image temporal data. That is, sample image temporal data can come from static image classification datasets or event datasets acquired by dynamic vision sensors (DVS). This application embodiment does not limit the source and temporal encoding method of sample image temporal data.
[0042] Here, the current network layer refers to the network layer in the spiking neural network being trained that is currently performing forward computation. The input information of the current network layer refers to the information provided to each spiking neuron in the current network layer for integration and accumulation: when the current network layer is the first network layer of the spiking neural network being trained, the input information of the current network layer can be obtained from the temporal data of the sample image through weighted operations, such as convolution or fully connected operations; when the current network layer is one of the network layers after the first network layer, the input information of the current network layer can be obtained from the output of its predecessor network layer through weighted operations.
[0043] Among them, membrane potential is used to characterize the cumulative calculation result of image features of sample image time series data by each spiking neuron at each time step. That is, the spiking neuron simulates the potential integration process of biological neurons, accumulating the input information into internal state step by step.
[0044] Optionally, for any spiking neuron in the current network layer, at time step The membrane potential can be measured by the spiking neuron at time step The received input information and the spiking neuron at time step The membrane potential is calculated after the pulse is delivered and reset.
[0045] Step 120: Compare the membrane potential with multiple different preset thresholds to obtain the pulse level of each spiking neuron at each time step, and determine the output pulse sequence of the current network layer based on the pulse level.
[0046] Here, multiple different preset thresholds refer to a set of pre-set issuance thresholds with mutually exclusive values. Specifically, multiple different preset thresholds can be set as an ordered multi-level threshold group, as shown below: ; The number of multiple different preset thresholds; For the first A preset threshold.
[0047] For example, the minimum preset threshold can be... Take the base threshold, such as 1, and the other preset thresholds can be increased sequentially above the base threshold; The value of can be set according to the requirements of image classification tasks regarding encoding accuracy and computational cost. For example, it can be set to . In this application, the specific number and value of multiple different preset thresholds are not limited.
[0048] It should be noted that, unlike the binary firing mechanism which only sets a single firing threshold, multiple preset thresholds can divide the suprathreshold region of the membrane potential into multiple quantization regions, enabling the spiking neuron to output pulses of different levels depending on the degree to which the membrane potential exceeds the threshold.
[0049] The pulse level is used to characterize the firing intensity of a spiking neuron within a single time step, and its value ranges from 0 to... Integers between [a certain range].
[0050] Optionally, for any spiking neuron at any time step, the membrane potential can be compared sequentially with multiple different preset thresholds. Each time the membrane potential exceeds a preset threshold, it contributes one unit level. After all preset threshold comparisons are completed, the comparison results at each level are summed to obtain the spiking level of the spiking neuron at that time step. For example, when the membrane potential is greater than or equal to... and less than In the case where the spiking neuron has a spiking order of 2 at that time step; when the membrane potential is less than In the case of a pulse level of 0, it indicates that the spiking neuron did not fire a pulse at that time step. For example, the formula for calculating the pulse level is as follows: ; in, Let be a step function, if If the value is 1, then take 1; otherwise, take 0. spiking neurons At time step The membrane potential; For the first A preset threshold; spiking neurons At time step The pulse level; The number of different preset thresholds.
[0051] Understandably, in When the value is 1, the above multi-value distribution mechanism degenerates into the traditional binary distribution mechanism. Therefore, the multi-value distribution mechanism is a compatibility extension of the binary distribution mechanism.
[0052] Furthermore, from an information theory perspective, the spiking level increases the upper limit of the output entropy of a spiking neuron at a single time step from 1 bit to... The bit significantly improves the information carrying capacity of a single time step, enabling the differentiation of suprathreshold membrane potentials of different amplitudes that were originally uniformly compressed into the same pulse symbol, effectively alleviating the discretization collapse of suprathreshold amplitude information.
[0053] Furthermore, after obtaining the pulse levels of each spiking neuron at each time step, the pulse levels can be normalized to obtain the output pulse sequence of the current network layer. For example, each pulse level can be divided by a preset threshold number. This is then used as the output pulse sequence, thus constraining the value of each element in the output pulse sequence to the range of 0 to 1, avoiding the variation with the number of preset thresholds. The increase in the value leads to the problem of linear amplification of the activation amplitude between layers, which ensures the stability of the activation distribution of each network layer of the spiking neural network to be trained, and thus ensures the convergence stability of the training process.
[0054] Step 130: If there is a target network layer in the spiking neural network to be trained that has a target residual connection with the current network layer, the input features of the target network layer are obtained according to the output pulse sequence of the current network layer. Based on the attention mechanism, the input features are modulated with the residual membrane potential of the current network layer at the last time step to obtain the modulated residual features. The residual membrane potential is used to characterize the membrane potential accumulated by the spiking neurons in the current network layer that have not fired pulses. The target residual connection is used to trigger membrane potential residual compensation.
[0055] The target residual connection refers to the cross-layer residual path pre-established between the specified extraction layer and the receiving layer in the spiking neural network to be trained. If a target residual connection is established between the current network layer and the target network layer, then the current network layer is the extraction layer and the target network layer is the receiving layer. The target residual connection is used to trigger membrane potential residual compensation, that is, to trigger the process of compensating the residual membrane potential of the extraction layer to the receiving layer.
[0056] The location of the target residual connections can be set according to the structure of the spiking neural network to be trained. For example, when the backbone network is a residual network, the basic module can be used as the smallest insertion unit, and the target residual connection can be established between the spiking neuron layer at the end of each basic module and the first spiking neuron layer of the next basic module. When the backbone network is a visual geometry network, each convolutional group of the same resolution can be regarded as a unit, and the target residual connection can be established between adjacent units. The embodiments of this application do not limit the number and location of the target residual connections. It is understood that the target residual connections at different locations can have independent parameters to separately model the statistical characteristics of the membrane potential residual of each network layer, thereby improving the adaptability of membrane potential residual compensation to the differences in feature distribution at different network depths.
[0057] Figure 3 This is one of the schematic diagrams of the structure of the spiking neural network to be trained provided by the present invention; Figure 4 This is the second schematic diagram of the structure of the spiking neural network to be trained provided by the present invention.
[0058] For example, such as Figure 3 As shown, Conv represents convolution, FC represents fully connected layers; Stage represents a stage; BasicBlock represents a basic module; for ResNet-20, it consists of 3 Stages, each containing 3 BasicBlocks, thus a total of 9 BasicBlocks. Let the... The first in the Stage One BasicBlock is ,in , ,for The last spiking neuron layer can be used as the extraction layer to extract the residual membrane potential that was not released at the final time step; while the receiving layer is set as the first spiking neuron layer of the next BasicBlock, that is, one membrane potential residual connection module is inserted at the end of each basic module, for a total of nine membrane potential residual connection modules. In this way, the unreleased state information in the extraction layer can be transmitted across blocks to the entrance of the receiving layer at the last time step, thereby compensating for the truncation loss of the standard main path at the time window boundary.
[0059] like Figure 4As shown, for VGG-16, each convolutional group of the same resolution is considered as a BasicBlock unit. Specifically, the convolutional part of VGG-16 is divided into 5 convolutional groups, denoted as F1=[64,64], F2=[128,128], F3=[256,256,256], F4=[512,512,512], and F5=[512,512,512]. For each convolutional group, a membrane potential residual connection module can also be inserted at its end, for a total of 5 membrane potential residual connection modules: the last spiking neuron layer in the convolutional group is used as the extraction layer, and the first spiking neuron layer of the next convolutional group is used as the receiving layer.
[0060] The input features of the target network layer refer to the features obtained from the output pulse sequence of the current network layer and to be input into the target network layer. It can be understood that the input features of the target network layer originate from the entire output pulse sequence of the current network layer. For example, the output pulse sequence of the current network layer can be weighted and processed, such as through convolution or fully connected operations, to obtain the input features of the target network layer. Since the output pulse sequence carries the threshold firing information of the current network layer at each time step in the form of pulse levels, the input features obtained accordingly can completely preserve the multi-value encoding results of the current network layer for the image features of the sample image time-series data.
[0061] Residual membrane potential is used to characterize the accumulated membrane potential of spiking neurons in the current network layer that have not fired pulses. It is understood that in the last time step, the membrane potential of some spiking neurons in the current network layer has not yet reached the firing condition, and their corresponding firing results are not included in the output pulse sequence. Although this portion of membrane potential cannot be passed forward in the form of pulses through the output pulse sequence, it has accumulated certain discriminative information related to the image classification task within the time window. If it is directly truncated and discarded when the time window closes, it will form a truncation loss at the time window boundary. To address this, this application embodiment establishes a cross-layer residual path between the designated extraction layer and the receiving layer of the spiking neural network to be trained through a membrane potential residual connection module based on an attention mechanism. This cross-layer residual path is activated only in the last time step, fusing the residual membrane potential of the extraction layer that has not fired in the last time step into the input of the receiving layer, thereby reducing the truncation loss at the time window boundary.
[0062] Optionally, in the last time step, the membrane potential of some spiking neurons in the current network layer has not yet reached the firing condition. Although this membrane potential has not been released in the form of a pulse, it has accumulated certain discriminative information related to the image classification task within the time window. If it is directly truncated and discarded when the time window closes, it will form a truncation loss at the time window boundary. To address this, this embodiment proposes a membrane potential residual connection module based on an attention mechanism. This module establishes a cross-layer residual path between a designated extraction layer and a receiving layer of the spiking neural network to be trained. It is activated only at the final moment, fusing the residual membrane potential that was not fired at the last time step of the extraction layer into the input of the receiving layer, thereby reducing the truncation loss at the time window boundary.
[0063] Specifically, for the current network layer, first determine whether there is a target network layer in the spiking neural network to be trained that has a target residual connection with the current network layer, that is, determine whether the current network layer is an extraction layer, and then perform the following steps based on the determination result: If the current network layer is not an extraction layer, the output pulse sequence of the current network layer is directly processed by weights and used as the input information of the next network layer. Then, the process returns to step 110 and iteratively executes the acquisition of the output pulse sequence of the next network layer.
[0064] If the current network layer is an extraction layer and the target network layer is the next layer after the current network layer, then the output pulse sequence of the current network layer is directly processed by weighting to obtain the input features of the target network layer.
[0065] If the current network layer is an extraction layer and the target network layer is not the next layer after the current network layer, the output pulse sequence of the current network layer continues to be passed layer by layer along the main path. That is, the output pulse sequence of the current network layer passes through the forward calculation of each intermediate network layer between the current network layer and the target network layer in sequence, such as weight operations such as convolution and pooling operations, as well as the corresponding pulse firing processing, until it is passed to the entrance of the target network layer to obtain the input features of the target network layer. At the same time, the residual membrane potential of the current network layer at the last time step is bypassed through the cross-layer residual path formed by the target residual connection. That is, the residual membrane potential does not participate in the forward calculation of each intermediate network layer, but is temporarily stored in the target residual connection. After the input features of the target network layer are obtained through the main path, it will participate in the subsequent attention modulation together with the input features.
[0066] The steps for obtaining the residual membrane potential here include: obtaining the unfired mask of the current network layer at the last time step, multiplying the unfired mask element-wise with the membrane potential of the current network layer at the last time step to set the membrane potential of the spiking neurons that have fired pulses to zero, and retaining only the membrane potential of the spiking neurons that have not fired pulses, thus extracting the residual membrane potential.
[0067] For example, in a 20-layer residual network, the extraction layer is the last spiking neuron layer of the current basic module, and the receiving layer is the first spiking neuron layer of the next basic module. Between them are intermediate network layers such as convolutional layers and normalization layers. The output pulse sequence is processed along the main path through these intermediate network layers to obtain the input features of the target network layer, while the residual membrane potential is directly delivered to the target network layer via the cross-layer residual path. It can be understood that through the dual transmission of the main path and the cross-layer residual path, the above-threshold emission information and the subthreshold residual information can reach the target network layer without conflict along their respective paths. This ensures both the integrity of the standard forward computation of the main path and that the residual membrane potential is not diluted or interfered with by the computation of the intermediate network layers.
[0068] Then, based on the attention mechanism, the input features of the target network layer are modulated with the residual membrane potential to obtain the modulated residual features.
[0069] The modulation residual feature refers to the feature obtained after modulating the residual membrane potential based on the attention mechanism. Specifically, when modulating based on the attention mechanism, the residual membrane potential and the input features of the target network layer can be used together as the evaluation criteria for the attention mechanism. The attention mechanism evaluates the value of the residual information at each position in the residual membrane potential relative to the task to be performed by the target network layer, and then weights and modulates each piece of residual information in the residual membrane potential according to the evaluated value to obtain the modulation residual feature. Thus, residual information with higher value, such as residual information with high correlation to the input features of the target network layer and residual information that contributes to image classification, is selectively retained, while residual information with lower value, such as noise or residual information with low relevance to the current task, is suppressed, avoiding the interference that may be introduced by indiscriminately collecting all residual membrane potentials.
[0070] Understandably, since membrane potential residual compensation is only activated once in the last time step of the time unfolding, in the intermediate time steps, the current network layer and the target network layer still follow the standard pulse firing process, and only transmit information through the output pulse sequence, thus ensuring the sparsity of the main computation of the spiking neural network to be trained. Therefore, membrane potential residual compensation achieves selective recycling of truncated information at the time window boundary without increasing the computational overhead of intermediate time steps as much as possible, thereby reducing the truncation loss at the time window boundary.
[0071] Step 140: Based on the modulation residual features and the input features, obtain the input information of the target network layer, and continue to input the input information of the target network layer into the target network layer until the output pulse sequence of the last network layer in the spiking neural network to be trained is obtained.
[0072] Optionally, the modulation residual features can be fused with the input features of the target network layer to obtain enhanced features, and the enhanced features can be used as the input information of the target network layer. The fusion method can be feature addition, feature concatenation and encoding, etc., and this application embodiment does not limit this.
[0073] Then, using the target network layer as the new current network layer, return to step 110 to continue forward propagation until the output pulse sequence of the last network layer in the spiking neural network to be trained is obtained.
[0074] Step 150: Based on the output pulse sequence of the last network layer, the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step, and the classification label of the sample image time series data, the spiking neural network to be trained is iteratively trained to obtain an image classification model.
[0075] Among them, the classification label refers to the real image category annotation information corresponding to the time series data of the sample images, such as the category to which the target object belongs in the time series data of the sample images.
[0076] Optionally, the classification result of the spiking neural network to be trained can be obtained from the output pulse sequence of the last layer of the network. For example, the output pulse sequence of the last layer of the network can be accumulated or averaged in the time dimension and mapped to the predicted probability of each category through a normalized exponential function to obtain the classification result. At the same time, the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step can be traversed, and a joint classification loss function can be constructed by combining the classification result of the sample image time series data with the classification label.
[0077] Then, the spiking neural network to be trained is iteratively trained according to the classification loss until the training termination condition is met, resulting in an image classification model. The training termination condition may include at least one of the following: the number of training iterations reaches a preset total number, the classification loss converges to a preset range, and the classification accuracy on the validation set reaches a preset metric. This embodiment of the application does not limit the specific criteria for this condition. The trained image classification model is used to process the temporal data of the image to be processed, obtaining the corresponding image classification result.
[0078] The image classification model training method provided in this application compares the membrane potential with multiple different preset thresholds to obtain pulse levels, enabling spiking neurons to output pulses of different levels according to the degree to which the membrane potential exceeds the threshold. This significantly improves the information carrying capacity of a single time step without increasing the number of time steps, effectively mitigating the on-threshold quantization truncation error caused by the irreversible collapse of on-threshold amplitude information within a single time step under the binary firing mechanism. Furthermore, by triggering membrane potential residual compensation through target residual connections, the residual membrane potential accumulated by spiking neurons that did not fire pulses in the last time step is selectively modulated and recovered based on the attention mechanism, compensating for the truncation loss at the time window boundary and realizing the reuse of sub-threshold residual discrimination information. Thus, the quantization loss of the spiking neural network is synergistically suppressed from two dimensions: on-threshold encoding accuracy and sub-threshold residual utilization. This allows the trained image classification model to still have high classification accuracy and feature representation ability under low time step conditions, while maintaining the event-driven sparse computation characteristics and low power consumption performance of the spiking neural network.
[0079] In some embodiments, the modulation of the input features and the residual film potential of the current network layer at the last time step based on the attention mechanism to obtain the modulation residual features includes: The residual film potential is normalized. The normalized residual membrane potential is aligned and mapped with the input feature to obtain the aligned residual membrane potential. The aligned residual membrane potential and the input features are input into the attention model to obtain a weight map; each element in the weight map is used to characterize the value of the residual information at each position in the aligned residual membrane potential to the task to be performed by the target network layer. Based on the weighted graph, the residual information at each position in the aligned residual film potential is weighted and fused to obtain the modulation residual features.
[0080] Figure 5 This is a schematic diagram of the process for membrane potential residual compensation based on an attention mechanism provided in an embodiment of this application. Figure 5 As shown, the process of modulating the residual membrane potential based on the attention mechanism generally follows the processing flow of extraction, alignment, screening and fusion. The extraction step is the step of extracting the residual membrane potential through the unissued mask. This embodiment mainly describes the normalization, alignment and screening steps after extraction.
[0081] The attention model refers to the attention mechanism module used to evaluate the value of residual information.
[0082] Optionally, when normalizing the residual membrane potential, the extracted residual membrane potential can be divided by the firing threshold of the current network layer, such as by the base threshold of the current network layer, or by the largest preset threshold among multiple different preset thresholds. This application embodiment does not limit the specific threshold used for normalization. It is understood that the amplitude distribution of membrane potentials differs between different network layers. By normalizing the residual membrane potential according to the firing threshold of the current network layer itself, the residual membrane potential can be compressed into a consistent numerical range, eliminating the differences in the dimensions and amplitude distribution of membrane potentials between different network layers, and preventing excessively large residual membrane potentials from suppressing the input features of the target network layer during fusion.
[0083] The current network layer, serving as the extraction layer, and the target network layer, serving as the receiving layer, are often located at different depths in the spiking neural network being trained. Their features may differ in channel count and spatial resolution, making it impossible to directly perform element-wise operations with the input features of the target network layer. To address this, an alignment mapping can be used to project the normalized residual membrane potential onto the feature space containing the input features of the target network layer, resulting in an aligned residual membrane potential that is perfectly aligned with the input features in terms of channel count and spatial size.
[0084] Furthermore, the aligned residual membrane potential and the input features of the target network layer can be jointly input into the attention model. The attention model, using the input features of the target network layer as a reference, dynamically evaluates the value of the residual information at each position in the aligned residual membrane potential to the task required by the target network layer, and outputs a weight map of the same size as the aligned residual membrane potential. Larger values in the weight map indicate greater value of the residual information at that position to the task required by the target network layer; for example, higher correlation with the input features of the target network layer and greater contribution to image classification. Conversely, smaller values indicate lower relevance of the residual information at that position to the current task; for example, it may be noise or redundant information.
[0085] Then, based on the weight map, the residual information at each position in the aligned residual membrane potential is weighted and fused. Specifically, the weight map and the aligned residual membrane potential are multiplied element by element to obtain the modulation residual features, thus completing the selective retention of residual information. This allows high-value residual information to be retained with a larger weight, while low-value residual information is suppressed with a smaller weight.
[0086] In this embodiment, by performing normalization, alignment mapping, attention evaluation, and weighted fusion sequentially on the residual membrane potential, the residual membrane potential is adapted to the input features of the target network layer in terms of both numerical range and feature dimension. Furthermore, the residual information is finely screened using a position-by-position weight map, achieving selective recovery of the residual membrane potential at the last time step. Compared to indiscriminately compensating for the residual membrane potential in its entirety, this avoids interference from noise and low-value residual information on the input of the target network layer, further improving the image classification accuracy.
[0087] In some embodiments, aligning and mapping the normalized residual membrane potential with the input features to obtain the aligned residual membrane potential includes: When the output dimensions of the current network layer and the target network layer are inconsistent, the normalized residual membrane potential is input to the channel projection convolution layer for channel dimension projection to obtain the first residual feature; the number of channels of the first residual feature is the same as the number of channels of the input feature. The spatial resolution of the first residual feature is adjusted to obtain the aligned residual membrane potential; the spatial resolution of the aligned residual membrane potential is the same as the spatial resolution of the input feature; the spatial resolution adjustment includes upsampling or downsampling.
[0088] Optionally, a channel projection convolutional layer refers to a convolutional layer used to project features along the channel dimension. For example, a channel projection convolutional layer can be a convolutional layer with a kernel size of 1×1. A 1×1 convolution can transform the number of channels with a small number of parameters without changing the spatial resolution, projecting the number of channels of the normalized residual membrane potential to the same number of channels as the input features of the target network layer, thus obtaining the first residual feature.
[0089] When adjusting the spatial resolution of the first residual feature, if the spatial resolution of the first residual feature is less than that of the input feature, upsampling, such as interpolation, can be used to enlarge the spatial resolution of the first residual feature to the same level as the input feature. If the spatial resolution of the first residual feature is greater than that of the input feature, downsampling, such as pooling, can be used to reduce the spatial resolution of the first residual feature to the same level as the input feature. If the spatial resolutions are the same, spatial resolution adjustment can be omitted, or identity mapping can be performed.
[0090] It should be noted that the specific configuration of the alignment mapping can be flexibly set according to the network structure traversed by the target residual connection. For example, in a 20-layer residual network as the backbone, for target residual connections between adjacent basic modules within the same stage, since the number of feature channels and spatial resolution remain unchanged, the alignment mapping can use identity mapping or lightweight 1×1 convolutions. For target residual connections across stages, since there is usually a simultaneous change in spatial resolution (halving) and channel number (doubling) between adjacent stages, the alignment mapping needs to perform both spatial downsampling and channel projection. In a 16-layer visual geometry group network as the backbone, the alignment mapping can use a combination of pooling or interpolation and 1×1 convolutions to handle resolution changes across convolutional groups.
[0091] In this embodiment, channel dimension projection is completed through channel projection convolutional layers, and spatial resolution adjustment is completed through upsampling or downsampling. Standard and lightweight differentiable operations solve the channel number difference and spatial resolution difference between the extraction layer and the receiving layer, so that the residual film potential can be projected into the feature space of the target network layer to participate in element-wise attention modulation and fusion, ensuring the feasibility of film potential residual compensation at any network depth and any cross-layer position.
[0092] In some embodiments, inputting the aligned residual membrane potential and the input features into an attention model to obtain a weight map includes: The aligned residual membrane potential is concatenated with the input feature in the channel dimension to obtain the first joint feature; Based on the attention convolutional layer in the attention model, the residual information at each position in the aligned residual membrane potential is evaluated according to the first joint feature to determine the value of the residual information at each position in the aligned residual membrane potential for the task to be performed by the target network layer, and the evaluation value corresponding to the residual information at each position in the aligned residual membrane potential is obtained. Based on the activation function in the attention model, the evaluation value is mapped to a preset numerical range to obtain the weight map; the preset numerical range is a range of values greater than 0 and less than 1.
[0093] Understandably, the value of residual information depends not only on the magnitude of the residual membrane potential itself, but also on its correlation with the features currently received by the target network layer.
[0094] To address this, when calculating the weight graph, the aligned residual membrane potential and the input features of the target network layer can be concatenated in the channel dimension to construct the first joint feature. This first joint feature carries both subthreshold residual information and the current suprathreshold feature information of the target network layer, providing a complete basis for value assessment.
[0095] Furthermore, the first joint feature is input into the attention convolutional layer in the attention model. The attention convolutional layer evaluates the value of the residual information at each position in the aligned residual membrane potential to the task to be performed by the target network layer based on the first joint feature, and obtains the evaluation value corresponding to the residual information at each position in the aligned residual membrane potential.
[0096] The attention convolutional layer refers to the convolutional layer in the attention model used to generate evaluation values based on the first joint features. Its input channel number corresponds to the number of channels of the first joint features, and its output channel number corresponds to the number of channels of the aligned residual membrane potential. Thus, for each spatial location and channel in the aligned residual membrane potential, the value of the residual information at the corresponding location to the task to be performed by the target network layer can be evaluated element by element, and the evaluation value corresponding to the residual information at each location can be obtained.
[0097] Then, based on the activation function in the attention model, the evaluation values are mapped to a preset numerical range greater than 0 and less than 1 to obtain a weight map. For example, the activation function can be the sigmoid activation function, which can smoothly compress any evaluation value into an open range of 0 to 1, so that each element in the weight map acts on the residual information in the form of soft weights: a weight close to 1 indicates that the residual information at that position is almost completely preserved, and a weight close to 0 indicates that the residual information at that position is almost completely suppressed.
[0098] In this embodiment, by concatenating the aligned residual membrane potential with the input features in the channel dimension to form the first joint feature, the attention evaluation simultaneously considers the distribution characteristics of the residual information itself and the current feature requirements of the target network layer, thus realizing task-related dynamic value evaluation. Furthermore, by generating an element-wise weight map with values between 0 and 1 through the attention convolutional layer and activation function, both fine-grained soft screening of residual information and ensuring that the attention model can be jointly trained end-to-end with the spiking neural network to be trained through backpropagation.
[0099] In some embodiments, obtaining the input information of the target network layer based on the modulation residual features and the input features includes: The modulation residual features and the input features are concatenated along the channel dimension to obtain the second joint feature; The second joint feature is input into the fusion convolutional layer for joint encoding to obtain the input information of the target network layer.
[0100] Optionally, the modulation residual features after attention filtering are concatenated with the input features of the target network layer in the channel dimension to obtain the second joint feature. The second joint feature simultaneously retains the suprathreshold emission information and the filtered subthreshold residual information, avoiding the problem of the two canceling each other out or overlapping in numerical value when directly added and fused.
[0101] Furthermore, the second joint feature is input into the fusion convolutional layer for joint encoding to obtain the input information of the target network layer.
[0102] Here, the fusion convolutional layer refers to the convolutional layer used to jointly encode the second joint feature. For example, the fusion convolutional layer can use a 1×1 convolution, with the number of input channels corresponding to the number of channels of the second joint feature and the number of output channels corresponding to the number of channels of the input feature of the target network layer. The fusion convolutional layer learns the fusion ratio and interaction relationship between the modulation residual feature and the input feature in the channel dimension, and jointly encodes the enhanced feature, which serves as the input information of the target network layer.
[0103] In this embodiment, the modulation residual features and input features are concatenated in the channel dimension to form a second joint feature, which is then jointly encoded by a fusion convolutional layer to obtain the input information of the target network layer. This allows the subthreshold residual information and the suprathreshold emission information to be deeply fused in a learnable manner. Compared with simple element-wise addition fusion, the fusion convolutional layer can adaptively learn the optimal combination of the two, further improving the expressive power of the input information of the target network layer, thereby improving the classification accuracy of the trained image classification model.
[0104] In some embodiments, the plurality of different preset thresholds are determined by any of the following methods: For the kth preset threshold among the plurality of different preset thresholds, the product between the base threshold and k is determined as the kth preset threshold; where k is an integer greater than or equal to 1 and less than or equal to the number of the plurality of different preset thresholds; Calculate the product between the difference between k and 1 and the preset dynamic range, and the ratio between the product and the number of the multiple different preset thresholds to obtain the first increment. The sum of the base threshold and the first increment is determined as the kth preset threshold. The product of the preset interval coefficient and the difference between k and 1 is used as the exponent for power operation. The product of the difference between the power operation result and 1 and the preset scaling coefficient is determined as the second increment. The sum of the basic threshold and the second increment is determined as the kth preset threshold.
[0105] Figure 6 This is a schematic diagram showing the threshold distribution and membrane potential distribution of the three multi-level threshold strategies provided in the embodiments of this application. Among them, Figure 6 (a) Figure 6 (b) Figure 6 (c) These are schematic diagrams of threshold distribution for the fixed threshold multiple strategy, the linear segmentation strategy, and the logarithmic segmentation strategy, respectively. Figure 6 (d) Figure 6 (e) Figure 6 (f) shows the membrane potential distribution for the fixed threshold multiple strategy, the linear segmentation strategy, and the logarithmic segmentation strategy, respectively.
[0106] like Figure 6 As shown, this application provides three typical schemes for determining multiple different preset thresholds: a fixed threshold multiple strategy, a linear segmentation strategy, and a logarithmic segmentation strategy. These three schemes provide a quantitative division of different density patterns in the suprathreshold range of the membrane potential.
[0107] The basic threshold refers to the smallest threshold among multiple different preset thresholds that serves as the starting point. For example, the basic threshold can be set to 1. This application embodiment does not limit the specific value of the basic threshold.
[0108] The first approach is a fixed threshold multiple strategy. For example, with a base threshold of 1, the k-th preset threshold can be determined using the following formula: ; in, For the first A preset threshold, The number of items greater than or equal to 1 and less than or equal to a preset threshold. The integers. That is, each preset threshold is arranged at equal intervals as an integer multiple of the base threshold, which is simple to implement and has a clear physical meaning.
[0109] The second approach is a linear segmentation strategy. For example, with a base threshold of 1, the first segment... A preset threshold can be determined using the following formula: ; in, This indicates the preset dynamic range, which is used to define the range of membrane potentials covered by multiple different preset thresholds above the base threshold. Its value can be set according to the actual distribution range of the membrane potential. This is the first increment.
[0110] It is understandable that the linear piecewise strategy has limitations within a given preset dynamic range. The upper-threshold region is uniformly divided, and the width of each quantization region is consistent, thereby providing uniform quantization resolution throughout the entire upper-threshold region. The quantization error scale of each region is consistent, which is suitable for scenarios where the upper-threshold film potential distribution is relatively uniform.
[0111] The third approach is a logarithmic segmentation strategy. For example, with a base threshold of 1, the... A preset threshold can be determined using the following formula: ; in, This represents the preset interval coefficient, used to control the growth rate of the interval between adjacent preset thresholds; This indicates the preset scaling factor, used to control the overall magnitude of each increment; This is the second increment.
[0112] It is understandable that, due to the exponential function... The growth accelerates with the increase in the base threshold. The preset thresholds determined by the logarithmic segmentation strategy are arranged more densely near the base threshold and more sparsely away from the base threshold, thus providing a denser quantization interval division near the firing boundary. Considering that the membrane potential of a large number of spiking neurons is concentrated near the firing boundary in actual training, the logarithmic segmentation strategy can more finely characterize this part of the samples near the firing boundary, with higher pulse level utilization and smaller local quantization error near the base threshold.
[0113] It should be noted that the multiple preset thresholds determined by the three strategies all satisfy the following: The incremental ordering can be achieved by selecting the appropriate strategy based on the membrane potential distribution characteristics of the time-series data of the sample images, the complexity of the image classification task, and other practical needs. This application does not limit this approach.
[0114] In this embodiment, by providing three preset threshold determination methods—fixed threshold multiple, linear segmentation, and logarithmic segmentation—a threshold configuration scheme with complementary quantization density and morphology is provided for the multi-value distribution mechanism. This allows the distribution of multiple different preset thresholds to match the actual distribution of suprathreshold membrane potential, further reducing suprathreshold quantization truncation error under the same number of preset thresholds, thereby improving the classification accuracy of the trained image classification model.
[0115] In some embodiments, the step of iteratively training the spiking neural network to obtain an image classification model based on the output pulse sequence of the last network layer, the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step, and the classification labels of the sample image time-series data includes: The surrogate gradient is obtained based on the difference between the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step and each preset threshold. The classification loss is obtained based on the classification result corresponding to the output pulse sequence of the last network layer and the classification label; The image classification model is obtained by iteratively training the spiking neural network to be trained based on the surrogate gradient and the classification loss.
[0116] It is understandable that the multi-valued firing process of a spiking neuron, which determines the pulse level based on comparisons between the membrane potential and multiple different preset thresholds, is a non-differentiable process composed of step functions and cannot be directly backpropagated. Therefore, this application's embodiments employ a multi-threshold surrogate gradient method: decomposing the multi-valued firing process into... The superposition of several binary threshold functions, i.e., the pulse level, is equivalent to the membrane potential being respectively related to the voltage and the voltage. The summation result of binary comparisons of preset thresholds is used, and a local proxy gradient function is introduced into the binary threshold function at each preset threshold to approximate the overall gradient of the multi-value distribution process as the sum of the local proxy gradients at each preset threshold.
[0117] Figure 7 This is one of the schematic diagrams of the distribution of the proxy gradient provided by the present invention. Figure 8 This is the second schematic diagram of the distribution of the proxy gradient provided by the present invention.
[0118] like Figure 7 As shown, the proxy gradient can be obtained using the following formula: ; in, Represents spiking neurons At time step The membrane potential; Represents spiking neurons At time step The pulse level; Indicates the first A preset threshold; That is, the membrane potential and the first The difference between preset thresholds; The local surrogate gradient function, for example, can be a piecewise linear function. It takes a non-zero gradient value within a preset neighborhood where the difference between the membrane potential and a preset threshold is close to zero, and a zero value outside that neighborhood. This application does not limit the specific form of the local surrogate gradient function. That is, the surrogate gradient is calculated based on the difference between the membrane potential of each spiking neuron at each time step and each preset threshold. When the membrane potential is close to any preset threshold, an effective gradient signal can be generated.
[0119] like Figure 8 As shown, the formula for calculating the local proxy gradient function can be: ; in, The segmentation threshold; This is the input information, specifically the difference between the membrane potential and a preset threshold. For example... Figure 8As shown, the segmentation threshold can be configured according to actual needs, such as 0.3, 0.5 or 1.8.
[0120] When obtaining the classification loss, the output pulse sequence of the last network layer can be accumulated or averaged over time, and then mapped to the predicted probability of each category by a normalized exponential function to obtain the classification result. The classification loss is then calculated based on the difference between the classification result and the classification label. For example, the classification loss can be calculated using the cross-entropy loss function. The specific form of the classification loss is not limited in the embodiments of this application.
[0121] Then, based on the surrogate gradient and classification loss, the spiking neural network to be trained is iteratively trained. Specifically, the classification loss is backpropagated layer by layer along the network. When the propagation passes through the multi-value firing process of each spiking neuron, the surrogate gradient is used to replace the non-differentiable firing function gradient. Since the alignment mapping, attention model and fusion process in the target residual connection are all composed of standard differentiable operations, backpropagation can simultaneously update the backbone parameters of the spiking neural network to be trained and the independent parameters of each target residual connection, realizing end-to-end joint training until the training termination condition is met, and the image classification model is obtained.
[0122] In this embodiment, the multi-valued distribution process is decomposed into the superposition of multiple binary threshold functions, and the sum of the local surrogate gradients at each threshold is obtained as the surrogate gradient based on the difference between the membrane potential and each preset threshold. This allows the membrane potential to obtain an effective gradient response near any preset threshold. Compared with the single-threshold surrogate gradient, this expands the effective response range of the gradient, reduces the gradient sparsity, and ensures that the multi-valued distribution mechanism and the membrane potential residual compensation can be jointly trained end-to-end. This improves the convergence stability of the training process and the classification accuracy of the trained image classification model.
[0123] In some embodiments, for each spiking neuron in the current network layer, the step of obtaining the membrane potential of the spiking neuron at the current time step includes: The reset codeword is reconstructed based on the pulse level of the spiking neuron in the previous time step; According to the reset codeword, the membrane potential of the spiking neuron at the previous time step is softly reset to obtain the reset membrane potential; Based on the reset membrane potential, the membrane potential of the spiking neuron at the current time step is obtained.
[0124] Among them, the reset codeword refers to the quantized codeword reconstructed based on the pulse level actually fired by the spiking neuron in the previous time step. Specifically, it can be obtained by mapping the pulse level according to the pre-stored mapping relationship between pulse level and reset codeword.
[0125] A soft reset refers to a reset method that subtracts a reset codeword from the membrane potential, rather than directly setting the membrane potential to zero. For example, the reset codeword can be subtracted from the membrane potential of a spiking neuron at the previous time step to obtain the reset membrane potential. It is understood that, unlike a hard reset which directly sets the emitted membrane potential to zero, a soft reset only deducts the portion already emitted through the pulse level. The portion of the membrane potential exceeding the reset codeword, i.e., the quantization residual after multi-valued quantization, is retained in the reset membrane potential and can continue to participate in integration and emission in subsequent time steps, avoiding the secondary discarding of the quantization residual by a hard reset.
[0126] When obtaining the membrane potential at the current time step based on the reset membrane potential, leakage attenuation can be applied to the reset membrane potential and accumulated with the input information of the current time step.
[0127] In this embodiment, by reconstructing the reset codeword based on the pulse level of the previous time step and performing a soft reset on the membrane potential using the reset codeword, the reset amount of the membrane potential strictly corresponds to the pulse level actually released under the multi-valued firing mechanism. The quantization residual after multi-valued quantization is retained in the membrane potential and continues to subsequent time steps, thus cooperating with the multi-valued firing mechanism. This reduces the on-threshold quantization error of a single time step, avoids the cumulative loss of quantization residuals from each time step, ensures the continuity and integrity of information during the evolution of the membrane potential, and further suppresses the quantization loss of the spiking neural network.
[0128] To verify the effectiveness of the image classification model training method provided in this application embodiment, the following description is based on specific experiments.
[0129] Using a 20-layer residual network and a 16-layer visual geometry network as the backbone network of the spiking neural network to be trained, the network was validated on the classic small-scale natural image classification dataset CIFAR-10, which contains 32×32 color images of 10 categories, the classic small-scale natural image classification dataset CIFAR-100, which contains 32×32 color images of 100 categories, and the typical neuromorphic gesture recognition dataset DVS-Gesture.
[0130] As shown in Table 1, the number of preset thresholds Under the given conditions, three threshold determination methods—fixed threshold fold strategy, linear segmentation strategy, and logarithmic segmentation strategy—were compared. All three multi-value strategies delivered stable accuracy improvements compared to the traditional LIF. Specifically, the linear segmentation strategy achieved 76.38% classification accuracy on the CIFAR-100 dataset and 95.86% on the DVS-Gesture dataset; the logarithmic segmentation strategy achieved 94.88% classification accuracy on the CIFAR-10 dataset; and the fixed threshold fold strategy, as the most direct multi-value scheme, also achieved a significant improvement over the binary allocation baseline, validating the effectiveness of the multi-value allocation mechanism itself.
[0131] Table 1 Simulation Comparison Table 1
[0132] Among them, SSCL is a similarity-sensitive contrastive learning method, MPBN is a membrane potential batch normalization method, Ternary is a ternary pulse method, tdBN is a threshold-dependent batch normalization method, and TET is a time-efficient training method. As shown in Table 2, a linear segmentation strategy was adopted on the CIFAR-10 and CIFAR-100 datasets, with a 20-layer residual network as the backbone network. The classification performance was verified under the condition that the total number of time steps T=1, 2, 4, and 6, respectively. The results show that the multi-value distribution mechanism has a particularly outstanding improvement effect in scenarios with a small total number of time steps and limited information carrying capacity per step.
[0133] Table 2 Simulation Comparison Table II
[0134] As shown in Table 3, on two backbone networks, a 20-layer residual network and a 16-layer visual geometry group network, the membrane potential residual compensation based on the attention mechanism provided in this application embodiment is compared with the standard binary distribution baseline under four time step totals of T=1, 2, 4, and 6. The method provided in this application embodiment is superior to the baseline under all comparison settings, verifying the stability and universality of membrane potential residual compensation under different backbone networks and different time step totals. Moreover, the smaller the total number of time steps, the more significant the improvement, indicating that the truncation loss of the residual membrane potential in the last time step has a greater impact on network performance when the time redundancy is small.
[0135] Table 3. Simulation Comparison Table (Part 3)
[0136] As shown in Table 4, ablation experiments were conducted with a 20-layer residual network and a total number of time steps T=4. The results are as follows: Compared with the standard binary emission baseline, the classification accuracy on the CIFAR-10 and CIFAR-100 datasets improved by 0.98% and 1.68%, respectively, after introducing membrane potential residual compensation based on the attention mechanism. Compared with the compensation scheme that directly adds the residual membrane potential to the input of the receiving layer, the attention-based filtering fusion method in this embodiment of the application is 0.39% and 0.85% higher on the CIFAR-10 and CIFAR-100 datasets, respectively, indicating that introducing the attention mechanism to selectively filter residual information has a significant advantage over simple superposition. Building upon this, the classification accuracy on the CIFAR-10 and CIFAR-100 datasets was further improved to 94.73% and 76.95%, respectively, representing a cumulative improvement of 1.52% and 4.24% relative to the baseline. This demonstrates that the multi-valued firing mechanism and membrane potential residual compensation are significantly complementary in suppressing both above-threshold encoding distortion and below-threshold residual truncation loss.
[0137] Table 4. Simulation Comparison Table (Part Four)
[0138] Figure 9 This is a flowchart illustrating the image classification method provided by the present invention.
[0139] It should be noted that the execution subject of this method can be a server, a terminal device, or a processor in an electronic device with data processing capabilities, or neuromorphic computing hardware, etc. It can be the same as or different from the execution subject of the aforementioned image classification model training method. This application does not limit this.
[0140] like Figure 9 As shown, the method includes: Step 910: Obtain the time series data of the image to be processed.
[0141] Among them, the image time series data to be processed refers to image data that needs to be classified and processed in actual application scenarios and is expanded into multiple time steps in the time dimension.
[0142] It is understood that the acquisition method of the temporal data of the image to be processed is consistent with the temporal encoding method of the temporal data of the sample images in the training phase, so as to ensure that the input distribution in the inference phase is consistent with that in the training phase. For example, for static image data, such as static images acquired by a camera device or static images read from an image library, the normalized static image can be copied along the time dimension into an input sequence of length T, and temporal encoding is completed using constant input copying to obtain the temporal data of the image to be processed, where T is the total number of time steps, and is consistent with the total number of time steps in the training phase. For neuromorphic event data, the asynchronous event stream acquired by the event camera can be divided into T time slices according to a fixed time window, and the events in each time slice can be aggregated into a temporal tensor to obtain the temporal data of the image to be processed. This application does not limit the source or specific acquisition method of the temporal data of the image to be processed.
[0143] Step 920: Input the time series data of the image to be processed into the image classification model to obtain the image classification result corresponding to the time series data of the image to be processed; The image classification model is trained based on the image classification model training method.
[0144] Optionally, after the temporal data of the image to be processed is input into the image classification model, the first layer of the image classification model obtains the input information based on the temporal data of the image to be processed through weight calculation. Each spiking neuron in each network layer integrates and accumulates the input information step by step to obtain the membrane potential, and compares the membrane potential with multiple different preset thresholds to obtain the pulse level at each time step. The output pulse sequence of each network layer is determined according to the pulse level and passed layer by layer. For the extraction layer and the receiving layer with target residual connections, in the last time step, the residual membrane potential accumulated by the spiking neurons of the extraction layer that have not fired pulses is normalized, aligned and mapped, and then fused with the input features of the receiving layer after attention filtering to obtain the input information enhanced by the receiving layer. This process continues until the output pulse sequence of the last network layer in the image classification model is obtained.
[0145] Then, based on the output pulse sequence of the last network layer, the image classification result corresponding to the time series data of the image to be processed is obtained. For example, the output pulse sequence of the last network layer can be accumulated or averaged in the time dimension, and then mapped to the predicted probability of each category through a normalized exponential function. The category with the highest predicted probability is determined as the image classification result corresponding to the time series data of the image to be processed.
[0146] The specific form of the image classification result corresponds to the actual application scenario. For example, in a static image classification scenario, the image classification result is the image category to which the target object belongs in the time series data of the image to be processed; in a gesture recognition scenario based on dynamic visual sensor events, the image classification result is the gesture category corresponding to the time series data of the image to be processed. This application does not limit the specific form of the image classification result in its embodiments.
[0147] Understandably, since the image classification model is trained based on a spiking neural network, it maintains the event-driven spiking computation characteristics during the inference phase, triggering computation and communication only when the spiking neurons fire spiking signals. This allows it to be deployed on neuromorphic computing hardware to complete the image classification task in a low-power manner. Furthermore, since the image classification model has suppressed the suprathreshold quantization truncation error through a multi-value firing mechanism and reduced the truncation loss at the time window boundary through membrane potential residual compensation during the training phase, it only requires fewer time steps to achieve high classification accuracy during the inference phase, further reducing inference latency and inference energy consumption.
[0148] The image classification method provided in this application provides an image classification method that inputs the temporal data of the image to be processed into an image classification model trained based on the above-mentioned image classification model training method. It utilizes a multi-value distribution mechanism to carry richer image feature amplitude information within a single time step, and uses attention membrane potential residual compensation to recover sub-threshold residual discriminant information in the last time step. This enables the image classification model to output accurate image classification results even under inference conditions at low time steps. While ensuring image classification accuracy, it also maintains the sparse computation characteristics and low power consumption advantages of event-driven spiking neural networks.
[0149] The image classification system provided by this invention is described below. The image classification system described below can be referred to in correspondence with the image classification model training method and image classification method described above.
[0150] Figure 10 This is a schematic diagram of the image classification system provided by the present invention; as shown below. Figure 10 As shown, the system includes a training module 1010 and an application module 1020; The training module is used to perform, for example... Figure 1 The image classification model training method shown; The application module is used to perform, for example... Figure 9 The image classification method described above.
[0151] The system provided in this embodiment obtains pulse levels by comparing the membrane potential with multiple different preset thresholds. This allows spiking neurons to output pulses of different levels depending on the degree to which the membrane potential exceeds the threshold. This significantly improves the information carrying capacity of a single time step without increasing the number of time steps, effectively mitigating the on-threshold quantization truncation error caused by the irreversible collapse of on-threshold amplitude information within a single time step under the binary firing mechanism. Furthermore, by triggering membrane potential residual compensation through target residual connections, the system selectively modulates and recovers the residual membrane potential accumulated by spiking neurons that did not fire pulses in the last time step based on an attention mechanism. This compensates for the truncation loss at the time window boundary and enables the reuse of sub-threshold residual discrimination information. Thus, the quantization loss of the spiking neural network is synergistically suppressed from two dimensions: on-threshold encoding accuracy and sub-threshold residual utilization. This allows the trained image classification model to still have high classification accuracy and feature representation ability under low time step conditions, while maintaining the event-driven sparse computation characteristics and low power consumption performance of the spiking neural network.
[0152] The system provided by this invention is used to execute the above-described method embodiments. For specific processes and details, please refer to the above embodiments, which will not be repeated here.
[0153] Figure 11 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 11As shown, the electronic device may include: a processor 1110, a communications interface 1120, a memory 1130, and a communications bus 1140, wherein the processor 1110, the communications interface 1120, and the memory 1130 communicate with each other through the communications bus 1140. The processor 1110 can call logical instructions in the memory 1130 to execute an image classification model training method. This method includes: for the current network layer in the spiking neural network to be trained, inputting the input information of the current network layer into the current network layer to obtain the membrane potential of each spiking neuron in the current network layer at each time step; the membrane potential is used to characterize the cumulative calculation result of image features of the sample image time-series data by each spiking neuron at each time step; comparing the membrane potential with multiple different preset thresholds to obtain the pulse level of each spiking neuron at each time step, and determining the output pulse sequence of the current network layer based on the pulse level; in the case that there is a target network layer in the spiking neural network to be trained that has a target residual connection with the current network layer, obtaining the input features of the target network layer based on the output pulse sequence of the current network layer, and, based on an attention mechanism, comparing the input features with the current network layer at the last time step. The residual membrane potential at each time step is modulated to obtain modulation residual features; the residual membrane potential is used to characterize the accumulated membrane potential of spiking neurons that have not fired pulses in the current network layer; the target residual connection is used to trigger membrane potential residual compensation; based on the modulation residual features and the input features, the input information of the target network layer is obtained, and the input information of the target network layer is continued to be input to the target network layer until the output pulse sequence of the last network layer in the spiking neural network to be trained is obtained; based on the output pulse sequence of the last network layer, the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step, and the classification label of the sample image time series data, the spiking neural network to be trained is iteratively trained to obtain an image classification model; or an image classification method, the method including: obtaining the time series data of the image to be processed; inputting the time series data of the image to be processed into the image classification model to obtain the image classification result corresponding to the time series data of the image to be processed.
[0154] Furthermore, the logical instructions in the aforementioned memory 1130 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0155] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the image classification model training method provided by the above methods. The method includes: for the current network layer in the spiking neural network to be trained, inputting the input information of the current network layer into the current network layer to obtain the membrane potential of each spiking neuron in the current network layer at each time step; the membrane potential is used to characterize the cumulative calculation result of the image features of the sample image time series data by each spiking neuron at each time step; comparing the membrane potential with multiple different preset thresholds to obtain the pulse level of each spiking neuron at each time step, and determining the output pulse sequence of the current network layer according to the pulse level; when there is a target network layer in the spiking neural network to be trained that has a target residual connection with the current network layer, obtaining the input features of the target network layer according to the output pulse sequence of the current network layer. The input features are modulated with the residual membrane potential of the current network layer at the last time step based on an attention mechanism to obtain modulation residual features. The residual membrane potential is used to characterize the accumulated membrane potential of spiking neurons in the current network layer that have not fired pulses. The target residual connection is used to trigger membrane potential residual compensation. According to the modulation residual features and the input features, the input information of the target network layer is obtained, and the input information of the target network layer is continued to be input to the target network layer until the output pulse sequence of the last network layer in the spiking neural network to be trained is obtained. According to the output pulse sequence of the last network layer, the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step, and the classification label of the sample image time series data, the spiking neural network to be trained is iteratively trained to obtain an image classification model; or an image classification method, the method including: obtaining the time series data of the image to be processed; inputting the time series data of the image to be processed into the image classification model to obtain the image classification result corresponding to the time series data of the image to be processed.
[0156] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements an image classification model training method provided by the above methods. This method includes: for a current network layer in a spiking neural network to be trained, inputting the input information of the current network layer into the current network layer to obtain the membrane potential of each spiking neuron in the current network layer at each time step; the membrane potential is used to characterize the cumulative calculation result of image features of sample image time-series data by each spiking neuron at each time step; comparing the membrane potential with multiple different preset thresholds to obtain the pulse level of each spiking neuron at each time step, and determining the output pulse sequence of the current network layer based on the pulse level; in the case that there is a target network layer in the spiking neural network to be trained that has a target residual connection with the current network layer, obtaining the input features of the target network layer based on the output pulse sequence of the current network layer, and, based on an attention mechanism, processing the input features of the target network layer. The input features are modulated with the residual membrane potential of the current network layer at the last time step to obtain the modulation residual features; the residual membrane potential is used to characterize the accumulated membrane potential of the spiking neurons in the current network layer that have not fired pulses; the target residual connection is used to trigger membrane potential residual compensation; according to the modulation residual features and the input features, the input information of the target network layer is obtained, and the input information of the target network layer is continued to be input to the target network layer until the output pulse sequence of the last network layer in the spiking neural network to be trained is obtained; according to the output pulse sequence of the last network layer, the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step, and the classification label of the sample image time series data, the spiking neural network to be trained is iteratively trained to obtain an image classification model; or an image classification method, the method including: obtaining the time series data of the image to be processed; inputting the time series data of the image to be processed into the image classification model to obtain the image classification result corresponding to the time series data of the image to be processed.
[0157] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0158] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for training an image classification model, characterized in that, include: For the current network layer in the spiking neural network to be trained, the input information of the current network layer is input into the current network layer to obtain the membrane potential of each spiking neuron in the current network layer at each time step; the membrane potential is used to characterize the cumulative calculation result of the image features of the sample image time series data by each spiking neuron at each time step; The membrane potential is compared with multiple different preset thresholds to obtain the pulse level of each spiking neuron at each time step, and the output pulse sequence of the current network layer is determined based on the pulse level. In the case where a target network layer exists in the spiking neural network to be trained, and a target residual connection is established between the target network layer and the current network layer, the input features of the target network layer are obtained based on the output pulse sequence of the current network layer. Then, based on an attention mechanism, the input features are modulated with the residual membrane potential of the current network layer at the last time step to obtain modulated residual features. The residual membrane potential is used to characterize the membrane potential accumulated by the spiking neurons in the current network layer that have not fired pulses. The target residual connection is used to trigger membrane potential residual compensation. Based on the modulation residual features and the input features, the input information of the target network layer is obtained, and the input information of the target network layer is continued to be input into the target network layer until the output pulse sequence of the last network layer in the spiking neural network to be trained is obtained; Based on the output pulse sequence of the last network layer, the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step, and the classification labels of the sample image time series data, the spiking neural network to be trained is iteratively trained to obtain an image classification model.
2. The image classification model training method according to claim 1, characterized in that, The attention-based mechanism modulates the input features with the residual membrane potential of the current network layer at the last time step to obtain modulated residual features, including: The residual film potential is normalized. The normalized residual membrane potential is aligned and mapped with the input feature to obtain the aligned residual membrane potential. The aligned residual membrane potential and the input features are input into the attention model to obtain a weight map; each element in the weight map is used to characterize the value of the residual information at each position in the aligned residual membrane potential to the task to be performed by the target network layer. Based on the weighted graph, the residual information at each position in the aligned residual film potential is weighted and fused to obtain the modulation residual features.
3. The image classification model training method according to claim 2, characterized in that, The step of aligning and mapping the normalized residual membrane potential with the input features to obtain the aligned residual membrane potential includes: When the output dimensions of the current network layer and the target network layer are inconsistent, the normalized residual membrane potential is input to the channel projection convolution layer for channel dimension projection to obtain the first residual feature; the number of channels of the first residual feature is the same as the number of channels of the input feature. The spatial resolution of the first residual feature is adjusted to obtain the aligned residual membrane potential; the spatial resolution of the aligned residual membrane potential is the same as the spatial resolution of the input feature; the spatial resolution adjustment includes upsampling or downsampling.
4. The image classification model training method according to claim 2, characterized in that, The step of inputting the aligned residual membrane potential and the input features into the attention model to obtain a weight map includes: The aligned residual membrane potential is concatenated with the input feature in the channel dimension to obtain the first joint feature; Based on the attention convolutional layer in the attention model, the residual information at each position in the aligned residual membrane potential is evaluated according to the first joint feature to assess the value of the residual information at each position in the aligned residual membrane potential for the task to be performed by the target network layer, and the evaluation value corresponding to the residual information at each position in the aligned residual membrane potential is obtained. Based on the activation function in the attention model, the evaluation value is mapped to a preset numerical range to obtain the weight map; the preset numerical range is a range of values greater than 0 and less than 1.
5. The image classification model training method according to any one of claims 1-4, characterized in that, The step of obtaining the input information of the target network layer based on the modulation residual features and the input features includes: The modulation residual features and the input features are concatenated along the channel dimension to obtain the second joint feature; The second joint feature is input into the fusion convolutional layer for joint encoding to obtain the input information of the target network layer.
6. The image classification model training method according to any one of claims 1-4, characterized in that, The multiple different preset thresholds are determined by any of the following methods: For the kth preset threshold among the plurality of different preset thresholds, the product between the base threshold and k is determined as the kth preset threshold; where k is an integer greater than or equal to 1 and less than or equal to the number of the plurality of different preset thresholds; Calculate the product between the difference between k and 1 and the preset dynamic range, and the ratio between the product and the number of the multiple different preset thresholds to obtain the first increment. The sum of the base threshold and the first increment is determined as the kth preset threshold. The product of the preset interval coefficient and the difference between k and 1 is used as the exponent for power operation. The product of the difference between the power operation result and 1 and the preset scaling coefficient is determined as the second increment. The sum of the basic threshold and the second increment is determined as the kth preset threshold.
7. The image classification model training method according to any one of claims 1-4, characterized in that, The step of iteratively training the spiking neural network to obtain an image classification model based on the output pulse sequence of the last network layer, the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step, and the classification labels of the sample image time-series data includes: The surrogate gradient is obtained based on the difference between the membrane potential of each spiking neuron in the spiking neural network to be trained at each time step and each preset threshold. The classification loss is obtained based on the classification result corresponding to the output pulse sequence of the last network layer and the classification label; The image classification model is obtained by iteratively training the spiking neural network to be trained based on the surrogate gradient and the classification loss.
8. The image classification model training method according to any one of claims 1-4, characterized in that, For each spiking neuron in the current network layer, the steps for obtaining the membrane potential of the spiking neuron at the current time step include: The reset codeword is reconstructed based on the pulse level of the spiking neuron in the previous time step; According to the reset codeword, the membrane potential of the spiking neuron at the previous time step is softly reset to obtain the reset membrane potential; Based on the reset membrane potential, the membrane potential of the spiking neuron at the current time step is obtained.
9. An image classification method, characterized in that, include: Acquire the temporal data of the image to be processed; The time series data of the image to be processed is input into the image classification model to obtain the image classification result corresponding to the time series data of the image to be processed. The image classification model is trained based on the image classification model training method as described in any one of claims 1-8.
10. An image classification system, characterized in that, The system includes a training module and an application module; The training module is used to execute the image classification model training method as described in any one of claims 1-8; The application module is used to execute the image classification method as described in claim 9.
