Deployment optimization method for spiking neural network training and related equipment
By building a physical node matrix and an adjacency matrix, combining mapping deployment networks and reinforcement learning excitation networks, optimizing the mapping relationship between logical computing units and physical computing units in the pulsed neural network, solving the problems of load imbalance and large communication overhead in traditional methods, and achieving a more efficient training process.
Patent Information
- Application Number
- CN202510014343.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-05-30
AI Technical Summary
Traditional pulse neural network training methods are difficult to effectively capture the communication requirements and data dependencies between logical computing units, resulting in unbalanced load, large communication overhead, and inability to make full use of hardware resources, resulting in low computing efficiency.
By obtaining the topological information of the physical computing unit, building a physical node matrix, and performing training and segmenting of the pulsed neural network, and obtaining the topological information of the logical computing unit to build an adjacency matrix and node feature matrix. Using mapping deployment networks and reinforcement learning incentive networks, predict mapping coordinate distribution information of logical computing units, optimize mapping deployment network parameters to improve training efficiency.
The mapping relationship between the logical computing unit and the physical computing unit is effectively optimized, the communication overhead and data transmission delay are reduced, and the training efficiency of the pulsed neural network is improved.
Smart Images

Figure CN120068955A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of spiking neural network training, and in particular, to a method for optimizing the deployment of spiking neural network training and related devices. Background Art
[0002] During the training process of a spiking neural network (SNN), traditional mapping methods are usually based on static rules or heuristic algorithms, and these methods have many limitations when dealing with complex SNN models. For example, due to the complex and dynamically changing connection relationships between neurons in the SNN model, traditional mapping methods are difficult to effectively capture the communication requirements and data dependencies between logical computing units, resulting in problems such as load imbalance and large communication overhead; in addition, with the continuous development of hardware platforms, the topological structure of the many-core architecture has become more complex, and the communication bandwidth and latency differences between physical computing units are significant. Therefore, traditional methods cannot fully utilize hardware resources, resulting in low computing efficiency, thus affecting the training efficiency of the SSN. Summary of the Invention
[0003] The embodiments of the present application provide a method for optimizing the deployment of spiking neural network training and related devices, which can effectively optimize the mapping relationship between logical computing units and physical computing units, and perform deployment based on the mapping relationship to improve the training efficiency of the SNN model.
[0004] To achieve the above object, the first aspect of the embodiments of the present application provides a method for optimizing the deployment of spiking neural network training, including: obtaining first topology information corresponding to a plurality of physical computing units, and constructing a physical node matrix corresponding to the plurality of physical computing units based on the first topology information; performing a training model segmentation on the spiking neural network to obtain a plurality of logical computing units, and obtaining second topology information corresponding to the plurality of logical computing units; constructing an adjacency matrix and a node feature matrix corresponding to the plurality of logical computing units based on the second topology information; obtaining a preset mapping deployment network, and obtaining a preset reinforcement learning incentive network; predicting, by the mapping deployment network according to the adjacency matrix and the node feature matrix, mapping coordinate distribution information of the plurality of logical computing units mapped to a plurality of nodes in the physical node matrix; calculating, by the reinforcement learning incentive network according to the mapping coordinate distribution information, a model loss, and updating network parameters of the mapping deployment network according to the incentive information generated by the model loss to obtain a trained mapping deployment network; and deploying the plurality of logical computing units to the plurality of physical computing units based on the trained mapping deployment network.
[0005] In some embodiments, constructing the adjacency matrix and the node feature matrix corresponding to the multiple logical computing units based on the second topology information includes: obtaining the data dependency relationships, the total data transmission volume, and the total data reception volume of the multiple logical computing units according to the second topology information; constructing the adjacency matrix according to the data dependency relationships of the multiple logical computing units; and constructing the node feature matrix according to the total data transmission volume and the total data reception volume of the multiple logical computing units.
[0006] In some embodiments, constructing the adjacency matrix according to the data dependency relationships of the multiple logical computing units includes: generating a first zero matrix with M rows and M columns according to the number M of the logical computing units; determining whether there is data transmission between each logical computing unit and other logical computing units according to the data dependency relationships of the multiple logical computing units, and if there is data transmission between two logical computing units, setting the element value at the corresponding position in the first zero matrix to 1 to obtain the adjacency matrix.
[0007] In some embodiments, constructing the node feature matrix according to the total data transmission volume and the total data reception volume of the multiple logical computing units includes: generating a second zero matrix and a third zero matrix with M rows and M columns according to the number M of the logical computing units; setting the element value at the corresponding position in the second zero matrix to the total data transmission volume according to the total data transmission volume of the multiple logical computing units to obtain the transmitted data volume matrix; setting the element value at the corresponding position in the third zero matrix to the total data reception volume according to the total data reception volume of the multiple logical computing units to obtain the received data volume matrix; and obtaining the node feature matrix according to the transmitted data volume matrix and the received data volume matrix.
[0008] In some embodiments, the mapping deployment network includes a graph convolutional layer, a first fully connected layer, and a second fully connected layer. Predicting the mapping coordinate distribution information of the multiple logical computing units mapped to multiple nodes in the physical node matrix through the mapping deployment network based on the adjacency matrix and the node feature matrix includes: performing convolutional feature extraction on the adjacency matrix and the node feature matrix through the graph convolutional layer to obtain convolutional sampling features; predicting the X-axis coordinate distribution information of the logical computing units mapped to multiple nodes in the physical node matrix through the first fully connected layer based on the convolutional sampling features; predicting the Y-axis coordinate distribution information of the logical computing units mapped to multiple nodes in the physical node matrix through the second fully connected layer based on the convolutional sampling features; and obtaining the mapping coordinate distribution information according to the X-axis coordinate distribution information and the Y-axis coordinate distribution information.
[0009] In some embodiments, calculating, by the reinforcement learning incentive network, a model loss according to the mapping coordinate distribution information includes: calculating, by the reinforcement learning incentive network, a first expected effect value corresponding to the mapping coordinate distribution information, and calculating a second expected effect value corresponding to when the mapping deployment network executes a historical deployment scheme; calculating a mean square error loss for the first expected effect value and the second expected effect value to obtain a model loss; wherein the expected effect value is used to characterize the total data transmission amount and the total delay generated when performing deployment based on the reinforcement learning incentive network.
[0010] In some embodiments, updating, according to the incentive information generated according to the model loss, network parameters of the mapping deployment network includes: optimizing the reinforcement learning incentive network according to the model loss, and generating incentive information by the optimized reinforcement learning incentive network; updating the network parameters of the mapping deployment network according to the incentive information.
[0011] In some embodiments, generating, by the optimized reinforcement learning incentive network, incentive information includes: calculating, by the optimized reinforcement learning incentive network, the total data transmission amount, the total delay, and a third expected effect value corresponding to the mapping coordinate distribution information; performing a weighted calculation on the total data transmission amount, the total delay, and the third expected effect value to obtain incentive information.
[0012] In some embodiments, the number of logical computing units is the same as the number of physical computing units.
[0013] To achieve the above object, a second aspect of the embodiments of the present application provides a deployment optimization device for training a spiking neural network, including: a physical node module, configured to obtain first topology information corresponding to a plurality of physical computing units, and construct a physical node matrix corresponding to the plurality of physical computing units based on the first topology information; a model splitting module, configured to split a training model of the spiking neural network to obtain a plurality of logical computing units, and obtain second topology information corresponding to the plurality of logical computing units; a logical node module, configured to construct an adjacency matrix and a node feature matrix corresponding to the plurality of logical computing units based on the second topology information; a model obtaining module, configured to obtain a preset mapping deployment network and a preset reinforcement learning incentive network; a mapping prediction module, configured to predict mapping coordinate distribution information of the plurality of logical computing units mapped to a plurality of nodes in the physical node matrix through the mapping deployment network according to the adjacency matrix and the node feature matrix; a deployment optimization module, configured to calculate a model loss through the reinforcement learning incentive network according to the mapping coordinate distribution information, and update network parameters of the mapping deployment network according to incentive information generated by the model loss to obtain a trained mapping deployment network; a mapping deployment module, configured to deploy the plurality of logical computing units to the plurality of physical computing units based on the trained mapping deployment network.
[0014] To achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, including: at least one processor; at least one memory, configured to store at least one program; when at least one of the at least one program is executed by the at least one processor, the deployment optimization method for training a spiking neural network described in any embodiment of the first aspect is implemented.
[0015] To achieve the above object, a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, storing computer-executable instructions, where the computer-executable instructions are used to execute the deployment optimization method for training a spiking neural network described in any embodiment of the first aspect.
[0016] A deployment optimization method for spiking neural network training and related devices proposed in this application can update the network parameters of the mapping deployment network through a reinforcement learning model to effectively optimize the mapping relationship between the logical computing units and physical computing units in the spiking neural network, thereby improving the training efficiency of the SNN model. Among them, the method of this application can obtain the first topological information of the physical computing units and construct a physical node matrix to determine the positional relationship and communication bandwidth of each physical computing unit in the many-core architecture. Further, by splitting the training tasks of the SNN model, multiple logical computing units are obtained, and the second topological information of the multiple logical computing units is obtained to determine the connection relationship, data dependency, and communication requirements between the multiple logical computing units. Further, by constructing a mapping deployment network, the topological structure and communication requirement features between the logical computing units are extracted, and based on these features, the best position of each logical computing unit mapped to the physical node matrix is predicted to obtain the mapping coordinate distribution information corresponding to the mapping scheme. Furthermore, the reinforcement learning incentive network can evaluate the quality of the generated mapping scheme according to the mapping coordinate distribution information, calculate the model loss, and generate incentive information to guide the mapping deployment network to optimize the parameters and obtain the trained mapping deployment network. It can be understood that through the iteration of the above reinforcement learning algorithm, the method of this application can obtain the trained mapping deployment network, which can effectively optimize the mapping relationship between the logical computing units and physical computing units. Furthermore, after deploying multiple logical computing units to multiple physical computing units based on the mapping relationship, the communication overhead and data transmission delay can be effectively reduced, and the training efficiency of the spiking neural network can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 FIG. is a flowchart of a deployment optimization method for spiking neural network training provided by an embodiment of this application;
[0018] Figure 2 FIG. is a flowchart of a method for constructing an adjacency matrix and a node feature matrix in the deployment optimization method for spiking neural network training provided by an embodiment of this application;
[0019] Figure 3 FIG. is a flowchart of a method for constructing an adjacency matrix in the deployment optimization method for spiking neural network training provided by an embodiment of this application;
[0020] Figure 4 FIG. is a flowchart of a method for constructing a node feature matrix in the deployment optimization method for spiking neural network training provided by an embodiment of this application;
[0021] Figure 5 FIG. is a flowchart of a method for predicting mapping coordinate distribution information in the deployment optimization method for spiking neural network training provided by an embodiment of this application;
[0022] Figure 6 In the deployment optimization method for spiking neural network training provided by an embodiment of the present application, it is a flowchart of the method for calculating the model loss;
[0023] Figure 7 In the deployment optimization method for spiking neural network training provided by an embodiment of the present application, it is a flowchart of the method for generating excitation information;
[0024] Figure 8 In the deployment optimization method for spiking neural network training provided by an embodiment of the present application, it is a schematic diagram of the many-core structure corresponding to multiple physical computing units;
[0025] Figure 9 In the deployment optimization method for spiking neural network training provided by an embodiment of the present application, it is a schematic diagram of the deployment optimization process;
[0026] Figure 10 In the deployment optimization method for spiking neural network training provided by an embodiment of the present application, it is a schematic diagram of the structure of an electronic device. Detailed implementation manners
[0027] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0028] In some embodiments, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from the module division in the system or the flowchart in the flowchart. The terms first, second, etc. in the specification and claims and the above drawings are used to distinguish similar objects and do not have to be used to describe a specific order or sequence.
[0029] In addition, unless otherwise clearly specified and limited, the term "connected / linked" should be understood in a broad sense. For example, it can be a fixed connection or a movable connection, or a detachable connection or a non-detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection or can communicate with each other; it can be directly connected or indirectly connected through an intermediate medium.
[0030] In the description of the embodiments of the present application, the descriptions referring to terms such as "one embodiment / implementation", "another embodiment / implementation", "certain embodiments / implementations", "in the above embodiments / implementations", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiments or examples are included in at least two embodiments or implementations disclosed in the present application. In the disclosure of the present application, the schematic expressions of the above terms do not necessarily refer to the same embodiment or implementation. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that in the flowchart.
[0031] Currently, during the training process of spiking neural networks (SNNs), traditional mapping methods are usually based on static rules or heuristic algorithms, and these methods have many limitations when dealing with complex SNN models. For example, due to the complex and dynamically changing connection relationships between neurons in the SNN model, traditional mapping methods are difficult to effectively capture the communication requirements and data dependency relationships between logical computing units, resulting in problems such as load imbalance and large communication overhead; in addition, with the continuous development of hardware platforms, the topological structure of many-core architectures has become more complex, and there are significant differences in the communication bandwidth and latency between physical computing units. Therefore, traditional methods cannot fully utilize hardware resources, leading to low computing efficiency, thus affecting the training efficiency of SSNs.
[0032] Based on this, the embodiments of the present application provide a deployment optimization method for spiking neural network training and related devices, which can effectively optimize the mapping relationship between logical computing units and physical computing units, and perform deployment based on the mapping relationship to improve the training efficiency of the SNN model.
[0033] Refer to Figure 1 , Figure 1 is the method flowchart of the deployment optimization method for spiking neural network training provided by an embodiment of the present application; the first aspect of the embodiments of the present application provides a deployment optimization method for spiking neural network training, including but not limited to the following steps:
[0034] Step S110, obtain the first topological information corresponding to multiple physical computing units, and construct a physical node matrix corresponding to the multiple physical computing units based on the first topological information;
[0035] Step S120, perform training model slicing on the spiking neural network to obtain multiple logical computing units, and obtain the second topological information corresponding to the multiple logical computing units;
[0036] Step S130, based on the second topological information, construct an adjacency matrix and a node feature matrix corresponding to the multiple logical computing units;
[0037] Step S140: Obtain a preset mapping deployment network and a preset reinforcement learning incentive network;
[0038] Step S150: Through the mapping deployment network, based on the adjacency matrix and the node feature matrix, predict the mapping coordinate distribution information of multiple logical computing units mapped to multiple nodes in the physical node matrix;
[0039] Step S160: Through the reinforcement learning incentive network, calculate the model loss according to the mapping coordinate distribution information, and update the network parameters of the mapping deployment network according to the incentive information generated by the model loss to obtain the trained mapping deployment network;
[0040] Step S170: Based on the trained mapping deployment network, deploy multiple logical computing units to multiple physical computing units.
[0041] In some embodiments, the spiking neural network (SNN) is a neural network model that simulates the working principle of the biological nervous system. It can transmit pulse signals at discrete time points for information transmission and has unique advantages in processing time-series data, low-power computing, etc.; the physical computing unit refers to the computing resources in the actual hardware, such as CPU cores, GPU cores, FPGAs, etc. These computing units are used to execute the training tasks of the spiking neural network. The first topology information describes the connection relationship, communication bandwidth, delay, etc. between multiple physical computing units and is used to reflect the physical structure of the hardware platform.
[0042] It should be noted that the process of optimizing the deployment of the many-core architecture for spiking neural network training can be understood as a process of training the mapping deployment network therein to optimize its parameters. The multiple physical computing units are multiple physical cores, the multiple logical computing units are logical cores, the adjacency matrix is used to characterize the connection relationship between logical cores, the node feature matrix is used to characterize the data sending and receiving situation between logical cores, and the mapping coordinate distribution information is used to represent the position probability of each sub-model deployed to the corresponding coordinates of the computing platform; corresponding to the above steps S110 to S170, this application can update the network parameters of the mapping deployment network through a reinforcement learning model to effectively optimize the mapping relationship between the logical computing units and the physical computing units in the spiking neural network, thereby improving the training efficiency of the SNN model.
[0043] It should be noted that the method of this application can obtain the first topology information of the physical computing units, construct a physical node matrix, and determine the positional relationship and communication bandwidth of each physical computing unit in the many-core architecture; further, by splitting the training tasks of the SNN model, multiple logical computing units are obtained, and the second topology information of the multiple logical computing units is obtained to determine the connection relationship, data dependency, and communication requirements between the multiple logical computing units; further, by constructing a mapping and deployment network, the topology structure and communication requirement features between the logical computing units are extracted, and based on these features, the optimal position of each logical computing unit mapped into the physical node matrix is predicted to obtain the mapping coordinate distribution information corresponding to the mapping scheme. Furthermore, the quality of the generated mapping scheme can be evaluated by the reinforcement learning incentive network according to the mapping coordinate distribution information, the model loss is calculated, and incentive information is generated to guide the mapping and deployment network to optimize the parameters, and the trained mapping and deployment network is obtained; it can be understood that through the iteration of the above reinforcement learning algorithm, the method of this application can obtain the trained mapping and deployment network.
[0044] It can be understood that the above mapping and deployment network can effectively optimize the mapping relationship between the logical computing units and the physical computing units. Furthermore, after deploying multiple logical computing units to multiple physical computing units based on the mapping relationship, the communication overhead and data transmission delay can be effectively reduced, and the training efficiency of the spiking neural network can be improved.
[0045] In some embodiments, corresponding to step S110, the physical node matrix is a matrix constructed based on the first topology information, representing the positional relationship of the physical computing units in the many-core architecture. Each element represents a physical computing unit, and the values in the matrix can represent the distance, communication bandwidth, etc. between the computing units.
[0046] In some embodiments, corresponding to step S120, the spiking neural network is divided into multiple sub-modules, and each sub-module is called a logical computing unit. The logical computing unit is responsible for executing a part of the computing tasks of the SNN. The second topology information is used to describe the connection relationship, data dependency relationship, communication requirements, etc. between the multiple logical computing units.
[0047] In some embodiments, a mapping deployment network is used to predict the best positions where logical computing units are mapped into a physical node matrix. Based on graph convolutional layers and fully connected layers, this network can extract the topological structures and communication requirement features among logical computing units and generate mapping coordinate distribution information. The reinforcement learning incentive network is a neural network used to evaluate the quality of the mapping schemes generated by the mapping deployment network. The reinforcement learning incentive network can calculate the model loss according to the mapping coordinate distribution information and generate incentive information for updating the parameters of the mapping deployment network. The mapping coordinate distribution information represents the probability distributions of the X-axis and Y-axis coordinates of each logical computing unit in the physical node matrix, reflecting the possible positions of the logical computing units mapped to different physical nodes. The model loss is an indicator reflecting the overall performance of the mapping scheme, which can be composed of factors such as communication overhead, load balance degree, and energy consumption. The incentive information is a reward signal generated according to the model loss, used to guide the parameter update of the mapping deployment network, reflecting the improvement degree of the current mapping scheme compared with the previous mapping scheme. Therefore, after multiple iterative optimizations, a trained mapping deployment network can be obtained. This network can generate high-quality mapping schemes, making the deployment of logical computing units on physical computing units more reasonable, and thus enabling the deployment optimization of spiking neural network training and effectively improving the training efficiency of the model.
[0048] It should be noted that in this application, the mapping optimization from logical cores to physical cores in the SNN model training is regarded as a reinforcement learning problem. The logical core is the logical computing unit, referring to the sub-module after the SNN model is partitioned. Each logical core represents a part of the computing tasks of the model, and the connection relationship among logical cores reflects the data flow and dependency relationship inside the model. The computing core (physical core) is the physical computing unit, referring to the actual hardware unit in the many-core architecture. Each computing core has independent computing capabilities and storage resources, and the computing cores communicate with each other through the network-on-chip (NOC) to jointly complete complex computing tasks. The computing core can be further divided into the front end (FE) and the back end (BE), which are responsible for forward propagation and backward propagation respectively.
[0049] It can be understood that, corresponding to the above steps S110 to S170, in view of the problems in the prior art such as uneven inter-kernel calculation and storage load, easy formation of local communication hotspots, low utilization rate of calculation cores, and long model training time during the training process of deep pulse neural networks, the present application uses a deep reinforcement learning network as a non-linear optimizer, and automatically optimizes the multi-core deployment network through deep deterministic policy gradients. By converting the connection relationship between model logical cores into logical graphs such as adjacency matrices and node feature matrices, and the inter-core topology of the multi-core architecture as a network graph such as a physical node matrix, graph convolution is used to embed the logical graph features into the policy network for mapping deployment, so that the mapping deployment network outputs continuous values equal to the number of logical cores, and discretizes them to obtain a deployment scheme with low data transmission volume and short calculation delay, so as to reduce training power consumption and improve the training efficiency of the model.
[0050] Reference Figure 2 , Figure 2 In the deployment optimization method for training a pulse neural network provided by an embodiment of the present application, it is a flowchart of a method for constructing an adjacency matrix and a node feature matrix; in some embodiments, based on the second topological information, an adjacency matrix and a node feature matrix corresponding to multiple logical computing units are constructed, but are not limited to the following steps:
[0051] Step S210, obtain the data dependency relationship, total data transmission volume, and total data reception volume of multiple logical computing units according to the second topological information;
[0052] Step S220, construct an adjacency matrix according to the data dependency relationship of multiple logical computing units; construct a node feature matrix according to the total data transmission volume and total data reception volume of multiple logical computing units.
[0053] Among them, the data dependency relationship is the data transmission path and dependency relationship between logical computing units. For example, some logical computing units may need to receive data from other logical computing units, or send data to other logical computing units. The data dependency relationship determines the communication requirements between logical computing units; the total data transmission volume is the amount of data that each logical computing unit needs to send during the training process, reflecting the output communication requirements of the logical computing unit; the total data reception volume is the amount of data that each logical computing unit needs to receive during the training process, reflecting the input communication requirements of the logical computing unit.
[0054] Therefore, on the above basis, the adjacency matrix is used to represent the connection relationship between logical computing units. By analyzing the data dependency relationship, it can be determined which logical computing units have data transmission, and the node feature matrix is used to record the total data transmission volume and total data reception volume of each logical computing unit.
[0055] Reference Figure 3 , Figure 3In the deployment optimization method for training a spiking neural network provided by an embodiment of the present application, the method flowchart for constructing an adjacency matrix; in some embodiments, an adjacency matrix is constructed according to the data dependency relationships of multiple logical computing units, including but not limited to the following steps:
[0056] Step S310, generate a first zero matrix with M rows and M columns according to the number M of logical computing units;
[0057] Step S320, according to the data dependency relationships of multiple logical computing units, determine whether there is data transmission between each logical computing unit and other logical computing units. If there is data transmission between two logical computing units, set the element value at the corresponding position in the first zero matrix to 1 to obtain the adjacency matrix.
[0058] Among them, the first zero matrix is an M×M matrix with an initial value of 0, used to construct the adjacency matrix, and M is the number of logical computing units.
[0059] In some embodiments, corresponding to steps S310 to S320, the process of constructing the adjacency matrix may include the data dependency relationships of multiple logical computing units, and set the corresponding elements in the matrix to 1. For example, if there is data transmission between sub-model 2 and sub-models 3, 4, and 5 respectively, then set A dj [1,2], A dj [1,3], A dj [1,4] to 1, and so on to complete the replacement of the flag positions of all dependency relationships. Secondly, construct a matrix A with all elements being 0 and a size of M×M s_inf .
[0060] Reference Figure 4 , Figure 4 In the deployment optimization method for training a spiking neural network provided by an embodiment of the present application, the method flowchart for constructing a node feature matrix; in some embodiments, a node feature matrix is constructed according to the total data transmission volume and the total data reception volume of multiple logical computing units, including but not limited to the following steps:
[0061] Step S410, generate a second zero matrix and a third zero matrix with M rows and M columns according to the number M of logical computing units;
[0062] Step S420, according to the total data transmission volume of multiple logical computing units, set the element value at the corresponding position in the second zero matrix to the total data transmission volume to obtain a transmitted data volume matrix;
[0063] Step S430, according to the total data reception volume of multiple logical computing units, set the element value at the corresponding position in the third zero matrix to the total data reception volume to obtain a received data volume matrix;
[0064] Step S440: Obtain the node feature matrix according to the transmitted data volume matrix and the received data volume matrix.
[0065] Among them, the second zero-value matrix and the third zero-value matrix are both M×M matrices with an initial value of 0, and are respectively used to construct the transmitted data volume matrix and the received data volume matrix, where M is the number of logical computing units.
[0066] In some embodiments, corresponding to step S420, the present application can construct a matrix A with all elements being 0 and a size of M×M s_inf , and according to the size D_S of the transmitted data volume between the sub-models obtained by analysis, replace the elements at the corresponding positions in the matrix A s_inf with the corresponding data transmission volume. For example, the data volumes that sub-model 2 needs to send to sub-models 3, 4, and 5 are D_S 23 , D_S 24 , D_S 25 respectively. Then, set A s_inf [1,2], A s_inf [1,3], A s_inf [1,4] to D_S 23 , D_S 24 , D_S 25 respectively.
[0067] In some embodiments, corresponding to step S430, the present application can construct a matrix A with all elements being 0 and a size of M×M r_inf , and according to the size D_R of the received data volume between the sub-models obtained in step 2, replace the elements at the corresponding positions in the matrix A r_inf with the corresponding data transmission volume. For example, the data volumes that sub-model 2 needs to receive from sub-models 3, 4, and 5 are D_R 32 , D_R 42 , D_R 52 respectively. Then, set A s_inf [2,1], A s_inf [3,1], A s_inf [4,1] to D_R 32 , D_R 42 , D_R 52 respectively.
[0068] Reference Figure 5 , Figure 5 is the flowchart of the method for predicting the mapping coordinate distribution information in the deployment optimization method for training a spiking neural network provided by an embodiment of the present application; in some embodiments, the mapping deployment network includes a graph convolutional layer, a first fully connected layer, and a second fully connected layer. According to the adjacency matrix and the node feature matrix, the mapping deployment network predicts the mapping coordinate distribution information of multiple logical computing units mapped to multiple nodes in the physical node matrix, including but not limited to the following steps:
[0069] Step S510, perform convolutional feature extraction on the adjacency matrix and the node feature matrix through a graph convolutional layer to obtain convolutional sampling features;
[0070] Step S520, based on the convolutional sampling features, predict the X-axis coordinate distribution information of the logical computing unit mapped to multiple nodes in the physical node matrix through a first fully connected layer;
[0071] Step S530, based on the convolutional sampling features, predict the Y-axis coordinate distribution information of the logical computing unit mapped to multiple nodes in the physical node matrix through a second fully connected layer;
[0072] Step S540, obtain the mapped coordinate distribution information according to the X-axis coordinate distribution information and the Y-axis coordinate distribution information.
[0073] Among them, the graph convolutional layer is a neural network layer for processing graph-structured data. It can extract the local and global dependencies between logical computing units by performing convolutional operations on the adjacency matrix and the node feature matrix, and generate convolutional sampling features. The convolutional sampling features are the feature representations output by the graph convolutional layer, which contain the topological structure and communication requirement features between logical computing units. These features are used for subsequent mapped coordinate prediction; the first fully connected layer is used to process the convolutional sampling features and predict the X-axis coordinate distribution information of the logical computing unit mapped to the physical node matrix. Through linear transformation and non-linear activation functions, the convolutional sampling features are mapped to the X-axis coordinate space; the second fully connected layer is used to process the convolutional sampling features and predict the Y-axis coordinate distribution information of the logical computing unit mapped to the physical node matrix. Through linear transformation and non-linear activation functions, the convolutional sampling features are mapped to the Y-axis coordinate space.
[0074] It can be understood that by discretizing the outputs of the fully connected layers for the X-axis coordinate distribution information and the Y-axis coordinate distribution information predicted respectively by the first fully connected layer and the second fully connected layer, the mapped coordinate distribution information of the logical computing unit in the physical node matrix can be obtained. The mapped coordinate distribution information is a mapping deployment scheme from a new sub-model to the computing core position.
[0075] Reference Figure 6 , Figure 6 is the flowchart of the method for calculating the model loss in the deployment optimization method for training a spiking neural network provided by an embodiment of the present application; in some embodiments, the reinforcement learning incentive network calculates the model loss according to the mapped coordinate distribution information, including but not limited to the following steps:
[0076] Step S610, calculate the first expected effect value corresponding to the mapped coordinate distribution information through the reinforcement learning incentive network, and calculate the second expected effect value corresponding to the mapped deployment network when executing the historical deployment scheme;
[0077] Step S620: Calculate the mean squared error loss between the first expected effect value and the second expected effect value to obtain the model loss;
[0078] Among them, the expected effect value is used to characterize the total data transmission volume and total delay generated when deploying based on the reinforcement learning incentive network. The total data transmission volume is used to reflect the communication overhead between logical computing units in the mapping scheme. The smaller the total data transmission volume, the higher the communication efficiency of the mapping scheme. The total delay is used to reflect the communication delay and computing delay between logical computing units in the mapping scheme. The shorter the total delay, the faster the response speed of the mapping scheme.
[0079] It can be understood that the first expected effect value is the expected effect value calculated by the reinforcement learning incentive network according to the current mapping coordinate distribution information. The expected effect value reflects the performance of the current new mapping deployment scheme and can be composed of indicators such as communication overhead and total delay. The second expected effect value is the expected effect value calculated by the reinforcement learning incentive network according to the historical deployment scheme. The historical deployment scheme refers to the mapping scheme that has been executed before. The second expected effect value is used to compare with the current mapping scheme. For example, the model loss can be obtained by calculating the mean squared error (MSE) between the first expected effect value and the second expected effect value. The MSE reflects the difference between the current mapping scheme and the historical deployment scheme. The smaller the model loss, the better the current mapping scheme. Furthermore, the network parameters of the mapping deployment network can be updated according to the incentive information generated by the model loss, realizing the update and optimization of the mapping deployment network.
[0080] In some embodiments, updating the network parameters of the mapping deployment network according to the incentive information generated by the model loss includes: optimizing the reinforcement learning incentive network according to the model loss, and generating incentive information through the optimized reinforcement learning incentive network; updating the network parameters of the mapping deployment network according to the incentive information; among them, in this application, the parameters of the reinforcement learning incentive network can be optimized by minimizing the model loss. The optimized incentive network can more accurately evaluate the quality of the mapping scheme and generate more reasonable incentive information.
[0081] It can be understood that the incentive information is a reward signal generated according to the optimized reinforcement learning incentive network and is used to guide the parameter update of the mapping deployment network. The incentive information reflects the improvement degree of the current mapping scheme relative to the previous mapping scheme. According to the incentive information, gradient descent or other optimization algorithms can be used to update the parameters of the mapping deployment network. Furthermore, through multiple iterations, the mapping deployment network can be gradually optimized, making the generated mapping scheme more reasonable. Therefore, based on the trained mapping deployment network, deploying multiple logical computing units to multiple physical computing units can achieve the deployment optimization of spiking neural network training and effectively improve the training efficiency of the model.
[0082] In some embodiments, the present application optimizes the mapping deployment network through a reinforcement learning model. Based on the Actor-Critic algorithm, the mapping deployment network can be used as the Actor-Network in the reinforcement learning model, and a reinforcement learning incentive network Critic-Network is constructed. In order to calculate the Reward to optimize the Actor-Network, the Critic-Network uses a set of connection networks to calculate the first expected effect value Q1 and the second expected effect value Q2 of the deployment scheme before optimization and the current optimized deployment scheme respectively. The MES-LOSS of Q1 and Q2 is used as the loss to optimize the Critic-Network. After optimization, the weighted sum of the Q value calculated by the Critic-Network and the energy consumption and delay is used as the Reward to optimize the Actor-Network. The Q value is the total data transmission volume and the total delay between different sub-models corresponding to the mapping deployment scheme.
[0083] In some embodiments,
[0084] Reward = -Q(αInf total +βL total );
[0085] Wherein, Inf total is the total data transmission volume, L total is the total delay, and the total delay includes data transmission delay and calculation delay. N count is the number of model calculation operands. Both α and β are constant factors. The incentive value Reward takes the negative of the weighted sum of the Q3 value and the energy consumption and delay, indicating that the greater the incentive value, the better the model optimization effect, which is consistent with the smaller the actual expected energy consumption and delay and the better the deployment mapping scheme. It can be understood that here are the delay and data volume of the current optimized deployment scheme recalculated by the Actor-Network after optimization, and Q3 is the third expected effect value generated by the Actor-Network after optimization.
[0086] It should be noted that the expected effect value is an expected value determined according to the total data transmission volume and the total delay, which can be understood as a coefficient. The greater the total transmission volume and the total delay, the greater the coefficient. Subsequently, in the following steps, by multiplying with the total transmission volume and the total delay, the effect of strengthening the incentive can be achieved.
[0087] Refer to Figure 7 , Figure 7In the deployment optimization method for training a spiking neural network provided by an embodiment of this application, the flowchart of the method for generating excitation information; in some embodiments, the excitation information is generated by an optimized reinforcement learning excitation network, including but not limited to the following steps:
[0088] Step S710, calculate the total data transmission volume, total delay, and the third expected effect value corresponding to the mapping coordinate distribution information through the optimized reinforcement learning excitation network;
[0089] Step S720, perform weighted calculation on the total data transmission volume, total delay, and the third expected effect value to obtain the excitation information.
[0090] Among them, the third expected effect value is the new expected effect value calculated by the optimized reinforcement learning excitation network according to the mapping coordinate distribution information. The third expected effect value can comprehensively consider factors such as the total data transmission volume and total delay to reflect the overall performance of the current mapping scheme. For example, by performing weighted calculation on the total data transmission volume, total delay, and the third expected effect value, the excitation information is obtained, and the weight coefficients can be adjusted according to actual needs to balance the importance of different performance indicators. The excitation information obtained through weighted calculation is used to update the parameters of the mapping deployment network to guide the system to continuously optimize the mapping scheme.
[0091] In some embodiments, the number of logical computing units is the same as the number of physical computing units. It can be understood that by using the model slicing method, the target spiking neural network is sliced into sub-models equal to the number M of computing cores of the training platform, so that each logical computing unit will be mapped to an independent physical computing unit. This one-to-one mapping method ensures that each physical computing unit is only responsible for the computing task of one logical computing unit, avoiding problems of resource competition and load imbalance; at the same time, this method also simplifies the mapping process, enabling the system to more efficiently utilize hardware resources.
[0092] In some embodiments, when this application performs iterative optimization, BatchSize can be set to 32, that is, first randomly generate 32 deployment schemes as the initial input for model training. After 600 rounds of training, the excitation information tends to be stable, and the trained mapping deployment network is obtained to output the optimal deployment mapping scheme, and multiple logical computing units are deployed to multiple physical computing units.
[0093] Refer to Figure 8 , Figure 8In the deployment optimization method for training spiking neural networks provided by an embodiment of the present application, the schematic diagram of the many-core structure corresponding to multiple physical computing units, where the first topological information is the connection relationship corresponding to the multiple physical computing units in this many-core structure; the front end (FE) includes: GLB (L1) for storing preprocessed data and intermediate results, and MACs + SPad (L0) for performing basic multiply-accumulate operations and storing the results in the local buffer; the back end (BE) includes: GLB (L1) for storing more complex intermediate results and final results, MACs + SPad (L0) for performing more complex computing tasks and storing the results in the local buffer, and the router (R) is responsible for data routing and forwarding. The FE and BE are connected through the router, and the physical computing units are connected to each other through the router to ensure efficient data transmission between different cores.
[0094] In some embodiments, obtaining the first topological information corresponding to multiple physical computing units and constructing a physical node matrix corresponding to the multiple physical computing units based on the first topological information includes: based on an existing training platform for deep spiking neural networks, counting the number of computing cores of the multiple physical computing units and each computing node in the training platform, obtaining the topological structure and communication bandwidth data between nodes and between cores, and modeling the computing cores in the coordinate system of a two-dimensional plane. For example, (0, 0) represents the first physical computing unit starting from the upper left corner, so as to form a physical node matrix.
[0095] In some embodiments, splitting the training model of the spiking neural network to obtain multiple logical computing units and obtaining the second topological information corresponding to the multiple logical computing units includes: using a model splitting method to split the target spiking neural network into sub-models equal in number to the number of computing cores M of the training platform, and then analyzing the data dependency relationship and the total amount of data sent and received D_S, D_R between each sub-module, and analyzing the data dependency and the total amount of data transmission FB_D between the forward computing core and the backward computing core in each computing core.
[0096] Reference Figure 9 , Figure 9 Schematic diagram of the deployment optimization process corresponding to the deployment optimization method for training spiking neural networks provided by an embodiment of the present application; Figure 9Used to display the structural diagram of the training and deployment optimization algorithm for a multi-core architecture of spiking neural networks based on reinforcement learning. It mainly consists of three parts: input, network model, and output. The sub-modules after pre-training network segmentation are called logical computing units in the following description, and each computing core in the multi-core architecture is called a physical computing unit; by obtaining the second topological information, an adjacency matrix (Adjacency-Matrix) representing the position and connection information between logical computing units is constructed, and a node feature matrix (Node-Feature) corresponding to the communication relationship and data volume size information between different logical computing units is constructed. The two matrices together constitute the input. The output part in the figure is a new deployment plan, which consists of two-dimensional coordinate pairs, and each coordinate pair represents the corresponding node where the corresponding logical core is mapped to the physical core topology of the multi-core architecture. The network part consists of a mapping deployment network Actor-Network and a reinforcement learning incentive network Critic-Network. Among them, the mapping deployment network consists of a graph convolutional layer and a fully connected layer. After the input is sampled by the graph convolutional layer, it enters the two fully connected layers respectively, and the mean and variance of the output of each fully connected layer are calculated. The sampling results of the mean and variance are discretized and respectively represent the position information of the X-axis and Y-axis in the mapping plan. The reinforcement learning incentive network is used to evaluate the benefits of the decision-making actions made by the mapping deployment network, that is, the deployment plan, and update the network parameters according to the error.
[0097] Corresponding Figure 9 , the mapping deployment network is responsible for generating a new deployment plan. The graph convolutional layer (Graph-Conv) is used to process the adjacency matrix and node features to extract features; the fully connected layer (FC) is used to output the coordinate positions of each sub-model on the physical core. X_coordinate is the coordinate of the output sub-model on the X-axis, Y_coordinate is the coordinate of the output sub-model on the Y-axis, dist_x and dist_y are respectively used to represent the distribution probabilities of the sub-model on the X-axis and Y-axis, and action is to determine the specific deployment plan according to dist_x and dist_y; Probs_1 and Probs_2: are the probability distributions output by the historical deployment plan and the current new deployment plan respectively, corresponding to the mapping coordinate distribution information. MES_Loss is the mean square error loss function, Q1 is the first expected effect value corresponding to the historical deployment plan, Q2 is the second expected effect value corresponding to the current new deployment plan, and reward is the incentive signal calculated according to the third expected effect value output by the optimized reinforcement learning incentive network, which is used to guide the update of the mapping deployment network.
[0098] In some embodiments, the present application further provides a deployment optimization device for training a spiking neural network, including: a physical node module, configured to obtain first topology information corresponding to a plurality of physical computing units, and construct a physical node matrix corresponding to the plurality of physical computing units based on the first topology information; a model slicing module, configured to slice a training model of the spiking neural network to obtain a plurality of logical computing units, and obtain second topology information corresponding to the plurality of logical computing units; a logical node module, configured to construct an adjacency matrix and a node feature matrix corresponding to the plurality of logical computing units based on the second topology information; a model obtaining module, configured to obtain a preset mapping deployment network and a preset reinforcement learning incentive network; a mapping prediction module, configured to predict mapping coordinate distribution information of mapping the plurality of logical computing units to a plurality of nodes in the physical node matrix through the mapping deployment network according to the adjacency matrix and the node feature matrix; a deployment optimization module, configured to calculate a model loss through the reinforcement learning incentive network according to the mapping coordinate distribution information, and update network parameters of the mapping deployment network according to the incentive information generated by the model loss to obtain a trained mapping deployment network; a mapping deployment module, configured to deploy the plurality of logical computing units to the plurality of physical computing units based on the trained mapping deployment network.
[0099] In some embodiments, the logical node module is further configured to obtain the data dependency relationship, the total data transmission amount, and the total data reception amount of the plurality of logical computing units according to the second topology information; construct an adjacency matrix according to the data dependency relationship of the plurality of logical computing units; and construct a node feature matrix according to the total data transmission amount and the total data reception amount of the plurality of logical computing units.
[0100] In some embodiments, the logical node module is further configured to generate a first zero-value matrix with M rows and M columns according to the number M of logical computing units; determine whether there is data transmission between each logical computing unit and other logical computing units according to the data dependency relationship of the plurality of logical computing units, and if there is data transmission between two logical computing units, set the element value at the corresponding position in the first zero-value matrix to 1 to obtain an adjacency matrix.
[0101] In some embodiments, the logical node module is further configured to generate a second zero-value matrix and a third zero-value matrix with M rows and M columns according to the number M of logical computing units; set the element value at the corresponding position in the second zero-value matrix to the total data transmission amount according to the total data transmission amount of the plurality of logical computing units to obtain a transmitted data volume matrix; set the element value at the corresponding position in the third zero-value matrix to the total data reception amount according to the total data reception amount of the plurality of logical computing units to obtain a received data volume matrix; and obtain a node feature matrix according to the transmitted data volume matrix and the received data volume matrix.
[0102] In some embodiments, the mapping deployment network includes a graph convolutional layer, a first fully connected layer, and a second fully connected layer. The mapping prediction module is further configured to perform convolutional feature extraction on the adjacency matrix and the node feature matrix through the graph convolutional layer to obtain convolutional sampling features; predict the X-axis coordinate distribution information of the logical computing units mapped to multiple nodes in the physical node matrix through the first fully connected layer based on the convolutional sampling features; predict the Y-axis coordinate distribution information of the logical computing units mapped to multiple nodes in the physical node matrix through the second fully connected layer based on the convolutional sampling features; obtain the mapping coordinate distribution information according to the X-axis coordinate distribution information and the Y-axis coordinate distribution information; wherein, the number of logical computing units is the same as the number of physical computing units.
[0103] In some embodiments, the deployment optimization module is further configured to calculate, through the reinforcement learning incentive network, a first expected effect value corresponding to the mapping coordinate distribution information, and calculate a second expected effect value corresponding to the mapping deployment network when executing the historical deployment scheme; perform mean square error loss calculation on the first expected effect value and the second expected effect value to obtain a model loss; wherein, the expected effect value is used to characterize the total data transmission amount and the total delay generated when performing deployment based on the reinforcement learning incentive network.
[0104] In some embodiments, the deployment optimization module is further configured to optimize the reinforcement learning incentive network according to the model loss, and generate incentive information through the optimized reinforcement learning incentive network; update the network parameters of the mapping deployment network according to the incentive information.
[0105] In some embodiments, the deployment optimization module is further configured to generate incentive information through the optimized reinforcement learning incentive network, including: calculating the total data transmission amount, the total delay, and a third expected effect value corresponding to the mapping coordinate distribution information through the optimized reinforcement learning incentive network; performing weighted calculation on the total data transmission amount, the total delay, and the third expected effect value to obtain the incentive information.
[0106] Reference Figure 10 , Figure 10 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the deployment optimization method for training the pulsed neural network in any one of the above embodiments. For example, it executes the method steps S110 to S170 described above, Figure 1 executes the method steps S210 to S220 described above, Figure 2 executes the method steps S310 to S320 described above, Figure 3 executes the method steps S410 to S440 described above, Figure 4 executes the method steps S510 to S540 described above, Figure 5 executes the method steps S510 to S540 described above.Figure 6 The method steps S610 to S620 in Figure 7 The method steps S710 to S720 in
[0107] The electronic device 1000 according to an embodiment of the present application includes one or more processors 1010 and a memory 1020. Figure 10 Taking one processor 1010 and one memory 1020 as an example in
[0108] The processor 1010 and the memory 1020 can be connected through a bus or other means. Figure 10 Taking the connection through a bus as an example in
[0109] The memory 1020, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory 1020 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 1020 may optionally include a memory 1020 that is remotely disposed relative to the processor 1010. These remote memories can be connected to the electronic device 1000 through a network. At the same time, examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0110] In some embodiments, when the processor executes a computer program, it executes the deployment optimization method for training a pulsed neural network according to any one of the above embodiments at a preset interval.
[0111] Those skilled in the art can understand that Figure 10 The device structure shown in
[0112] In Figure 10 In the electronic device 1000 shown, the processor 1010 can be used to call the deployment optimization method for training a pulsed neural network stored in the memory 1020, so as to implement the deployment optimization of training a pulsed neural network.
[0113] Based on the above hardware structure of the electronic device 1000, various embodiments of the deployment optimization device for training a pulsed neural network of the present application are proposed. At the same time, the non-transitory software programs and instructions required to implement the deployment optimization method for training a pulsed neural network in the above embodiments are stored in the memory. When executed by the processor, the deployment optimization method for training a pulsed neural network in the above embodiments is executed.
[0114] An embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions for executing the above-described deployment optimization method for training a spiking neural network, enabling the above one or more processors to execute the deployment optimization method for training a spiking neural network according to any one of the above embodiments. For example, execute the method steps S110 to S170 described above, execute the method steps S210 to S220 described above, Figure 1 execute the method steps S310 to S320 described above, Figure 2 execute the method steps S210 to S220 described above, Figure 3 execute the method steps S310 to S320 described above, Figure 4 execute the method steps S410 to S440 described above, Figure 5 execute the method steps S510 to S540 described above, Figure 6 execute the method steps S610 to S620 described above, Figure 7 execute the method steps S710 to S720 described above.
[0115] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed to multiple network nodes. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0116] Those of ordinary skill in the art will understand that all or some of the steps and systems disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer-readable storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer-readable storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVDs) or other optical disk storage, magnetic cassettes, tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and that can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.
[0117] The above is a specific description of the preferred embodiment of the present application, but the present application is not limited to the above embodiments. Those skilled in the art can make various equivalent deformations or substitutions without departing from the spirit of the present application, and these equivalent deformations or substitutions are all included within the scope defined by the claims of the present application.
Claims
1. A deployment optimization method for pulse neural network training, characterized in that: include: Acquire first topology information corresponding to a plurality of physical computing units, and construct a physical node matrix corresponding to the plurality of physical computing units based on the first topology information; Performing a training model segmentation on the pulse neural network to obtain a plurality of logic computing units, and acquiring second topology information corresponding to the plurality of logic computing units; Based on the second topology information, construct an adjacency matrix and a node feature matrix corresponding to the plurality of logical computing units; Get the preset mapping deployment network, and get the preset reinforcement learning incentive network; Predicting mapping coordinate distribution information of the plurality of logical computing units mapped to the plurality of nodes in the physical node matrix according to the adjacency matrix and the node feature matrix through the mapping deployment network; Calculating the model loss according to the mapping coordinate distribution information through the reinforcement learning incentive network, and updating the network parameters of the mapping deployment network according to the incentive information generated by the model loss to obtain a trained mapping deployment network; Based on the trained mapping deployment network, the plurality of logical computing units are deployed to the plurality of physical computing units.
2. The deployment optimization method for pulse neural network training according to claim 1 is characterized in that: The step of constructing the adjacency matrix and the node feature matrix corresponding to the plurality of logic computing units based on the second topology information includes: Obtaining data dependency, total data transmission, and total data reception of the plurality of the logical computing units according to the second topology information; Constructing an adjacency matrix according to the data dependency relationship of the plurality of logic computing units; A node characteristic matrix is constructed according to the total amount of data sent and the total amount of data received by the plurality of logic computing units.
3. The deployment optimization method for pulse neural network training according to claim 2 is characterized in that: The step of constructing an adjacency matrix according to the data dependency relationship of the plurality of logic computing units comprises: According to the number M of the logic calculation units, a first zero value matrix with M rows and M columns is generated; According to the data dependency relationship of the plurality of logic computing units, determine whether there is data transmission between each of the logic computing units and the other logic computing units; if there is data transmission between the two logic computing units, set the element value at the corresponding position in the first zero value matrix to 1 to obtain an adjacency matrix.
4. The deployment optimization method for pulse neural network training according to claim 2, characterized in that: The step of constructing a node feature matrix according to the total amount of data sent and the total amount of data received by the plurality of logic computing units includes: According to the number M of the logic calculation units, generate a second zero value matrix and a third zero value matrix with M rows and M columns; According to the total amount of data sent by the plurality of logic calculation units, the element value at the corresponding position in the second zero value matrix is set to the total amount of data sent, so as to obtain a sent data amount matrix; According to the total amount of data received by the plurality of logic calculation units, the element value at the corresponding position in the third zero value matrix is set to the total amount of data received, so as to obtain a received data amount matrix; A node feature matrix is obtained according to the sent data amount matrix and the received data amount matrix.
5. The deployment optimization method for pulse neural network training according to claim 1, characterized in that: The mapping deployment network includes a graph convolution layer, a first fully connected layer, and a second fully connected layer. The mapping deployment network predicts mapping coordinate distribution information of the plurality of logical computing units mapped to the plurality of nodes in the physical node matrix according to the adjacency matrix and the node feature matrix, including: Performing convolution feature extraction on the adjacency matrix and the node feature matrix through the graph convolution layer to obtain convolution sampling features; Predicting, through the first fully connected layer and based on the convolution sampling features, X-axis coordinate distribution information of the logical computing unit mapped to multiple nodes in the physical node matrix; Predicting, by the second fully connected layer based on the convolution sampling features, Y-axis coordinate distribution information of the logical computing unit mapped to multiple nodes in the physical node matrix; Mapping coordinate distribution information is obtained according to the X-axis coordinate distribution information and the Y-axis coordinate distribution information.
6. The method for optimizing the deployment of pulse neural network training according to claim 1, characterized in that: The calculating the model loss according to the mapping coordinate distribution information by the reinforcement learning incentive network includes: Calculating a first expected effect value corresponding to the mapping coordinate distribution information through the reinforcement learning incentive network, and calculating a second expected effect value corresponding to when the mapping deployment network executes a historical deployment scheme; Performing mean square error loss calculation on the first expected effect value and the second expected effect value to obtain a model loss; The expected effect value is used to characterize the total amount of data transmission and the total delay generated when the reinforcement learning incentive network is deployed.
7. The method for optimizing the deployment of pulse neural network training according to claim 6, characterized in that: The updating of network parameters of the mapping deployment network according to the incentive information generated by the model loss includes: Optimizing the reinforcement learning incentive network according to the model loss, and generating incentive information through the optimized reinforcement learning incentive network; The network parameters of the mapped deployment network are updated according to the incentive information.
8. The method for optimizing the deployment of pulse neural network training according to claim 7, characterized in that: The step of generating incentive information through the optimized reinforcement learning incentive network includes: Calculate the total data transmission amount, the total delay and the third expected effect value corresponding to the mapping coordinate distribution information through the optimized reinforcement learning incentive network; The total amount of data transmission, the total delay and the third expected effect value are weightedly calculated to obtain incentive information.
9. The method for optimizing the deployment of pulse neural network training according to claim 1, characterized in that: The number of the logical computing units is the same as the number of the physical computing units.
10. A deployment optimization device for pulse neural network training, characterized in that: include: A physical node module, used to obtain first topology information corresponding to a plurality of physical computing units, and construct a physical node matrix corresponding to the plurality of physical computing units based on the first topology information; A model segmentation module, used to segment the training model of the pulse neural network to obtain a plurality of logical computing units, and obtain second topology information corresponding to the plurality of logical computing units; A logical node module, configured to construct an adjacency matrix and a node feature matrix corresponding to the plurality of logical computing units based on the second topology information; A model acquisition module is used to acquire a preset mapping deployment network and a preset reinforcement learning incentive network; A mapping prediction module, used to predict mapping coordinate distribution information of the plurality of logical computing units mapped to the plurality of nodes in the physical node matrix according to the adjacency matrix and the node feature matrix through the mapping deployment network; A deployment optimization module, used to calculate the model loss according to the mapping coordinate distribution information through the reinforcement learning incentive network, and update the network parameters of the mapping deployment network according to the incentive information generated by the model loss to obtain a trained mapping deployment network; A mapping deployment module is used to deploy the multiple logical computing units to the multiple physical computing units based on the trained mapping deployment network.
11. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the deployment optimization method for pulse neural network training as described in any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium storing computer-executable instructions for executing the deployment optimization method for pulse neural network training as described in any one of claims 1 to 9.