Automatic parallel method based on double TMAN and strategy gradient optimization
By extracting computational graph features based on the dual Tumamba network and combining reinforcement learning optimization methods, the problems of insufficient expression capabilities of computational graph features and the stability of strategy gradient algorithms in device placement are solved, and more efficient and stable parallel strategy search is achieved.
Patent Information
- Application Number
- CN202411698245.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-26
AI Technical Summary
The lack of ability to express the computing graph features in the existing equipment placement method leads to fluctuations in the performance of reinforcement learning solutions, and the changes in the old and new strategies of traditional policy gradient algorithms are too large, resulting in inaccuracy and stability problems.
An automatic parallel method based on dual Tumamba network and policy gradient optimization is designed. Computation graph features are extracted through dual Tumamba network, combining node attributes, topological space and semantic features to generate powerful node representations, and an additional loss layer is introduced to quickly capture subtle changes in the environment in the reinforcement learning module.
It significantly improves the expression ability of the computational graph, reduces the time cost of model parallel strategy search, obtains better parallel strategy, and improves the learning efficiency, stability and exploration ability of the strategy.
Smart Images

Figure CN119558378A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of automatic parallel technology optimization of AI models, and specifically relates to an automatic parallel method based on a dual Tumanba network and policy gradient optimization. Background Art
[0002] In recent years, the scale of basic models has expanded dramatically, but the growth of computing power and storage capacity has not kept pace, resulting in large-scale AI model training relying on the collaboration of multiple devices. This challenge has prompted the research and industry communities to continuously explore new strategies for efficiently training large-scale models.
[0003] Automatic parallel technology provides an effective way to solve the problem of large-scale model training. It automatically generates parallel strategies, efficiently designs distributed training strategies for models, and accelerates the distributed computing of models on multiple devices, allowing developers to focus more on the innovation of algorithm models. At present, the core methods for implementing distributed model training include data parallelism and model parallelism. The core of data parallelism is to divide and distribute the training data to multiple devices, and replicate the complete AI model on these devices at the same time. Each device independently processes its assigned data subset and regularly synchronizes model parameters through a communication mechanism to ensure global consistency. Model parallelism is designed for processing ultra-large-scale models. When the complexity of the model exceeds the carrying capacity of a single device, this method divides the model and its computing tasks into multiple parts and flexibly deploys them on different devices. This process is also vividly called "device placement" in academia. It allows each device to focus on a sub-fragment of the model and complete the overall training task through efficient collaboration.
[0004] The learning ability of reinforcement learning and the effective expression of computational graph features are key factors driving the efficiency and performance of automatic parallel strategy search. In terms of the optimization of reinforcement learning modules, although ColocRL, hierarchical device placement method (HDP) and reinforcement genetic algorithm learning (REGAL) use the Reinforce algorithm to accelerate the parallel strategy search of AI models, the low sample efficiency problem they face significantly prolongs the training cycle. Methods such as Placeto, GraphSAGE and P-GNN use Markov decision process (MDP) to optimize device configuration, accurately capture state transition probabilities and immediate rewards, and find the optimal path to maximize long-term returns. However, MDP requires the Markov property to be satisfied, that is, the next state depends only on the current state and action, and has nothing to do with the historical state. Post, Spolight, GDP, Mars and Trinity use the proximal policy optimization (PPO) algorithm to optimize device placement, and enhance the stability of training by improving sampling efficiency and limiting the update range of new strategies. In terms of graph embedding technology, Placeto and Trinity, for example, ignore the crucial node position information when constructing the node embedding system, which may cause the key features to be marginalized, and then cause the computational graphs with similar structures to be confused in the vector space, seriously interfering with the accuracy and effectiveness of the operator placement strategy. Although GraphSAGE attempts to aggregate the local information of neighboring nodes by random sampling to capture the subtle differences in the computational graph, this approach has the risk of random loss of important information. As the model complexity increases, the number of operators surges, and the sampling scale also expands accordingly, which not only slows down the training process, but also significantly increases the computational burden and execution time, becoming another bottleneck restricting performance. P-GNN and Aware attempt to integrate position encoding into node representation to make up for the regret of missing position information. However, their methods all rely on aggregating the node representation farthest from the target node to integrate position information. This strategy is limited by the inherent defects of the message passing mechanism (MPNNs), resulting in limited overall feature expression capabilities of the computational graph, making it difficult to fully reflect its internal structure and complexity, and ultimately affecting the efficiency and depth of parallel strategy search. More importantly, all current graph embedding-based device placement methods, including Placeto, GraphSAGE, P-GNN, Trinity, Aware, etc., ignore the potential impact of semantic information in the computational graph on device placement decisions. This neglect may not only limit the further improvement of model parallel performance, but also hinder the maximization of overall efficiency. Summary of the invention
[0005] Aiming at the problem of insufficient expression ability of computation graph features in existing equipment placement methods and performance fluctuation when solving strategies with reinforcement learning, the present invention designs and implements an automatic parallel method based on dual graph mamba network and policy gradient optimization, which effectively reduces the time cost of model parallel strategy search and obtains a better parallel strategy. First, the computation graph features are extracted through the dual graph mamba network. The network contains two branches: one branch (graph mamba branch) uses the node selection mechanism to enhance long-distance dependencies, thereby improving the expression ability of graph embedding; the other branch (decoupled graph neural network branch) combines node attributes, topological space and semantic features to generate a powerful and complete node representation, where the semantic features are constructed by the attributes of computation graph operators to provide supplementary information for the topological graph. Then, the features extracted by the two branches are fused to generate the final computation graph features. This process improves the expression ability of the computation graph by deeply mining the semantic information in the graph. Finally, the obtained computation graph features are input into the reinforcement learning iterative solution module. In this module, an additional loss layer is introduced for each node, so that the algorithm can quickly capture subtle changes in the environment, allowing learning and adjustment of decisions at a finer granularity. By adjusting the strategy through feedback, this method significantly improves the learning efficiency, stability and exploration ability of the strategy, and ultimately obtains the optimal parallel strategy.
[0006] The present invention provides an automatic parallel method based on a dual-tumanba network and policy gradient optimization, the steps of which are as follows:
[0007] Step 1: Obtain a public AI model dataset, perform operator fusion on each computational graph G in the dataset, and obtain the feature matrix of the computational graph Where V represents the node set of the computation graph G, and F is the feature of the nodes in the computation graph G, as follows:
[0008] Obtain a public AI model dataset, and perform operator fusion on each computational graph G in the AI model dataset using the ColocRL algorithm. The fused computational graph contains the relevant attributes of all operators in the computational graph, including operator type, input, output, and access identifier. Construct the original feature vector of the operator, i.e., node encoding initialization, based on the operator-related attributes, and obtain the complete feature matrix X of the computational graph. Where V represents the node set of the computational graph G, and F is the feature of the nodes in the graph.
[0009] Step 2: Construct a dual Tumanba network consisting of a Tumanba branch and a decoupled graph neural network branch, and transform the feature matrix Input into two branches respectively to get the feature representation X M With X D ;
[0010] Step 2.1: Tumanba branch generates node encoding matrix M based on feature matrix X 0With the edge coding matrix Q, the edge coding matrix Q is passed through the message passing network MPNN to obtain the intermediate representation N t ; Node encoding matrix M 0 Input to the Tumanba module to extract features and obtain the intermediate feature matrix M t , M t and N t Add the average of each element to get the feature matrix M T ;M T Input to the multilayer perceptron to get M T′ ;M T′ With N t The final feature representation X of the Tumanba branch is obtained through the message passing network M .
[0011] Sub-step 2.1.1: Obtain the intermediate feature matrix by adding the adjacency matrix D of X to the identity matrix I Through the matrix Perform Laplace normalization to obtain the edge coding matrix The edge encoding matrix Q is input into the message passing network to obtain the intermediate representation
[0012] Sub-step 2.1.2: Feature matrix X and intermediate feature matrix Multiply to get the node encoding matrix M 0 , node encoding matrix M 0 Input to the Tumanba module to get the intermediate node code M t ; Node code M t Through the selective state management SSM mechanism of the Tumanba module, the state M at the next moment is obtained t+1 ;
[0013] The implementation process of the selective state management SSM mechanism first introduces three learnable weight matrices W B ,W c and W Δ , respectively for M t Perform linear transformation to obtain projection parameters B, C and discrete step length Δ activated by Softplus; use the evolution parameter A obtained at the previous moment, the projection parameter B at the current moment, and the discrete step length Δ to calculate the evolution parameter and in Related to Δ*A through an exponential function, It is calculated based on the difference between the inverse matrix of Δ*A and the exponential function; then by combining M t-1 and M t , as well as the projection parameter C and the evolution parameter and Update the current state to get M t+1 .
[0014] Sub-step 2.1.3: Use the message passing network to process the feature matrix X and obtain the intermediate representation N t+1 ; N t+1 and M t+1 Accumulate and get the fusion feature matrix M at time t t+1′ , and M t+1′ Input into the multilayer perceptron to obtain the feature matrix M at the next moment t+2 After T times of the same iterative operation, the iterated feature matrix M is finally obtained. T .
[0015] Sub-step 2.1.4: After T iterations, the feature matrix M T With the middle representation N T At the same time, it is used as input and processed again through the message passing network to obtain the fusion feature matrix M at time T T′ ; Finally, M T′ As the computational graph feature representation of the Tumanba branch, it is denoted as
[0016] Step 2.2: Take the feature matrix X as the node attribute feature A 0 , and A 0 The semantic feature C is obtained through the GCN network with the edge encoding matrix Q 0 , while A 0 After multiple layers of Tumanba modules, we get the semantic intermediate representation B 0 ; A 0 , C 0 , B 0 AT, CT and BT are obtained through weight sharing and structural consistency constraints. The final feature representation of the decoupled graph neural network branch is obtained through weights.
[0017] Sub-step 2.2.1: Take the feature matrix X as node attribute features The initial node attribute feature A 0 Input the edge encoding matrix Q into the graph convolutional network GCN to obtain the initial structural features And use Tumanba module to analyze the node attribute feature A 0 Processing; get the initial semantic features
[0018] Sub-step 2.2.2: Get A 0 , C 0 , B 0 The node attribute feature matrix A at the final moment is obtained by combining weight sharing and structural consistency constraints T , topological characteristic matrix C Tand the semantic information feature matrix B T , and obtain the final feature representation To achieve this goal, we first introduce a learnable shared reconstruction factor matrix W S , calculate the reconstructed feature matrix A t ,B t and C t , and optimize the relationship between the three by minimizing the error. In the optimization process, the Sigmoid function of nonlinear transformation and a series of hyperparameters are used to balance the contribution of different feature matrices. Finally, after multiple iterations, A t ,B t and C t After optimization, the feature matrix A is obtained T ,B T and C T , A T ,B T and C T Connect them in series and constrain the weights to obtain the final feature representation of the decoupled graph neural network branches.
[0019] Step 3: Extract the computational graph feature representation X from the Tumanba branch M The final feature representation X of the decoupled graph neural network branch D The summed values are used as input and fed into the LSTM network for feature fusion to obtain the final feature representation of the dual Tumanba network.
[0020] Step 4: Represent the features obtained in step 3 The input is sent to the reinforcement learning iterative solution module, and the reinforcement learning characteristics (proximal policy gradient optimization) are used to obtain the optimal parallel strategy by continuously iterating and optimizing the intermediate reward value.
[0021] The present invention has the following beneficial effects:
[0022] (1) The dual Tumanba graph neural network is used to effectively improve the expression ability of the computational graph. Specifically, the decoupled graph neural network branch constructs a semantic graph through the attribute feature space of the computational graph operator to provide supplementary information for the topological graph of the computational graph and significantly improves the node expression ability. The Tumanba branch enhances the long-distance dependency relationship in the graph encoding through the node selection mechanism, further enhancing the graph embedding expression ability.
[0023] (2) The policy gradient reinforcement learning method is used to effectively solve the inaccuracy and stability problems caused by the large difference between the new and old strategies of the traditional policy gradient algorithm in the device placement problem. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is the overall architecture diagram;
[0025] Figure 2 It is based on the dual-tumanba coding module graph. DETAILED DESCRIPTION
[0026] The present invention will be further described below with reference to the accompanying drawings and specific implementation steps:
[0027] Figure 1 The figure shows the overall process of the automatic parallel method based on the dual graph mamba network and policy gradient optimization, such as converting an AI model into a graph Where V represents the set of computational graph operators (nodes), operator v i ∈V represents a single operator (such as matrix multiplication, convolution, etc.); E represents the set of directed edges between nodes, e i,j ∈E represents the operator v i and v j Given D = {d1, d2, d3, …, d m} represents the devices available in the cluster, where d i ∈D represents a computing device (such as CPU or GPU). Given computing resources D and computational graph Finding Mappings i (i.e. parallel strategy, where s i ∈S strategy set) so that every operator v i Corresponding to a device d i The ultimate goal is to find a device placement strategy i , when calculating the graph The operator follows the strategy s i When placing, minimize the computational graph Execution time The neural network computation graph and random device placement strategies i As input, then traverse all nodes v in the computation graph i ∈V, first, it uses a dual graph mamba network to obtain the graph embedding representation Secondly, for each selected node v i , which applies a reinforcement learning (proximal policy optimization) based policy s i v i Assigned to device d i Then, it calculates the execution time Update reinforcement learning policy s i , and continuously optimize the placement strategy of subsequent nodes. Figure 2 The figure shows a process of extracting computational graph feature representation based on a dual graph mamba network, including the following steps:
[0028] Step 1: Obtain a public AI model dataset and perform operator fusion on each computational graph G in the dataset. The fused computational graph contains the relevant attributes of all operators in the computational graph (including operator type, input, output, access identifier, etc.). Construct the original feature vector of the operator, i.e., node encoding initialization, based on the operator-related attributes to obtain the complete feature matrix X of the computational graph. Where V represents the node set of the computational graph G, and F is the feature of the nodes in the graph.
[0029] Step 2: Construct a dual Tumanba network consisting of a Tumanba branch and a decoupled graph neural network branch, and transform the feature matrix Input into two branches respectively to get the feature representation X M With X D .
[0030] Step 2.1: Tumanba branch generates node encoding matrix M based on feature matrix X 0 With the edge coding matrix Q, the edge coding matrix Q is passed through the message passing network MPNN to obtain the intermediate representation N t ; Node encoding matrix M 0 Input to the Tumanba module to extract features and obtain the intermediate feature matrix M t , M t and N t Add the average of each element to get the feature matrix M T ;M T Input to the multilayer perceptron to get M T′ ;M T′ With N t The final feature representation X of the Tumanba branch is obtained through the message passing network M .
[0031] Sub-step 2.1.1: Obtain the intermediate feature matrix by adding the adjacency matrix D of X to the identity matrix I Through the matrix Perform Laplace normalization to obtain the edge coding matrix The edge encoding matrix Q is input into the message passing network to obtain the intermediate representation
[0032] Sub-step 2.1.2: Feature matrix X and intermediate feature matrix Multiply to get the node encoding matrix M 0 , node encoding matrix M 0 Input to the Tumanba module to get the intermediate node code M t ; At the same time, node encoding M t Rely on the Tumanba module to extract features and get M t+1 , first introduce the learnable weight matrix W B ,W c and WΔ , and obtain the projection parameters B, C and discrete step length Δ. Then, the evolution parameters and projection parameters The continuous state is converted into a discrete state, and finally the Tumanba module is used for selective state management (SSM) to update the current state to obtain M t+1 .
[0033] B=W B M t ,C=W c M t ,Δ=Softplus(W Δ M t )
[0034]
[0035] Sub-step 2.1.3: Use the message passing network to process the feature matrix X and obtain the intermediate representation N t+1 ; N t+1 and M t+1 Accumulate and get the fusion feature matrix M at time t t+1′ , and M t+1′ Input into the multilayer perceptron to obtain the feature matrix M at the next moment t+2 .
[0036] Sub-step 2.1.4: Translate the intermediate representation N T And through the multi-layer perceptron to obtain the feature matrix M T As input, after passing through the message passing network, the final computational graph feature representation of the Tumanba branch is obtained
[0037] X M =Combine(N T ,M T )
[0038] Step 2.2: Extract features for the decoupled graph neural network branch and use the feature matrix X as the node attribute feature A 0 , and A 0 The semantic feature C is obtained through the GCN network with the edge encoding matrix Q 0 , while A 0 After multiple layers of Tumanba modules, we get the semantic intermediate representation B 0 ; A 0 , C 0 , B 0 A is obtained by weight sharing and structural consistency constraints. T , C T and B T , and finally the three are weighted to obtain the final feature representation of the decoupled graph neural network branch
[0039] Sub-step 2.2.1: Extract node attributes and topological features. First, extract node attribute features from the complete information of the computational graph X (i.e., feature matrix) At the same time, the topological structure of the calculation graph is analyzed and the topological graph features are extracted. Based on the extracted node attribute feature A 0 , get the initial semantic features It is then input into the graph convolutional network (GCN), and after multiple layers of convolution operations and possible nonlinear activation functions, an intermediate representation of the topological feature matrix is obtained.
[0040] Sub-step 2.2.2: Set node attribute feature A 0 Input into the Tumanba neural network module, further process the node attribute features, and obtain the semantic information feature matrix Then, the intermediate representation of the semantic information feature matrix is obtained through a multi-layer Tumanba neural network.
[0041] Sub-step 2.2.3: Obtain the node attribute feature matrix A at time t t , the intermediate representation of the topological feature matrix C t and the intermediate representation B of the semantic information feature matrix t In the process, the three get the final A at time T through weight sharing and structural consistency constraints. T ,B T and C T , and the final feature representation of the decoupled graph neural network branch is obtained by constraining the ε weight
[0042] Sub-step 2.2.3.1: Introduce the learnable shared reconstruction factor matrix W S To reconstruct the potential correlation between the adjacency matrices. At the same time, in order to ensure the symmetry of the reconstructed matrix, constrain W S =WW T .in This is achieved by combining the node attribute feature matrix A with the learnable shared reconstruction factor matrix W S and its transpose A T The product of is used to capture the potential inter-node correlation in A. and Similarly, they represent the semantic information feature matrix B and the topological feature matrix C through W S The reconstructed adjacency relationship is represented. and These items are based on A, B and C, respectively, with W added Sand its transpose-related additional terms (such as and ). These additional terms introduce additional information to capture the complex relationship between feature matrices. The specific calculation and update formulas are as follows:
[0043]
[0044] Among them, A is the node attribute feature matrix, B is the semantic information feature matrix, C is the topological feature matrix, and W, F, K and H are bias matrices.
[0045] Sub-step 2.2.3.2: A t , B t and C t The error between and By reconstructing the factor W S Minimize. Where ε is the node attribute feature A t , semantic feature B t With topology C t The balance coefficient is used to balance the weight relationship between the three, and the value range is 0-1.
[0046]
[0047] Sub-step 2.2.3.3: σ is the Sigmoid function of the nonlinear transformation. L1, L2, and L3 are used to balance the hyperparameters contributed by the three graph encodings (A, B, C) in the decoupled graph neural network. After T iterations, the final A T , B T , C T Connect them in series to get the final feature representation
[0048]
[0049] X D =Concat(A T ,B T ,C T )
[0050] Step 3: Extract the computational graph feature representation X from the Tumanba branch M The final feature representation X of the decoupled graph neural network branch D As input, it is input into the LSTM network for feature fusion to obtain the final feature representation of the dual Tumanba network
[0051] Step 4: Represent the features obtained in step 5 The input is sent to the policy gradient (PPO) iterative solution module, and the optimal parallel strategy is obtained by continuously iterating and optimizing the reward value using the characteristics of the policy gradient method.
[0052] Example:
[0053] In order to verify the effectiveness of an automatic parallel method based on dual-graph mamba network and policy gradient optimization, three carefully constructed datasets, ptb, cifar10, and nmt, were selected for testing. Among them, the ptb dataset focuses on the recurrent neural network architecture, cifar10 is built based on a convolutional neural network, and the nmt dataset is generated by adjusting the parameters of the neural machine translation model. Each dataset contains 17 randomly extracted computational graphs, and the average number of operators in the computational graphs in nmt, cifar10, and ptb is 190, 300, and 500, respectively. The performance is evaluated by two indicators: single-round iterative training time and policy search time: the shorter the single-round iterative training time, the more efficient the parallel strategy; the less the policy search time, the faster the policy search speed. Experimental data reveal that compared with existing device placement methods such as Placeto, GraphSAGE, P-GNN, and CP-GNNAK, the present invention proposes and implements an automatic parallel method based on dual-graph mamba network and policy gradient optimization, which shows significant advantages in both policy search speed and parallel strategy quality.
[0054] Table 1 intuitively shows the execution time of each method under different data sets and numbers of graphics cards. The parallel strategy implemented by the present invention is significantly better than other methods. Compared with the Placeto method, the parallel strategy obtained by the present invention reduces the average model training time by 16.58%. Table 2 lists in detail the calculation time of each method under different data sets and numbers of graphics cards, further proving the excellent performance of the present invention in strategy search speed. Compared with the Placeto method, the average search speed of the present invention to obtain the optimal parallel strategy is increased by 31.53 times.
[0055] Table 1 Comparison of single-round iterative training time of different methods on different datasets with different card numbers (unit: sec)
[0056]
[0057] Table 2 Comparison of strategy search time of different methods on different data sets with different card numbers (unit: sec)
[0058]
Claims
1. An automatic parallel method based on dual-tumanba network and policy gradient optimization, characterized in that: The steps include: Step 1: Obtain a public AI model dataset, perform operator fusion on each computational graph G in the dataset, and obtain the feature matrix of the computational graph Where V represents the node set of the computation graph G, and F represents the features of the nodes in the computation graph G; Step 2: Construct a dual Tumanba network consisting of a Tumanba branch and a decoupled graph neural network branch, and transform the feature matrix Input into two branches respectively to get the feature representation X M With X D ; Step 3: Represent the computational graph features extracted by the Tumanba branch as X M Feature representation of decoupled graph neural network branches X D Calculate the mean and input it into the LSTM network for feature fusion to obtain the final feature representation of the dual Tumanba network Step 4: Represent the features The result is input into the reinforcement learning iterative solution module, and the proximal policy gradient optimization method of reinforcement learning is used to obtain the optimal parallel strategy by continuously iterating and optimizing the intermediate reward value.
2. The automatic parallel method based on dual-tumanba network and policy gradient optimization according to claim 1, characterized in that: The specific implementation process of step 1 is as follows: Obtain a public AI model dataset, and perform operator fusion on each computational graph G in the AI model dataset using the ColocRL algorithm. The fused computational graph contains the relevant attributes of all operators in the computational graph, including operator type, input, output, and access identifier. Construct the original feature vector of the operator, i.e., node encoding initialization, based on the operator-related attributes to obtain the complete feature matrix of the computational graph. Where V represents the node set of the computational graph G, and F is the feature of the nodes in the graph.
3. The automatic parallel method based on dual-tumanba network and policy gradient optimization according to claim 2, characterized in that: The specific implementation process of step 2 is as follows: Step 2.1: Tumanba branch generates node encoding matrix M based on feature matrix X 0 With the edge coding matrix Q, the edge coding matrix Q is passed through the message passing network MPNN to obtain the intermediate representation N t ; Node encoding matrix M 0 Input to the Tumanba module to extract features and obtain the intermediate feature matrix M t , M t and N t Add and average each element to get the feature matrix M T ; M T Input to the multilayer perceptron to get M T′ ;M T′ The final feature representation X of the Tumanba branch is obtained by the message passing network with Nt M ; Step 2.2: Take the feature matrix X as the node attribute feature A 0 , and A 0 The semantic feature C is obtained through the GCN network with the edge encoding matrix Q 0 , while A 0 After multiple layers of Tumanba modules, we get the semantic intermediate representation B 0 ; A 0 , C 0 , B 0 A is obtained by weight sharing and structural consistency constraints. T , C T and B T , and finally the three are weighted to obtain the final feature representation of the decoupled graph neural network branch 4. The automatic parallel method based on dual-Tumanba network and policy gradient optimization according to claim 3, characterized in that: The specific implementation process of step 2.1 is as follows: Step 2.1.1: Obtain the intermediate feature matrix by adding the adjacency matrix D of X and the identity matrix I Through the matrix Perform Laplace normalization to obtain the edge coding matrix The edge encoding matrix Q is input into the message passing network to obtain the intermediate representation Step 2.1.2: Feature matrix X and intermediate feature matrix Multiply to get the node encoding matrix M 0 , node encoding matrix M 0 Input to the Tumanba module to get the intermediate node code M t ; Node code M t Through the selective state management SSM mechanism of the Tumanba module, the state M at the next moment is obtained t+1 ; Step 2.1.3: Use the message passing network to process the feature matrix X and obtain the intermediate representation N t+1 ; N t+l and M t+1 Accumulate and get the fusion feature matrix M at time t t+1′ , and M t+1′ Input into the multilayer perceptron to obtain the feature matrix M at the next moment t+2 ; Step 2.1.4: After T iterations, the feature matrix M T With the middle representation N T At the same time, it is used as input and processed again through the message passing network to obtain the fusion feature matrix M at time T T′ ; Finally, M T′ As the computational graph feature representation of the Tumanba branch, it is denoted as 5. The automatic parallel method based on dual-tumanba network and policy gradient optimization according to claim 4, characterized in that: The implementation process of the selective state management SSM mechanism is as follows: First, three learnable weight matrices W are introduced: B , W c and W Δ , respectively for M t Perform linear transformation to obtain projection parameters B, C and discrete step length Δ activated by Softplus; use the evolution parameter A obtained at the previous moment, the projection parameter B at the current moment, and the discrete step length Δ to calculate the evolution parameter and in Related to Δ*A through an exponential function, Then the difference between the inverse matrix of Δ*A and the exponential function is calculated; then by combining M t-1 and M t , as well as the projection parameter C and the evolution parameter and Update the current state to get M t+1 , the specific calculation is as follows: B=W B M t ,C=W c M t ,Δ=Softplus(W Δ M t ) 6. The automatic parallel method based on dual-tumanba network and policy gradient optimization according to claim 5, characterized in that: The specific implementation process of step 2.2 is as follows: Step 2.2.1: Take the feature matrix X as the node attribute feature The initial node attribute feature A 0 Input the edge encoding matrix Q into the graph convolutional network GCN to obtain the initial structural features And use Tumanba module to analyze the node attribute feature A 0 Processing; get the initial semantic features Step 2.2.2: Get A 0 , C 0 , B 0 The node attribute feature matrix A at the final moment is obtained by combining weight sharing and structural consistency constraints T , topological characteristic matrix C T and the semantic information feature matrix B T , and obtain the final feature representation 7. The automatic parallel method based on dual-Tumanba network and policy gradient optimization according to claim 6, characterized in that: The specific implementation process of step 2.2.2 is as follows: Step 2.2.3.1: Introduce the learnable shared reconstruction factor matrix W S Reconstruct the potential correlation between the adjacency matrix and constrain W S =WW T , the specific calculation and update formula are as follows: Among them, A is the node attribute feature matrix, B is the semantic information feature matrix, C is the topological feature matrix, W, F, K and H are bias matrices; Step 2.2.3.2: A t , B t and C t The error between and By reconstructing the factor W S Minimize; where ε is the node attribute feature A t , semantic feature B t With topology C t The balance coefficient is used to balance the weight relationship between the three, and the value range is 0-1. The specific formula is as follows: Step 2.2.3.3: After T iterations, the final A T , B T , C T Concatenate to get the final feature representation The specific formula is as follows: X D =Concat(A T ,B T ,C T ) σ is the Sigmoid function of nonlinear transformation; L1, L2 and L3 are hyperparameters.
Citation Information
Patent Citations
Neural network distributed automatic parallel training method based on AC reinforcement learning
CN116306897A
Multi-target chip layout optimization method based on hierarchical reinforcement learning
CN117787186A
AI model distributed automatic parallelization method based on position label representation
CN118378085A
Cross-modal hash learning method based on Mama and covariance interactive attention
CN118747843A
Image recognition method based on zero sample Mangbar model
CN118799704A