A graph node annotation method, device, equipment and storage medium
By calculating the representativeness and information amount index of candidate nodes in the graph sample data, combining the sensory domain evaluation score, dynamically adjusting the weight, and selecting key nodes for annotation, the problem of inaccurate and low efficiency of labeling nodes in graph neural network training is solved, and the training efficiency is improved.
Patent Information
- Application Number
- CN202110651232.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-10
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-06-10
AI Technical Summary
In the process of training of graph neural networks, there are problems of inaccuracy and low efficiency in the selection of labeling nodes, resulting in low training efficiency.
By determining the target unlabeled nodes in the preset area of the candidate node in the graph sample data, the index of their representativeness and information volume is calculated, combined with the node evaluation scores in the sensory domain, dynamically adjust the weights, and select nodes with more representativeness and information volume for annotation.
The point selection accuracy and labeling efficiency of the annotation node are improved, thereby improving the training efficiency of the graph neural network.
Smart Images

Figure CN113822412B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a graph node annotation method, apparatus, device and storage medium. Background Art
[0002] Graph neural networks, which can simultaneously learn graph structures and node attribute relationships, have garnered increasing attention in recent years. They have made significant contributions to fields such as text classification, sequence labeling, relation extraction, and image classification. Graph neural networks are trained using graph sample data.
[0003] Graph sample data includes a large number of labeled nodes and unlabeled nodes. The training process of the graph neural network is to input the graph sample data into the graph neural network of a specific task, obtain the output result of the labeled node for the specific task through the graph neural network, and then obtain the loss value between the output result and the labeling information of the labeled node. The loss value is then passed back to update the parameters of each layer of the iterative graph neural network to complete the training of the graph neural network.
[0004] As can be seen from the above process, the selection of labeled nodes is crucial for training graph neural networks. To achieve more efficient and accurate graph neural networks through model training, it is necessary to select more representative and comprehensive nodes for labeling. However, the selection of labeled nodes is generally plagued by problems such as inaccurate selection and low efficiency. Therefore, how to efficiently and accurately select graph nodes in graph sample data for labeling has become a pressing issue. Summary of the Invention
[0005] The embodiments of the present application provide a graph node labeling method, apparatus, device and storage medium, which can evaluate the representativeness and information content of each graph node in graph sample data, and then determine the graph nodes with stronger representativeness and more comprehensive information content for labeling based on the evaluation results. In this way, the accuracy of point selection for labeling nodes can be improved, the efficiency of graph node labeling can be improved, and thus the training efficiency of graph neural networks can be improved.
[0006] On one hand, the present application provides a graph node annotation method, comprising:
[0007] A candidate node is determined from unlabeled nodes included in the graph sample data, wherein the graph sample data includes at least one labeled node and at least one unlabeled node.
[0008] According to the positions of the candidate nodes and the labeled nodes in the graph sample data, a target unlabeled node in a preset area corresponding to the candidate node is determined, where the target unlabeled node includes the candidate node.
[0009] Determine a first index corresponding to the target unlabeled node and determine a second index corresponding to the target unlabeled node, wherein the first index is used to evaluate the representativeness of the target unlabeled node with respect to the graph sample data, and the second index is used to evaluate the amount of information of the target unlabeled node with respect to the graph sample data.
[0010] An evaluation score corresponding to the target unlabeled node is determined according to the first index and the second index corresponding to the target unlabeled node.
[0011] According to the evaluation score corresponding to the target unlabeled node, the candidate nodes are labeled to obtain the labeled nodes.
[0012] On the other hand, the present application provides a graph node labeling device, comprising:
[0013] The determining unit is configured to determine a candidate node from unlabeled nodes included in the graph sample data, wherein the graph sample data includes at least one labeled node and at least one unlabeled node.
[0014] The determination unit is further configured to determine, based on the positions of the candidate nodes and the labeled nodes in the graph sample data, a target unlabeled node in a preset area corresponding to the candidate node, wherein the target unlabeled node includes the candidate node.
[0015] An operation unit is used to determine a first index corresponding to a target unlabeled node and a second index corresponding to the target unlabeled node, wherein the first index is used to evaluate the representativeness of the target unlabeled node with respect to the graph sample data, and the second index is used to evaluate the amount of information of the target unlabeled node with respect to the graph sample data.
[0016] The operation unit is further configured to determine an evaluation score corresponding to the target unlabeled node according to the first index and the second index corresponding to the target unlabeled node.
[0017] The processing unit is used to label the candidate nodes according to the evaluation scores corresponding to the target unlabeled nodes to obtain labeled nodes.
[0018] In one possible design, the computing unit is specifically configured to determine a cluster center corresponding to a target unlabeled node in the graph sample data, perform feature aggregation on the target unlabeled node and the cluster center, and obtain aggregate features corresponding to the target unlabeled node and the cluster center, respectively. Based on the aggregate features corresponding to the target unlabeled node and the aggregate features corresponding to the cluster center, a distance value from the target unlabeled node to the cluster center is determined, and the distance value from the target unlabeled node to the cluster center is determined as a first index corresponding to the target unlabeled node.
[0019] In one possible design, the determination unit is also used to determine a first graph neural network and a second graph neural network corresponding to the graph neural network, wherein the network parameters of the first graph neural network and the second graph neural network are different, and the second graph neural network is obtained after a parameter update operation is performed on the first graph neural network.
[0020] The computing unit is specifically configured to input the eigenvalue corresponding to the target unlabeled node into a first graph neural network to obtain a first output result, and input the eigenvalue corresponding to the target unlabeled node into a second graph neural network to obtain a second output result. Based on the first output result and the second output result, a loss value between the first output result and the second output result is determined, and based on the loss value between the first output result and the second output result, a second index corresponding to the target unlabeled node is determined.
[0021] In one possible design, the computing unit is specifically used to obtain a first weight value of the first graph neural network and a second weight value of the second graph neural network, calculate a loss value between the first output result and the second output result based on the first weight value of the first graph neural network and the second weight value of the second graph neural network, and determine an information index corresponding to the target unlabeled node based on the calculation result, wherein the first weight value is less than the second weight value.
[0022] In one possible design, the computing unit is further configured to adjust a third weight value corresponding to the first index and a fourth weight value corresponding to the second index at a current moment, where the current moment corresponds to the second graph neural network. Based on the adjusted third and fourth weight values, a weighted average operation is performed on the first and second indices corresponding to the target unlabeled node, and an evaluation score corresponding to the target unlabeled node is determined based on the weighted average operation result.
[0023] In one possible design, the third weight value corresponding to the first index at the current moment is less than the third weight value corresponding to the first index at the historical moment, the fourth weight value corresponding to the second index at the current moment is greater than the fourth weight value corresponding to the second index at the historical moment, and the historical moment corresponds to the first graph neural network.
[0024] In one possible design, the processing unit is specifically used to determine the total evaluation score corresponding to the candidate node based on the evaluation score corresponding to the target unlabeled node and the number of target unlabeled nodes. If the total evaluation score corresponding to the candidate node is greater than a preset threshold, the candidate node is labeled to obtain a labeled node.
[0025] Another aspect of the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the above-mentioned methods.
[0026] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0027] In an embodiment of the present application, a graph node labeling method is provided, which first needs to calculate the first index and the second index corresponding to all unlabeled nodes in the graph sample data respectively, and then determine the evaluation score of the candidate node according to the first index and the second index of all target unlabeled nodes within the preset range corresponding to the candidate node, and then decide whether to label the candidate node according to the evaluation score. In this way, the representativeness and information content of the candidate node with respect to the graph sample data can be evaluated, and the candidate node can be evaluated again in combination with the neighboring nodes of the candidate node to determine whether the candidate node is a key node in the graph sample data, and then the candidate node can be labeled based on the evaluation results. In this way, the labeled nodes can be selected from the candidate nodes in a more targeted manner, the accuracy of the selection of the labeled nodes can be improved, the labeling efficiency of the graph sample data can be improved, and the training efficiency of the subsequent graph neural network can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of the structure of graph data provided in an embodiment of the present application;
[0029] Figure 2 A flowchart of a graph neural network training method provided in an embodiment of the present application;
[0030] Figure 3 A flowchart of a graph node labeling method provided in an embodiment of the present application;
[0031] Figure 4 A schematic diagram of the structure of a graph sample data provided in an embodiment of the present application;
[0032] Figure 5 Flowchart for executing the active learning method based on maximizing the effective receptive field provided in the embodiment of the present application;
[0033] Figure 6 A schematic diagram of the structure of a graph node labeling device is provided for an embodiment of the present application;
[0034] Figure 7 A schematic structural diagram of a computer device is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0035] The embodiments of the present application provide a graph node labeling method, apparatus, device and storage medium, which can evaluate the representativeness and information content of each graph node in graph sample data, and then determine the graph nodes with stronger representativeness and more comprehensive information content for labeling based on the evaluation results. In this way, the accuracy of point selection for labeling nodes can be improved, the efficiency of graph node labeling can be improved, and thus the training efficiency of graph neural networks can be improved.
[0036] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the numbers used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "corresponding to" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] With the emergence of massive amounts of data, graph-structured data, which can represent complex relationships between objects, has gained increasing attention and posed new challenges to existing algorithms. Graph neural networks, used to process graph-structured data and as models that can reveal deep topological information, have begun to be widely used in fields such as communications, life sciences, and economics and finance. Graph neural networks can perform calculations directly on graphs, following the graph's structure throughout the computation process. They fully preserve the graph's structural information and can learn from it, resulting in extremely powerful computational capabilities.
[0038] Since graph neural networks are based on computer vision technology (CV), before introducing graph neural networks, we first briefly introduce computer vision technology in the field of artificial intelligence.
[0039] Artificial intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0040] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0041] Computer vision is the science of making machines "see." Specifically, it refers to the use of cameras and computers to replace the human eye in identifying, tracking, and measuring objects. This involves further processing the images, transforming them into images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, aiming to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, and common biometric recognition technologies such as facial recognition and fingerprint recognition.
[0042] To understand graph neural networks, you first need to understand graphs. A graph is a structure composed of nodes and edges. Generally, nodes represent physical objects, while edges represent events or special relationships between entities. Furthermore, if both nodes and edges in a graph carry attributes (information), the graph can be called an attributed graph. As you can imagine, a vast amount of real-life business data can be represented using graphs. Since everything is connected, a simple representation of nodes and relationships is sufficient to encompass everything.
[0043] Figure 1 A schematic diagram of the structure of a graph data provided in an embodiment of the present application is shown as follows: Figure 1As shown, it represents the social network of user A. Multiple individuals are nodes in the graph data, and relationships between users can be represented as edges. Nodes also carry attribute information corresponding to each user. For example, the attribute information corresponding to user A includes user A's age, gender, and online age. Furthermore, user B is related to user A as a relative, and user C is related to user A as a colleague. This graph data can be used to represent user A's social circle. The nodes corresponding to user B and user C are neighbor nodes of user A's corresponding node, and their corresponding attribute information also reflects the relevant characteristics of user A.
[0044] Graph neural networks, on the other hand, are computational models built based on graph data representation methods. They can be used to perform specific tasks, including image recognition, visual recognition, and motion reasoning. Generally, a graph neural network can include a graph embedding layer and a task layer. The graph embedding layer is used to represent each node in the graph data as a node vector, while the task layer executes algorithms based on specific tasks, operates on vectors, and outputs task-specific results. After the network structure of each layer of the graph neural network is determined, it must first be trained, and then the trained graph neural network is used to perform related tasks.
[0045] Figure 2 A flowchart of a training method for a graph neural network provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the neural network training process can be divided into four parts, including: obtaining graph sample data, generating output results, training the graph neural network, and generating the graph network model. The following will introduce the functions and processes of each part, specifically:
[0046] S1. Obtain graph sample data.
[0047] Specifically, sampling can be performed based on the task corresponding to the graph neural network to be trained to obtain multiple graph sample data. For example, if the task of the graph neural network is to recognize the target object (such as a cat), then multiple pictures of cats can be collected as graph sample data. The sample data can include pictures of cats with different postures, colors, breeds, sizes, etc., so that the graph neural network can subsequently learn more features.
[0048] As you can understand, graph sample data includes features and annotation information. The annotation information represents the actual classification or actual results of the graph sample data for a specific task, which is used to evaluate the output of the graph neural network. The annotation of graph sample data is the foundation of deep learning, directly determining the evaluation mechanism of the graph neural network and influencing the accuracy of the graph neural network's output. Therefore, a prerequisite for the graph neural network training process is to first annotate the graph sample data so that it carries the correct labels for the task.
[0049] S2. Use the graph sample data obtained in step S1 as the input of the graph neural network to be trained, and the graph neural network to be trained outputs an output result, which is related to the specific task.
[0050] In the above example, if the specific task of the graph neural network is to identify the target object, then the output results of the graph neural network can be "is the target object" and "is not the target object". Exemplarily, the graph neural network can be divided into a graph embedding layer and a task layer. The graph embedding layer is used to identify the features in the graph sample data and represent the features as vectors. The task layer can be a classifier that obtains the final recognition and classification results by operating on the vectors. When training the graph neural network, the graph sample data needs to be input into the graph neural network. The graph neural network learns relevant knowledge from the graph sample data and obtains the output results of the graph sample data.
[0051] S3. Obtain the loss value through the loss function corresponding to the graph neural network to be trained, and update the graph neural network parameters according to the loss value.
[0052] After obtaining the output results of the graph sample data, it is necessary to compare the output results with the labels carried by the graph sample data, obtain the loss value through the loss function, and propagate this loss value in reverse to update the parameters of the graph neural network. In this way, after multiple parameter iterations, the output results corresponding to the graph sample data are closer and closer to the labels carried by them. In other words, the output results are constantly approaching the actual results corresponding to the graph sample data, improving the output accuracy of the graph neural network.
[0053] S4. After the training is completed, a graph network model is generated.
[0054] The training process of a graph neural network is an iterative process. When the training conditions are met, the training ends, the final updated model parameters are determined, and the graph network model is generated. For example, the training conditions may include reaching a preset number of training times or the loss value falling below a preset threshold. Once the training conditions are met, the training process ends, and the resulting graph network model can be applied to specific tasks.
[0055] To prevent tampering, the generated graph network model can be stored using blockchain technology. The following briefly introduces blockchain technology. Blockchain is a novel application model that combines distributed data storage, peer-to-peer transmission, consensus mechanisms, encryption algorithms, and other computer technologies. Blockchain is essentially a decentralized database, a series of data blocks linked using cryptographic methods. Each block contains information about a batch of network transactions, which is used to verify the validity of the information (to prevent counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.
[0056] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operation monitoring. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the corresponding relationship between the user's real identity and the blockchain address (authority management), etc., and under authorization, it supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records the valid requests to the storage after consensus is reached. For a new business request, the basic service first adapts the interface to parse and authenticate the request (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management). The smart contract module is responsible for the registration, issuance, triggering and execution of contracts. Developers can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the contract logic is triggered by calling keys or other events to trigger execution. The contract logic is completed, and the contract upgrade and cancellation functions are also provided. The operation monitoring module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarms, network status monitoring, and node equipment health status monitoring.
[0057] The platform's product service layer provides the basic capabilities and implementation framework for typical applications. Developers can build on these basic capabilities, overlay business features, and complete the blockchain implementation of business logic. The application service layer provides application services based on blockchain solutions for business participants to use.
[0058] From the above description, we can see that the annotation of graph sample data is the foundation of graph neural network training. Selecting key nodes of graph sample data for annotation can improve the training efficiency of graph neural networks. Since the process of annotating graph sample data requires a lot of cost and effort, in order to improve annotation efficiency, more representative nodes with more information should be selected as annotation nodes. In other words, nodes that are more valuable for improving the performance of graph neural networks should be selected for annotation. In this way, the annotation cost of graph sample data can be reduced while improving the training efficiency of graph neural networks.
[0059] Representativeness measures the ability of a selected node to represent the entire graph sample data. Higher representativeness indicates that the corresponding features of the node are more critical to the entire graph sample data. Common methods for measuring node representativeness are the density and centrality of the node. Information content, on the other hand, measures the information a node possesses that is not captured by the current graph network model. The higher the information content of a node, the richer the features it contains. A common method for measuring information content is the uncertainty of the neural network's prediction results.
[0060] Existing technologies usually calculate the centrality of each candidate node in the graph based on the properties of the graph structure. Then, during the training process of the graph neural network, the graph is input into the current graph neural network. The representativeness and uncertainty corresponding to each candidate node are determined based on the intermediate results generated by the graph neural network. These three indicators are then integrated over time. Finally, the candidate nodes are evaluated and suitable nodes are selected for labeling.
[0061] In the above-mentioned point selection process, since representativeness and uncertainty are both evaluation indicators based on the intermediate results of the graph neural network, the error of the graph neural network is still large in the early stage of model training. This will make the intermediate results and output results of the graph neural network unreliable. Therefore, the representativeness index and uncertainty index obtained will also be inaccurate, and the candidate nodes selected based on the representativeness index and uncertainty index will not be valuable enough. At the same time, the above-mentioned method requires retraining the graph neural network model after each point selection and annotation. Since the training process of the graph neural network often takes a long time, this will lead to extremely low point selection efficiency. At the same time, the above-mentioned method also ignores the semi-supervised learning nature of the graph neural network model and does not use the receptive field of the labeled nodes to select the nodes to be labeled. Based on the above description, if the nodes in the graph data can be selected more efficiently and accurately for annotation, it will become an urgent problem to be solved.
[0062] Combined with the above description, Figure 3 A flowchart of a graph node annotation method provided in this application is shown as follows: Figure 3 Shown, including:
[0063] 301. Determine candidate nodes among the unlabeled nodes included in the graph sample data.
[0064] When using graph sample data to train a graph neural network, the first step is to select key nodes for labeling. Specifically, the graph sample data includes labeled nodes and a large number of unlabeled nodes. The labeling work is for the labelers to label the unlabeled nodes after screening. Therefore, it is necessary to first determine the candidate nodes among the unlabeled nodes, evaluate the candidate nodes through subsequent steps to determine the labeling value corresponding to the candidate nodes, and then determine whether to label the candidate nodes based on the obtained labeling value. If the candidate node meets the labeling requirements, the candidate node is labeled and becomes a new labeled node for use in subsequent graph neural network training.
[0065] 302. Determine a target unlabeled node within a preset area corresponding to the candidate node based on positions of the candidate node and the labeled nodes in the graph sample data.
[0066] It is understandable that if the graph sample data already contains labeled nodes that carry label information, the position of the labeled nodes will also affect the annotation value of the candidate node. For example, when the candidate node is very close to the labeled node, it may cause the candidate node to be similar to the labeled node. Under the premise that the labeled node exists, the annotation of the candidate node is not very meaningful. At the same time, in the graph sample data, the nature of the neighboring nodes will also affect the candidate node. For example, the amount of feature information carried by the neighboring nodes corresponding to the candidate node will also affect the amount of information corresponding to the candidate node. Therefore, it is necessary to determine the target unlabeled node in the preset area corresponding to the candidate node based on the position of the candidate node and the labeled node in the graph sample data. The target unlabeled node also includes the candidate node. By considering the situation of each node within the preset area, the final annotation value of the candidate node is obtained. In this way, the candidate node will be evaluated more comprehensively, so that more valuable unlabeled nodes can be obtained for annotation, thereby improving annotation efficiency.
[0067] Based on the above description, the embodiment of the present application proposes the concept of an effective receptive domain. The receptive domain refers to the set of nodes that can affect the result of the operation when the graph neural network performs an analysis operation on a certain node. Usually, it is the neighboring nodes of the node in the graph data. It is understandable that when annotating and evaluating a node in the graph sample data, it is not comprehensive to evaluate only the information corresponding to the node. It is necessary to evaluate the node in combination with the situation of all nodes in the receptive domain corresponding to the node. Figure 4 A schematic diagram of the structure of a sample data provided in an embodiment of the present application is shown in FIG. Figure 4As shown in the figure, node A is a labeled node. If the graph neural network used for this graph sample data is a two-layer neural network, then the receptive domain corresponding to node A is its neighboring nodes within the second order. Since neighboring nodes beyond the second order do not contribute to the training of the two-layer graph neural network, nodes outside the receptive domain are no longer influenced by the labeled nodes. The effective receptive domain is the sum of the effectiveness of all nodes within the receptive domain.
[0068] Therefore, when selecting candidate nodes, you can give priority to nodes outside the receptive domain of the labeled nodes as candidate nodes, and then determine the receptive domain corresponding to the candidate nodes, and then evaluate the candidate nodes based on the effectiveness of each node in the receptive domain. Specifically, you can select a batch of unlabeled nodes in each active learning process, and require this batch of unlabeled nodes to have the largest effective receptive domain. Based on the greedy search method, you can maintain a set of selected unlabeled nodes, and select a node each time so that its effective receptive domain is the largest after joining the unlabeled node set. When the number of nodes in the unlabeled node set meets the requirements, the current set is returned. Figure 4 As shown in the figure, if the candidate node is B, the receptive domain (preset area) corresponding to the candidate node B is the second-order neighbor corresponding to the candidate node B in the figure. Then, all nodes in the receptive domain corresponding to the candidate node B are analyzed separately, and the final evaluation score of the candidate node B is obtained according to the analysis results.
[0069] 303. Determine a first index corresponding to the target unlabeled node.
[0070] The first index is used to evaluate the representativeness of each node with respect to the graph sample data. The first index can be used to measure the distribution of nodes in the graph sample data. For example, the first index of each node can be obtained based on the negative Euclidean distance between the node and the cluster node. The closer the node is to the cluster center, the more representative it is, and the larger the first index.
[0071] 304. Determine a second index corresponding to the target unlabeled node.
[0072] The second index is used to evaluate the information content of the target unlabeled node with respect to the graph sample data. The higher the information content of the node, the richer the information contained in the node that is not captured by the graph neural network. For example, the graph sample data can be input into the graph neural network, and the second index corresponding to the node can be determined based on the output result of the node.
[0073] 305. Determine an evaluation score corresponding to the target unlabeled node according to the first index and the second index corresponding to the target unlabeled node.
[0074] For a node in the receptive domain (the target unlabeled node), after obtaining the first index and the second index corresponding to the node, the evaluation score of the node can be determined based on the first index and the second index. In this way, after determining the evaluation score corresponding to each node in turn, the evaluation values of all nodes in the receptive domain are combined to determine whether to label the candidate node.
[0075] 306. Label the candidate nodes according to the evaluation scores corresponding to the target unlabeled nodes to obtain labeled nodes.
[0076] For example, the total evaluation score of the candidate node can be determined by combining the evaluation score of the target unlabeled node and the number of target unlabeled nodes included in the receptive field. If the total evaluation score is greater than a preset threshold, the candidate node is labeled to obtain the labeled node.
[0077] It can be understood that the more nodes in the receptive domain corresponding to the candidate node and the higher the evaluation scores corresponding to all target unlabeled nodes, the more representative the candidate node is for the graph sample data, and the higher the amount of information it contains, the more valuable it is for the training of the graph neural network. The higher the annotation value of such candidate nodes, the more effective the annotation nodes can be obtained if they are labeled, and the annotation efficiency can be improved.
[0078] In the graph node labeling method provided in the embodiment of the present application, it is first necessary to calculate the first index and the second index corresponding to all unlabeled nodes in the graph sample data respectively, and then determine the evaluation score of the candidate node based on the first index and the second index of all target unlabeled nodes within the preset range corresponding to the candidate node, and then decide whether to label the candidate node based on the evaluation score. In this way, the representativeness and information content of the candidate node with respect to the graph sample data can be evaluated, and at the same time, the candidate node can be evaluated again in combination with the neighboring nodes of the candidate node to determine whether the candidate node is a key node in the graph sample data, and then the candidate node can be labeled based on the evaluation results. In this way, the labeled nodes can be selected from the candidate nodes in a more targeted manner, the accuracy of the selection of the labeled nodes can be improved, the labeling efficiency of the graph sample data can be improved, and the training efficiency of the subsequent graph neural network can be improved.
[0079] The following is for Figure 4 The candidate node B shown is given, and its labeling process is described in detail.
[0080] First, the receptive field of candidate node B can be determined based on the receptive field of the labeled node A and the position of candidate node B. Since the effective receptive field in the graph sample data is in the form of a union, the preset area corresponding to candidate node B includes nodes 1, 2, 3, 4, and 5. To comprehensively evaluate candidate node B, it is necessary to calculate the evaluation scores of six nodes, namely, nodes 1, 2, 3, 4, 5, and candidate node B.
[0081] Taking candidate node B as an example, the following specifically introduces the process of obtaining the evaluation score of candidate node B. It can be understood that the process of obtaining the evaluation scores corresponding to nodes 1, 2, 3, 4 and 5 is similar to that of candidate node B and will not be repeated here.
[0082] (1) First, it is necessary to calculate the first index corresponding to the candidate node B. This first index is used to evaluate the representativeness of the candidate node B and is an index unrelated to the graph neural network.
[0083] First, feature aggregation is performed on candidate node B in the graph sample data, so that candidate node B has information about neighboring nodes. Multiple cluster centers can then be determined from the graph sample data. For example, a semi-supervised K-means algorithm can be used. After determining the target cluster center closest to candidate node B, the negative Euclidean distance from this node to the target cluster center is calculated using the following formula:
[0084] Rep(v i )=-||H(v i )-H(c i )|| 2
[0085] Among them, Rep(v i ) represents node v i The corresponding first index, H(v i ) represents node v i After aggregation, in the above example, node v i Then it is candidate node B. c i Indicates the distance from node v i The nearest cluster center is the target cluster center. The smaller the difference between the node's features and the target cluster center, the more representative it is in the corresponding cluster. As can be seen from the above formula, this calculation process does not require model training and only requires a single calculation, greatly reducing the amount of computation and improving efficiency.
[0086] After calculating the first index corresponding to the candidate node, it is necessary to combine the training process of the graph neural network to determine the second index corresponding to the candidate node.
[0087] (2) The second index is an evaluation of the amount of information not captured by the graph neural network, so it needs to be obtained in combination with the training process of the graph neural network.
[0088] First, we need to obtain the first graph neural network and the second graph neural network in the training process. It can be understood that the training process of the graph neural network is the process of continuously adjusting the parameters of each layer of the network. Therefore, the first graph neural network and the second graph neural network are only intermediate model products at different stages of training. Their corresponding neural network structures are exactly the same, but the parameters are different. Here, the second graph neural network is obtained after the first graph neural network is trained.
[0089] Then, the graph sample data can be input into the first graph neural network and the second graph neural network respectively, so that the first graph neural network and the second graph neural network perform operations on the feature values of the candidate node B, and finally obtain the first output result and the second output result about the candidate node B, and then determine the loss value of the first output result and the second output result, and determine the second index corresponding to the candidate node B based on the loss value.
[0090] In the above description, since the second graph neural network is obtained by updating the parameters of the first graph neural network, if the features contained in the candidate node B have been learned by the graph neural network, then the output results of the first graph neural network and the second graph neural network for candidate node B will not be much different, that is, the loss value of the first output result and the second output result will become smaller. It can be concluded that the amount of information of candidate node B is small, and its corresponding second index is also small. If the candidate node B contains a large amount of information that has not been learned by the graph neural network, then its corresponding features will cause the second output result corresponding to the second graph neural network to change significantly, and the difference between the first output result and the second output result will become very large. At this time, it can be said that the amount of information of candidate node B is large, and its corresponding second index will also become correspondingly larger.
[0091] Therefore, this method uses a multi-layer perceptron to update the node features of candidate node B, and based on the QBC method, uses the attention mechanism to evaluate the information content of the node prediction results. The method is as follows:
[0092]
[0093] Where n is the number of models used in the embodiment of the present application. In the above example, the first graph neural network and the second graph neural network are used, so n is equal to 2. For example, multiple intermediate models in the training process can also be used to obtain the second index. j (v i ) represents the model j for node v i The prediction result (output result), f k (v i) represents the model k for node v i The prediction result (output result) of , similarly, in the above example, node vi is the candidate node B. Among them, and f j (v i ) and f k (v i ) corresponding weight value.
[0094] Among them, the weight value corresponding to the first graph neural network is the first weight value, and the weight value corresponding to the second graph neural network is the second weight value; when calculating the second index, it is also necessary to calculate the loss value between the first output result and the second output result based on the first weight value and the second weight value. It can be understood that the first graph neural network is the graph neural network before the second graph neural network. Therefore, the second weight value corresponding to the second graph neural network needs to be greater than the first weight value corresponding to the first graph neural network.
[0095] In the above description, the information content of nodes is evaluated using the graph neural network at different stages of the training process. First, the number of network parameters and computational cost will be reduced. Secondly, after obtaining new labeled data, compared with the traditional method of retraining all models, this method inherits the previous model parameters and then continues training based on the previous model parameters, reducing the additional overhead brought by retraining.
[0096] After determining the first index and the second index corresponding to the candidate node B, it is necessary to combine the first index and the second index to obtain the evaluation score corresponding to the candidate node B. Since the second index is calculated based on the training process of the graph neural network, the accuracy of the graph neural network gradually improves over time, which will lead to higher and higher accuracy of the second index obtained using the graph neural network, and have an increasing impact on the selection of candidate nodes. Therefore, when combining the first index and the second index to obtain the corresponding evaluation score of the candidate node, the strategy should also be adjusted dynamically. For example, the strategy can be adjusted based on the dynamic and effective nature of time. The specific formula is as follows:
[0097]
[0098] Among them, e i Rep(v i ) is the first index corresponding to the node, Inf(v i ) is the second index corresponding to the node, where It is a time-sensitive parameter used to dynamically adjust the node representativeness and information content.
[0099] It can be seen that As time goes by, the value of the annotation index gradually decreases. Therefore, it will gradually increase over time. That is, in the initial stage of the annotation work, since the training process of the graph neural network is still in its early stages, there are fewer corresponding annotated nodes and the number of iterative parameter updates is also small. Therefore, the accuracy of the graph neural network is low, and the reliability of the second index obtained from it is also small. At this time, the key factor in evaluating candidate nodes is representativeness. The more representative the candidate node, the more valuable it is to be annotated. As time goes by, the training process of the graph neural network enters the later stage, and the accuracy of the graph neural network becomes higher and higher. At this time, the factor affecting whether the candidate node is annotated becomes the evaluation of the amount of information. The higher the amount of information that contains information not captured by the graph neural network, the more valuable it is to be annotated, which is more conducive to the convergence of the graph neural network and accelerates the training process of the graph neural network.
[0100] Following the above method, the evaluation scores for nodes 1, 2, 3, 4, and 5 are obtained in sequence. These scores are then combined with the evaluation score for candidate node B to obtain a total evaluation score. For example, the total evaluation score is the sum of the evaluation scores for the six nodes. If the total evaluation score reaches a preset threshold, candidate node B is worthy of annotation and should be annotated, becoming a labeled node.
[0101] For example, if there are multiple candidate nodes, after obtaining the total evaluation score corresponding to each candidate node, the candidate nodes can be screened based on the number of neighboring nodes included in the candidate node's receptive domain. Candidate nodes are screened based on the principle of having a large number of neighboring nodes in the receptive domain and a high total evaluation score of all nodes in the receptive domain. The most valuable nodes are selected for annotation, ensuring the effectiveness of the annotation work and saving annotation costs.
[0102] Figure 5 The execution process of an active learning method based on maximizing the effective receptive field provided in the embodiment of the present application has the following main steps:
[0103] First, the graph sample data includes unlabeled nodes and labeled nodes. Then, the graph sample data and the graph neural network are combined to calculate the first index (representativeness) and second index (information amount) corresponding to each unlabeled node. Then, the receptive field of the labeled node is combined to determine the preset area of the unlabeled node, and the first index and second index corresponding to each node in the preset area are combined to determine the total evaluation score corresponding to the unlabeled node. The total evaluation score is used to select some nodes in the unlabeled nodes for labeling. After labeling, the unlabeled nodes and labeled nodes in the graph sample data are updated again, and then the next round of labeled node selection process is re-entered.
[0104] It is understandable that this implementation can be specifically applied to the field of cloud computing, using the above-mentioned annotation method to obtain the corresponding network model, and using the network model to process cloud-related task data. For example, the model can be used to identify users' social relationships, query and classify massive cloud data, etc. The following is a brief introduction to cloud computing technology:
[0105] Cloud computing is a computing model that distributes computing tasks across a resource pool consisting of a large number of computers, enabling various application systems to access computing power, storage space, and information services as needed. The network that provides these resources is called the "cloud." To users, these resources appear infinitely scalable and can be accessed at any time, used on demand, expanded at any time, and paid for on a per-use basis.
[0106] As a provider of cloud computing infrastructure, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform) is established. Various types of virtual resources are deployed in the resource pool for external customers to choose and use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.
[0107] Based on logical functional divisions, the PaaS (Platform as a Service) layer can be deployed on top of the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. SaaS can also be deployed directly on top of IaaS. PaaS is a platform for software execution, such as databases and web containers. SaaS is a variety of business software, such as web portals and text messaging tools. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
[0108] Figure 6 A schematic diagram of a graph node annotation device is provided for an embodiment of the present application, including:
[0109] The determining unit 601 is configured to determine a candidate node from unlabeled nodes included in the graph sample data, wherein the graph sample data includes at least one labeled node and at least one unlabeled node.
[0110] The determining unit 601 is further configured to determine, based on positions of the candidate node and the labeled nodes in the graph sample data, a target unlabeled node in a preset area corresponding to the candidate node, where the target unlabeled node includes the candidate node.
[0111] The operation unit 602 is used to determine the first index corresponding to the target unlabeled node and the second index corresponding to the target unlabeled node, wherein the first index is used to evaluate the representativeness of the target unlabeled node with respect to the graph sample data, and the second index is used to evaluate the amount of information of the target unlabeled node with respect to the graph sample data.
[0112] The operation unit 602 is further configured to determine an evaluation score corresponding to the target unlabeled node according to the first index and the second index corresponding to the target unlabeled node.
[0113] The processing unit 603 is configured to label the candidate nodes according to the evaluation scores corresponding to the target unlabeled nodes to obtain labeled nodes.
[0114] In one possible design, operation unit 602 is specifically configured to determine a cluster center corresponding to a target unlabeled node in the graph sample data, perform feature aggregation on the target unlabeled node and the cluster center, and obtain aggregate features corresponding to the target unlabeled node and the cluster center, respectively. Based on the aggregate features corresponding to the target unlabeled node and the aggregate features corresponding to the cluster center, a distance value from the target unlabeled node to the cluster center is determined, and the distance value from the target unlabeled node to the cluster center is determined as a first index corresponding to the target unlabeled node.
[0115] In one possible design, the determination unit 601 is also used to determine a first graph neural network and a second graph neural network corresponding to the graph neural network, wherein the network parameters of the first graph neural network and the second graph neural network are different, and the second graph neural network is obtained after a parameter update operation is performed on the first graph neural network.
[0116] Operation unit 602 is specifically configured to input the eigenvalue corresponding to the target unlabeled node into a first graph neural network to obtain a first output result, and input the eigenvalue corresponding to the target unlabeled node into a second graph neural network to obtain a second output result. Based on the first and second output results, a loss value between the first and second output results is determined, and based on the loss value between the first and second output results, a second index corresponding to the target unlabeled node is determined.
[0117] In one possible design, the operation unit 602 is specifically used to obtain a first weight value of the first graph neural network and a second weight value of the second graph neural network, calculate the loss value between the first output result and the second output result based on the first weight value of the first graph neural network and the second weight value of the second graph neural network, and determine the information index corresponding to the target unlabeled node based on the calculation result, wherein the first weight value is less than the second weight value.
[0118] In one possible design, computing unit 602 is further configured to adjust a third weight value corresponding to the first index and a fourth weight value corresponding to the second index at a current moment, where the current moment corresponds to the second graph neural network. Based on the adjusted third and fourth weight values, a weighted average operation is performed on the first and second indices corresponding to the target unlabeled node, and an evaluation score corresponding to the target unlabeled node is determined based on the weighted average operation result.
[0119] In one possible design, the third weight value corresponding to the first index at the current moment is less than the third weight value corresponding to the first index at the historical moment, the fourth weight value corresponding to the second index at the current moment is greater than the fourth weight value corresponding to the second index at the historical moment, and the historical moment corresponds to the first graph neural network.
[0120] In one possible design, the processing unit 603 is specifically used to determine the total evaluation score corresponding to the candidate node based on the evaluation score corresponding to the target unlabeled node and the number of target unlabeled nodes. If the total evaluation score corresponding to the candidate node is greater than a preset threshold, the candidate node is labeled to obtain a labeled node.
[0121] The present application also provides another computer device, which can be deployed on a server. Figure 7 , Figure 7 This is a schematic diagram of an embodiment of a computer device in the embodiment of the present application. Figure 7 As shown, the computer device 700 may vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 722 (e.g., one or more processors) and memory 732, and one or more storage media 730 (e.g., one or more mass storage devices) storing application programs 742 or data 744. The memory 732 and storage media 730 may be either transient or persistent storage. The program stored in the storage medium 730 may include one or more modules (not shown), each of which may include a series of instruction operations on the server. Furthermore, the CPU 722 may be configured to communicate with the storage medium 730 to execute the series of instruction operations in the storage medium 730 on the computer device 700.
[0122] The computer device 700 may also include one or more power supplies, one or more wired or wireless network interfaces 750, one or more input and output interfaces 758, and / or one or more operating systems 741, such as Windows Server 2003 or Windows Server 2003R. TM , Mac OS X TM , Unix TM, Linux TM , FreeBSD TM etc.
[0123] The steps performed by the computer device in the above embodiment can be based on the Figure 7 The computer device structure shown.
[0124] In the embodiment of the present application, the CPU 722 included in the computer device is used to execute Figure 3 The steps performed by a computer device in the illustrated embodiment.
[0125] The present application also provides a computer-readable storage medium having a computer program stored therein. When the computer-readable storage medium is executed on a computer, the computer program causes the computer to execute the following steps executed by the computer device in the method described in the embodiment shown in the preceding figure:
[0126] A candidate node is determined from unlabeled nodes included in the graph sample data, wherein the graph sample data includes at least one labeled node and at least one unlabeled node.
[0127] According to the positions of the candidate nodes and the labeled nodes in the graph sample data, a target unlabeled node in a preset area corresponding to the candidate node is determined, where the target unlabeled node includes the candidate node.
[0128] Determine a first index corresponding to the target unlabeled node and determine a second index corresponding to the target unlabeled node, wherein the first index is used to evaluate the representativeness of the target unlabeled node with respect to the graph sample data, and the second index is used to evaluate the amount of information of the target unlabeled node with respect to the graph sample data.
[0129] An evaluation score corresponding to the target unlabeled node is determined according to the first index and the second index corresponding to the target unlabeled node.
[0130] According to the evaluation score corresponding to the target unlabeled node, the candidate nodes are labeled to obtain the labeled nodes.
[0131] The present application also provides a computer program product including a program, which, when executed on a computer, enables the computer to execute the aforementioned Figure 3 The illustrated embodiments describe steps performed by a computer device in the method.
[0132] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0133] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0134] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0135] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0136] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0137] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A graph node labeling method, characterized in that: The method comprises: Determining a candidate node from unlabeled nodes included in the graph sample data; wherein the graph sample data includes at least one labeled node and at least one unlabeled node; Determine, according to the positions of the candidate node and the labeled node in the graph sample data, a target unlabeled node in a preset area corresponding to the candidate node, wherein the target unlabeled node includes the candidate node; Determine a first index corresponding to the target unlabeled node and determine a second index corresponding to the target unlabeled node; the first index is used to evaluate the representativeness of the target unlabeled node with respect to the graph sample data, and the second index is used to evaluate the information content of the target unlabeled node with respect to the graph sample data; Determining an evaluation score corresponding to the target unlabeled node according to the first index and the second index corresponding to the target unlabeled node; The candidate nodes are labeled according to the evaluation scores corresponding to the target unlabeled nodes to obtain labeled nodes. The labeled nodes are used to train a graph neural network, and the graph neural network is used for image recognition.
2. The method according to claim 1, characterized in that Determining the first index corresponding to the target unlabeled node includes: Determining the cluster center corresponding to the target unlabeled node in the graph sample data; Performing feature aggregation on the target unlabeled node and the cluster center to obtain aggregate features corresponding to the target unlabeled node and aggregate features corresponding to the cluster center respectively; Determining a distance value from the target unlabeled node to the cluster center according to the aggregation feature corresponding to the target unlabeled node and the aggregation feature corresponding to the cluster center; A distance value from the target unlabeled node to the cluster center is determined as a first index corresponding to the target unlabeled node.
3. The method according to claim 1, characterized in that Determining the second index corresponding to the target unlabeled node includes: Determining a first graph neural network and a second graph neural network corresponding to the graph neural network; wherein the first graph neural network and the second graph neural network have different network parameters, and the second graph neural network is obtained after performing a parameter update operation on the first graph neural network; Inputting the feature value corresponding to the target unlabeled node into the first graph neural network to obtain a first output result; Inputting the feature value corresponding to the target unlabeled node into the second graph neural network to obtain a second output result; determining a loss value between the first output result and the second output result according to the first output result and the second output result; Determine a second index corresponding to the target unlabeled node according to a loss value between the first output result and the second output result.
4. The method according to claim 3, characterized in that The determining, according to the loss value between the first output result and the second output result, a second index corresponding to the target unlabeled node includes: Obtaining a first weight value of the first graph neural network and a second weight value of the second graph neural network; Calculating a loss value between the first output result and the second output result based on a first weight value of the first graph neural network and a second weight value of the second graph neural network; An information content index corresponding to the target unlabeled node is determined according to the calculation result; wherein the first weight value is less than the second weight value.
5. The method according to claim 4, characterized in that Determining the evaluation score corresponding to the target unlabeled node according to the first index and the second index corresponding to the target unlabeled node includes: Adjusting a third weight value corresponding to the first index and a fourth weight value corresponding to the second index at a current moment; the current moment corresponds to the second graph neural network; Performing a weighted average operation on the first index and the second index corresponding to the target unlabeled node according to the adjusted third weight value and the fourth weight value; The evaluation score corresponding to the target unlabeled node is determined according to the weighted average operation result.
6. The method according to claim 5, characterized in that The third weight value corresponding to the first index at the current moment is smaller than the third weight value corresponding to the first index at the historical moment, and the fourth weight value corresponding to the second index at the current moment is larger than the fourth weight value corresponding to the second index at the historical moment; The historical moment corresponds to the first graph neural network.
7. The method according to any one of claims 1 to 6, characterized in that The step of labeling the candidate nodes according to the evaluation scores corresponding to the target unlabeled nodes to obtain labeled nodes includes: Determine the total evaluation score corresponding to the candidate node according to the evaluation score corresponding to the target unlabeled node and the number of target unlabeled nodes; If the total evaluation score corresponding to the candidate node is greater than a preset threshold, the candidate node is marked to obtain the marked node.
8. A graph node labeling device, characterized in that: The device comprises: A determination unit, configured to determine a candidate node from unlabeled nodes included in the graph sample data; wherein the graph sample data includes at least one labeled node and at least one unlabeled node; The determining unit is further configured to determine, based on positions of the candidate node and the labeled node in the graph sample data, a target unlabeled node in a preset area corresponding to the candidate node, wherein the target unlabeled node includes the candidate node; a computing unit, configured to determine a first index corresponding to the target unlabeled node and a second index corresponding to the target unlabeled node; the first index is used to evaluate the representativeness of the target unlabeled node with respect to the graph sample data, and the second index is used to evaluate the information content of the target unlabeled node with respect to the graph sample data; The computing unit is further configured to determine an evaluation score corresponding to the target unlabeled node based on a first index and a second index corresponding to the target unlabeled node; A processing unit is used to label the candidate nodes according to the evaluation scores corresponding to the target unlabeled nodes to obtain labeled nodes, and the labeled nodes are used to train the graph neural network, and the graph neural network is used for image recognition.
9. The device according to claim 8, characterized in that The operation unit is specifically used to determine the cluster center corresponding to the target unlabeled node in the graph sample data; perform feature aggregation on the target unlabeled node and the cluster center to obtain the aggregation features corresponding to the target unlabeled node and the aggregation features corresponding to the cluster center respectively; determine the distance value from the target unlabeled node to the cluster center based on the aggregation features corresponding to the target unlabeled node and the aggregation features corresponding to the cluster center; and determine the distance value from the target unlabeled node to the cluster center as the first index corresponding to the target unlabeled node.
10. The device according to claim 8, characterized in that The determining unit is further configured to determine a first graph neural network and a second graph neural network corresponding to the graph neural network; wherein the first graph neural network and the second graph neural network have different network parameters, and the second graph neural network is obtained after performing a parameter update operation on the first graph neural network; The operation unit is specifically used to input the characteristic value corresponding to the target unlabeled node into the first graph neural network to obtain a first output result; input the characteristic value corresponding to the target unlabeled node into the second graph neural network to obtain a second output result; determine the loss value between the first output result and the second output result based on the first output result and the second output result; determine the second index corresponding to the target unlabeled node based on the loss value between the first output result and the second output result.
11. The device according to claim 10, characterized in that The operation unit is specifically used to obtain a first weight value of the first graph neural network and a second weight value of the second graph neural network; calculate the loss value between the first output result and the second output result based on the first weight value of the first graph neural network and the second weight value of the second graph neural network; determine the information content index corresponding to the target unlabeled node based on the calculation result; wherein, the first weight value is less than the second weight value.
12. The device according to claim 11, characterized in that The operation unit is further used to adjust the third weight value corresponding to the first index and the fourth weight value corresponding to the second index at the current moment; the current moment corresponds to the second graph neural network; according to the adjusted third weight value and the fourth weight value, a weighted average operation is performed on the first index and the second index corresponding to the target unlabeled node; and the evaluation score corresponding to the target unlabeled node is determined according to the weighted average operation result.
13. The device according to claim 12, characterized in that The operation unit is also used to ensure that the third weight value corresponding to the first index at the current moment is less than the third weight value corresponding to the first index at the historical moment, the fourth weight value corresponding to the second index at the current moment is greater than the fourth weight value corresponding to the second index at the historical moment, and the historical moment corresponds to the first graph neural network.
14. The device according to any one of claims 9 to 13, characterized in that The processing unit is specifically used to determine the total evaluation score corresponding to the candidate node based on the evaluation score corresponding to the target unlabeled node and the number of target unlabeled nodes; if the total evaluation score corresponding to the candidate node is greater than a preset threshold, the candidate node is labeled to obtain the labeled node.
15. A computer device, characterized in that: include: memories, transceivers, processors, and bus systems; Wherein, the memory is used to store programs; The processor is configured to execute the program in the memory to implement the method according to any one of claims 1 to 7; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
16. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 7.
17. A computer program product, characterized in that The computer program product comprises instructions, which, when executed on a computer device, cause the computer device to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Network node label active learning method and system based on graph convolution network
CN110363282A
Graph node label information prediction method and device and electronic equipment
CN112231527A