A method and system for large-scale brain simulation with flexible generation of synaptic weights

By supporting the flexible generation of synaptic weights in large-scale brain simulation, the problem of excessive storage overhead is solved, and the integrity of synaptic plasticity function and the saving of storage resources are achieved.

CN119005267BActive Publication Date: 2026-02-27CHINA NANHU ACAD OF ELECTRONICS & INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310568940.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-16
Publication Date
2026-02-27
Estimated Expiration
2043-05-16

AI Technical Summary

Technical Problem

In existing large-scale brain simulation technologies, the pre-generation of synaptic weights leads to excessive storage overhead and cannot simultaneously support the integrity of synaptic plasticity.

Method used

A method for flexibly generating synaptic weights is proposed, which supports both pre-generation and on-demand generation. By judging the available space on the device, the generation method is automatically decided, and synaptic weights are randomly generated when generating on demand, thereby reducing storage requirements.

Benefits of technology

While preserving synaptic plasticity, it significantly reduces storage overhead, lowers the storage resource requirements for large-scale brain simulation, and saves 30% of storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005267B_ABST
    Figure CN119005267B_ABST
Patent Text Reader

Abstract

The application discloses a kind of synaptic weight flexible generation large-scale brain simulation method and system, comprising: according to the input brain simulation network information, create neuron cluster;Determine the generation mode of synaptic weight, generation mode is generated in advance and / or on-demand generation;Create the connection between neuron cluster, if generation mode is generated in advance, save the delay of synaptic connection and synaptic weight, if generation mode is on-demand generation, save the delay of synaptic connection;Run brain simulation network simulation, in simulation process, if generation mode is generated in advance, directly read the synaptic weight saved, if generation mode is on-demand generation, randomly generate synaptic weight.The application simultaneously supports synaptic weight generation in advance and on-demand generation, retains the integrity of brain simulation network synaptic plasticity function.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of brain simulation, and particularly relates to a large-scale brain simulation method and system with flexible generation of synaptic weights. BACKGROUND

[0002] The human brain is the most complex structure known to date, with a large scale, both computing and storage functions, but still a complex physical structure with limited complexity: it has about 100 billion neurons, each of which is connected to other neurons through thousands or even tens of thousands of neural synapses. Understanding brain function is still one of the biggest challenges in contemporary science. At present, the main experimental means of neuroscience is used to analyze the physical and chemical properties of brain neurons and synapses from the molecular biology and cell biology levels, and to understand the signal processing and information processing characteristics of neurons and synapses. At the same time, due to the rapid development of computer hardware, neuroscience and computer science, the research and development of artificial brain are flourishing, and it is feasible to simulate a network composed of hundreds of thousands or millions of neurons.

[0003] At present, the understanding of brain dynamics and brain function is mainly improved by simulating the pulse neural network through modeling. However, even a small mammal like a mouse has a trillion synapse connections. Before running the simulation, information describing which neurons are synapse connected and the weights is usually generated and stored in a large array. If a network of this size is simulated, each synapse connection needs at least one floating-point value to represent the weight, which is equivalent to several TB of data. For a single computer, this is unrealistic storage overhead. And in order to efficiently implement the simulation of large-scale brain simulation network, it is often carried out on a graphics processing unit. The on-chip memory of a modern graphics processing unit is relatively small, and most of the silicon area is used for arithmetic logic units. Therefore, the huge storage overhead is still a pain point in large-scale brain simulation.

[0004] With the advent of modern supercomputers, it is feasible to simulate a network composed of hundreds of thousands or millions of neurons. Therefore, several large brain projects, such as NeuronGPU, Genn, including the European "Human Brain Project" (the Human Brain Project, hereinafter referred to as "HBP"), are trying to build a large-scale brain simulation framework for mathematical exploration of network dynamics. NEST is a key brain simulator in HBP. The goal of these projects is not to create a model for a specific brain region, but to create a general brain simulator. These brain simulators are also appropriately called brain simulation engines, which are not bound to a specific candidate model, but are suitable for the execution of many candidate models, including current and future models.

[0005] NEST is a simulator for large-scale spiking neural network simulation on central processing unit. When constructing a spiking neural network, it generates the synaptic connection information, including the synaptic weight, and saves it in the memory. When simulating the brain simulation network, the pulse propagation needs to add the synaptic input of each presynaptic neuron to the postsynaptic neuron. At this time, the program reads the synaptic weight information saved before. This is a brain simulation system with pre-generated synaptic weight.

[0006] NeuronGPU is a GPU library for large-scale simulation of spiking neural networks, written in C++ and CUDA-C++ programming languages. The library contains basic neuron models and various synaptic models, mainly for large-scale simulation of spiking neural networks on GPUs. However, its work only supports pre-generated synaptic weights. That is, its parameters, especially state variables and synaptic connections, need to be initialized before simulation. This is done by running an initialization algorithm on the host CPU before simulation, storing the results in CPU memory, uploading them to GPU memory, and then using them during simulation. This is also a pre-generated synaptic weight method.

[0007] In addition, Genn proposes a framework to facilitate the use of graphics accelerators for large-scale neural network computation models, which is also only for GPUs. It is a code generation tool that cannot support both manual specification and program automatic decision-making when generating GPU code, so it does not retain the integrity of the synaptic plasticity function of the spiking neural network.

[0008] In summary, the widely used large-scale spiking neural network simulation frameworks NEST and NeuronGPU only support pre-generated synaptic weight methods. Before simulation, its parameters, especially state variables and synaptic connections, need to be initialized. NEST saves it to memory. NeuronGPU completes it by running an initialization algorithm on the host CPU before simulation, storing the results in CPU memory, uploading them to GPU memory, and then using them during simulation. This brings a lot of storage overhead, and video memory is a more valuable computing resource than memory. Genn is only a code generation tool for GPUs. When generating code, it only supports GPUs and cannot support both manual specification and program automatic decision-making methods. Therefore, its code does not retain the synaptic plasticity function of the spiking neural network. SUMMARY

[0009] One of the purposes of the present application is to provide a large-scale brain simulation method with flexible synaptic weight generation, which supports both pre-generated and on-demand synaptic weight generation, and retains the integrity of the synaptic plasticity function of the brain simulation network.

[0010] To achieve the above object, the technical scheme adopted by the present application is:

[0011] A synaptic weight flexible generation large-scale brain simulation method, comprising:

[0012] According to the input brain simulation network information, create a neuron cluster;

[0013] Determine the generation mode of synaptic weight, the generation mode is pre-generation and / or on-demand generation;

[0014] Create a connection between neuron clusters, if the generation mode is pre-generation, save the delay and synaptic weight of the synaptic connection, if the generation mode is on-demand generation, save the delay of the synaptic connection;

[0015] Run the brain simulation network simulation, during the simulation process, if the generation mode is pre-generation, directly read the saved synaptic weight, if the generation mode is on-demand generation, randomly generate synaptic weight.

[0016] The following also provides several optional modes, but not as an additional limitation of the above general scheme, just a further supplement or preferred, without technical or logical contradiction, each optional mode can be combined with the above general scheme, and can also be combined between multiple optional modes.

[0017] As a preferred, the brain simulation network information includes neuron cluster parameters and neuron cluster connection information;

[0018] The creation of the neuron cluster includes: creating a neuron cluster according to the neuron cluster parameters, saving the local neuron cluster to the same array, and placing the remote neuron cluster in an empty neuron cluster.

[0019] As a preferred, the determination of the generation mode of synaptic weight includes:

[0020] Obtain the keyword information, determine whether the user specifies the generation mode of synaptic weight, if the user specifies the generation mode of synaptic weight, obtain the generation mode specified in the keyword information, if the user does not specify the generation mode of synaptic weight, determine the generation mode of synaptic weight according to the brain simulation network information.

[0021] As a preferred, the determination of the generation mode of synaptic weight according to the brain simulation network information includes:

[0022] Read the neuron cluster parameters in the brain simulation network information to obtain the attributes of each neuron in the neuron cluster, and determine the space occupied by each neuron according to the attributes of each neuron;

[0023] read the neuron cluster connection information in the brain simulation network information, obtain the attribute of each synapse, and determine the space occupied by each synapse according to the attribute of each synapse;

[0024] calculate the total space occupied by all neurons in the brain simulation network as the required space generated on demand, and calculate the total space occupied by all neurons and synapses in the brain simulation network as the required space generated in advance;

[0025] If the available space of the device is greater than the preset multiple of the required space generated in advance, it is determined that the generation mode of the synapse weight is the generation in advance; otherwise, if the available space of the device is greater than the required space generated on demand, it is determined that the generation mode of the synapse weight is the generation on demand; otherwise, it is prompted that the available space is insufficient.

[0026] As preferred, if the generation mode is the generation in advance, the delay and weight of the synapse connection are saved, including:

[0027] For each pair of neurons connected, the source neuron ID and the target neuron ID, and the delay and weight of the synapse connection are saved in an array.

[0028] As preferred, if the generation mode is the generation on demand, the delay of the synapse connection is saved, including:

[0029] For each pair of neurons connected, the source neuron ID and the target neuron ID, and the delay of the synapse connection are saved in an array.

[0030] As preferred, the connection type of the connection between the neuron clusters includes five types of One_To_One, All_To_All, Fixed_Total_Number, Fixed_In_Degree and Fixed_Out_Degree.

[0031] As preferred, if the generation mode is the generation on demand, the weight is randomly generated, including: the weight is randomly generated according to the source neuron ID and the target neuron ID of each synapse connection in the pulse propagation.

[0032] As preferred, the randomly generated weight is a true random number or a pseudo-random number.

[0033] The large-scale brain simulation method for flexible generation of synapse weights provided by the application supports the generation in advance and the generation on demand of synapse weights, and retains the integrity of the synapse plasticity function of the brain simulation network. When the synapse weight is generated on demand, the need to save the synapse weight data is completely eliminated, and the storage overhead occupied by the large-scale brain simulation can be greatly saved.

[0034] The second object of the present application is to provide a large-scale brain simulation system with flexible generation of synaptic weights, which supports pre-generation and on-demand generation of synaptic weights, and retains the integrity of synaptic plasticity function of the brain simulation network.

[0035] To achieve the above object, the technical solution adopted by the present application is:

[0036] A large-scale brain simulation system with flexible generation of synaptic weights comprises a processor and a memory storing a plurality of computer instructions, which, when executed by the processor, implement the steps of the large-scale brain simulation method with flexible generation of synaptic weights. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 A flowchart of a large-scale brain simulation method with flexible generation of synaptic weights according to the present application;

[0038] Figure 2 A pulse firing visualization diagram under different synaptic weight generation modes according to the present application. DETAILED DESCRIPTION

[0039] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terminology used in the description of the present application herein only for the purpose of describing specific embodiments and is not intended to limit the present application.

[0041] When simulating a large-scale spiking neural network using a computer, neurons and synapses can be described using a variety of mathematical models. Spiking propagation requires adding the synaptic input of each presynaptic neuron to the postsynaptic neuron, which is ultimately converted into a time- or event-driven update algorithm. Before the simulation is run, information describing the connections between neurons and synapses and the weights is usually generated.

[0042] However, even a small mammal like a mouse has a trillion synapse connections. Each synapse connection requires at least one floating-point value to represent the weight, which is equivalent to several TB of data. For large-scale brain model network simulation, this results in high storage overhead.

[0043] To solve the above problems, the embodiment proposes a large-scale brain simulation method supporting both pre-generation of synaptic weights and on-demand generation during runtime on a device. The embodiment allows to specify whether to pre-generate synaptic weights. If the user does not specify the synaptic weight generation mode, the storage overhead required to create the network is roughly estimated according to the network size, and the hardware information is combined to automatically decide whether to pre-generate the weights for saving.

[0044] When the synaptic weights are generated on demand, the need to save the synaptic weight data is completely eliminated, and this method allows to greatly save the storage overhead when simulating the brain simulation network. When the synaptic weights are generated on demand, the presynaptic neuron ID and postsynaptic neuron ID are taken as parameters to randomly generate synaptic weights, and according to different random seed settings, both completely random and pseudo-random modes are supported.

[0045] As shown in Figure 1 , a large-scale brain simulation method for flexible generation of synaptic weights of the embodiment includes the following steps:

[0046] Step 1, creating neuron clusters according to the input brain simulation network information.

[0047] First, read the user-defined brain simulation network information, create the corresponding neuron cluster according to the neuron cluster information to be created, and save the instance to an array. The brain simulation network information usually includes neuron cluster parameters and neuron cluster connection information. The neuron cluster parameters are used to build the neuron cluster, such as neuron type, number, attribute value, etc. The neuron cluster connection information is used to build the synaptic connection, such as synaptic ratio, connection relationship, attribute value, etc.

[0048] In addition, in order to facilitate flexible setting of simulation parameters, simulation control parameters such as time step can also be included in the brain simulation network information.

[0049] When creating a neuron cluster, create a neuron cluster according to the neuron cluster parameters, and use an array to store all neuron clusters after creating all neuron clusters. Local neuron clusters will be sequentially stored in this array, and all remote neuron clusters will be placed in a separate neuron cluster. The number of neurons in this neuron cluster where the remote neuron cluster is placed is equal to the sum of the number of neurons in all other neuron clusters outside the current process. The remote neuron cluster is placed in a neuron cluster to map the remote neuron to the local, create a corresponding proxy neuron in the local, and facilitate the connection between the local neuron cluster and the remote neuron cluster.

[0050] Step 2, determine the generation mode of synaptic weights.

[0051] The generation mode in this embodiment includes pre-generation and / or on-demand generation. The pre-generation mode refers to generating the synaptic weights before the brain simulation network simulation and saving them. The on-demand generation mode refers to temporarily generating the synaptic weights according to the synaptic connections currently used in the brain simulation network simulation, and not saving the synaptic weights of the synaptic connections throughout the process.

[0052] It should be noted that the generation mode in this embodiment includes two modes of pre-generation and on-demand generation, but it is not limited that the two modes must exist independently. When the two modes exist simultaneously, it can be understood that part of the synaptic weights are pre-generated and part of the synaptic weights are on-demand generated, and the proportion of the synaptic weights in the two modes is not limited.

[0053] In order to preserve the integrity of the synaptic plasticity function of the brain simulation network, this embodiment supports the user to specify the generation mode of the synaptic weights, and executes different processes according to the user's specified results. When judging the generation mode of the synaptic weights, first, the keyword information is obtained, and it is judged whether the user has specified the generation mode of the synaptic weights. If the user has specified the generation mode of the synaptic weights, the generation mode specified in the keyword information is obtained. If the user has not specified the generation mode of the synaptic weights, the generation mode of the synaptic weights is determined according to the brain simulation network information.

[0054] Correspondingly, when the user specifies the generation mode, the user can only specify pre-generation or on-demand generation. When the user selects both pre-generation and on-demand generation, it is further needed to specify which synaptic connection weights are pre-generated and which synaptic connection weights are on-demand generated. After obtaining and parsing the keyword information, the user's specified content can be obtained.

[0055] When it is needed to determine the generation mode of the synaptic weights according to the brain simulation network information, automatic decision is made by estimating the network size. First, the neural type, number and synaptic ratio between neurons and other related information are parsed according to the previously read brain simulation network information, and the approximate storage space required when using pre-generation and on-demand generation during program creation and connection is estimated. Specifically, the automatic decision steps include:

[0056] A. Read the neuron cluster parameters in the brain simulation network information to obtain the attributes of each neuron in the neuron cluster, and determine the space occupied by each neuron according to the attributes of each neuron.

[0057] The size of the neuron is obtained from the attribute field of the neuron in the source code to obtain the space occupied by a single neuron. Each synapse is also obtained from the attributes in the synapse class to obtain the space of a single synapse. When calculating, the number of neurons and the number of synapses read are multiplied by the size of a single neuron and synapse, respectively, to estimate the required storage space.

[0058] B, read the neuron cluster connection information in the brain simulation network information, get the attribute of each synapse, and determine the space occupied by each synapse according to the attribute of each synapse.

[0059] C, calculate the total space occupied by all neurons in the brain simulation network as the space required for on-demand generation, and calculate the total space occupied by all neurons and synapses in the brain simulation network as the space required for advance generation.

[0060] When calculating the space required for on-demand generation, if the generation mode is on-demand generation, only the total space occupied by all neurons is calculated as the space required for on-demand generation, and if the generation mode is on-demand generation and advance generation, the total space occupied by all neurons and synapses that need to generate weights in advance is calculated as the space required for on-demand generation.

[0061] When calculating the space required for advance generation, if the generation mode is advance generation, the total space occupied by all neurons and all synapses is calculated as the space required for advance generation, and if the generation mode is on-demand generation and advance generation, the total space occupied by all neurons and synapses that need to generate weights in advance is calculated as the space required for advance generation.

[0062] D, if the available space of the device is greater than the preset multiple of the space required for advance generation, it is determined that the generation mode of the synapse weight is advance generation; otherwise, if the available space of the device is greater than the space required for on-demand generation, it is determined that the generation mode of the synapse weight is on-demand generation; otherwise, it is prompted that the available space is insufficient.

[0063] When deciding the generation mode of the synapse weight by itself, the calculated required space is compared with the available space of the device to ensure the feasibility of the simulation simulation. The preset multiple in the embodiment is usually 1.1 times or more, such as 1.5 times, 2 times, etc.

[0064] When it is determined that the generation mode of the synapse weight is advance generation, it can be separate advance generation or contain both advance generation and on-demand generation, and when it is determined that the generation mode of the synapse weight is on-demand generation, it can be separate on-demand generation or contain both advance generation and on-demand generation, according to the analysis result of the user-specified keyword information. When neither is satisfied, a prompt message will be output to show that the available space may be insufficient, and the user decides whether to terminate the program.

[0065] Step 3, create connections between neuron clusters, if the generation mode is advance generation, save the delay and weight of the synapse connection, if the generation mode is on-demand generation, save the delay of the synapse connection.

[0066] For the synapse weight that needs to be generated in advance, the embodiment will open up storage space for storing the weight, and for the synapse weight that does not need to be generated in advance, i.e. on-demand generation, the embodiment does not open up the corresponding storage space. The synapse weight generated in advance here can be all synapse weights in the generation mode of being generated in advance, or part of the synapse weights in the generation mode of being generated in advance and on-demand generation.

[0067] In creating the connection between the neuron clusters, first, the connection type between the source neuron cluster and the target neuron cluster is obtained, and then the synapse connection of the neurons in the source neuron cluster and the target neuron cluster is established according to the connection type.

[0068] The connection type of the connection between the neuron clusters includes but is not limited to five types of One_To_One, All_To_All, Fixed_Total_Number, Fixed_In_Degree and Fixed_Out_Degree. The interface of the connection is first called at runtime, the interface function judges which connection type it is, and the corresponding connection function is called to process the connection.

[0069] The connection function processes differently according to different connection types. In the One_To_One mode, the connection is made in one-to-one order of the neuron IDs in the source neuron cluster and the target neuron cluster. In the All_To_All mode, all neurons in the source neuron cluster and the target neuron cluster are traversed, and the connection between each pair of neurons is made. In the Fixed_Total_Number mode, the number of synapse connections between the two neuron clusters is fixed, and a fixed number of neuron IDs are randomly selected from the source neuron cluster and the target neuron cluster, and then connected one by one. In the Fixed_In_Degree mode, the connection is a connection mode in which the in-degree of the neuron is fixed to a certain value, a fixed number of neuron IDs are randomly selected from the source neuron cluster for each target neuron, and then connected. In the Fixed_Out_Degree mode, the connection is a connection mode in which the out-degree of the neuron is fixed to a certain value, a fixed number of neuron IDs are randomly selected from the target neuron cluster for each source neuron, and then connected.

[0070] The connection between the neuron clusters can have a remote connection. The remote connection is different from the local connection in that the remote connection needs to be communicated through MPI, the source neuron cluster sends the neuron ID to be connected to the target neuron cluster, and the target neuron cluster establishes the connection after obtaining the neuron ID from the source neuron cluster.

[0071] When connecting each pair of neurons, the connection information formed by the source neuron ID and the target neuron ID is put into an array, and when the synaptic weight of the synaptic connection is generated in advance, the array also contains the delay and synaptic weight of the synaptic connection, and when the synaptic weight of the synaptic connection is generated on demand, the array also contains the delay of the synaptic connection.

[0072] Step 4, run the brain simulation network simulation, during the simulation, if the generation mode is pre-generation, directly read the saved synaptic weight, if the generation mode is on-demand generation, randomly generate the synaptic weight.

[0073] When the synaptic weight is randomly generated, the generated is a true random number or a pseudo-random number, when the generated is a true random number, the synaptic weight obtained by the same synaptic connection each time is completely different, when the generated is a pseudo-random number, the synaptic weight randomly generated by the same synaptic each time is consistent.

[0074] This embodiment takes the source neuron ID and the target neuron ID of each synaptic connection in pulse propagation as a parameter, and generates a true random number or a pseudo-random number according to a fixed or variable random number seed. The variable random number seed can be the source neuron ID or the target neuron ID or the sum of the two, etc.

[0075] This embodiment supports both pre-generation and saving of synaptic weight and on-demand generation of synaptic weight at runtime, and when generating on demand, two methods of completely random generation (getting a true random number) and pseudo-random generation (getting a pseudo-random number) of synaptic weight can be selected, which reduces the storage pressure while retaining the integrity of the synaptic plasticity function of the brain simulation network.

[0076] In addition to the change of the synaptic weight acquisition method, the processes such as pulse transmission in the brain simulation network are consistent with the existing brain simulation process, and this embodiment provides a brain simulation process based on the existing brain simulation process combined with the synaptic weight acquisition method of this embodiment as follows:

[0077] (1) Read the time step information and other information of the simulation, initialize the space required by the application, and in a time step, update the content in the pulse buffer of each neuron according to the situation of the neuron emitting pulses. At the same time, according to the pulses emitted by the neuron and the delay, the pulses that need to take effect in the target neuron are obtained, and the information of these pulses is recorded.

[0078] (2) According to the recorded pulse effect information, perform pulse propagation. At this time, the synaptic input of each presynaptic neuron (source neuron) needs to be added to the postsynaptic neuron (target neuron), and the weight information of each synaptic connection needs to be obtained.

[0079] (3) If the synaptic weight is generated in advance, the synaptic weight of the synapse is read from the saved space. If the synaptic weight is generated on demand, it is randomly generated according to the pre-synaptic neuron ID and post-synaptic neuron ID. At this time, according to the difference of the random number seed, two kinds of on-demand generation can be supported: one is that the weight obtained by the same synapse each time is completely different, and the other is that the weight randomly generated by the same synapse each time is consistent.

[0080] (4) The network state update of one time step is completed above, and then the iteration is performed according to the total time step information to be simulated, and the whole brain simulation network simulation process is completed.

[0081] The current brain simulation framework usually creates neuron clusters and then connects them, and saves the synaptic weight information of the synapse when connecting. The weight of the neuron cluster is usually a distribution information, which can be directly randomly generated when the weight is needed. To make the generated weight consistent with the weight generated in advance and saved, it is necessary to ensure that the weight of the same synapse is consistent each time. Therefore, the pre-synaptic neuron and post-synaptic neuron ID can be used as parameters for generating the weight, so as to ensure consistency. The method proposed in the embodiment supports on-demand generation of synaptic weight while retaining the pre-generated method, thereby retaining the integrity of the synaptic plasticity function of the brain simulation network. When generating on demand, the problem of huge storage overhead when generating in advance can be greatly alleviated.

[0082] In order to verify that the true random number or pseudo-random number as the randomly generated synaptic weight in the on-demand generation has the characteristics of the synaptic weight generated in advance, the following provides a specific experimental example.

[0083] The network structure of the brain simulation network is taken as: a total of more than 20,000 neuron clusters, and the total number of neurons is 2 billion. The connection mode between the neuron clusters is Fixed_In_Degree connection, and the minimum synapse ratio of the connection is 1:100. There is only excitatory connection between the neuron clusters, and the proportion of excitatory and inhibitory neurons in the neuron cluster is 4:1. Verification is done on a machine with 6 GPUs.

[0084] In this experiment, the network structure information is first read, and then the neuron clusters are created and stored in an array. According to the parameters in the network structure, the weight of the synapse is generated on demand when used. Then, according to the connection information, the corresponding neuron clusters are connected according to the connection rules, and at the same time, the space required for the synaptic weight is not allocated, that is, the synaptic weight is not saved.

[0085] After the connection is created, in each simulation time step, the pulse buffer of each neuron is updated, and the effective pulses are collected, and then the input of each presynaptic neuron is added to the postsynaptic neuron. At this time, the synaptic weight needs to be randomly generated. Two ways are tested, one is completely random generation, that is, the weight of the same synapse is completely different each time, and the other is pseudo-random generation, that is, the weight of the same synapse is consistent each time. Then, the network state is updated in a loop according to the total simulation time step.

[0086] In this experiment, the synaptic weight is generated in advance, the synaptic weight is generated on demand in a completely random manner, and the synaptic weight is generated on demand in a pseudo-random manner. The pulse firing rate of the same neuron is recorded each time, and the result of the synaptic weight generated in advance is taken as the correct result.

[0087] As shown in Figure 2 , the horizontal coordinate of the figure is the simulation time, and the vertical coordinate is the neuron cluster ID. The results show that when the synaptic weight is generated on demand, whether it is completely random or pseudo-random, it is consistent with the result when the synaptic weight is generated in advance, indicating that the synaptic weight generation method on demand of the application is reliable.

[0088] In addition, the storage space occupied by the synaptic weight generated in advance, the synaptic weight generated on demand in a completely random manner, and the synaptic weight generated on demand in a pseudo-random manner in the experiment is shown in Table 1.

[0089] Table 1 Storage space statistical results

[0090] Generation mode Pre-generated Fully random on-demand generation Pseudo-random on-demand generation Storage footprint 47252 MiB 32914 MiB (-30%) 32914 MiB (-30%)

[0091] From the content of Table 1, for the problem of large storage space overhead in simulating a large-scale brain simulation network, the method of the embodiment can effectively alleviate the problem when the synaptic weight is generated on demand. The results show that the method of the embodiment can effectively reduce the occupation of the video memory by about 30%, greatly relieving the storage pressure in brain simulation.

[0092] In another embodiment, the application further provides a large-scale brain simulation system with flexible synaptic weight generation, comprising a processor and a memory storing a plurality of computer instructions, which are executed by the processor to implement the steps of a large-scale brain simulation method with flexible synaptic weight generation.

[0093] For specific limitations of a large-scale brain simulation system with flexible synaptic weight generation, please refer to the limitations of a large-scale brain simulation method with flexible synaptic weight generation in the above, which will not be repeated here.

[0094] The memory and the processor are electrically connected directly or indirectly to realize the transmission or interaction of data. For example, the elements can be electrically connected through one or more communication buses or signal lines. The memory stores a computer program executable on the processor. The processor realizes the method in the embodiments of the application by running the computer program stored in the memory.

[0095] The memory can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory is used to store a program. The processor executes the program after receiving an execution instruction.

[0096] The processor can be an integrated circuit chip with data processing capability. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. The processor can realize or execute the methods, steps and logic block diagrams disclosed in the embodiments of the application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0097] The technical features of the above-described embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above-described embodiments are not described, but it should be considered that any combination of the technical features is within the scope of the present disclosure, as long as the combination does not cause contradiction.

[0098] The above-described embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the application. It should be pointed out that, for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for large-scale brain simulation with flexible generation of synaptic weights, characterized in that, The method for large-scale brain simulation of flexible generation of synaptic weights comprises: creating neuron clusters according to input brain simulation network information; determining a generation mode of synaptic weights, the generation mode being pre-generation and / or on-demand generation; the determination of the generation mode of synaptic weights comprises: obtaining keyword information, determining whether the user has specified the generation mode of synaptic weights, if the user has specified the generation mode of synaptic weights, obtaining the specified generation mode in the keyword information, if the user has not specified the generation mode of synaptic weights, determining the generation mode of synaptic weights according to the brain simulation network information; wherein the pre-generation refers to generating and saving synaptic weights before brain simulation network simulation, and the on-demand generation refers to temporarily generating synaptic weights according to the currently used synaptic connection in brain simulation network simulation, and not saving the synaptic weights of synaptic connection; creating connections between neuron clusters, if the generation mode is pre-generation, saving the delay and synaptic weights of synaptic connection, if the generation mode is on-demand generation, saving the delay of synaptic connection; running brain simulation network simulation, in the simulation process, if the generation mode is pre-generation, directly reading the saved synaptic weights, if the generation mode is on-demand generation, randomly generating synaptic weights.

2. The method for large-scale brain simulation with flexible generation of synaptic weights according to claim 1, wherein, The brain simulation network information comprises neuron cluster parameters and neuron cluster connection information; The creation of neuron clusters comprises: creating neuron clusters according to the neuron cluster parameters, saving local neuron clusters to the same array, and placing remote neuron clusters in an empty neuron cluster.

3. The method of claim 1, wherein the synaptic weight is flexibly generated in the large-scale brain simulation. The determination of the generation mode of synaptic weights according to the brain simulation network information comprises: reading the neuron cluster parameters in the brain simulation network information to obtain the attributes of each neuron in the neuron cluster, and determining the space occupied by each neuron according to the attributes of each neuron; reading the neuron cluster connection information in the brain simulation network information to obtain the attributes of each synapse, and determining the space occupied by each synapse according to the attributes of each synapse; calculating the total space occupied by all neurons in the brain simulation network as the space required for on-demand generation, and calculating the total space occupied by all neurons and synapses in the brain simulation network as the space required for pre-generation; if the available space of the device is greater than a preset multiple of the space required for pre-generation, determining the generation mode of synaptic weights as pre-generation; otherwise, if the available space of the device is greater than the space required for on-demand generation, determining the generation mode of synaptic weights as on-demand generation; otherwise, prompting that the available space is insufficient.

4. The method of claim 1, wherein the synaptic weight is flexibly generated in the large-scale brain simulation. If the generation mode is pre-generation, saving the delay and weights of synaptic connection, comprises: for each pair of neurons connected, saving the source neuron ID and target neuron ID, and the delay and weights of synaptic connection to an array.

5. The method of claim 1, wherein the synaptic weight flexible generation is performed by using a neural network model. If the generation mode is on-demand generation, saving the delay of synaptic connection, comprises: for each pair of neurons connected, saving the source neuron ID and target neuron ID, and the delay of synaptic connection to an array.

6. The method of claim 1, wherein the synaptic weight flexible generation is performed by using a neural network model. The connection types of the connections between the neuron clusters include One_To_One, All_To_All, Fixed_Total_Number, Fixed_In_Degree and Fixed_Out_Degree.

7. The method of claim 1, wherein the synaptic weight flexible generation is performed by using a neural network model. When the generation mode is on-demand generation, the weights are randomly generated, including randomly generating the weights according to the source neuron ID and target neuron ID of each synaptic connection in pulse propagation.

8. The method of claim 1, wherein the synaptic weight flexible generation is performed by a plurality of processors. The randomly generated weights are true random numbers or pseudo random numbers.

9. A synaptic weight flexible generation large-scale brain simulation system comprising a processor and a memory having stored therein a plurality of computer instructions, wherein, The computer instructions, when executed by the processor, implement the steps of the large-scale brain simulation method for flexible generation of synaptic weights according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Flexible-time division multiplexing spiking neuron realization architecture

    CN106934457A

  • Reconfigurable neuro-synaptic cores for spiking neural network

    CN109816102A