Architecture search method, device, equipment and storage medium for ultra-large-scale graphs
By combining local sampling and importance sampling strategies with peer learning methods, it solves the difficult problem of neural network architecture search in the existing technology for processing ultra-large-scale graph data, achieves the effect of quickly finding the optimal architecture, and improves processing efficiency and accuracy.
Patent Information
- Application Number
- CN202210794670.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-07
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-07-07
AI Technical Summary
Existing technologies are difficult to effectively process and train neural network architectures for ultra-large-scale graph data. As a result, the searched architecture is not suitable for the original graph, has poor scalability, and cannot handle the optimization of graph neural networks on a scale of hundreds of millions.
Obtain subgraphs of very large graphs through local sampling, use a pre-customized importance sampling strategy to sample multiple neural network architectures from the supernetwork, use peer learning methods to train these architectures, and iteratively perform subgraph sampling, architecture sampling and training steps , get the trained super network, and then perform an architecture search to find the optimal architecture.
This method can quickly find the optimal neural network architecture corresponding to extremely large graph data, improves the accuracy and efficiency of processing extremely large graph data, reduces training difficulty, and makes the architecture learning process smoother and faster.
Smart Images

Figure CN114997377B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of graph data processing technology, and more specifically, to an architecture search method, apparatus, device, and storage medium for ultra-large-scale graphs. Background Art
[0002] Graph data is a graph structure composed of points and edges, such as social network relationship graphs, protein molecular structure graphs, etc. Graph neural networks are specifically used to process graph data and complete tasks corresponding to graph data. Graph neural network architecture search is to search for suitable neural network architectures according to different graph data tasks. It is a hot research topic today. How to process ultra-large-scale graph data and quickly search for suitable architectures is a problem that needs to be solved now. In the prior art, the actual standard design of neural networks mostly follows the message passing framework. For the processing of ultra-large graph data, graph sampling methods are used to sample part of the graph from the ultra-large graph and train the neural network only on part of the graph. When searching for a graph neural network architecture, the architecture search is first performed through a small subgraph, and then expanded to a medium-sized graph.
[0003] In the existing technology, the processing methods for super-large graph data can only be used to expand and stabilize the training of a single graph neural network, but cannot process and train a super network, and thus cannot perform architecture search. The method of searching through a small subgraph cannot meet the errors caused by the complexity of the graph structure and the randomness of sampling, and cannot guarantee that the searched architecture is suitable for the original graph. In addition, its scalability is poor and cannot handle the tuning of graph neural networks with a scale of hundreds of millions. Summary of the invention
[0004] The embodiments of the present application provide an architecture search method, device, equipment and storage medium for ultra-large-scale graphs, aiming to quickly search for a neural network architecture that processes ultra-large-scale graph structure data.
[0005] A first aspect of an embodiment of the present application provides an architecture search method for a very large-scale graph, the method comprising:
[0006] Performing local sampling on the super-large graph to obtain a sub-graph of the super-large graph;
[0007] Sample multiple neural network architectures from pre-built hypernetworks via pre-customized importance sampling strategies;
[0008] Using a peer learning method, the plurality of neural network architectures are trained through the subgraphs to obtain a plurality of trained neural network architectures;
[0009] Iteratively perform the above subgraph sampling, architecture sampling and architecture training steps to obtain a trained super network;
[0010] An architecture search is performed on the super network to obtain an optimal architecture corresponding to the super large graph.
[0011] Optionally, the performing local sampling on the super-large graph to obtain a sub-graph of the super-large graph includes:
[0012] Determine a sampling area from the super large map;
[0013] The nodes and edges in the sampling area are sampled to obtain the subgraph.
[0014] Optionally, the plurality of neural network architectures are randomly sampled from a pre-built hypernetwork by a pre-customized importance sampling strategy, and the customization steps of the importance sampling strategy are:
[0015] When performing architecture sampling, a decision is made by an intelligent agent, a plurality of neural network architectures are determined from the super network, and the plurality of neural network architectures are sampled;
[0016] Processing the graph data through the multiple neural network architectures to obtain graph data processing results;
[0017] Returning a reward value to the agent according to the accuracy of the graph data processing result;
[0018] The agent adjusts the strategy for the next sampling according to the size of the reward value;
[0019] The above-mentioned agent decision-making, graph data processing, reward value return and strategy adjustment steps are iteratively executed to obtain a trained agent, and the architecture sampling strategy executed by the agent is the importance sampling strategy.
[0020] Optionally, the super network includes all graph network layers, and each of the graph network layers includes all information transmission methods.
[0021] Optionally, the adopting a peer learning method to train the multiple neural network architectures through the subgraphs to obtain multiple trained neural network architectures includes:
[0022] treating the plurality of neural network architectures as a learning team;
[0023] Selecting an optimal architecture from the learning team, and performing classification difficulty evaluation on each node in the subgraph using the optimal architecture to obtain a classification difficulty value for each node;
[0024] According to the classification difficulty value of each node, a weight of the loss value of each node is set;
[0025] According to the loss value, the parameters of the multiple neural network architectures are adjusted to obtain multiple trained neural network architectures.
[0026] Optionally, selecting an optimal architecture from the learning team, and performing difficulty evaluation on each node in the subgraph by using the optimal architecture to obtain a difficulty value of each node includes:
[0027] Classifying the nodes of the subgraph by each neural network architecture of the multiple neural network architectures to obtain node classification results corresponding to the multiple neural networks;
[0028] Performing accuracy statistics on the node classification results, and selecting the neural network architecture corresponding to the node classification result with the highest accuracy as the optimal architecture;
[0029] According to the node classification result corresponding to the optimal architecture, a classification difficulty evaluation is performed on each node in the subgraph to obtain a classification difficulty value of each node.
[0030] Optionally, setting the weight of the loss value of each node according to the classification difficulty value of each node includes:
[0031] When the classification difficulty value of the node is high, a lower weight is set for the loss value of the node;
[0032] When the classification difficulty value of the node is low, a higher weight is set for the loss value of the node.
[0033] A second aspect of an embodiment of the present application provides an architecture search device for a very large-scale graph, the device comprising:
[0034] A sub-graph sampling module, used for performing local sampling on a super-large graph to obtain a sub-graph of the super-large graph;
[0035] An architecture sampling module for sampling multiple neural network architectures from a pre-built hypernetwork via a pre-customized importance sampling strategy;
[0036] An architecture training module, used to train the multiple neural network architectures through the subgraphs using a peer learning method to obtain multiple trained neural network architectures;
[0037] A super network training module is used to iteratively perform the above subgraph sampling, architecture sampling and architecture training steps to obtain a trained super network;
[0038] The architecture search module is used to perform architecture search on the super network to obtain the optimal architecture corresponding to the super large graph.
[0039] Optionally, the sub-image sampling module includes:
[0040] A sampling area determination submodule, used to determine a sampling area from the super large image;
[0041] The subgraph sampling submodule is used to sample the nodes and edges in the sampling area to obtain the subgraph.
[0042] Optionally, the plurality of neural network architectures are randomly sampled from a pre-built hypernetwork by a pre-customized importance sampling strategy, and the customization steps of the importance sampling strategy are:
[0043] When performing architecture sampling, a decision is made by an intelligent agent, a plurality of neural network architectures are determined from the super network, and the plurality of neural network architectures are sampled;
[0044] Processing the graph data through the multiple neural network architectures to obtain graph data processing results;
[0045] Returning a reward value to the agent according to the accuracy of the graph data processing result;
[0046] The agent adjusts the strategy for the next sampling according to the size of the reward value;
[0047] The above-mentioned agent decision-making, graph data processing, reward value return and strategy adjustment steps are iteratively executed to obtain a trained agent, and the architecture sampling strategy executed by the agent is the importance sampling strategy.
[0048] Optionally, the super network includes all graph network layers, and each of the graph network layers includes all information transmission methods.
[0049] Optionally, the architecture training module includes:
[0050] A learning team building submodule, used to treat the multiple neural network architectures as a learning team;
[0051] A classification difficulty value evaluation submodule is used to select an optimal architecture from the learning team, and to perform classification difficulty evaluation on each node in the subgraph through the optimal architecture to obtain a classification difficulty value of each node;
[0052] A weight setting submodule, used to set the weight of the loss value of each node according to the classification difficulty value of each node;
[0053] The parameter adjustment submodule is used to adjust the parameters of the multiple neural network architectures according to the loss value to obtain multiple trained neural network architectures.
[0054] Optionally, the classification difficulty value evaluation submodule includes:
[0055] A classification result obtaining submodule, used to classify the nodes of the subgraph through each neural network architecture of the multiple neural network architectures to obtain node classification results corresponding to the multiple neural networks;
[0056] The optimal architecture obtaining submodule is used to perform accuracy statistics on the node classification results, and select the neural network architecture corresponding to the node classification result with the highest accuracy as the optimal architecture;
[0057] The classification difficulty value determination submodule is used to perform classification difficulty evaluation on each node in the subgraph according to the node classification result corresponding to the optimal architecture, so as to obtain the classification difficulty value of each node.
[0058] Optionally, the weight setting submodule includes:
[0059] A first loss value weight setting submodule, used for setting a lower weight for the loss value of the node when the classification difficulty value of the node is higher;
[0060] The second loss value weight setting submodule is used to set a higher weight for the loss value of the node when the classification difficulty value of the node is low.
[0061] A third aspect of an embodiment of the present application provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the method described in the first aspect of the present application are implemented.
[0062] A fourth aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect of the present application are implemented.
[0063] The architecture search method for super-large-scale graphs provided in this application is adopted to perform local sampling on the super-large graph to obtain a subgraph of the super-large graph; multiple neural network architectures are sampled from the pre-built super-network through a pre-customized importance sampling strategy; a peer learning method is adopted to train the multiple neural network architectures through the sub-graph to obtain multiple trained neural network architectures; the above sub-graph sampling, architecture sampling and architecture training steps are iteratively performed to obtain a trained super-network; the architecture search is performed on the super-network to obtain the optimal architecture corresponding to the super-large graph. In this application, local sampling is performed on the super-large graph, and multiple neural networks are sampled from the super-network through the importance sampling strategy. A preliminary evaluation of the accuracy of the neural network architecture can be made to ensure that the selected multiple neural network architectures have a certain accuracy and reduce the difficulty of training. Then, a peer learning method is used to train multiple neural networks through sub-graphs. The peer learning method allows the architectures to help each other and find the most suitable optimization target, so that the learning process of the architecture is very smooth, and the training of the super-network can be completed more conveniently and quickly. Then, when processing super-large graph data, the neural network architecture corresponding to the graph data can be quickly found, and the processing of the super-large graph data can be quickly completed. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0065] Figure 1 It is a flowchart of an architecture search method for ultra-large-scale graphs proposed in one embodiment of the present application;
[0066] Figure 2 It is a schematic diagram of the super network optimization process proposed in an embodiment of the present application;
[0067] Figure 3 It is a schematic diagram of an architecture search device for ultra-large-scale graphs proposed in one embodiment of the present application. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0069] refer to Figure 1 , Figure 1 FIG. 1 is a flowchart of an architecture search method for ultra-large-scale graphs proposed in one embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0070] S11: Perform local sampling on the super-large image to obtain a sub-image of the super-large image.
[0071] In this embodiment, the structure of the graph is composed of nodes and edges. A node represents an independent unit, and an edge between nodes represents the relationship between two nodes. A super-large graph is a large-scale graph composed of a large number of nodes and edges. The nodes and edges of a part of the area in the super-large graph are extracted to form a sub-graph. The super-large graph can be divided into multiple sub-graphs, and each sub-graph is composed of the nodes and edges of a continuous area in the super-large graph.
[0072] In this embodiment, it is first necessary to perform local sampling on the super-large graph. Local sampling is to extract nodes and edges between nodes in a partial area of the super-large graph to obtain a subgraph of the super-large graph.
[0073] In this embodiment, the specific steps of performing local sampling on the super-large image to obtain a sub-image of the super-large image are:
[0074] S11-1: Determine a sampling area from the super large image.
[0075] S11-2: Sampling the nodes and edges in the sampling area to obtain the subgraph.
[0076] In this embodiment, when performing graph sampling, a sampling area is randomly determined from the super-large graph, and the nodes and edges in the sampling area are sampled to obtain a subgraph, which is a part of the super-large graph.
[0077] For example, the sampling method can be random sampling, randomly selecting a node from the super large graph, taking the node as the central node, taking the node and the nodes and edges within a certain range around it, such as the nodes and edges within a radius of 15 cm as the target sampling area, and sampling from the target sampling area to obtain a subgraph. The number of nodes to be collected can also be preset, for example, the preset number of nodes to be collected is 100, then randomly selecting a node, taking the node as the center, and sampling the neighbor nodes of the node and the neighbor nodes of the neighbor nodes until 100 nodes are collected, stopping the collection and obtaining the collected subgraph. The super large graph can be a relationship graph of all residents of a city, a relationship graph of historical figures and historical events of a certain period, a structural internal relationship graph of a complex structure, etc.
[0078] S12: Sample multiple neural network architectures from a pre-built hypernetwork via a pre-customized importance sampling strategy.
[0079] In this embodiment, the importance sampling strategy is an architecture sampling strategy for preliminarily predicting the most suitable neural network architecture for inputting super-large graph data. The hypernetwork is a search space that contains all possible network architectures. The hypernetwork is divided into multiple layers, and each layer contains all information transmission methods.
[0080] In this embodiment, after sampling the subgraphs, it is necessary to sample multiple neural network architectures from the pre-built hypernetwork through a pre-customized importance sampling strategy. When building the hypernetwork, the hypernetwork is abstracted into a series of information transfer layers, and each layer can select a different information transfer mechanism to build the network. When sampling the architecture, the higher the accuracy of the graph data processing, the greater the probability of being collected. After architecture collection, multiple neural network architectures can be collected from the hypernetwork.
[0081] For example, the architectures included in the super network are all existing neural network architectures of GCN and GAT. When sampling, the first layer selects the convolution operation, the second layer selects the attention operation, the third layer selects the pooling operation, etc. By selecting the corresponding operation in each layer, a complete neural network architecture is formed.
[0082] S13: Using a peer learning method, the multiple neural network architectures are trained through the subgraphs to obtain multiple trained neural network architectures.
[0083] In this embodiment, the peer learning method is a neural network architecture training method. Specifically, first, multiple neural network architectures are collected from the super network, and these multiple neural network architectures are formed into a learning team. Then, a neural network architecture with the best performance is determined from the learning team. This neural network architecture is used to estimate the difficulty of each node in the subgraph, and at the same time, learning goals are determined for other network architectures in the learning team.
[0084] In this embodiment, after collecting subgraphs and multiple neural network architectures, a peer learning method is used to determine a network architecture with the best performance from multiple neural network architectures, and the network architecture is used to evaluate the difficulty of each node in the subgraph. According to the difficulty of each node, the optimization goal is determined for the entire learning group, so that the neural network architectures in the learning group first learn the points with lower difficulty and then learn the points with higher difficulty. When all the neural network architectures in the entire learning group are trained, the learning of the learning group ends, and multiple trained neural network architectures are obtained.
[0085] For example, 10 neural network architectures are sampled from the super network to form a learning team T. The best performance architecture is determined to be architecture 3. Each node in the graph is classified through architecture 3, and the accuracy of the root classification result is used to determine the difficulty of each node. The more accurate the classification result, the lower the difficulty of the node, and the greater the error between the classification result and the correct result, the higher the difficulty of the node. After determining the difficulty of each node, the node difficulty determined by architecture 3 is used to guide the remaining 9 neural network architectures to first learn the nodes with lower difficulty and then learn the nodes with higher difficulty, thereby completing the training of all neural network architectures in the entire learning team T.
[0086] S14: Iteratively execute the above subgraph sampling, architecture sampling and architecture training steps to obtain a trained super network.
[0087] In this embodiment, when searching for the neural network architecture corresponding to the super-large graph through the super-network, it is necessary to iteratively perform the sub-graph sampling, architecture sampling and architecture training steps. The sub-graph obtained by each sampling is only a part of the super-large graph, so it is necessary to repeat the sub-graph sampling and architecture sampling iteratively. When the sampling and training reach a certain number of times, the architecture in the entire super-network will be optimized, and a trained super-network will be obtained.
[0088] In this embodiment, when the sampling training reaches a certain number of times, all the architectures in the entire super network tend to converge. At this time, the parameters of all neural network architectures in the super network are adjusted to the optimal level. When the parameters of all neural network architectures in the super network are adjusted to the optimal level, the iterative process is stopped to obtain a trained super network.
[0089] S15: Performing an architecture search on the super network to obtain an optimal architecture corresponding to the super large graph.
[0090] In this embodiment, the optimal architecture is the architecture that most accurately classifies each node in the input super-large graph in the super network, and the graph processing result is the processing result obtained by extracting the graph representation of the super-large graph through the optimal architecture according to the specific target task.
[0091] In this embodiment, after obtaining a trained super network, a search algorithm is used to select the optimal architecture from the super network to process the super large graph. The search algorithm can be any commonly used search algorithm, such as an evolutionary algorithm or a genetic algorithm, and is not limited here.
[0092] In another embodiment of the present application, after obtaining the optimal architecture, graph processing is performed on the super-large graph using the optimal architecture to obtain a graph processing result.
[0093] In this embodiment, after obtaining the optimal architecture in the trained super network, the super-large graph is input into the optimal architecture, and features are extracted from the super-large graph according to the pre-input target task to obtain a representation vector for each node of the super-large graph. The target task is predicted based on the relationship between each node to obtain a prediction result, which is the processing result of the target task, i.e., the graph processing result.
[0094] For example, the super large graph is a character relationship graph, and the target task is to predict the sports that each character likes. After selecting the best architecture in the hypernetwork, the character relationship graph is input into the best architecture. The best architecture performs node representation on the character relationship graph, and predicts the sports that the character corresponding to each node likes based on the node representation of each node to obtain the prediction result. The best architecture has completed the node classification task corresponding to the character relationship graph.
[0095] In the above embodiment, a super network is constructed based on a one-shot strategy, which abstracts the graph network into a series of information transfer layers, and each layer can select a different information transfer mechanism to construct the network. The constructed super network includes all layers in the graph network, and each layer includes all information transfer methods. This modeling method allows the super network to include all possible networks in the search space. It only needs to activate the information transfer method corresponding to each layer in the super network to construct any network in the space. During training, Monte Carlo sampling is used to optimize the weight of the super network, by collecting a part of the super large graph to limit the message flow, collecting the neural network architecture through the importance strategy, training the neural network architecture through the peer learning method, and using gradient descent to optimize the entire super network. This method performs joint architecture-subgraph sampling learning, and can smooth highly non-convex optimization targets, stabilize the sampling process of the architecture, and reduce the computational burden, solving the problem of consistency collapse. In actual processing, the hypernetwork in this embodiment was empirically evaluated on five data sets with the number of fixed points ranging from 10^4 to 10^8. The results show that the method proposed in this embodiment has significant improvement in the architecture search of very large graphs compared to the existing neural network architecture search methods. This method can complete the neural network architecture search of very large graphs consisting of billions of edges in a short time.
[0096] In another embodiment of the present application, the customization steps of the importance sampling strategy are:
[0097] S21: When performing architecture sampling, a decision is made through an intelligent agent, a plurality of neural network architectures are determined from the super network, and the plurality of neural network architectures are sampled.
[0098] In this embodiment, the intelligent agent is an individual used for decision-making, and the intelligent agent decides which information transmission method to select at which layer of the super network.
[0099] In this embodiment, a reinforcement learning method is adopted. The intelligent agent makes decisions and sets the reward value to the accuracy of its graph data processing, which can well estimate the importance sampling probability of the architecture.
[0100] S22: Process the graph data through the multiple neural network architectures to obtain graph data processing results.
[0101] S23: Return a reward value to the agent based on the accuracy of the graph data processing result.
[0102] S24: The agent adjusts the strategy for the next sampling according to the size of the reward value.
[0103] In this embodiment, the reward value is a mechanism for rewarding the agent's decision. When the agent's decision has a positive effect, the returned reward value is positive. When the agent's decision has a negative effect, the returned reward value is very small or negative.
[0104] In this embodiment, the neural network selected by the agent is used to process the graph data, and the corresponding reward value is returned to the agent according to the processing result of the graph data. When the agent receives the reward value, it determines whether the decision made is correct according to the size of the reward value, and then adjusts the strategy for the next decision. The input graph data is pre-labeled with the correct result of the target task, and the result predicted by the architecture is compared with the correct result of the target task. According to the similarity between the predicted result of the architecture and the correct result, the corresponding reward value is returned to the agent.
[0105] For example, an agent selects and samples an architecture A from a hypernetwork, and uses architecture A to process graph data. The target task is to classify the nodes in the graph data. Architecture A classifies the nodes in the graph data, obtains the category of each node, and compares it with the pre-labeled node category. Based on the comparison result, the corresponding reward value is returned to the agent, and the agent adjusts its decision based on the reward value.
[0106] S25: Iteratively execute the above-mentioned agent decision-making, graph data processing, reward value return and strategy adjustment steps to obtain a trained agent, and the architecture sampling strategy executed by the agent is the importance sampling strategy.
[0107] In this embodiment, the agent decision-making, graph data processing, reward value return and strategy adjustment steps are iteratively executed. When the agent's decision reaches the optimal level, the iteration is terminated to obtain a trained agent. At this time, the strategy executed by the agent is the importance sampling strategy.
[0108] Even if there is a smooth optimization target, the training process will still encounter instability problems caused by sampling the learning team in A~N. In order to stabilize the training of super-large networks on large-scale graphs, importance sampling is proposed to reduce the optimization variance. In optimizing the weights of the super network, in order to avoid overfitting, attention should be paid to the average accuracy on the validation data set, and a stable estimate of the average accuracy of the validation data set should be ensured as much as possible. From the importance sampling formula, it can be seen that the probability of each architecture being selected should be proportional to its accuracy when the accuracy estimate is optimal (when the variance is minimum). In general, it is necessary to traverse all architectures in the space, which is very time-consuming.
[0109] Therefore, in this embodiment, a reinforcement learning strategy is used to estimate the optimal distribution of the architecture. By setting the reinforcement learning reward to the accuracy of the architecture in processing the graph data, the importance sampling probability of the architecture can be well estimated.
[0110] In another embodiment of the present application, a peer learning method is used to train the multiple neural network architectures through the subgraphs to obtain multiple trained neural network architectures, including:
[0111] S31: Treat the multiple neural network architectures as a learning team.
[0112] In this embodiment, a peer learning method is adopted, and the collected multiple neural network architectures are used as a learning team. The multiple neural network architectures in the learning team have a common optimization goal.
[0113] S32: Select an optimal architecture from the learning team, and use the optimal architecture to perform classification difficulty evaluation on each node in the subgraph to obtain a classification difficulty value of each node.
[0114] In this embodiment, the classification difficulty value of a node represents the difficulty of accurately classifying the node.
[0115] In this embodiment, it is necessary to select an optimal architecture from the learning team, and to perform classification difficulty evaluation on each node in the subgraph through the optimal architecture to obtain the classification difficulty value of each node.
[0116] In this embodiment, an optimal architecture is selected from the learning team, and the classification difficulty of each node in the subgraph is evaluated by the optimal architecture. The specific steps of obtaining the classification difficulty value of each node are as follows:
[0117] S32-1: Classify the nodes of the subgraph through each neural network architecture among the multiple neural network architectures to obtain node classification results corresponding to the multiple neural networks.
[0118] S32-2: Perform accuracy statistics on the node classification results, and select the neural network architecture corresponding to the node classification result with the highest accuracy as the optimal architecture.
[0119] In this embodiment, nodes of the collected subgraphs are classified by each of the multiple neural network architectures, and each neural network architecture will obtain a node classification result. Because the node categories on the subgraphs are pre-labeled, the accuracy of the node classification of the neural network architecture can be counted, and the neural network architecture corresponding to the node classification result with the highest accuracy among the multiple node classification results is determined to be the optimal architecture.
[0120] For example, there are 10 architectures in a learning team. These 10 architectures are used to classify nodes in the subgraph to obtain node classification results. The accuracy of these node classification results is statistically analyzed, and it is found that the accuracy of architecture 3 is the highest. Therefore, the best architecture is architecture 3.
[0121] S32-3: According to the node classification result corresponding to the optimal architecture, a classification difficulty evaluation is performed on each node in the subgraph to obtain a classification difficulty value of each node.
[0122] In this embodiment, according to the node classification result corresponding to the optimal architecture, the classification difficulty of each node in the subgraph is evaluated to obtain the classification difficulty value of each node, and the node classification result of the optimal architecture is compared with the pre-labeled correct result to obtain the classification difficulty value of each node. In this embodiment, the closer the distance between the vector of the node classification result and the vector of the correct result is, the lower the classification difficulty value of the node is, and the farther the distance between the vector of the node classification result and the vector of the correct result is, the higher the classification difficulty value of the node is.
[0123] For example, the graph data is a character relationship graph, the node classification task is age classification, and the classification results are children, teenagers, young people, middle-aged people, and the elderly. The classification result of the best architecture for node A is children, and the actual result is teenagers. In this case, the classification is wrong, and the classification difficulty value of node A is higher; the classification result of the best architecture for node B is old people, and the actual result is also old people. In this case, the classification is correct, and the classification difficulty value of node B is lower.
[0124] If all computational graphs of multiple sampled neural network architectures are stored, it will consume a lot of memory for large-scale graphs. In order to reduce complexity, this embodiment proposes a strategy for dynamically recording the difficulty estimate of the single best architecture, that is, only recording the node classification difficulty value of the current best architecture.
[0125] For example, there are 10 architectures in a learning team. First, the node difficulty value obtained by architecture 1 is recorded. When the classification effect of architecture 2 is better than that of architecture 1, the node difficulty value recorded by architecture 1 is deleted, and only the node difficulty value obtained by architecture 2 is recorded. And so on, the node difficulty value obtained by the architecture with the best classification effect among the 10 architectures is dynamically recorded.
[0126] S33: According to the classification difficulty value of each node, the weight of the loss value of each node is set.
[0127] In this embodiment, the weight of the loss value of each node is set according to the classification difficulty value of each node, including:
[0128] S33-1: When the classification difficulty value of the node is high, a lower weight is set for the loss value of the node.
[0129] S33-2: When the classification difficulty value of the node is low, a higher weight is set for the loss value of the node.
[0130] In this embodiment, when training the sampled neural network architecture, the parameters of the entire neural network architecture are adjusted through the loss value of each node. When the classification difficulty of the node is high, it means that the optimal architecture cannot accurately classify the node. At this time, a lower weight is set for the loss value of the node. When the parameters of the neural network are adjusted, the loss value of the node has a smaller adjustment on the neural network parameters. When the classification difficulty of the node is low, a higher weight is set for the loss value of the node, and the loss value of the node has a greater adjustment on the neural network parameters. In order to ultimately optimize the loss of each node, the loss weights of all points will eventually approach 1.
[0131] S34: According to the loss value, the parameters of the multiple neural network architectures are adjusted to obtain multiple trained neural network architectures.
[0132] In this embodiment, according to the loss value of each node on each subgraph, the parameters of each neural network architecture are adjusted through the loss function. When the neural network architecture tends to converge, the parameters are adjusted to the optimal value to obtain multiple trained neural network architectures.
[0133] refer to Figure 2 , Figure 2 This is a schematic diagram of the super network optimization process proposed in an embodiment of the present application. Figure 2 The embodiments of the present application are further described as follows. Figure 2As shown in the figure, firstly, a subgraph of the large-scale graph is sampled to obtain a subgraph of the large-scale graph. At the same time, the architecture sampling strategy based on importance is used to preliminarily select the optimal architecture distribution, and multiple neural network architectures are collected to form a corresponding learning group (learning team), where π(g) represents the subgraph. Then, the optimization goal adjustment strategy based on peer learning is used to evaluate the difficulty of node loss optimization and find the optimal architecture. According to the node optimization difficulty obtained from the optimal architecture, that is, the node classification difficulty, the weight of each node loss value is adjusted. In the peer learning loss formula, IE represents expectation, P(a) represents uniform distribution, q(a) represents reinforcement distribution, and α v represents the node weight, a represents the architecture, g s represents a subgraph, v represents a node, L(a,g s ,v) represents the loss value of node v on architecture a. When optimizing the parameters of the neural network architecture, the loss function is used to optimize the parameters of the hypernetwork. Operation 1, operation 2, and operation 3 of each layer in the hypernetwork represent different ways of information transmission.
[0134] The embodiments of the present application greatly improve the scalability of the current graph neural network search method, and can complete the adjustment and optimization of the graph neural network for ultra-large-scale graphs (hundreds of millions of nodes) within one day. It can greatly enhance the effect of unknown large-scale data tasks, and find the best network architecture for processing unknown large-scale data sets in a short time by automatically adjusting the model design by the machine, greatly saving computing resources and computing time, and quickly and accurately processing ultra-large-scale graph structure data.
[0135] Based on the same inventive concept, an embodiment of the present application provides an architecture search device for ultra-large-scale graphs. Figure 3 , Figure 3 FIG. 3 is a schematic diagram of an architecture search device 300 for a very large-scale graph proposed in an embodiment of the present application. Figure 3 As shown, the device comprises:
[0136] A sub-image sampling module 301 is used to perform local sampling on a super-large image to obtain a sub-image of the super-large image;
[0137] An architecture sampling module 302 for sampling a plurality of neural network architectures from a pre-built hypernetwork by using a pre-customized importance sampling strategy;
[0138] An architecture training module 303 is used to adopt a peer learning method to train the multiple neural network architectures through the subgraphs to obtain multiple trained neural network architectures;
[0139] A super network training module 304 is used to iteratively perform the above subgraph sampling, architecture sampling and architecture training steps to obtain a trained super network;
[0140] The architecture search module 305 is used to perform architecture search on the super network to obtain the optimal architecture corresponding to the super large graph.
[0141] Optionally, the sub-image sampling module includes:
[0142] A sampling area determination submodule, used to determine a sampling area from the super large image;
[0143] The subgraph sampling submodule is used to sample the nodes and edges in the sampling area to obtain the subgraph.
[0144] Optionally, the plurality of neural network architectures are randomly sampled from a pre-built hypernetwork by a pre-customized importance sampling strategy, and the customization steps of the importance sampling strategy are:
[0145] When performing architecture sampling, a decision is made by an intelligent agent, a plurality of neural network architectures are determined from the super network, and the plurality of neural network architectures are sampled;
[0146] Processing the graph data through the multiple neural network architectures to obtain graph data processing results;
[0147] Returning a reward value to the agent according to the accuracy of the graph data processing result;
[0148] The agent adjusts the strategy for the next sampling according to the size of the reward value;
[0149] The above-mentioned agent decision-making, graph data processing, reward value return and strategy adjustment steps are iteratively executed to obtain a trained agent, and the architecture sampling strategy executed by the agent is the importance sampling strategy.
[0150] Optionally, the super network includes all graph network layers, and each of the graph network layers includes all information transmission methods.
[0151] Optionally, the architecture training module includes:
[0152] A learning team building submodule, used to treat the multiple neural network architectures as a learning team;
[0153] A classification difficulty value evaluation submodule is used to select an optimal architecture from the learning team, and to perform classification difficulty evaluation on each node in the subgraph through the optimal architecture to obtain a classification difficulty value of each node;
[0154] A weight setting submodule, used to set the weight of the loss value of each node according to the classification difficulty value of each node;
[0155] The parameter adjustment submodule is used to adjust the parameters of the multiple neural network architectures according to the loss value to obtain multiple trained neural network architectures.
[0156] Optionally, the classification difficulty value evaluation submodule includes:
[0157] A classification result obtaining submodule, used to classify the nodes of the subgraph through each neural network architecture of the multiple neural network architectures to obtain node classification results corresponding to the multiple neural networks;
[0158] The optimal architecture obtaining submodule is used to perform accuracy statistics on the node classification results, and select the neural network architecture corresponding to the node classification result with the highest accuracy as the optimal architecture;
[0159] The classification difficulty value determination submodule is used to perform classification difficulty evaluation on each node in the subgraph according to the node classification result corresponding to the optimal architecture, so as to obtain the classification difficulty value of each node.
[0160] Optionally, the weight setting submodule includes:
[0161] A first loss value weight setting submodule, used for setting a lower weight for the loss value of the node when the classification difficulty value of the node is higher;
[0162] The second loss value weight setting submodule is used to set a higher weight for the loss value of the node when the classification difficulty value of the node is low.
[0163] Based on the same inventive concept, another embodiment of the present application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the architecture search method for ultra-large-scale graphs as described in any of the above embodiments of the present application.
[0164] Based on the same inventive concept, another embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executed, implements the steps of the architecture search method for ultra-large-scale graphs described in any of the above embodiments of the present application.
[0165] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0166] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0167] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0168] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0169] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0171] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0172] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0173] The above is a detailed introduction to the architecture search method, device, equipment and storage medium for ultra-large-scale graphs provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for architecture search for ultra-large-scale graphs, characterized in that: The method comprises: Performing local sampling on the super-large graph to obtain a sub-graph of the super-large graph includes: Determine a sampling area from the super large map; Sampling the nodes and edges in the sampling area to obtain the subgraph; Multiple neural network architectures are sampled from a pre-built hypernetwork through a pre-customized importance sampling strategy, wherein the customization steps of the importance sampling strategy are: When performing architecture sampling, a decision is made by an intelligent agent, a plurality of neural network architectures are determined from the super network, and the plurality of neural network architectures are sampled; Processing the graph data through the multiple neural network architectures to obtain graph data processing results; Returning a reward value to the agent according to the accuracy of the graph data processing result; The agent adjusts the strategy for the next sampling according to the size of the reward value; Iteratively execute the above-mentioned agent decision-making, graph data processing, reward value return and strategy adjustment steps to obtain a trained agent, and the architecture sampling strategy executed by the agent is the importance sampling strategy; The peer learning method is adopted to train the multiple neural network architectures through the subgraphs to obtain multiple trained neural network architectures, including: treating the plurality of neural network architectures as a learning team; Selecting an optimal architecture from the learning team, and performing classification difficulty evaluation on each node in the subgraph by using the optimal architecture to obtain a classification difficulty value of each node, including: Classifying the nodes of the subgraph by each neural network architecture of the multiple neural network architectures to obtain node classification results corresponding to the multiple neural networks; Performing accuracy statistics on the node classification results, and selecting the neural network architecture corresponding to the node classification result with the highest accuracy as the optimal architecture; According to the node classification result corresponding to the optimal architecture, a classification difficulty evaluation is performed on each node in the subgraph to obtain a classification difficulty value of each node; According to the classification difficulty value of each node, a weight of the loss value of each node is set; According to the loss value, adjusting the parameters of the multiple neural network architectures to obtain multiple trained neural network architectures; Iteratively perform the above subgraph sampling, architecture sampling and architecture training steps to obtain a trained super network; An architecture search is performed on the super network to obtain the optimal architecture corresponding to the super large graph, wherein the super network includes all graph network layers, and each of the graph network layers includes all information transmission methods.
2. The method according to claim 1, characterized in that The step of setting the weight of the loss value of each node according to the classification difficulty value of each node comprises: When the classification difficulty value of the node is high, a lower weight is set for the loss value of the node; When the classification difficulty value of the node is low, a higher weight is set for the loss value of the node.
3. A structure search device for ultra-large-scale graphs, characterized in that: The device is used to implement the steps in any one of the methods of claims 1-2, including: A sub-graph sampling module, used for performing local sampling on a super-large graph to obtain a sub-graph of the super-large graph; An architecture sampling module for sampling multiple neural network architectures from pre-built hypernetworks via a pre-customized importance sampling strategy; An architecture training module, used to train the multiple neural network architectures through the subgraphs using a peer learning method to obtain multiple trained neural network architectures; A super network training module is used to iteratively perform the above subgraph sampling, architecture sampling and architecture training steps to obtain a trained super network; The architecture search module is used to perform architecture search on the super network to obtain the optimal architecture corresponding to the super large graph.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 2 are implemented.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 2 are implemented.
