A CANN computing acceleration method based on ANN and SNN

By employing computational acceleration methods based on ANN and SNN, a precoding and quantization process is designed to construct an improved LIF neuron module, achieving ANN2SNN conversion. This solves the problem of low computational efficiency in CANN models, improves the real-time performance and accuracy of navigation algorithms, and is suitable for neuromorphic navigation systems in embedded devices.

CN122242575APending Publication Date: 2026-06-19SOUTHEAST UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTHEAST UNIV
Filing Date
2026-03-12
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing CANN models are computationally inefficient when simulating the brain's PI capabilities, especially on embedded devices where iterative computation is highly complex, making it difficult to achieve real-time navigation capabilities.

Method used

By employing computational acceleration methods based on ANN and SNN, a unique precoding process and dataset creation algorithm are designed to construct an improved LIF neuron module and an adaptive leaky membrane potential update mechanism, thereby achieving ANN2SNN conversion. The quantized activation value is a discrete pulse sequence, reducing computational complexity.

🎯Benefits of technology

It significantly improves the computation speed and decoding accuracy of CANN, enabling real-time navigation on embedded devices. It is suitable for the deployment of neuromorphic navigation algorithms, improving computational efficiency and the accuracy of decoding results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122242575A_ABST
    Figure CN122242575A_ABST
Patent Text Reader

Abstract

This invention discloses a CANN computation acceleration method based on ANN and SNN, comprising the following steps: (1) simulating the intermediate states of CANN neuron activity under randomized input sequences using a precise differential model of CANN as a dataset; (2) fitting the neuron activity of CANN using ANN and precoding the sequence input using one-hot encoding and linear interpolation to ensure spatial periodicity and response differentiation characteristics; (3) realizing ANN2SNN by constructing an improved LIF neuron module, designing a continuously differentiable gradient substitution function and an adaptive leaky membrane potential update mechanism to replace the traditional activation function in ANN; (4) realizing ANN2SNN by designing a layer adaptive collaborative quantization module, achieving precise adaptation of quantized activation and pulse firing based on the distribution range of activation values ​​in each layer of ANN. The ANN model generated by this invention can achieve computational acceleration on ANN neural network acceleration chips, and the generated SNN model can achieve low-power computation on neuromorphic brain-like chips.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of neuromorphic computing technology, specifically relating to a method for accelerating computation using a continuous attractor neural network (CANN) based on artificial neural networks (ANN) and spiking neural networks (SNN). Background Technology

[0002] In recent years, brain-inspired navigation (BIN) research inspired by spatial cognition has attracted widespread attention and in-depth discussion in academia. Currently, the core idea of ​​BIN research lies in drawing inspiration from the neural mechanisms of spatial navigation in the brain, using neurodynamic models such as continuous attractor neural networks (CANN) for computational modeling to endow mobile robots and unmanned systems with autonomous localization and navigation capabilities. Given that the field of BIN is still in the transitional stage from theoretical exploration to engineering application, current research focuses on in-depth simulation of key core mechanisms in the brain's navigation neural circuits, rather than blindly conducting large-scale modeling at the whole-brain scale. In this process, the path integral (PI) neural mechanism of the entorhinal cortex has shown significant technical superiority, providing important inspiration for classic topics in navigation such as path prediction (DR) and simultaneous localization and mapping (SLAM).

[0003] In the current technological evolution path, most advancements in brain-inspired navigation (BIN) that simulate the brain's PI (pivot induction) capabilities to achieve DR (radio deduction) tasks employ the CANN (canonical neural network) modeling framework. CANN is a special type of attractor neural network and also a unique neurodynamic model. Essentially, it is a recurrent network composed of many nodes that eventually stabilizes. Each node can be viewed as a neuron, receiving excitatory signals from surrounding neurons and global inhibitory signals from distant neurons, achieving a stable state even without external input. Attractors in CANN are continuous, and each attractor pair encodes an activation value. The connection strength between two neurons depends only on the difference between their preferred stimuli, not the preferred stimulus value. The most prominent feature of CANN is the translation invariance of connections between neurons. CANN can accept external input to alter the state of its internal neurons. The input is often Gaussian encoded and then transmitted to internal neurons with different weights. This differentiation guides the formation of wave packets, thus encoding the input. The output is then obtained by group decoding of the current neuron's wave packets. Utilizing the encoding and decoding capabilities of CANN to transmit information is one of the core steps in current brain-inspired navigation. While CANN has demonstrated great potential in simulating neuronal firing characteristics and population coding mechanisms, its computational efficiency in practical engineering applications remains a bottleneck that urgently needs to be addressed. Conventional CANN models typically involve the interactions of large-scale neuronal clusters, relying on highly complex nonlinear partial differential equations to simulate the evolution of neurodynamic properties. This results in a heavy computational burden when performing high-frequency real-time updates. Although some research has attempted to introduce a Bayesian probabilistic framework, modifying the CANN model into a Bayesian attractor model to optimize the probabilistic inference process, the complexity of iterative computation remains high on embedded systems with limited hardware computing power.

[0004] As a cutting-edge, multidisciplinary technology, Biological Integral Networking (BIN) cannot achieve comprehensive iterations at the principle, computation, and capability levels overnight. It requires continuous innovation in underlying computational methods to gradually achieve performance leaps. Especially during the critical phase of advancing BIN technology into edge devices, developing new models that balance biological rationality with real-time computation will make significant contributions to the community's development in this field. Summary of the Invention

[0005] To address the aforementioned issues, this invention discloses a CANN computation acceleration method based on ANN and SNN. It fits the three main stages of the PI process (input encoding, state update, and group decoding) and designs a unique pre-encoding process and dataset creation algorithm for ANN input. This significantly improves the running speed of the neuromorphic PI method and enables it to be better deployed and integrated on various embedded edge devices and general computing platforms.

[0006] To achieve the above objectives, the technical solution of the present invention is as follows:

[0007] A method for accelerating CANN computation based on ANN and SNN can be summarized in four steps:

[0008] (1) The activity of CANN neurons under randomized input sequences was simulated by the exact differential model of CANN, and the neuron states and intermediate variables of CANN under different input sequences were recorded as a dataset;

[0009] (2) The neuronal activity of CANN is fitted by ANN. The fitting objects include the pre-encoded input, state and decoded output of CANN. In addition, one-hot encoding and linear interpolation are used to pre-encode the sequence input to ensure that ANN can have the spatial periodicity and response differentiation characteristics of CANN.

[0010] (3) ANN2SNN is realized by constructing an improved LIF neuron module, and a continuously differentiable gradient substitution function and an adaptive leaky membrane potential update mechanism are designed to replace the traditional activation function in ANN with this module;

[0011] (4) ANN2SNN is implemented by designing an adaptive collaborative quantization module. Based on the distribution range of activation values ​​in each layer of ANN, the quantization parameters are determined layer by layer, and the continuous activation values ​​are mapped to discrete pulse sequences to achieve precise matching between quantization activation and pulse delivery.

[0012] Step one involves a dataset creation method based on the 1DCANN integral model. External input is generated through a random process to produce sequence information about angles. The randomized elements include sequence length, angle change patterns, the proportion of different change patterns in the entire sequence's duration, and the magnitude of constant values ​​when they remain unchanged. The training and validation sets are obtained by partitioning the generated dataset in a 4:1 ratio, with the sequence length controlled to 500 frames to reduce fitting difficulty and improve training stability. The test set has a sequence length 7-10 times that of the training set, not less than 3750 frames, and is generated using the same random process and integral model as the training set after adjusting the sequence length parameter. The input values ​​for the sequences are determined according to different patterns. The values ​​can vary linearly or remain constant, with the aim of enabling the network to fit wave packet activity at different rates of change.

[0013] The generated dataset is obtained by capturing intermediate states in the dynamics of the integral model. These intermediate states include: pre-encoded input, neuron states, and vectors generated during the decoding process. The dynamics can be summarized as follows: When the integral model updates its state based on external input, it needs to pre-encode the input, projecting it onto the neuron's state space. Subsequently, the neuron obtains its post-input neuron state through ODE calculation based on the projected input and its current neuron state. Both the pre-encoding method and the update process strictly adhere to the CANN dynamics equations of the integral model. The detailed dynamics are shown below:

[0014] First, the input values ​​need to be pre-encoded, mainly using Gaussian coding. The specific formula is as follows:

[0015] ;

[0016] in, This represents the input stimulus to the i-th neuron. and They are all constants greater than 0; and These are the external input and the preference of the i-th neuron, respectively. The preferences of the neurons are all taken from the information state set. By representing the stimuli obtained by different neurons as vectors, the pre-encoded input required to create the dataset can be obtained.

[0017] The input neuron activity is then simulated using the differential equations of CANN. The mathematical form of the CANN neuron state uses an integral model involving the following calculation formulas:

[0018] ;

[0019] in, This indicates that the total synaptic input of the i-th neuron is also an object that needs to be captured during the dataset creation process. This represents the connection weights between neurons i and j, and the connections are symmetric. This represents the pulse firing frequency of the i-th neuron; and The constant represents different weighting coefficients.

[0020] Finally, the target output is obtained by group decoding of the neuron states U of the CANN, and the specific formula is as follows:

[0021] ;

[0022] Where y is the decoded output, Z represents the number of neurons in the current dimension of CANN, N refers to the resolution of a single neuron, and S(U) and C(U) are intermediate vectors in the decoding process required to create the dataset.

[0023] Extending the dataset creation method based on the 1DCANN integral model yields a dataset creation method based on the 3DCANN integral model. In creating the dataset, three 1D random sequences are pre-generated and then concatenated to simulate coordinate changes; the range of input values ​​remains the same. Between these points, for 3DACNNs of different scales, the numerical values ​​can be limited to this range through mapping. During input preprocessing, the three-dimensional coordinates are separated, and their respective input vectors are calculated according to the formula x before being concatenated.

[0024] ;

[0025] in These represent the encoded vectors for the input in the three dimensions x, y, and z, respectively. This represents the input vector at the current time step. The input encoding and normalization process is consistent with that of 1DCANN. When decoding the wave packets of 3DACNN, the cell activity array needs to be summed along its dimensions beforehand to obtain one-dimensional neuron information representations in the X, Y, and Z dimensions, as shown below:

[0026] ;

[0027] They represent dimensionality reduction to A one-dimensional vector in three dimensions is used, and then the decoded value of each dimension is calculated to obtain spatial information. Here... The spliced ​​result is the fitting target of the LSTM layer of 3DCANN.

[0028] Step two involves fitting the created dataset using an ANN. The ANN design under 1DCANN follows the principle of lightweight design and continues the structure of the Wu Si model, including one input layer, two fully connected layers (FC) with ReLU activation, two LSTM layers, and two TimeDistributed layers for decoding the time-step states. The two FC layers are used to extract abstract representations of the input sequences. The two LSTM layers are used to fit the neurodynamic activity patterns of the CANN; the two TimeDistributed layers are used to decode the 1DCANN patterns fitted by the LSTM layers through representation learning. The training details for the one-dimensional CANN to ANN conversion are described below. This invention uses the decoded values ​​obtained from the 1DCANN integral model calculation as the training labels for the model. These decoded values ​​are the numerical values ​​corresponding to the numerator and denominator before arctangent calculation. During the 1DCANN to ANN training process, the Adam optimizer and the root mean square error (MSE) loss function were used, and a total of 200 epochs were trained, with 12 sequence information inputs per epoch.

[0029] The ANN fitting model for 3DCANN also includes an Input layer, two fully connected layers (FC) with ReLU activation, two LSTM layers, and two TimeDistributed layers for time-step state decoding. Due to complexity considerations, this invention does not directly fit the activity states of neurons in a multidimensional CANN network, but rather fits the dimension-reduced and concatenated vectors obtained during the decoding process. The dimension reduction method will be introduced later. This strategy reduces both time and space complexity to... This is also the key to improving the algorithm's running speed after reconstruction, and the wave packet state before dimensionality reduction can be approximated through inverse transformation. Training details are described below. This invention uses the decoding vector of the 3DCANN simulated by CANN as the training label for the model. This decoding vector is... The values ​​of the numerator and denominator before the arctangent calculation in each decoding process are concatenated. During training, the Adam optimizer and root mean square error (MSE) are used as the loss function, and a total of 200 epochs are trained, with 12 sequence information inputs in each epoch.

[0030] Furthermore, one-hot encoding and linear interpolation are used to pre-encode the sequence input to ensure that the ANN possesses the spatial periodicity and response differentiation characteristics of a CANN. The specific methods are as follows:

[0031] Given an input in a random sequence, the value, when modulo a certain value, will fall within a certain interval A; establish a simple linear mapping that is bijective to map any value in interval A to the specified interval. From a certain angle, the input vector of the ANN is obtained using one-hot encoding and linear interpolation, as shown in the following formula:

[0032] ;

[0033] in, , Refers to the decimal part of C;

[0034] This operation reduces the difficulty for ANN to fit the differential properties of CANN responses, effectively reducing the network structure.

[0035] Step three involves constructing an improved LIF neuron module to implement ANN2SNN. This involves designing a continuously differentiable gradient substitution function and an adaptive leaky membrane potential update mechanism, replacing the traditional activation function in the ANN with this module. The specific method is as follows:

[0036] The gradient substitution function is a continuously differentiable sigmoid function, expressed as:

[0037] ;

[0038] In the formula, Let be the neuron membrane potential at time t, and V be the impulse firing threshold, ranging from 0.5 to 2.0. This is the gradient smoothing coefficient, with a value ranging from 3.0 to 10.0;

[0039] The calculation formula for the adaptive leakage membrane potential update mechanism is as follows:

[0040] ;

[0041] In the formula, The adaptive leakage factor is adjusted within the range of 0.8-0.99. These are synaptic weights, taken from the layer weight parameters of the pre-trained ANN; The input signal is at time t; The membrane potential reset potential has a value range of 0.0-0.3; s is the pulse output at time t, s=1 indicates pulse delivery, and s=0 indicates no delivery.

[0042] During the replacement process, all activation layers of the ANN model are traversed, and traditional activation functions such as ReLU and SiLU are replaced one by one with improved LIF neuron modules, while keeping the weight parameters of other layers of the model unchanged.

[0043] Step four involves implementing ANN2SNN through a layered adaptive collaborative quantization module. Based on the distribution range of activation values ​​in each layer of the ANN, quantization parameters are determined layer by layer, mapping continuous activation values ​​to discrete pulse sequences, thus achieving precise matching between quantized activation and pulse delivery. The specific method is as follows:

[0044] The formula for calculating the quantization operation function f(·) is:

[0045] ;

[0046] In the formula, (·) is the rounding function. (·) is the truncation function, which will... It is restricted to the interval [0,1].

[0047] The beneficial effects of this invention are as follows:

[0048] This invention proposes a computational acceleration method based on ANN and CANN. In practical applications, it combines the fast iteration of the CANN discrete equation model with the precise state decoding properties of the integral equation model. Furthermore, it can be used for the reconstruction of navigation-related cells in neuromorphic algorithms, reproducing the relevant properties of navigation cells in the original algorithm while reducing time consumption. This accelerated algorithm has been applied to the reconstruction of related cells in NeuroSLAM. Experiments have demonstrated that it effectively improves computational speed while providing more accurate decoding results compared to the original algorithm. Processing the output of the state layer reveals that its output clearly exhibits attractor characteristics, possessing both translation invariance and self-stabilizing properties. Moreover, by using quantization and gradient substitution methods, the weights of the ANN network are converted into usable SNN network weights, enabling deployment on neuromorphic chips and neural network acceleration chips. Therefore, this invention has significant engineering application value for neuromorphic navigation network algorithms involving continuous attractor networks. Attached Figure Description

[0049] Figure 1 This is a schematic diagram of the overall architecture of the CANN computation acceleration algorithm based on ANN and SNN proposed in this invention.

[0050] Figure 2 This is a flowchart illustrating the cyclic image processing process of a brain-inspired 3D SLAM system applied to brain-like algorithms according to the present invention.

[0051] Figure 3 This is a diagram showing the ANN structure and workflow used in this implementation example.

[0052] Figure 4 This is a schematic diagram of the self-collected dataset path and distribution environment used in the implementation example.

[0053] Figure 5 This is a schematic diagram comparing the closed-loop path decoding trajectories in the original algorithm dataset for the implementation example.

[0054] Figure 6 A schematic diagram comparing the closed-loop path decoding trajectory in a self-collected dataset to illustrate the implementation example.

[0055] Figure 7 This is a schematic diagram of the state transition of a three-dimensional mesh cell in the implementation example.

[0056] Figure 8 This is a schematic diagram illustrating the height head orientation during cell state transfer in the implementation example. Detailed Implementation

[0057] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.

[0058] like Figure 1As shown, the present invention discloses a CANN computation acceleration method based on ANN and SNN. By introducing a neural network into the NeuroSLAM model, the navigation cell model is reconstructed, mainly consisting of the core height head-oriented cell and three-dimensional mesh cell. The neural network is mainly used to improve the iteration mode of the mesh cell. Through multiple CANN models of mesh cells and head-oriented cells, an empirical map is created, realizing the cell encoding and decoding capabilities and mapping capabilities of the original NeuroSLAM. Figure 2 This paper introduces the ANN structure and workflow diagram used in this implementation case, and limits the number of neurons to maintain the same resolution as the original algorithm. Figure 3 The processing flow of this invention for constructing brain-like algorithms is briefly introduced.

[0059] like Figure 3 As shown, to ensure rigor and demonstrate the general applicability of the invention when used in the NeuroSLAM system, in addition to using the dataset from the original algorithm for analysis, a separate dataset was also collected. This dataset exhibits diverse environmental distributions, including narrow corridors, low-texture areas, winding corridors, and open areas. Furthermore, the dataset contains moving figures and dynamic objects, posing a challenge to purely visual monocular SLAM algorithms. This allows for the demonstration of the invention's stability through experimental results during implementation.

[0060] like Figures 1-2 As shown, the CANN computation acceleration method based on ANN and SNN described in this invention involves multiple steps in the process of applying it to a brain-like navigation algorithm: dataset creation, neural network weight training, and reconstruction of relevant navigation cells. The dataset creation method is as follows: external input generates sequence information about angles through a random process. The random objects include sequence length, angle change patterns, the proportion of duration of different change patterns in the entire sequence, and the constant value when it remains unchanged. The neural network fits the relevant states in the dataset, including the input pre-encoded vector, cell states, and corresponding decoded values. The successfully fitted network can be used to reconstruct relevant cells in the brain-like algorithm. The reconstructed functions include input preprocessing, state updating, and decoding. By extracting the outputs of different layers of the neural network, the process of cell state change over time and the input changes at different times can be obtained. Figure 5-6 As shown, the algorithms before and after reconstruction were tested on both the original dataset and the self-collected dataset, mainly comparing the changes in the experience map and the detection of loop closure capabilities. Test results show that the reconstructed navigation cell retains the encoding and decoding capabilities of the original algorithm and achieves consistency in experience map construction. Furthermore, the reconstructed navigation cell has a significantly faster iteration speed than the unreconstructed navigation cell. Figure 7-8As shown, by recording the cell states during the navigation cell iteration process, the state changes of different navigation cells during pose calculation can be clearly observed. Figure 7 The image shows the change in cell state wave packet along the height dimension as the height of a 3D mesh cell changes. Figure 8 This shows that as the height head faces the cell, the cell state wave packet moves along the angular dimension.

[0061] Example 1:

[0062] The implementation method of the CANN computation acceleration method based on ANN and SNN is as follows:

[0063] Step A: Simulate the activity of CANN neurons under randomized input sequences using an exact differential model of CANN, and record the neuron states and intermediate variables of CANN under different input sequences as a dataset. The specific method is as follows:

[0064] The input values ​​of the random sequence are for different patterns. The input values ​​can vary linearly or remain constant, aiming to enable the network to fit wave packet activity at different rates of change. The input values ​​need to be Gaussian encoded, as shown in the following formula:

[0065] ;

[0066] in, This represents the input stimulus to the i-th neuron. and They are all constants greater than 0; and These represent the external input and the preference of the i-th neuron, respectively, with the neuron's preference taken from the information state set;

[0067] The input neuron activity is simulated using differential equations in CANN. The mathematical form of the CANN neuron state adopts the Wu Si model, and the calculation formula is as follows:

[0068] ;

[0069] in, This represents the total synaptic input of the i-th neuron. This represents the connection weights between neurons i and j, and the connections are symmetric. This represents the pulse firing frequency of the i-th neuron; and The constant represents different weighting coefficients.

[0070] The target output can be obtained by group decoding of the neuron state U of CANN, and the specific formula is as follows:

[0071] ;

[0072] Where y is the decoded output, Z represents the number of neurons in the current dimension of CANN, and N refers to the resolution of a single neuron.

[0073] Gaussian-coded input during the CANN state update process The neuron state U, along with S(U) and C(U) in the decoding step, will be recorded as the fitting target of the ANN. It's important to distinguish that the neuron state of a one-dimensional CANN can be written as a vector, while the neuron state of a multi-dimensional CANN is stored as a multi-dimensional matrix. However, because the states are decoupled in dimensionality and transformed into multi-dimensional vectors during group decoding, the dataset of a multi-dimensional CANN no longer contains U but rather the decoupled dimensional vectors. The decoupling process, taking a three-dimensional CANN as an example, is illustrated in the following formula:

[0074] ;

[0075] In the process of creating the 3D CANN dataset, the vector concatenated from SX, SY, and SZ was used to replace U as the fitting target for the time series layer.

[0076] Step B: To ensure that the neural network acceleration approach can be used for related algorithm deployment on neuromorphic chips, the weights of the currently fitted ANN network need to be transferred to a usable SNN. This bypasses the difficulty of training SNN networks. The transfer method requires quantization and gradient substitution operations, where the specific implementation of gradient substitution is shown below:

[0077] The gradient substitution function is a continuously differentiable sigmoid function, expressed as:

[0078] ;

[0079] In the formula, Let be the neuron membrane potential at time t, and V be the impulse firing threshold, ranging from 0.5 to 2.0. This is the gradient smoothing coefficient, with a value ranging from 3.0 to 10.0;

[0080] The calculation formula for the adaptive leakage membrane potential update mechanism is as follows:

[0081] ;

[0082] In the formula, The adaptive leakage factor is adjusted within the range of 0.8-0.99. These are synaptic weights, taken from the layer weight parameters of the pre-trained ANN; The input signal is at time t; The membrane potential reset potential has a value range of 0.0-0.3; s is the pulse output at time t, s=1 indicates pulse delivery, and s=0 indicates no delivery.

[0083] During the replacement process, all activation layers of the ANN model are traversed, and traditional activation functions such as ReLU and SiLU are replaced one by one with improved LIF neuron modules, while keeping the weight parameters of other layers of the model unchanged.

[0084] In addition to gradient substitution, an adaptive collaborative quantization module needs to be designed to implement ANN2SNN. Based on the distribution range of activation values ​​in each layer of the ANN, quantization parameters are determined layer by layer, mapping continuous activation values ​​to discrete pulse sequences, thus achieving precise matching between quantized activation and pulse delivery. The specific method is as follows:

[0085] The formula for calculating the quantization operation function f(·) is:

[0086] ;

[0087] In the formula, (·) is the rounding function. (·) is the truncation function, which will... It is restricted to the interval [0,1].

[0088] Step C: Reconstruct the navigation cells in NeuroSLAM using the fitted neural network, focusing on the height head-orientation cells and 3D mesh cells. Since the height and angle information calculations for the height head-orientation cells are not coupled in the original algorithm, two different tensors are used during reconstruction to maintain the neuron states in the corresponding dimensions during the SLAM process, thus enabling the reconstruction of the height head-orientation cells using 1DCANN. The reconstruction of the 3D mesh cells only modifies the iterative algorithm and maintains the function interface, directly using 3DCANN for neurodynamic fitting. The reconstructed navigation cells can output more accurate decoding results at a faster speed; the relevant neuron states can be viewed. Figure 6-7 .

[0089] To accelerate computation, the CANN model fitted by the ANN network and the neuromorphic navigation system NeuroSLAM were deployed on an industrial control computer supporting NVIDIA GTX GPUs and on a smaller NVIDIA Jetson Nano embedded computing board. To achieve low-power computation, the CANN model converted from ANN2SNN and the neuromorphic navigation system NeuroSLAM were deployed on the LYNXI HS110-8G-WL neuromorphic edge computing host to ensure real-time performance and low power consumption.

[0090] This invention discloses a method for accelerating CANN computation based on ANN and SNN. The method includes: calculating random input using a CANN integral model and recording the encoded input, neuron states, and intermediate values ​​of the decoding algorithm to create a dataset; fitting the dynamic characteristics of a mathematical model using an artificial neural network constructed with linear and temporal layers; reconstructing relevant navigation cells in a neuromorphic algorithm based on the fitted neural network; and implementing ANN2SNN through gradient substitution and quantization to complete the algorithm's deployment on a neuromorphic chip. Addressing the shortcomings of slow navigation cell iteration speed, high algorithm complexity, and inaccurate decoding results under long-term operation in the NeuroSLAM system, this invention introduces neural network reconstruction of relevant navigation cells, significantly improving the overall algorithm speed at both the edge and PC ends, while also significantly improving decoding accuracy, and ensuring that the loop closure performance of the original algorithm is not degraded.

[0091] In summary, this invention discloses a method for accelerating CANN computation based on ANN and SNN. By introducing neural networks to accelerate the neurodynamic computation of CANN, it ensures that the reconstructed navigation cells improve operating speed while maintaining the relevant neurodynamic characteristics of CANN. This method has been successfully deployed on both neural network acceleration chips and neuromorphic chips. It has broad engineering practical value and guiding significance.

[0092] It should be noted that the above content merely illustrates the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. For those skilled in the art, various improvements and modifications can be made without departing from the principle of the present invention, and all such improvements and modifications fall within the scope of protection of the claims of the present invention.

Claims

1. A CANN computing acceleration method based on ANN and SNN, characterized in that: Includes the following steps: (1) The activity of CANN neurons under randomized input sequences was simulated by the exact differential model of CANN, and the neuron states and intermediate variables of CANN under different input sequences were recorded as a dataset; (2) The neuronal activity of CANN is fitted by ANN. The fitting objects include the pre-encoded input, state and decoded output of CANN. In addition, one-hot encoding and linear interpolation are used to pre-encode the sequence input to ensure that ANN can have the spatial periodicity and response differentiation characteristics of CANN. (3) ANN2SNN is realized by constructing an improved LIF neuron module, and a continuously differentiable gradient substitution function and an adaptive leaky membrane potential update mechanism are designed to replace the traditional activation function in ANN with this module; (4) ANN2SNN is implemented by designing an adaptive collaborative quantization module. Based on the distribution range of activation values ​​in each layer of ANN, the quantization parameters are determined layer by layer, and the continuous activation values ​​are mapped to discrete pulse sequences to achieve precise matching between quantization activation and pulse delivery.

2. The CANN computation acceleration method based on ANN and SNN according to claim 1, characterized in that... In step (1), the CANN neuron activity under randomized input sequences is simulated using the exact differential model of CANN. The neuron states and intermediate variables of CANN under different input sequences are recorded as a dataset. The specific method is as follows: The input values ​​of the random sequence are for different patterns. The input values ​​can vary linearly or remain constant, aiming to enable the network to fit wave packet activity at different rates of change. The input values ​​need to be Gaussian encoded, as shown in the following formula: ; in, This represents the input stimulus to the i-th neuron. and They are all constants greater than 0; and These represent the external input and the preference of the i-th neuron, respectively, with the neuron's preference taken from the information state set; The input neuron activity is simulated using differential equations in CANN. The mathematical form of the CANN neuron state adopts the Wu Si model, and the calculation formula is as follows: ; in, This represents the total synaptic input of the i-th neuron. This represents the connection weights between neurons i and j, and the connections are symmetric. This represents the pulse firing frequency of the i-th neuron; and The constants represent different weighting coefficients; The target output is obtained by group decoding of the neuron state U of CANN, and the specific formula is as follows: ; Where y is the decoded output, Z represents the number of neurons in the current dimension of CANN, and N refers to the resolution of a single neuron. Gaussian-coded input during the CANN state update process The neuron state U, as well as S(U) and C(U) in the decoding step, will be recorded as the fitting target of the ANN. It is important to distinguish that the neuron state of a one-dimensional CANN is written as a vector, while the neuron state of a multi-dimensional CANN is stored in the form of a multi-dimensional matrix. However, since the state is decoupled in dimensionality and transformed into a multi-dimensional vector during group decoding, the dataset of a multi-dimensional CANN no longer contains U but is a decoupled dimensional vector. The decoupling process is taken as an example of a three-dimensional CANN, and the specific formula is as follows: ; They represent dimensionality reduction to In the process of creating the 3D CANN dataset, the 1D vectors in the three dimensions are used. The concatenated vectors SX, SY, and SZ are used to replace U as the fitting target for the time series layer.

3. The CANN computation acceleration method based on ANN and SNN according to claim 1, characterized in that... In step (2), the neuronal activity of CANN is fitted using ANN. The fitting objects include the pre-encoded input, state, and decoded output of CANN. In addition, one-hot encoding and linear interpolation are used to pre-encode the sequence input to ensure that ANN can have the spatial periodicity and response differentiation characteristics of CANN. The specific method is as follows: Given an input in a random sequence, the value, when modulo a certain value, will fall within a certain interval A; establish a simple linear mapping that is bijective to map any value in interval A to the specified interval. From a certain angle, the input vector of the ANN is obtained using one-hot encoding and linear interpolation, as shown in the following formula: ; in, , Refers to the decimal part of C; This operation reduces the difficulty of fitting the differential properties of CANN responses to ANNs, effectively reducing the network structure. The ANN network structure mainly consists of three parts: an input layer, two ReLU-activated fully connected layers, two temporal layers, and two ReLU-activated fully connected layers for time-step state decoding; these are used to fit neuron states and intermediate variables, respectively.

4. The CANN computation acceleration method based on ANN and SNN according to claim 1, characterized in that: Step (3) ANN2SNN is implemented by constructing an improved LIF neuron module. A continuously differentiable gradient substitution function and an adaptive leaky membrane potential update mechanism are designed to replace the traditional activation function in ANN with this module. The specific method is as follows: The gradient substitution function is a continuously differentiable sigmoid function, expressed as: ; In the formula, Let be the neuron membrane potential at time t, and V be the impulse firing threshold, ranging from 0.5 to 2.

0. This is the gradient smoothing coefficient, with a value ranging from 3.0 to 10.0; The calculation formula for the adaptive leakage membrane potential update mechanism is as follows: ; In the formula, The adaptive leakage factor is adjusted within the range of 0.8-0.

99. These are synaptic weights, taken from the layer weight parameters of the pre-trained ANN; The input signal is at time t; The membrane potential reset potential has a value range of 0.0-0.3; s is the pulse output at time t, s=1 indicates pulse delivery, and s=0 indicates no delivery. During the replacement process, all activation layers of the ANN model are traversed, and traditional activation functions such as ReLU and SiLU are replaced one by one with improved LIF neuron modules, while keeping the weight parameters of other layers of the model unchanged.

5. The CANN computation acceleration method based on ANN and SNN according to claim 1, characterized in that: Step (4) implements ANN2SNN by designing an adaptive collaborative quantization module. Based on the distribution range of activation values ​​in each layer of the ANN, the quantization parameters are determined layer by layer, and continuous activation values ​​are mapped to discrete pulse sequences to achieve precise matching between quantization activation and pulse delivery. The specific method is as follows: The formula for calculating the quantization operation function f(·) is: ; In the formula, (·) is the rounding function. (·) is the truncation function, which will... It is restricted to the interval [0,1].