A pulse signal transmission system and method supporting independent latency

By introducing a pulse signal transmission system and method that supports independent time delay in brain simulation, the problems of poor universality and inconsistent time delay settings in the implementation of pulse signal transmission on different hardware in the prior art are solved, and the effect of independent time delay settings on different hardware is consistent with the real brain.

CN117875387BActive Publication Date: 2026-04-24CHINA NANHU ACAD OF ELECTRONICS & INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA NANHU ACAD OF ELECTRONICS & INFORMATION TECH
Filing Date
2023-12-29
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing brain simulation frameworks struggle to implement independent delay settings on different hardware during pulse signal transmission and do not support users setting independent delays for each synaptic connection, resulting in inconsistencies with the real brain.

Method used

A pulse signal transmission system and method supporting independent time delay is provided, including a preneuron cluster module, a pulse signal transmission module and a postneuron cluster module, which encapsulates multiple pulse signal transmission operators, supports independent time delay settings on different hardware, and transmits pulse signals through various synaptic connection rules and structural expressions.

Benefits of technology

It achieves universality of pulse signal transmission across different hardware and allows users to independently set the delay for each synaptic connection, ensuring that the synaptic delay is consistent with the actual situation in the brain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117875387B_ABST
    Figure CN117875387B_ABST
Patent Text Reader

Abstract

The application discloses a kind of independent time delay supported pulse signal transmission system and method, it is related to information processing technical field, it is applied to brain simulation realized by electronic equipment with computing power, the system sequentially includes: front neuron cluster module, pulse signal transmission module and post neuron cluster module;Pulse signal transmission module is encapsulated with multiple pulse signal transmission operators based on synapse connection rule between neurons, for the simulation of pulse signal transmission between front neuron cluster and post neuron cluster;Pulse signal transmission module is provided with multiple interfaces for obtaining the technical parameters required for calling pulse signal transmission operator;Wherein, multiple interfaces include: synapse connection rule, expression form of synapse connection structure, weight information of synapse, time delay information of synapse, neuron number of front neuron cluster, neuron number of post neuron cluster, simulation total time step.The application can be applicable in different hardware systems and each synapse has independent time delay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information processing technology, and in particular to the transmission of pulse signals between anterior and posterior neuron clusters in brain simulation. Background Technology

[0002] Using computers to simulate the activity of hundreds of millions of synapses and neurons in the brain is an important way for researchers to understand brain dynamics, explore the brain's operating mechanisms, and conduct brain science research. We call the act of using computers to simulate the activity of brain synapses and neurons "brain simulation". Starting with the pioneering work in references [1] and [2], researchers have provided many synapse and neuron simulation schemes with biological theoretical support for the field of brain simulation technology.

[0003] With the increasing attention paid to brain science in recent years, the rapid development of neuroscience and computer science, and the upgrading and iteration of computer hardware, many excellent frameworks supporting brain simulation functions have emerged.

[0004] In brain simulation using these frameworks, "pulse signal transmission" is a crucial step. During brain simulation, neurons are interconnected via synapses. A specific neuron may or may not have a synaptic connection. When a neuron emits a pulse signal, the signal is transmitted to other neurons through the synapses extending from that neuron. The network of synapses and neurons built using these brain simulation frameworks is called a "brain simulation network."

[0005] To simulate pulse generation and propagation in a computer, continuous time in the real world is discretized into time steps. During simulation, pulse generation and propagation occur within discrete time steps. The duration between two time steps can be manually set (typically 0.1 milliseconds).

[0006] During the transmission of a pulse signal along a synapse, it is multiplied by a pre-defined weight value and reaches other neurons after a pre-defined time step. The membrane potential of the neuron receiving the signal will change. The time step taken for the signal to travel along the synapse is called the "time delay." In the real brain, each synapse has its own independent time delay value; that is, the time delay values ​​between synapses are independent and do not affect each other.

[0007] In brain simulations, electrical currents are input to some neurons, causing their membrane potentials to exceed a pre-set threshold, thus triggering pulses. These pulses are transmitted to other neurons via synapses, causing changes in their membrane potentials. When the membrane potential exceeds the pre-set threshold, these neurons also pulse, affecting other neurons connected to them. Researchers can observe the changes in membrane potentials and pulse firing patterns of different neurons during the simulation to conduct brain science research. The simulation duration is measured in time steps. If the time step is set to 0.1 milliseconds, and researchers want to observe the results of simulating 0.1 seconds of the real world, the simulation program would run for 1000 time steps.

[0008] To more clearly represent the complex and interconnected vast number of neurons, the field of brain simulation has introduced the concept of "neuronal clusters." A neuron cluster is a collection of several neurons, connected to each other by several synapses. During brain simulation, one neuron cluster emits a pulse signal, which is transmitted to another neuron cluster through synaptic connections. The neuron cluster that emits the pulse signal is called the "pre-neuronal cluster," and the neuron cluster that receives the pulse signal is called the "post-neuronal cluster." Each synapse between two neuron clusters originates from a neuron in the pre-neuronal cluster and connects to a neuron in the post-neuronal cluster. Each synapse corresponds to a pre-defined weight value and a time delay value. The pulse signal transmitted at this synapse is multiplied by the weight value and reaches the corresponding neuron after passing through the time step corresponding to the time delay value.

[0009] References [3], [4], and [5] are three main frameworks that support brain simulation functions.

[0010] After constructing a brain simulation network composed of synapses and neurons using the frameworks in references [3] and [4], users can independently set the delay for each synaptic connection in the brain simulation network, which is consistent with the real situation of the brain. In the real brain, the delay values ​​corresponding to synaptic connections are independent of each other and do not affect each other. The pulse signal transmission methods proposed by both frameworks describe the process of a pulse emitted by a single neuron being transmitted to other connected neurons through the synapses connected from that neuron. The pulse signal transmission method proposed by the framework in reference [3] is based on the idea of ​​CPU multithreading. When implementing this method, C++ multithreaded code is required, and it can only be implemented on the CPU. The pulse signal transmission method proposed by the framework in reference [4] is based on the idea of ​​GPU multithreading. When implementing this method, CUDA code is required, and it can only be implemented on the GPU. In summary, the pulse signal transmission methods proposed by both frameworks are difficult to implement on different hardware.

[0011] After constructing the brain simulation network using the framework in Reference [5], all synaptic connections from the same neuron in the preneuron cluster can only have the same time delay value. That is, the time delay values ​​corresponding to all synaptic connections from the same neuron are not independent of each other. Therefore, the framework in Reference [5] does not support users setting the time delay independently for each synaptic connection when transmitting pulse signals, which is inconsistent with the real situation. The pulse signal transmission method proposed in the framework of Reference [5] describes the process of pulses emitted by the preneuron cluster being transmitted to the postneuron cluster through the synapse between two neuron clusters. This method can be implemented on different hardware.

[0012] The references cited in this invention are as follows:

[0013] Literature[1]: Hodgkin AL, Huxley A FA quantitative description of membranecurrent and its application to conduction and excitation in nerve[J].TheJournal of physiology,1952,117(4):500;

[0014] Literature [2]: Segev I, Rinzel J, Shepherd G M. The Theoretical Foundations of Dendritic Function: The Collected Papers of Wilfrid Rall with Commentaries (Computational Neuroscience) [J]. 1994;

[0015] Document [3]: Gewaltig MO, Diesmann M. Nest (neural simulation tool) [J]. Scholarpedia, 2007, 2 (4): 1430;

[0016] Literature [4]: ​​Golosio B, Tiddia G, De Luca C, et al. Fast simulations of highly-connected spiking cortical models using GPUs [J]. Frontiers in Computational Neuroscience, 2021, 15: 627620;

[0017] Literature [5]: Wang C, Chen Summary of the Invention

[0018] The purpose of this invention is to overcome the deficiencies of the prior art.

[0019] This invention provides a pulse signal transmission system supporting independent time delay, applied in brain simulation implemented by a computing-capable electronic device. The system sequentially comprises: a pre-neuron cluster module, a pulse signal transmission module, and a post-neuron cluster module; wherein,

[0020] The preneuron cluster consists of P neurons; where P is greater than or equal to 1.

[0021] The postneuron cluster consists of Q neurons; where Q is greater than or equal to 1.

[0022] The pulse signal transmission module encapsulates multiple pulse signal transmission operators based on synaptic connection rules between neurons, used for simulating pulse signal transmission between pre- and post-neuron clusters. The module provides multiple interfaces for obtaining the technical parameters required to invoke the pulse signal transmission operators; these interfaces include: the synaptic connection rule (Rule), the synaptic connection structure expression (Repr), and the synaptic weight information (W). user Synaptic delay information D user The number of neurons in the preneuron cluster P, the number of neurons in the postneuron cluster Q, and the total simulation time steps T.

[0023] Furthermore, the synaptic connection rules between neurons include: a one-to-one connection rule between neurons in two neuron clusters (One2One); a rule that every neuron in the pre-neuron cluster connects to all neurons in the post-neuron cluster (All2All); and custom connection rules, which allow users to specify the number of synaptic connections between two neuron clusters, the probability of connections between neurons in two neuron clusters, and also allow users to directly specify the specific synaptic connection structure.

[0024] Furthermore, the synaptic connection structure is expressed in the following three forms:

[0025] 'mat' uses matrix M to represent the structure of synaptic connections between two neuron clusters: the number of rows m of the matrix represents the number of neurons in the pre-neuron cluster, and the number of columns represents the number of neurons in the post-neuron cluster; if the element in the i-th row and j-th column of the matrix M ij A value of 1 indicates that there is a synaptic connection between the i-th neuron of the preneuron cluster and the j-th neuron of the postneuron cluster. If M ij A value of 0 indicates that there is no connection between the two neurons;

[0026] 'coo' uses two vectors to represent the structure of synaptic connections: one vector is the ID of the pre-neuron cluster neurons corresponding to all synapses between neuron clusters, denoted as pre_ids; the other vector is the ID of the post-neuron cluster neurons corresponding to all synapses between neuron clusters, denoted as post_ids.

[0027] The 'csr' form is derived from 'coo': the pre_ids under the 'coo' form are sorted in ascending order, and the order of post_ids is changed accordingly after the pre_ids are sorted; the 'csr' form uses two vectors to represent the synaptic connection structure: one vector is the sorted post_ids; the other vector is denoted as pre_indptr, and its length is the number of neurons in the preneuron cluster plus 1; when the i-th element of pre_indptr is the same as the (i+1)-th element, the i-th neuron in the preneuron cluster has no synaptic connection to the postneuron cluster.

[0028] Furthermore, the pulse signal transmission module encapsulates five pulse signal transmission operators based on synaptic connection rules and synaptic connection structure expressions: event_one2one, event_all2all, event_mat, event_coo, and event_csr. The pulse signal transmission module determines the pulse signal transmission operator to be invoked based on the acquired synaptic connection rules (Rule) and synaptic connection structure expressions (Repr).

[0029] When the acquired synaptic connection rule is a rule corresponding to a one-to-one connection between neurons in two neuron clusters (One2One), the pulse signal transmission operator to be called is determined to be event_one2one;

[0030] When the acquired synaptic connection rule is an All2All rule that connects each neuron in the anterior neuron cluster to all neurons in the posterior neuron cluster, the pulse signal transmission operator to be called is determined to be event_all2all.

[0031] When the obtained synaptic connection rule Rule is a custom rule and the expression form of the synaptic connection structure Repr is 'mat', the pulse signal transmission operator to be called is determined to be event_mat;

[0032] When the obtained synaptic connection rule Rule is a custom rule and the expression form of the synaptic connection structure Repr is 'coo', the pulse signal transmission operator to be called is determined to be event_coo;

[0033] When the obtained synaptic connection rule is a custom rule and the expression form of the synaptic connection structure, Repr, is 'csr', the pulse signal transmission operator to be called is determined to be event_csr.

[0034] This invention also provides a pulse signal transmission method supporting independent time delay, applied in brain simulation implemented by a computing-capable electronic device, implemented by the pulse signal transmission system supporting independent time delay as described above, and the method includes the following steps:

[0035] Step 1: Obtain the number of neurons P in the preneuron cluster, the number of neurons Q in the postneuron cluster, the synaptic connection rule (Rule) between the preneuron cluster and the postneuron cluster, the expression form of the synaptic connection structure (Repr), and the synaptic weight information W. user Synaptic delay information D user The total simulation time step T;

[0036] Step 2: Based on the obtained synaptic connection rules (Rule) and the expression form of the synaptic connection structure (Repr), determine the pulse signal transmission operator to be invoked;

[0037] Step 3, based on the obtained synaptic weight information W user Synaptic delay information D user The weight information W and time delay information D required for the pulse signal transmission operator to operate;

[0038] Step 4: Set the initial value of the loop counter RC to 0; set the initial value of the target buffer TB to a vector of length (max(D)+1)*Q with all elements equal to 0; set the initial value of the simulation time step t to 0, where max(D) represents the maximum value of the elements in the delay information D;

[0039] Step 5: Obtain the pulses Sp emitted by the preneuron cluster;

[0040] Step 6: Based on the determined synaptic connection rules and synaptic structure expression, call different pulse signal transmission operators to obtain the pulse signal that the next neuron cluster should receive at the current moment, which is used to update the membrane potential of the neurons in the next neuron cluster.

[0041] Step 7: Let t = t + 1, and determine whether the simulation time step t is less than the total simulation time step T. If the simulation time step t is less than the total simulation time step T, return to step 5; if the simulation time step t is greater than or equal to the total simulation time step T, end the run.

[0042] Furthermore, in step 3, when W user D user When the data meets the requirements of the pulse signal transmission operator, W user D user Equivalent to W and D; when W user D user When the user specifies the data generation rules, W and D are automatically generated according to the given data generation rules to meet the requirements of the operator.

[0043] Furthermore, in step 5, the pulse Sp emitted by the pre-neuron cluster is a vector of length P, which consists of 0 and 1. When the i-th neuron of the current neuron cluster emits a pulse at the current time step, the i-th element of Sp is 1; if no pulse is emitted, the element is 0.

[0044] Furthermore, in step 6, when the pulse signal transmission operator called is event_one2one, obtaining the pulse signal that the neuron cluster should receive after the current time specifically includes the following steps:

[0045] Step 6101, calculate the vector delta to be accumulated in the target cache TB:

[0046] delta = Sp * W;

[0047] Step 6102, calculate the index vector indices of the elements of the TB to be updated:

[0048] indices=(RC+D)%(max(D)+1)*Q+arange(Q)

[0049] In the formula, RC+D means that each element in D is added to RC to obtain a new vector, and arange(Q) is used to generate a vector that starts from 0, with adjacent elements differing by 1 and increasing in length. The vector has a length of Q and the last element is Q-1.

[0050] Step 6103, Update target cache TB:

[0051] TB[indices]+=delta

[0052] In the formula, TB[indices] represents the elements in TB specified by indices as indices. The number of these elements is the same as the length of the vector delta. The formula means to accumulate the vector delta by adding the elements in TB specified by indices.

[0053] Step 6104: Select the target vector TV from the target cache:

[0054] TV = TB[RC*Q:(RC+1)*Q-1]

[0055] The formula means that the elements with indices RC*Q to (RC+1)*Q-1 in TB are selected as the target vector TV. After obtaining TV, it means that the pulse signal transmitted to the post-neuron cluster at the current time step has been obtained.

[0056] Step 6105: Set the selected elements in the target cache to 0.

[0057] TB[RC*Q:(RC+1)*Q-1]=0

[0058] The formula means that all elements in TB with indices from RC*Q to (RC+1)*Q-1 are 0;

[0059] Step 6106, update the loop counter RC:

[0060] RC = (RC+1)%(max(D)+1).

[0061] Furthermore, in step 6, when the invoked pulse signal transmission operator is event_all2all, obtaining the pulse signal that the neuron cluster should receive after the current time step specifically includes the following steps:

[0062] Step 6201: Initialize the number of neurons in the traversed pre-neuron clusters and add 1 to the value m, let m = 1;

[0063] Step 6202, calculate the vector delta to be accumulated in the target cache TB:

[0064] delta = Sp m *W m

[0065] In the formula, Sp m W represents the m-th element in Sp. m This represents the data in the m-th row of W;

[0066] Step 6203, calculate the index vector indices of the elements of the TB to be updated:

[0067] indices=(RC+D m)%(max(D)+1)*Q+arange(Q)

[0068] In the formula, D m This represents the data in the m-th row of D;

[0069] Step 6204, Update target cache TB:

[0070] TB[indices]+=delta

[0071] Step 6205, update m: m = m + 1. When m is greater than the number of neurons P in the pre-neuron cluster, execute step 6206. When m is less than or equal to the number of neurons P in the pre-neuron cluster, execute step 6202.

[0072] Step 6206: Select the target vector TV from the target cache:

[0073] TV = TB[RC*Q:(RC+1)*Q-1]

[0074] The formula means that the elements with indices RC*Q to (RC+1)*Q-1 in TB are selected as the target vector TV. After obtaining TV, it means that the pulse signal transmitted to the post-neuron cluster at the current time step has been obtained.

[0075] Step 6207: Set the selected elements in the target cache to 0.

[0076] TB[RC*Q:(RC+1)*Q-1]=0

[0077] The formula means that all elements in TB with indices from RC*Q to (RC+1)*Q-1 are 0;

[0078] Step 6208, update the loop counter RC:

[0079] RC = (RC+1)%(max(D)+1).

[0080] The event_all2all operator converts steps 6201 to 6205 into parallel execution on the GPU.

[0081] Furthermore, in step 6, when the pulse signal transmission operator called is event_mat, obtaining the pulse signal that the neuron cluster should receive after the current time specifically includes the following steps:

[0082] Step 6301: Initialize the number of neurons in the traversed pre-neuron clusters and add 1 to the value m, let m = 1;

[0083] Step 6302, calculate the vector delta to be accumulated in the target cache TB:

[0084] delta = Sp m *W m *M m

[0085] In the formula, Sp m M represents the m-th element in Sp. m W represents the data in the m-th row of matrix M. m This represents the data in the m-th row of W;

[0086] Step 6303, calculate the index vector indices of the elements of the TB to be updated:

[0087] indices=(RC+D m )%(max(D)+1)*Q+arange(Q)

[0088] Step 6304, Update target cache TB: Update target cache TB:

[0089] TB[indices]+=delta

[0090] Step 6305, update m: m = m + 1. When m is greater than the number of neurons P in the pre-neuron cluster, execute step 6306. When m is less than or equal to the number of neurons P in the pre-neuron cluster, execute step 6302.

[0091] Step 6306: Select the target vector TV from the target cache:

[0092] TV = TB[RC*Q:(RC+1)*Q-1]

[0093] The formula means that the elements with indices RC*Q to (RC+1)*Q-1 in TB are selected as the target vector TV. After obtaining TV, it means that the pulse signal transmitted to the post-neuron cluster at the current time step has been obtained.

[0094] Step 6307: Set the selected elements in the target cache to 0.

[0095] TB[RC*Q:(RC+1)*Q-1]=0

[0096] The formula means that all elements in TB with indices from RC*Q to (RC+1)*Q-1 are 0;

[0097] Step 6308, update the loop counter RC:

[0098] RC = (RC+1)%(max(D)+1).

[0099] The event_mat operator converts steps 6301 to 6305 into parallel execution on the GPU.

[0100] Furthermore, in step 6, when the invoked pulse signal transmission operator is event_coo, obtaining the pulse signal that the neuron cluster should receive after the current time step specifically includes the following steps:

[0101] Step 6401: Based on the neuron cluster pulse firing status before the current time step, generate a vector unroll_Sp that marks the neuron pulse firing status corresponding to each element in pre_ids;

[0102] Step 6402, calculate the vector delta to be accumulated in the target cache TB:

[0103] delta = unroll_Sp*W

[0104] Step 6403, calculate the index vector indices of the elements of the TB to be updated:

[0105] indices=(RC+D)%(max(D)+1)*Q+post_ids

[0106] Where post_ids represents the IDs of all neurons in the postneuron cluster corresponding to the synapses between the preneuron cluster and the postneuron cluster;

[0107] Step 6404, Update target cache TB:

[0108] TB[indices]+=delta;

[0109] Step 6405: Select the target vector TV from the target cache:

[0110] TV = TB[RC*Q:(RC+1)*Q-1]

[0111] The formula means that the elements with indices RC*Q to (RC+1)*Q-1 in TB are selected as the target vector TV. After obtaining TV, it means that the pulse signal transmitted to the post-neuron cluster at the current time step has been obtained.

[0112] Step 6406: Set the selected elements in the target cache to 0.

[0113] TB[RC*Q:(RC+1)*Q-1]=0

[0114] The formula means that all elements in TB with indices from RC*Q to (RC+1)*Q-1 are 0;

[0115] Step 6407, update the loop counter RC:

[0116] RC = (RC+1)%(max(D)+1).

[0117] Furthermore, when the pulse signal transmission operator called is event_csr, obtaining the pulse signal that the neuron cluster should receive after the current time step specifically includes the following steps:

[0118] Step 6501: Initialize the number of neurons in the traversed pre-neuron clusters and add 1 to the value m, let m = 1;

[0119] Step 6502: Initialize the number of synaptic connections between the m-th neuron that has been traversed and the preceding neuron cluster and add 1 to the value n, so that n = 1;

[0120] Step 6503: Determine whether all synaptic connections from the m-th neuron have been traversed based on n. If not, proceed to step 6504; if they have been traversed, proceed to step 6507.

[0121] Step 6504, calculate the index k of the element of TB to be updated when the pulse is transmitted through the nth synaptic connection:

[0122] k=(RC+D mn )%(max(D)+1)*Q+post_ids[pre_indptr m +n-1]

[0123] In the formula, D mn pre_indptr represents the time delay value corresponding to the nth synaptic connection from the mth neuron. m This represents the m-th element in the vector pre_indptr;

[0124] Step 6505, update the target cache TB, the update formula is:

[0125] TB[k]+=Sp m *W mn

[0126] In the formula, W mn This represents the weight value corresponding to the nth synaptic connection originating from the mth neuron;

[0127] Step 6506, update n: n = n + 1, then execute step 6503;

[0128] Step 6507, update m: m = m + 1. When m is greater than the number of neurons P in the pre-neuron cluster, execute step 6508. When m is less than or equal to the number of neurons P in the pre-neuron cluster, execute step 6502.

[0129] Step 6508: Select the target vector TV from the target cache:

[0130] TV = TB[RC*Q:(RC+1)*Q-1]

[0131] The formula means that the elements with indices RC*Q to (RC+1)*Q-1 in TB are selected as the target vector TV. After obtaining TV, it means that the pulse signal transmitted to the post-neuron cluster at the current time step has been obtained.

[0132] Step 6509: Set the selected elements in the target cache to 0.

[0133] TB[RC*Q:(RC+1)*Q-1]=0

[0134] The formula means that all elements in TB with indices from RC*Q to (RC+1)*Q-1 are 0;

[0135] Step 6510, update the loop counter RC:

[0136] RC = (RC+1)%(max(D)+1).

[0137] The event_csr operator converts steps 6501 to 6507 into parallel execution on the GPU.

[0138] The present invention also provides an electronic device, the electronic device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the pulse signal transmission method supporting independent time delay as described above.

[0139] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of a pulse signal transmission method supporting independent time delay as described above.

[0140] The pulse signal transmission system and method of the present invention can be implemented on different hardware, which solves the defect that the pulse signal transmission method in the prior art can only be implemented on one type of hardware and has poor versatility. The pulse signal transmission system and method of the present invention also support users to set the delay for each synaptic connection independently, which solves the defect that the prior art does not support this function, so that the setting of synaptic delay is consistent with the actual situation in the brain. Attached Figure Description

[0141] Figure 1 This is a schematic diagram of two interconnected clusters of neurons;

[0142] Figure 2 This is the 'mat' expression for the synaptic connection structure (St) of the present invention;

[0143] Figure 3This is the 'coo' expression of the synaptic connection structure (St) of the present invention;

[0144] Figure 4 This is the 'csr' expression for the synaptic connection structure (St) of the present invention;

[0145] Figure 5 This is a flowchart of the pulse signal transmission method of the present invention;

[0146] Figure 6 Here is a flowchart of the event_one2one operator's workflow;

[0147] Figure 7 Here is a flowchart of the event_all2all operator's workflow;

[0148] Figure 8 Here is a flowchart of the event_mat operator's workflow;

[0149] Figure 9 Here is a flowchart of the event_coo operator's workflow;

[0150] Figure 10 Here is a flowchart of the event_csr operator's workflow;

[0151] Figure 11 This is a schematic diagram illustrating two neuron clusters in the pulse signal transmission method flow of the present invention;

[0152] Figure 12 This is a simplified flowchart of the first simulation time step of the pulse signal transmission system of the present invention;

[0153] Figure 13 This is a simplified flowchart of the second simulation time step of the pulse signal transmission system of the present invention;

[0154] Figure 14 These are the experimental results of the event_one2one operator of this invention;

[0155] Figure 15 These are the experimental results of the event_all2all operator of this invention;

[0156] Figure 16 These are the experimental results of the event_mat operator of this invention;

[0157] Figure 17 These are the experimental results of the event_coo operator of this invention;

[0158] Figure 18 These are the experimental results of the event_csr operator of this invention;

[0159] Figure 19This is a schematic diagram of the structure of the electronic device of the present invention. Detailed Implementation

[0160] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings.

[0161] Figure 1 The diagram illustrates two interconnected clusters of neurons: the first cluster contains P neurons, and the second cluster contains Q neurons. Each white circle in a cluster represents a single neuron, and the number within the circle represents the neuron's index value, sometimes simply referred to as id, starting from 0. If an element is the first element in the index vector, its index value (id) is 0. There is no term like "the 0th element," nor are there terms like "the 0th row" or "the 0th neuron." One-way arrows between the circles represent synaptic connections.

[0162] When constructing brain simulation networks, similar to Figure 1 The synaptic connections are generated according to certain rules. The synaptic connection rules of this invention are:

[0163] 1. The rule of one-to-one connections between neurons in two clusters of neurons;

[0164] 2. The rule that every neuron in the first neuron cluster connects to every neuron in the second neuron cluster (All2All);

[0165] 3. Customize connection rules.

[0166] The One2One connection rule requires that the number of neurons in two neuron clusters be equal. According to this rule, the number of synaptic connections generated between the two neuron clusters is the same as the number of neurons in a single neuron cluster. Each neuron in the first neuron cluster has one synapse, and each neuron in the second neuron cluster has one and only one synapse connected to itself. The neurons in the two neuron clusters form a one-to-one correspondence.

[0167] The All2All connection rule requires that between two neuron clusters, every neuron in the former cluster is connected to all neurons in the latter cluster.

[0168] Custom connection rules allow users to specify the number of synaptic connections between two neuron clusters, the probability of connections between neurons in two neuron clusters, and also allow users to directly specify specific synaptic connection structures.

[0169] Figure 1The multiple black arrows represent synaptic connections (St) between two clusters of neurons, providing a graphical representation of synaptic connections. This invention defines three representations of synaptic connections (St), Repr, whereby the same synaptic connection can be expressed in these three forms:

[0170] 1. 'mat': Uses a matrix to represent the structure of synaptic connections between two clusters of neurons;

[0171] 2. 'coo' (coordinate): Uses two vectors to represent the structure of a synaptic connection;

[0172] 3. 'csr' (compressed sparse row): Derived from 'coo', it uses two vectors to represent the connection structure of a synapse.

[0173] 'mat' uses a matrix M to represent the structure of synaptic connections between two neuron clusters. The number of rows in the matrix represents the number of neurons in the pre-neuron cluster, and the number of columns represents the number of neurons in the post-neuron cluster. If the element in the i-th row and j-th column of the matrix is ​​M... ij A value of 1 indicates that there is a synaptic connection between the i-th neuron of the preneuron cluster and the j-th neuron of the postneuron cluster. If M ij A value of 0 indicates that there is no connection between the two neurons. This is a dense representation. Figure 2 The matrix is Figure 1 The 'mat' representation of the synaptic connection structure, where the start label of each row is the neuron ID of the pre-neuron cluster, and the start label of each column is the neuron ID of the post-neuron cluster. The start labels are used here only for convenience. Figure 1 Correspondingly, it does not belong to the matrix.

[0174] The 'coo' (coordinate) function uses two vectors to represent the structure of synaptic connections: one vector, denoted as `pre_ids`, represents the IDs of neurons in the pre-neuron cluster corresponding to all synapses between neuron clusters. If a neuron in the pre-neuron cluster has `n` synaptic connections to a neuron in the post-neuron cluster, its ID will appear `n` times in `pre_ids`. Therefore, the length of `pre_ids` is equal to the total number of synaptic connections between the two neuron clusters. The other vector, denoted as `post_ids`, represents the IDs of neurons in the post-neuron cluster corresponding to all synapses between neuron clusters. Similarly, if a neuron in the post-neuron cluster is pointed to by `n` synaptic connections, its ID will appear `n` times in `post_ids`. Therefore, the length of `post_ids` is equal to the total number of synaptic connections between the two neuron clusters. For example... Figure 3As shown, the first element of `pre_ids` is '0', and the first element of `post_ids` is '1'. This indicates that there is a synaptic connection between the neuron with 'id' of '0' in the pre-neuron cluster and the neuron with 'id' of '1' in the post-neuron cluster. Therefore, the two elements at the same position in `pre_ids` and `post_ids` can jointly represent one synaptic connection, as shown below. Figure 3 As shown in the figure, each column represents one synaptic connection.

[0175] The 'CSR' (compressed sparse row) representation is derived from 'COO'. First, the pre_ids in the 'COO' representation are sorted in ascending order. Since there is a correspondence between pre_ids and post_ids, the order of post_ids changes accordingly after sorting the pre_ids. The 'CSR' form uses two vectors to represent the synaptic connection structure: one vector is the sorted post_ids; the other vector is denoted as pre_indptr, with a length equal to the number of neurons in the preneuron cluster plus one. The i-th element of pre_indptr is pre_indpth. i This means that the index of the post-neuron corresponding to the first synapse from the i-th neuron of the pre-neuron cluster is in the sorted post_ids. The last element of pre_indptr is the index of the post corresponding to the last synapse from the last neuron of the pre-neuron cluster plus 1. Furthermore, it is stipulated that when the i-th element of pre_indptr is the same as the (i+1)-th element, it means that the i-th neuron of the pre-neuron cluster has no synaptic connection to the post-neuron cluster.

[0176] by Figure 3 For example, Figure 3 The `pre_ids` values ​​have been sorted. The second neuron in the preneuron cluster has an ID of 1, and its first synapse corresponds to... Figure 3 In column 3, the postneuron ID corresponding to the synapse is 0, and its index in post_ids is 2 (index values ​​start from 0). Therefore, Figure 4 In the previous section, `pre_indptr2` is 2; the last neuron in the preneuron cluster has an ID of 2, and its last synapse corresponds to... Figure 3 In column 5, the synapse corresponds to a postneuron id of 2, which has an index of 4 in post_ids. Therefore... Figure 4 The last element of pre_indptr is 5.

[0177] All three of the above representations can express the synaptic connection structure (St). Based on the synaptic connection structure (St) in any representation, the index value of the neuron in the postneuron cluster to which the synapse from any preneuron cluster neuron is connected can be known.

[0178] Based on the aforementioned preneuron clusters, postneuron clusters, and the defined synaptic connection rules and synaptic connection structure (St) expression forms, this invention proposes a pulse signal transmission system supporting independent time delays. This system is applied to brain simulations implemented using computationally capable electronic devices. The system sequentially comprises: a preneuron cluster module, a pulse signal transmission module, and a postneuron cluster module; wherein...

[0179] The preneuron cluster consists of P neurons; where P is greater than 1.

[0180] The postneuron cluster consists of Q neurons; where Q is greater than 1.

[0181] The pulse signal transmission module encapsulates multiple pulse signal transmission operators based on synaptic connection rules between neurons, used for simulating pulse signal transmission between pre- and post-neuron clusters. The module provides multiple interfaces for obtaining the technical parameters required to invoke the pulse signal transmission operators; these interfaces include: the synaptic connection rule (Rule), the synaptic connection structure expression (Repr), and the synaptic weight information (W). user Synaptic delay information D user The number of neurons in the preneuron cluster P, the number of neurons in the postneuron cluster Q, and the total simulation time steps T.

[0182] The encapsulated multiple pulse signal transmission operators can specifically be five pulse signal transmission operators. These five pulse signal transmission operators are: event_one2one, event_all2all, event_mat, event_coo, and event_csr. The pulse signal transmission system automatically calls the corresponding operators based on the synaptic connection rules and synaptic connection structure expression provided by the user, realizing the transmission of pulse signals between neuron clusters.

[0183] Within a single time step during brain simulation, when any two connected preceding and following neuronal clusters transmit pulse signals via synaptic connections, the pulse signal transmission system invokes the pulse signal transmission operator once. After being invoked, the pulse signal operator returns the pulse signal that the following neuronal cluster should receive at the current time, ensuring correct pulse signal transmission. The signal arriving at the following neuronal cluster is used to update the membrane potentials of all neurons in the cluster.

[0184] Figure 5 The flowchart of the pulse signal transmission method supporting independent time delay of the present invention is shown. Figures 6 to 10 The detailed workflow of each pulse signal transmission operator in this invention is illustrated. For example... Figure 5 As shown, the method of the present invention includes the following steps:

[0185] Step S1: The user inputs the synaptic connection rules (Rule) between the preceding and following neuronal clusters, the expression form of the synaptic connection structure (Repr), and the synaptic weight information (W) into the pulse signal transmission system. user Synaptic delay information W user Number of neurons in the preneuron cluster P, number of neurons in the postneuron cluster Q, and total simulation time steps T;

[0186] Step S2: Determine the synaptic connection rule. If the connection rule is One2One or All2All, proceed to step S7. If the connection rule is a custom connection rule, proceed to step S3.

[0187] Step S3: Determine the expression form of the synaptic connection structure. If it is 'mat', proceed to step S4; if it is 'coo', proceed to step S5; if it is 'csr', proceed to step S6.

[0188] Step S4: Generate St in 'mat' form according to the custom connection rule, represented by matrix M, and then execute step S7;

[0189] Step S5: Generate St in the form of 'coo' according to the custom connection rule, represented by two vectors pre_ids and post_ids, and then execute step S7;

[0190] Step S6: Generate St in 'csr' form according to the custom connection rule, represented by two vectors post_ids and pre_indptr, and then execute step S7;

[0191] Step S7: Based on the weight information W input by the user user Delay information D user The weight information W and time delay information D required for the pulse signal transmission operator to operate;

[0192] Step S8: Set the initial value of the loop counter to 0; set the initial value of the target cache TB to a vector of length (max(D)+1)*Q with all elements being 0;

[0193] Step S9: Let t = 0, where t represents the current simulation time step that has been executed;

[0194] Step S10: The pulse signal transmission system acquires the pulses Sp fired by the pre-neuron cluster;

[0195] Step S11: Call different operators according to the current connection rule and synaptic structure expression. If the current connection rule is One2One, execute step S12. If the current connection rule is All2All, execute step S13. If the current connection rule is a custom connection rule and the synaptic structure expression is 'mat', execute step S14. If the current connection rule is a custom connection rule and the synaptic structure expression is 'coo', execute step S15. If the current connection rule is a custom connection rule and the synaptic structure expression is 'csr', execute step S16.

[0196] Step S12: Call the event_one2one operator. After the operator finishes its work, proceed to step S17.

[0197] Step S13: Call the event_all2all operator. After the operator finishes its work, proceed to step S17.

[0198] Step S14: Call the event_mat operator. After the operator finishes its work, proceed to step S17.

[0199] Step S15: Call the event_coo operator. After the operator finishes its work, proceed to step S17.

[0200] Step S16: Call the event_csr operator. After the operator finishes its work, proceed to step S17.

[0201] Step S17: Update t: t = t + 1. Determine if t is less than the total simulation time step T set by the user. If it is less, execute step S10. If it is not less, end the run.

[0202] In step S7, the user-input weight information W user Delay information W user It can be data that directly meets the requirements of the pulse signal transmission operator, or it can be data generated according to user-specified rules, such as generating data according to a certain probability distribution or a specific function passed in by the user. When W user D user When the data meets the requirements for the operator to function, W user D user Equivalent to W and D; when W user D userThese are the user-specified data generation rules. The pulse signal transmission system will automatically generate W and D according to the given rules, which meet the requirements for the operator's operation. When the current connection rule is One2One, W and D are vectors of length P or Q (where P = Q); when the current connection rule is All2All, W and D are matrices of length P and column Q; when the current connection rule is a custom connection rule and the synaptic structure is expressed as 'mat', W and D are matrices of length P and column Q; when the current connection rule is a custom connection rule and the synaptic structure is expressed as 'coo', W and D are vectors of length equal to pre_ids; when the current connection rule is a custom connection rule and the synaptic structure is expressed as 'csr', W and D are vectors of length equal to pre_ids.

[0203] In step S8, max(D) represents the maximum value of the elements in D.

[0204] In step S10, the pulse Sp emitted by the pre-neuron cluster is a vector of length P, which consists of 0 and 1. When the i-th neuron of the current neuron cluster emits a pulse at the current time step, the i-th element of Sp is 1. If no pulse is emitted, the element is 0.

[0205] In step S12, the workflow of the event_one2one operator includes:

[0206] S1201 calculates the vector delta to be accumulated in the target cache TB, using the following formula:

[0207] delta = Sp * W

[0208] In the formula, Sp and W are two vectors of equal length. The formula means that vectors Sp and W are multiplied by their corresponding elements to obtain vector delta. In subsequent formulas, there is a binary operator between the two vectors, which means that the binary operator is executed on the corresponding elements of the two vectors to obtain a new vector. This will not be explained in detail again.

[0209] S1202 calculates the index vector `indices` of the elements in the TB to be updated, using the following formula:

[0210] indices=(RC+D)%(max(D)+1)*Q+arange(Q)

[0211] In the formula, RC is a scalar, D is a vector, and RC+D means that each element in D is added to RC to obtain a new vector. In the subsequent formulas, there is a binary operator between the scalar and the vector, which means that each element in the vector is added to the scalar to obtain a new vector. This will not be explained in detail. arange(Q) generates a vector that starts from 0, with adjacent elements differing by 1 and increasing in length. The vector length is Q and the last element is Q-1.

[0212] S1203 updates the target cache TB, and the update formula is:

[0213] TB[indices]+=delta

[0214] In the formula, TB[indices] represents the elements in TB specified by indices as indices. The number of these elements is the same as the length of the vector delta. The formula means to accumulate the vector delta by adding the elements in TB specified by indices.

[0215] S1204 selects the target vector TV from the target cache, and the formula for obtaining TV is:

[0216] TV = TB[RC*Q:(RC+1)*Q-1]

[0217] The formula indicates that elements with indices RC*Q to (RC+1)*Q-1 in TB are selected (the expression in the formula includes two elements with indices RC*Q and (RC+1)*Q-1, and no further explanation is needed). These elements are copied out as the target vector TV. TV can be used to update the membrane potential of neurons in the post-neuron cluster. Updating the membrane potential is not part of the pulse signal transmission system. After obtaining TV, it means that the pulse signal transmitted to the post-neuron cluster at the current time step has been obtained.

[0218] S1205 sets the selected elements in the target cache to 0, using the following formula:

[0219] TB[RC*Q:(RC+1)*Q-1]=0

[0220] The formula means that all elements in TB with indices from RC*Q to (RC+1)*Q-1 are 0.

[0221] S1206 updates the loop counter RC using the following formula:

[0222] RC = (RC + 1) % (max(D) + 1)

[0223] In step S13, the workflow of the event_all2all operator includes:

[0224] S1301 Let m = 1, where m represents the number of neurons in the traversed pre-neuron clusters plus 1. In the initial state, the neurons in the pre-neuron clusters have not been traversed, so the number of neurons in the traversed neuron clusters is 0, and the initial value of m is 1.

[0225] S1302 calculates the vector delta to be accumulated in the target cache TB, using the following formula:

[0226] delta = Sp m *W m

[0227] In the formula, Sp m W represents the m-th element in Sp, which is a scalar. m The data in the m-th row of W is a vector;

[0228] S1303 calculates the index vector `indices` of the elements in the TB to be updated, using the following formula:

[0229] indices=(RC+D m )%(max(D)+1)*Q+arange(Q)

[0230] In the formula, D m The data in the m-th row of D is represented by a vector;

[0231] S1304 updates the target cache TB, and the update formula is:

[0232] TB[indices]+=delta

[0233] S1305 Update m: m = m + 1. When m is greater than the number of neurons P in the pre-neuron cluster, execute step 1306. When m is less than or equal to the number of neurons P in the pre-neuron cluster, execute step 1302.

[0234] S1306 selects the target vector TV from the target cache, the same as S1204;

[0235] S1307 sets the selected elements in the target cache to 0, the same as S1205;

[0236] S1308 updates the cycle counter RC, the same as S1206.

[0237] In step S13, the event_all2all operator converts steps S1301 to S1305 into parallel execution on the GPU.

[0238] In step S14, the workflow of the event_mat operator includes:

[0239] S1401, with m = 1, is the same as S1301;

[0240] S1402 calculates the vector delta to be accumulated in the target cache TB, using the following formula:

[0241] delta = Sp m *W m *M m

[0242] In the formula, M m The data in the m-th row of matrix M is represented by a vector.

[0243] S1403 calculates the index vector indices of the elements of the TB to be updated, which is the same as S1303;

[0244] S1404 updates the target cache TB, and the update formula is:

[0245] TB[indices]+=delta

[0246] S1405 Update m: m = m + 1. When m is greater than the number of neurons P in the pre-neuron cluster, execute step 1406. When m is less than or equal to the number of neurons P in the pre-neuron cluster, execute step 1402.

[0247] S1406 selects the target vector TV from the target cache, the same as S1204;

[0248] S1407 sets the selected elements in the target cache to 0, the same as S1205;

[0249] S1408 updates the loop counter RC, the same as S1206.

[0250] In step S14, the event_mat operator converts steps S1401 to S1405 into parallel execution on the GPU.

[0251] In step S15, the workflow of the event_coo operator includes:

[0252] S1501 generates a vector unroll_Sp that marks the firing status of each neuron in pre_ids based on the firing status of the previous neuron cluster at the current time step. For example, if the neuron with index i in the previous neuron cluster fires a pulse at the current time step, then all elements in pre_ids with value i are set to 1. If no pulse is fired, then all are set to 0. Based on the firing status of each neuron in the previous neuron cluster, pre_ids is set to 1 or 0, and finally unroll_Sp is obtained.

[0253] S1502 calculates the vector delta to be accumulated in the target cache TB using the following formula:

[0254] delta = unroll_Sp*W

[0255] S1503 calculates the index vector `indices` of the elements in the TB to be updated, using the following formula:

[0256] indices=(RC+D)%(max(D)+1)*Q+post_ids

[0257] S1504 updates the target cache TB, and the update formula is:

[0258] TB[indices]+=delta

[0259] S1505 selects the target vector TV from the target cache, the same as S1204;

[0260] S1506 sets the selected elements in the target cache to 0, the same as S1205;

[0261] S1507 updates the cycle counter RC, the same as S1206.

[0262] In step S16, the workflow of the event_csr operator includes:

[0263] S1601, with m = 1, is the same as S1301;

[0264] S1602 Let n = 1, where n represents the number of synaptic connections between the m-th neuron and the two neuron clusters, plus 1. In the initial state, no synaptic connections have been traversed, so the number of synaptic connections between the m-th neuron and the two neuron clusters is 0, and the initial value of n is 1.

[0265] S1603 determines whether all synaptic connections from the m-th neuron have been traversed based on n. If not, execute S1604; if not, execute S1607.

[0266] S1604 calculates the index k of the element to be updated in TB when the pulse is transmitted through the nth connection, using the following formula:

[0267] k=(RC+D mn )%(max(D)+1)*Q+post_ids[pre_indptr m +n-1]

[0268] In the formula, D mn pre_indptr represents the time delay value corresponding to the nth synaptic connection trained from the mth neuron.m This represents the m-th element in the vector pre_indptr;

[0269] S1605 updates the target cache TB, and the update formula is:

[0270] TB[k]+=Sp m *W mn

[0271] In the formula, W mn This represents the weight value corresponding to the nth synaptic connection trained from the mth neuron;

[0272] S1606 Update n: n = n + 1, execute S1603;

[0273] S1607 Update m: m = m + 1. When m is greater than the number of neurons P in the pre-neuron cluster, execute step 1608. When m is less than or equal to the number of neurons P in the pre-neuron cluster, execute step 1602.

[0274] S1608 selects the target vector TV from the target cache, the same as S1204;

[0275] S1609 sets the selected elements in the target cache to 0, the same as S1205;

[0276] S1610 updates the cycle counter RC, the same as S1206.

[0277] In step S16, the event_csr operator converts steps S1601 to S1607 into parallel execution on the GPU.

[0278] The following is a simple example to illustrate the workflow of a pulse signal transmission system.

[0279] Suppose that when a user performs brain simulation, they build two connected neuronal clusters. The first cluster has one neuron with an index of 0, which we'll call A for ease of explanation. The second cluster has two neurons, with the neurons indices 0 and 1 respectively referred to as B and C. The synaptic connection rule is set to All2All; the synaptic connection structure is represented as 'mat'; the weight of the synapse connecting A to B is set to 4, and the delay is set to 2; the weight of the synapse connecting A to C is set to 3, and the delay is set to 0. Figure 11 As shown.

[0280] Based on the detailed workflow described above, after the user inputs relevant information into the pulse signal transmission system, the system generates weight information W and time delay information D, both of which are 1x2 (P rows, Q columns) matrices. W is [[4,3]] and D is [[2,0]]. It also generates RC and target buffer TB, both initially set to 0. The length of TB is (max(D)+1)*Q=(2+1)*2=6, and the initial value of TB is a vector of length 6 with all elements set to 0.

[0281] Assume the user sets the total simulation time steps to 2.

[0282] Suppose that in the first simulation time step, neuron A fires a pulse, which is acquired by the pulse signal transmission system. Sp is a vector of length 1 with 1 element, i.e., Sp is [1]. According to the user's settings, the system calls the event_all2all operator to perform the following operations:

[0283] Calculate the vector to be accumulated in the target cache TB:

[0284] delta = Sp1 * W1 = 1 * [4,3]

[0285] delta is [4,3];

[0286] Calculate the index of the element in the TB to be updated:

[0287] indices=(RC+D m )%(max(D)+1)*Q+arange(Q)

[0288] = (0 + [2,0]) % (2 + 1) * 2 + [0,1]

[0289] indices is [4,1]

[0290] Update target cache TB:

[0291] TB[indices]+=delta

[0292] Right now,

[0293] TB[[4,1]]+=[4,3]

[0294] After the TB update, it is [0,3,0,0,4,0];

[0295] Select the target vector TV from the target cache:

[0296] TV = TB[RC*Q:(RC+1)*Q-1]

[0297] Right now,

[0298] TV=TB[0*2:(0+1)*2-1]=TB[0:1],

[0299] TV is [0,3];

[0300] As mentioned above, TV can be used to update the membrane potential of neurons in the post-neuron cluster. The work of updating the membrane potential is not part of the pulse signal transmission system. After obtaining TV, it means that the pulse signal transmitted to the post-neuron cluster at the current time step has been obtained.

[0301] Set the selected elements in the target cache to 0:

[0302] TB[RC*Q:(RC+1)*Q-1]=0

[0303] Right now,

[0304] TB[0:1]=0

[0305] After the TB update, it is [0,0,0,0,4,0];

[0306] Update the loop counter RC:

[0307] RC = (RC + 1)%max(D) + 1

[0308] Right now:

[0309] RC = (0+1)%2+1

[0310] The updated RC value is 1.

[0311] The workflow of the pulse signal transmission system in the first time step can be simplified as follows: Figure 12 express:

[0312] Assume that A still fires a pulse in the second simulation time step. Because neurons have a refractory period—that is, after firing a pulse at a certain moment, a single neuron will not fire pulses for a period of time—A would not fire any more pulses in the second time step in a typical brain simulation scenario. This assumption is made here only to illustrate the system's working mechanism. In the second time step, the system still acquires pulses from the previous neuron cluster and calls the `event_all2all` operator. The workflow of the pulse signal transmission system in the second time step can be simplified as follows: Figure 13 express:

[0313] In summary, the pulse signal transmission system proposed in this invention calls the corresponding operator from five pulse signal transmission operators based on the synaptic connection rules and synaptic connection structure expression form input by the user, thereby realizing the transmission of pulse signals between neuron clusters.

[0314] The pulse signal transmission system of the present invention uses a pulse signal transmission method that solves the shortcomings of existing pulse signal transmission methods, which can only be implemented on one type of hardware and have poor versatility. It realizes a universal pulse transmission method that can be implemented on different hardware.

[0315] In order to address the shortcomings of existing technologies that do not support users setting independent delays for each synaptic connection and cannot keep in line with the actual situation in the brain, the pulse signal transmission method of the present invention introduces a loop counter RC and a target buffer TB into the pulse signal transmission method, thereby supporting users to set independent delays for each synaptic connection.

[0316] To verify that the pulse signal transmission method of the present invention can be implemented on different hardware, correctly transmit pulse signals, and support users to independently set the delay for each synaptic connection, a brain simulation experiment was designed, and the experimental scenario was set as follows:

[0317] There are synaptic connections between two clusters of neurons. Each cluster has 20 neurons. The user sets the time delay for each synaptic connection independently. The time delay values ​​of all synapses follow a Gaussian distribution. Each synapse has the same weight value. The two clusters are cluster 1 and cluster 2. Cluster 1 is given an input current and generates pulses. After cluster 1 generates pulses, it affects the membrane voltage of cluster 2 through synaptic connections. There are 5 cases for synaptic connections between two neuron clusters: (1) The connection rule is One2One, and the event_one2one operator should be called when the pulse signal is transmitted; (2) The connection rule is All2All, and the event_all2all operator should be called when the pulse signal is transmitted; (3) The connection rule is a custom connection rule (the experiment uses a custom connection rule that specifies the number of synaptic connections between two neuron clusters, and the number of synapses is set to 300), the expression form of the synaptic connection structure is 'mat', and the event_mat operator should be called when the pulse signal is transmitted; (4) The connection rule is a custom connection rule (the experiment uses a custom connection rule that specifies the number of synaptic connections between two neuron clusters, and the number of synapses is set to 10), the expression form of the synaptic connection structure is 'coo', and the event_coo operator should be called when the pulse signal is transmitted; (5) The connection rule is a custom connection rule (the experiment uses a custom connection rule that specifies the number of synaptic connections between two neuron clusters, and the number of synapses is set to 80), the expression form of the synaptic connection structure is 'csr', and the event_csr operator should be called when the pulse signal is transmitted. In summary, there were 5 experimental scenarios, and 5 pulse signal transmission operators were tested. In all 5 experimental scenarios, the brain simulation was 20ms (0.1ms per time step, for a total of 200 time steps).

[0318] Five pulse signal transmission operators were implemented on CPU and GPU, and brain simulations were performed in the above five scenarios using these two hardwares. The pulse distribution of cluster 1 was the same when using different hardware. The pulse distribution of cluster 2 during the brain simulation was recorded. Then, the pulse records of cluster 2 were compared with those of the brain simulation in the same scenario when the pulse distribution of cluster 1 remained unchanged. It was found that the pulse records of cluster 2 were completely consistent in the above three sets of pulse records in the five experimental scenarios. The experimental results are as follows: Figures 14 to 18 As shown, this demonstrates that the pulse signal transmission method proposed in this patent can be implemented on different hardware, transmit pulse signals correctly, and allows users to independently set the delay for each synaptic connection.

[0319] The present invention also discloses an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps in the pulse signal transmission method supporting independent time delay described above.

[0320] Figure 19 This is a structural diagram of an electronic device according to an embodiment of the present invention, such as... Figure 19 As shown, the electronic device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, Near Field Communication (NFC), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.

[0321] Those skilled in the art will understand that Figure 19 The structure shown is merely a structural diagram of the part related to the technical solution of this disclosure and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0322] The present invention also discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the pulse signal transmission method supporting independent time delay described above.

[0323] Please note that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A pulse signal transmission system supporting independent time delay, applied in brain simulation implemented by a computing-capable electronic device, characterized in that, The system comprises, in sequence: a preneuron cluster module, a pulse signal transmission module, and a postneuron cluster module; among which, The preneuron cluster consists of P neurons; where P is greater than or equal to 1. The postneuron cluster consists of Q neurons; where Q is greater than or equal to 1. The pulse signal transmission module encapsulates multiple pulse signal transmission operators based on synaptic connection rules between neurons, used for simulating pulse signal transmission between pre- and post-neuron clusters. The module provides multiple interfaces for obtaining the technical parameters required to invoke the pulse signal transmission operators; these interfaces include: synaptic connection rule (Rule), synaptic connection structure expression (Repr), and synaptic weight information. Synaptic delay information Number of neurons in the preneuron cluster P, number of neurons in the postneuron cluster Q, and total simulation time steps T; During the simulation, after the pre-neuron cluster fires a pulse Sp, it is directly sent to the target buffer TB and participates in weight accumulation. The target buffer TB is used to hold the weight accumulation results of different simulation time steps, and its length is [length missing]. Within each simulation time step, only a segment of data corresponding to that simulation time step is extracted from the target buffer TB as the increment of the membrane potential of each target neuron; where the time delay information D is required for the pulse signal transmission operator to operate, derived from the synaptic time delay information. generate; Synaptic connection rules between neurons include: One2One rules for one-to-one connections between neurons in two neuron clusters; All2All rules for all neurons in the preceding neuron cluster to connect to all neurons in the following neuron cluster; and custom connection rules, which allow users to specify the number of synaptic connections between two neuron clusters, the probability of connections between neurons in two neuron clusters, and also allow users to directly specify the specific synaptic connection structure.

2. The pulse signal transmission system supporting independent time delay according to claim 1, characterized in that, Synaptic connections can be expressed in three ways: 'mat' uses matrix M to represent the structure of synaptic connections between two neuron clusters: the number of rows m of the matrix represents the number of neurons in the pre-neuron cluster, and the number of columns represents the number of neurons in the post-neuron cluster; if the element in the i-th row and j-th column of the matrix... A value of 1 indicates that there is a synaptic connection between the i-th neuron of the preneuron cluster and the j-th neuron of the postneuron cluster. A value of 0 indicates that there is no connection between the two neurons; 'coo' uses two vectors to represent the structure of synaptic connections: one vector is the ID of the pre-neuron cluster neurons corresponding to all synapses between neuron clusters, denoted as pre_ids; the other vector is the ID of the post-neuron cluster neurons corresponding to all synapses between neuron clusters, denoted as post_ids. The 'csr' form is derived from 'coo': the pre_ids under the 'coo' form are sorted in ascending order, and the order of post_ids is changed accordingly after the pre_ids are sorted; the 'csr' form uses two vectors to represent the synaptic connection structure: one vector is the sorted post_ids; the other vector is denoted as pre_indptr, and its length is the number of neurons in the preneuron cluster plus 1; when the i-th element of pre_indptr is the same as the (i+1)-th element, the i-th neuron in the preneuron cluster has no synaptic connection to the postneuron cluster.

3. The pulse signal transmission system supporting independent time delay according to claim 2, characterized in that, The pulse signal transmission module, based on synaptic connection rules and the expression form of synaptic connection structures, encapsulates five pulse signal transmission operators: event_one2one, event_all2all, event_mat, event_coo, and event_csr. The module determines the pulse signal transmission operator to be invoked based on the acquired synaptic connection rules (Rule) and the expression form of the synaptic connection structure (Repr). When the acquired synaptic connection rule is One2One, which corresponds to a one-to-one connection between neurons in two neuron clusters, the pulse signal transmission operator to be called is determined to be event_one2one; When the acquired synaptic connection rule is All2All, which connects each neuron in the preneuron cluster to all neurons in the postneuron cluster, the pulse signal transmission operator to be called is determined to be event_all2all. When the obtained synaptic connection rule Rule is a custom rule and the expression form of the synaptic connection structure Repr is 'mat', the pulse signal transmission operator to be called is determined to be event_mat; When the obtained synaptic connection rule Rule is a custom rule and the expression form of the synaptic connection structure Repr is 'coo', the pulse signal transmission operator to be called is determined to be event_coo; When the obtained synaptic connection rule is a custom rule and the expression form of the synaptic connection structure, Repr, is 'csr', the pulse signal transmission operator to be called is determined to be event_csr.

4. A pulse signal transmission method supporting independent time delay, applied in brain simulation implemented by a computing-capable electronic device, implemented by the pulse signal transmission system supporting independent time delay as described in any one of claims 1-3, characterized in that, The method includes the following steps: Step 1: Obtain the number of neurons P in the preneuron cluster, the number of neurons Q in the postneuron cluster, the synaptic connection rules (Rule) between the preneuron cluster and the postneuron cluster, the expression form (Repr) of the synaptic connection structure, and the synaptic weight information. Synaptic delay information The total simulation time step T; Step 2: Based on the obtained synaptic connection rules (Rule) and the expression form of the synaptic connection structure (Repr), determine the pulse signal transmission operator to be invoked; Step 3, based on the obtained synaptic weight information Synaptic delay information The weight information W and time delay information D required for the pulse signal transmission operator to operate; Step 4: Initialize the loop counter RC to 0; initialize the target cache TB to a length of [value missing]. The vector with all elements being 0 is used to initialize the simulation time step t to 0, where max(D) represents the maximum value of the elements in the time delay information D; Step 5: Obtain the pulses Sp emitted by the preneuron cluster; Step 6: Based on the determined synaptic connection rules and synaptic structure expression, call different pulse signal transmission operators to obtain the pulse signal that the next neuron cluster should receive at the current moment, which is used to update the membrane potential of the neurons in the next neuron cluster. Step 7: Let t = t + 1, and determine whether the simulation time step t is less than the total simulation time step T. If the simulation time step t is less than the total simulation time step T, return to step 5; if the simulation time step t is greater than or equal to the total simulation time step T, end the run.

5. The pulse signal transmission method supporting independent time delay according to claim 4, characterized in that, In step 3, when , When the data meets the requirements of the pulse signal transmission operator, , Equivalent to W and D; when , When the user specifies the data generation rules, W and D are automatically generated according to the given data generation rules to meet the requirements of the operator.

6. The pulse signal transmission method supporting independent time delay according to claim 4, characterized in that, In step 5, the pulse Sp emitted by the pre-neuron cluster is a vector of length P, which consists of 0s and 1s. When the i-th neuron of the current neuron cluster emits a pulse at the current time step, the i-th element of Sp is 1. If no pulse is emitted, the element is 0.

7. The pulse signal transmission method supporting independent time delay according to claim 4, characterized in that, In step 6, when the pulse signal transmission operator called is event_one2one, obtaining the pulse signal that the neuron cluster should receive after the current time step specifically includes the following steps: Step 6101, calculate the vector delta to be accumulated in the target cache TB: ; Step 6102, calculate the index vector indices of the elements in the target cache TB to be updated: In the formula, RC+D means that each element in D is added to RC to obtain a new vector, and arange(Q) is used to generate a vector that starts from 0, with adjacent elements differing by 1 and increasing in length. The vector has a length of Q and the last element is Q-1. Step 6103, Update target cache TB: In the formula, This represents the elements in the target cache TB specified by indices. The number of these elements is the same as the length of the vector delta. The formula represents the accumulation of the vector delta on the elements specified by indices in the target cache TB. Step 6104: Select the target vector TV from the target cache TB: The formula represents selecting the index from the target cache TB. to The elements are used as the target vector TV. Obtaining the target vector TV indicates that the pulse signal transmitted to the post-neuron cluster at the current time step has been obtained. Step 6105: Set the selected elements in the target cache TB to 0: The formula represents setting the index in the target cache TB to be... to All elements are 0; Step 6106, update the loop counter RC: 。 8. The pulse signal transmission method supporting independent time delay according to claim 4, characterized in that, In step 6, when the pulse signal transmission operator called is event_all2all, obtaining the pulse signal that the neuron cluster should receive after the current time step specifically includes the following steps: Step 6201: Initialize the number of neurons in the traversed pre-neuron clusters and add 1 to the value m, let m=1; Step 6202, calculate the vector delta to be accumulated in the target cache TB: In the formula, This represents the m-th element in Sp. This represents the data in the m-th row of W; Step 6203, calculate the index vector indices of the elements in the target cache TB to be updated: In the formula, This represents the data in the m-th row of D; Step 6204, Update target cache TB: Step 6205, update m: m = m + 1. When m is greater than the number of neurons P in the pre-neuron cluster, execute step 6206. When m is less than or equal to the number of neurons P in the pre-neuron cluster, execute step 6202. Step 6206: Select the target vector TV from the target cache TB: The formula represents selecting the index from the target cache TB. to The elements are used as the target vector TV. Obtaining the target vector TV indicates that the pulse signal transmitted to the post-neuron cluster at the current time step has been obtained. Step 6207: Set the selected elements in the target cache TB to 0: The formula represents setting the index in the target cache TB to be... to All elements are 0; Step 6208, update the loop counter RC: The event_all2all operator converts steps 6201 to 6205 into parallel execution on the GPU.

9. The pulse signal transmission method supporting independent time delay according to claim 4, characterized in that, In step 6, when the pulse signal transmission operator called is event_mat, obtaining the pulse signal that the neuron cluster should receive after the current time step specifically includes the following steps: Step 6301: Initialize the number of neurons in the traversed pre-neuron clusters and add 1 to the value m, let m=1; Step 6302, calculate the vector delta to be accumulated in the target cache TB: In the formula, This represents the m-th element in Sp. This represents the data in the m-th row of matrix M. This represents the data in the m-th row of W; Step 6303, calculate the index vector indices of the elements in the target cache TB to be updated: Step 6304, Update target cache TB: Step 6305, Update m: m = m + 1. When m is greater than the number of neurons P in the pre-neuron cluster, execute step 6306. When m is less than or equal to the number of neurons P in the pre-neuron cluster, execute step 6302. Step 6306: Select the target vector TV from the target cache TB: The formula represents selecting the index from the target cache TB. to The elements are used as the target vector TV. Obtaining the target vector TV indicates that the pulse signal transmitted to the post-neuron cluster at the current time step has been obtained. Step 6307: Set the selected elements in the target cache TB to 0: The formula represents setting the index in the target cache TB to be... to All elements are 0; Step 6308, update the loop counter RC: The event_mat operator converts steps 6301 to 6305 into parallel execution on the GPU.

10. The pulse signal transmission method supporting independent time delay according to claim 4, characterized in that, In step 6, when the pulse signal transmission operator called is event_coo, obtaining the pulse signal that the neuron cluster should receive after the current time step specifically includes the following steps: Step 6401: Based on the neuron cluster pulse firing status before the current time step, generate a vector unroll_Sp that marks the neuron pulse firing status corresponding to each element in pre_ids; Step 6402, calculate the vector delta to be accumulated in the target cache TB: Step 6403, calculate the index vector indices of the elements in the target cache TB to be updated: Where post_ids represents the IDs of all neurons in the postneuron cluster corresponding to the synapses between the preneuron cluster and the postneuron cluster; Step 6404, Update target cache TB: ; Step 6405: Select the target vector TV from the target cache TB: The formula represents selecting the index from the target cache TB. to The elements are used as the target vector TV. Obtaining the target vector TV indicates that the pulse signal transmitted to the post-neuron cluster at the current time step has been obtained. Step 6406: Set the selected elements in the target cache TB to 0: The formula represents setting the index in the target cache TB to be... to All elements are 0; Step 6407, update the loop counter RC: 。 11. The pulse signal transmission method supporting independent time delay according to claim 4, characterized in that, In step 6, when the pulse signal transmission operator called is event_csr, obtaining the pulse signal that the neuron cluster should receive after the current time step specifically includes the following steps: Step 6501: Initialize the number of neurons in the traversed pre-neuron clusters and add 1 to the value m, let m=1; Step 6502: Initialize the number of synaptic connections between the m-th neuron that has been traversed and the preceding neuron cluster and add 1 to the value n, so that n=1; Step 6503: Determine whether all synaptic connections from the m-th neuron have been traversed based on n. If not, proceed to step 6504; if they have been traversed, proceed to step 6507. Step 6504, calculate the index k of the element in the target cache TB to be updated when the pulse is transmitted through the nth synaptic connection: In the formula, This represents the time delay value corresponding to the nth synaptic connection formed by the mth neuron. This represents the m-th element in the vector pre_indptr; post_ids represents the IDs of all neurons in the post-neuron cluster corresponding to the synapses between the pre-neuron cluster and the post-neuron cluster. Step 6505, update the target cache TB, the update formula is: In the formula, This represents the weight value corresponding to the nth synaptic connection originating from the mth neuron; Step 6506, update n: n = n + 1, then execute step 6503; Step 6507, update m: m = m + 1. When m is greater than the number of neurons P in the pre-neuron cluster, execute step 6508. When m is less than or equal to the number of neurons P in the pre-neuron cluster, execute step 6502. Step 6508: Select the target vector TV from the target cache TB: The formula represents selecting the index from the target cache TB. to The elements are used as the target vector TV. Obtaining the target vector TV indicates that the pulse signal transmitted to the post-neuron cluster at the current time step has been obtained. Step 6509: Set the selected elements in the target cache TB to 0: The formula represents setting the index in the target cache TB to be... to All elements are 0; Step 6510, update the loop counter RC: The event_csr operator converts steps 6501 to 6507 into parallel execution on the GPU.

12. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the pulse signal transmission method supporting independent time delay as described in any one of claims 4 to 11.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a pulse signal transmission method supporting independent time delay as described in any one of claims 4 to 11.

Citation Information

Patent Citations

  • Lightweight on-chip learning method and system based on spiking neural network, and processor

    CN114091663A

  • Pulse neural network hardware platform and pulse signal processing method

    CN117172291A