Semi-supervised graph node expansion method based on secondary alignment
Through the semi-supervised graph node expansion method based on secondary alignment, the problem of quantity and topological imbalance in graph data node classification is solved, the classification accuracy is improved and the calculation complexity is reduced, and label-free nodes are fully utilized.
Patent Information
- Application Number
- CN202411846560.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-14
AI Technical Summary
When handling the classification of graph data nodes, the prior art faces the problems of quantitative imbalance and topological imbalance, which leads to insufficient classification accuracy of the model, and high computational complexity, and insufficient use of label-free nodes.
The semi-supervised graph node expansion method based on quadratic alignment is used to determine the influence matrix by calculating the quadratic or third power of the whole graph adjacency matrix, select the category with the largest number of labeled nodes as the benchmark, perform first alignment and quadratic alignment, expand the original training node set, and simplify the setting and calculation of pseudo-labels.
The accuracy of graph data node classification is improved, the computational complexity is reduced, and the label-free nodes are fully utilized, and the setting of pseudo-labels is carried out in two steps, ensuring the balance of the results.
Smart Images

Figure CN119622422A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data classification and graph machine learning, and in particular to a semi-supervised graph node expansion method based on quadratic alignment. Background Art
[0002] In the field of data science and graph machine learning, the node classification task of graph data has always been a hot topic of research. For the general graph node classification problem, many related methods have been proposed. Among them, the graph embedding-based method is an important solution. This type of method captures the topological structure and node features of the graph by learning the low-dimensional representation of the node, and then classifies the node. In addition, the graph convolutional network (GCN) method is also widely used. GCN updates the representation of the node by aggregating the features of neighboring nodes, thus achieving remarkable results in the node classification task.
[0003] The classification of graph nodes often faces two imbalance problems: quantity imbalance and topological imbalance. Quantity imbalance means that the number of nodes in some categories is far less than that in other categories. In this case, the model is easily dominated by the majority class nodes and ignores the characteristics of the minority class nodes; topological imbalance means that the connection distribution between nodes in the graph data is extremely uneven, that is, some nodes have many adjacent nodes and dense connections, while other nodes are sparsely connected. These two imbalances will significantly affect the accuracy of node classification.
[0004] In order to deal with the problem of imbalanced numbers, many new methods have been proposed, such as the balanced neighborhood exploration (BNE) method. BNE is based on the idea that "the more influenced a class is, the more likely it is to belong to that class". It explores an equal number of nodes for each category through neighbor node exploration, and sequentially constructs a node training set that is balanced in number, which is then added to model training. BNE has achieved remarkable results.
[0005] In order to solve the problem of topological imbalance, more new methods have been introduced. The graph neural network model ReNode is one of the representatives. First, a personalized PageRank matrix is used to measure the mutual influence between nodes. Then, a calculation formula is constructed to evaluate the influence conflict of the nodes. Finally, the training weight is reduced or increased according to the influence conflict.
[0006] However, current solutions still have many shortcomings. Many methods are complex and time-consuming to calculate; most methods do not take unlabeled nodes into account and are underdeveloped; and some methods do not take into account the imbalance problem.
[0007] Therefore, in the related technology, there is an urgent need for a method that can improve the classification ability of graph data nodes and reduce the computational complexity. Summary of the invention
[0008] Based on this, it is necessary to provide a semi-supervised graph node expansion method based on quadratic alignment, which can improve the classification ability of graph data nodes and reduce the computational complexity in response to the above technical problems.
[0009] In a first aspect, the present application provides a semi-supervised graph node expansion method based on quadratic alignment. The method comprises:
[0010] Calculate the second or third power of the full graph adjacency matrix corresponding to the graph nodes, and determine the influence matrix based on the calculation results;
[0011] Selecting a category set with the largest number of labeled nodes as a first benchmark, and determining an alignment node based on the first benchmark and the influence matrix, wherein the category set of labeled nodes is a set of labeled nodes obtained by performing an initial classification on the graph nodes;
[0012] Determine the influence ranking of each category on the node based on the influence matrix, and determine a set of candidate pseudo labels for the node;
[0013] Determine a secondary alignment benchmark based on the node candidate pseudo-label set, the first benchmark and a preset expected number of nodes, and determine a secondary alignment node based on the secondary alignment benchmark and an influence matrix;
[0014] The original training node set is expanded based on the first alignment node and the second alignment node.
[0015] Optionally, in one embodiment of the present application, determining the influence matrix based on the calculation results includes:
[0016] The influence row vectors of each category on each node are determined based on the power matrix of the full-graph adjacency matrix, and the influence matrix is determined based on the influence row vectors.
[0017] Optionally, in an embodiment of the present application, determining an alignment node based on the first benchmark and the influence matrix includes:
[0018] For the influence row vector corresponding to the category, the influence values corresponding to the labeled nodes are removed, the remaining influence values are sorted by size, and the corresponding unlabeled nodes are selected as the primary alignment nodes based on the sorting result combined with the first benchmark.
[0019] Optionally, in one embodiment of the present application, determining the secondary alignment benchmark based on the node candidate pseudo-label set, the first benchmark and a preset expected number of nodes includes:
[0020] A category set with the least number of candidate pseudo labels for nodes is selected as a second benchmark, and a secondary alignment benchmark is determined by combining a preset expected number of points and the first benchmark.
[0021] Optionally, in one embodiment of the present application, determining the secondary alignment node based on the secondary alignment benchmark and the influence matrix includes:
[0022] For the influence column vector corresponding to the node candidate pseudo-label set, remove the influence values corresponding to the labeled nodes and the first-aligned nodes, sort the remaining influence values by size, and select the corresponding unlabeled nodes as the second-aligned nodes based on the sorting result combined with the second-alignment benchmark.
[0023] In a second aspect, the present application also provides a semi-supervised graph node expansion device based on quadratic alignment. The device comprises:
[0024] An influence matrix determination module is used to calculate the second or third power of the full graph adjacency matrix corresponding to the graph node, and determine the influence matrix based on the calculation result;
[0025] A primary alignment module is used to select a category set with the largest number of labeled nodes as a first benchmark, and determine a primary alignment node based on the first benchmark and an influence matrix, wherein the category set of labeled nodes is a labeled node set obtained by performing an initial classification on the graph nodes;
[0026] A candidate pseudo-label determination module is used to determine the influence ranking of each category on the node based on the influence matrix, and determine a set of candidate pseudo-labels for the node;
[0027] A secondary alignment module, used to determine a secondary alignment benchmark based on the node candidate pseudo-label set, the first benchmark and a preset expected number of nodes, and to determine a secondary alignment node based on the secondary alignment benchmark and an influence matrix;
[0028] The node expansion module is used to expand the original training node set based on the first alignment node and the second alignment node.
[0029] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the methods described in the above embodiments.
[0030] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in each of the above embodiments are implemented.
[0031] The above-mentioned semi-supervised graph node expansion method based on quadratic alignment first calculates the quadratic or cubic power of the full graph adjacency matrix corresponding to the graph node, and determines the influence matrix based on the calculation result; then, selects the category set with the largest number of labeled nodes as the first benchmark, and determines the first alignment node based on the first benchmark and the influence matrix, wherein the category set of labeled nodes is the set of labeled nodes obtained by initial classification of the graph nodes; then, determines the influence ranking of each category on the node based on the influence matrix, and determines the node candidate pseudo-label set; then, determines the secondary alignment benchmark based on the node candidate pseudo-label set, the first benchmark and the preset expected number of nodes, and determines the secondary alignment node based on the secondary alignment benchmark and the influence matrix; finally, expands the original training node set based on the first alignment node and the secondary alignment node. In other words, using the power of the adjacency matrix as a standard for measuring the quality of pseudo-labels is simple and intuitive, and has low complexity; paying attention to the existence of a large number of unlabeled nodes in semi-supervised node classification, a pseudo-label scheme is proposed to utilize them, so as to make full use of existing data and improve the node classification effect. The setting of pseudo-labels is divided into two steps: alignment + expansion, which ensures the balance of the results. While the complexity is not high, the impact of imbalance on classification is taken into account, and attention is paid to, selected and utilized unlabeled nodes, thereby improving the accuracy of semi-supervised node classification of graph data. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 An application environment diagram of a semi-supervised graph node expansion method based on quadratic alignment in one embodiment;
[0033] Figure 2 A schematic diagram of a process of a semi-supervised graph node expansion method based on quadratic alignment in one embodiment;
[0034] Figure 3 It is a structural block diagram of a semi-supervised graph node expansion device based on secondary alignment in one embodiment;
[0035] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0037] The semi-supervised graph node expansion method based on quadratic alignment provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal communicates with the server through the network. The data storage system can store the data that the server needs to process. The data storage system can be integrated on the server, or it can be placed on the cloud or other network servers. Among them, the terminal can be but not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server can be implemented as an independent server or a server cluster consisting of multiple servers.
[0038] In one embodiment, Figure 2 As shown in the figure, a semi-supervised graph node expansion method based on quadratic alignment is provided. Figure 1 The server in the example is used to illustrate the following steps:
[0039] S201: Calculate the second or third power of the full graph adjacency matrix corresponding to the graph node, and determine the influence matrix based on the calculation result.
[0040] In the embodiment of the present application, the original data set is an undirected graph G = (V, E, L), where V is a node set and the node feature matrix X∈R n*d , n is the number of nodes, d is the node feature dimension, E is the edge set, and the adjacency matrix A∈R n*n Description, element a ij Indicates whether node i is connected to node j, 1 indicates connection, 0 indicates no connection. Assume y i ∈{1,2,...,k} is the category label of the node, with a total of k categories; T c The set of labeled nodes of category c is the training set, and satisfies T = ∑T c ,|T|≈5%|V|, T is the set of all categories, that is, nodes with labels account for 5% of the node set. In specific applications, the original data set undirected graph can be a literature citation network data set, where nodes represent files (paper documents), edges represent citation relationships, and labels are on nodes.
[0041] First, the quadratic or cubic power of the full-graph adjacency matrix A is calculated, and the exponent of the matrix power (two or three) is selected according to the data set. Based on the calculation results of the matrix power, the influence of each category on each node is determined to measure the quality of the pseudo-label. All influences together constitute the influence matrix.
[0042] Specifically, in one embodiment of the present application, determining the influence matrix based on the calculation results includes:
[0043] The influence row vectors of each category on each node are determined based on the power matrix of the full-graph adjacency matrix, and the influence matrix is determined based on the influence row vectors.
[0044] In one embodiment of the present application, the power of the full graph adjacency matrix A is W=A n ∈R n*n ,n is (2,3), the specific form is as follows:
[0045]
[0046] Among them, w ij It represents the number of paths with length n from node i to node j, which can be used to measure the influence of node i to node j.
[0047] For a certain category c, extract the row W corresponding to the labeled node of this category from the matrix W i (y=c&i∈T c ), and concatenate them into the following matrix:
[0048]
[0049] Among them, u is the number of labeled nodes in this category.
[0050] After that, sum each column separately to get the row vector of the influence of category c on each node [f c1 f c2 …f cn ] 1×n , concatenate the k row vectors obtained from all k categories into an influence matrix, which represents the influence distribution of each category on each node and is used to measure the quality of pseudo labels. The format is as follows:
[0051]
[0052] S203: Select a category set with the largest number of labeled nodes as a first benchmark, and determine an alignment node based on the first benchmark and the influence matrix, wherein the category set of labeled nodes is a labeled node set obtained by initially classifying the graph nodes.
[0053] In the embodiment of the present application, the number of labeled nodes with the largest number in each category is used as the first benchmark, and the remaining categories absorb a part of the nodes with the greatest influence in this category, and add pseudo labels of the corresponding category to the absorbed nodes, so that the number of nodes in the category is aligned with the first benchmark value, and all absorbed nodes are aligned nodes once.
[0054] Specifically, in one embodiment of the present application, determining an alignment node based on the first benchmark and the influence matrix includes:
[0055] For the influence row vector corresponding to the category, the influence values corresponding to the labeled nodes are removed, the remaining influence values are sorted by size, and the corresponding unlabeled nodes are selected as the primary alignment nodes based on the sorting result combined with the first benchmark.
[0056] In one embodiment of the present application, let basis = max{|T k |}, that is, the number of nodes with the largest number of labels in each category. For each category, take the row corresponding to category c from the influence matrix [f c1 f c2 …f cn ] 1×n , remove the influence values corresponding to the labeled nodes, sort the remaining influence values in descending order, and take the first basis-|T c | The nodes corresponding to the values are set to N c , that is, once an aligned node is added, it will be added to the node set of this category, and the pseudo label of the corresponding category will be added to achieve quantity alignment.
[0057] S205: Determine the influence ranking of each category on the node based on the influence matrix, and determine a set of candidate pseudo labels for the node.
[0058] In the embodiment of the present application, for the influence matrix, each node is sorted according to its influence on each category, that is, the influence value is sorted by column, and the sorting result corresponds to the influence ranking of each category on the node. Each column of the matrix F is sorted in descending order to obtain
[0059]
[0060] At the same time, select an appropriate ranking value, that is, the maximum number of pseudo labels that each node can obtain. The top-ranked categories under each node are the possible pseudo labels of the node, and determine the node candidate pseudo label set. Specifically, set the maximum number of pseudo labels that each node can obtain m∈[1,k], take the first m rows of the above matrix, and the format of each row is as follows
[0061] F i ′=[f′ i1 f′ i2 … f′ in ] 1×n ;
[0062] Among them, the element f′ ij is the influence value of the class with the highest influence on node j.
[0063] Record F i Each element f′ in ′ ij The row number in the original matrix F The row number is the category of the class with the highest influence on node j, which is also the pseudo label. Classify and obtain k candidate pseudo-label sets, and the node pseudo-labels in each set are the same.
[0064] S207: Determine a secondary alignment benchmark based on the node candidate pseudo-label set, the first benchmark and a preset expected number of nodes, and determine a secondary alignment node based on the secondary alignment benchmark and an influence matrix.
[0065] In the embodiment of the present application, all possible pseudo labels of all nodes are put into a category pool and sorted, and the pseudo labels with the highest influence values in each category are identified as the final pseudo labels.
[0066] In one embodiment of the present application, determining the secondary alignment benchmark based on the node candidate pseudo-label set, the first benchmark and the preset expected number of nodes includes:
[0067] A category set with the least number of candidate pseudo labels for nodes is selected as a second benchmark, and a secondary alignment benchmark is determined by combining a preset expected number of points and the first benchmark.
[0068] In one embodiment of the present application, a suitable expansion rate e∈[1,3] is selected according to the data set, and the preset expected number of points, that is, the total number of training nodes expected for each category, is The number of pseudo labels of the class with the least number of candidate pseudo labels for nodes, leastclsnum, is used as the second benchmark. Its size is compared with (the preset expected number of points - the first benchmark), and the smaller one is selected as the secondary alignment benchmark, that is, min{leastclsnum,maxnum-basis} is the number of pseudo labels pseudonum expanded for each category.
[0069] In one embodiment of the present application, determining the secondary alignment node based on the secondary alignment benchmark and the influence matrix includes:
[0070] For the influence column vector corresponding to the node candidate pseudo-label set, remove the influence values corresponding to the labeled nodes and the first-aligned nodes, sort the remaining influence values by size, and select the corresponding unlabeled nodes as the second-aligned nodes based on the sorting result combined with the second-alignment benchmark.
[0071] In one embodiment of the present application, for each influence column vector set corresponding to a pseudo label c, the influence values corresponding to the labeled nodes and the first aligned nodes are removed, and the remaining influence values are sorted in descending order according to their size to obtain a sorted node list P c′. Take the unlabeled nodes corresponding to the pseudonum elements of the first secondary alignment benchmark as the secondary alignment nodes, add the pseudo labels of the corresponding categories, and set them as the set P c , will be added to the node set of the corresponding category.
[0072] S209: Expanding the original training node set based on the first alignment node and the second alignment node.
[0073] In an embodiment of the present application, the first-aligned nodes and the second-aligned nodes are added to the corresponding category node sets according to the categories corresponding to the pseudo-labels to form the final labeled training set nodes, thereby realizing graph node classification.
[0074] In the above-mentioned semi-supervised graph node expansion method based on quadratic alignment, first, the quadratic or cubic power of the full graph adjacency matrix corresponding to the graph node is calculated, and the influence matrix is determined based on the calculation result; then, the category set with the largest number of labeled nodes is selected as the first benchmark, and the first alignment node is determined based on the first benchmark and the influence matrix, wherein the category set of labeled nodes is the set of labeled nodes obtained by initial classification of the graph nodes; then, the influence ranking of each category on the node is determined based on the influence matrix, and the node candidate pseudo-label set is determined; then, the secondary alignment benchmark is determined based on the node candidate pseudo-label set, the first benchmark and the preset expected number of nodes, and the secondary alignment node is determined based on the secondary alignment benchmark and the influence matrix; finally, the original training node set is expanded based on the first alignment node and the secondary alignment node. In other words, using the power of the adjacency matrix as a standard for measuring the quality of pseudo-labels is simple and intuitive, and has low complexity; paying attention to the existence of a large number of unlabeled nodes in semi-supervised node classification, a pseudo-label scheme is proposed to utilize them, so as to make full use of existing data and improve the node classification effect. The setting of pseudo-labels is divided into two steps: alignment + expansion, which ensures the balance of the results. While the complexity is not high, the impact of imbalance on classification is taken into account, and attention is paid to, selected and utilized unlabeled nodes, thereby improving the accuracy of semi-supervised node classification of graph data.
[0075] In one embodiment of the present application, two datasets, Cora and Citeseer, are selected from the graph dataset Planetoid, and their number of nodes, number of edges, number of categories, and feature dimensions are shown in the following table. Cora and Citeseer are two literature citation network datasets, both of which are undirected graphs, where nodes represent files (paper documents) and edges represent citation relationships. Labels are placed on nodes, which is a multi-classification task.
[0076]
[0077] The data set is divided into the following categories: labeled nodes account for 5% of all nodes, and the category imbalance rates are 5.0 and 10.0.
[0078] SGC, ReNode (RN) and BNE are selected as comparison methods. SGC is the model used for training RN, BNE and the method of this application, and appears as the Baseline (B) method in the experimental results. The description of each method is as follows:
[0079]
[0080] The graph nodes are classified uniformly, and the Macro-F1 score is used to measure the classification results of different methods for each data set. The calculation formula of the F1 score is
[0081]
[0082] Among them, precision represents accuracy, recall represents recall rate, and Macro-F1 score calculates the F1 score of each category and then averages the F1 scores of all categories.
[0083] The experimental results are shown in the following table, and the best result for each dataset is marked in bold.
[0084]
[0085]
[0086] As shown in the table, on both datasets, the method of the present application achieved the highest Macro-F1 value, i.e. the best result. The experimental results of the method of the present application were obtained under the following conditions:
[0087]
[0088] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0089] Based on the same inventive concept, the embodiment of the present application also provides a semi-supervised graph node expansion device based on quadratic alignment for implementing the semi-supervised graph node expansion method based on quadratic alignment mentioned above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of a semi-supervised graph node expansion device based on quadratic alignment provided below can be referred to the limitations of a semi-supervised graph node expansion method based on quadratic alignment above, and will not be repeated here.
[0090] In one embodiment, Figure 3 As shown, a semi-supervised graph node expansion device 300 based on secondary alignment is provided, comprising: an influence matrix determination module 301, a primary alignment module 303, an alternative pseudo-label determination module 305, a secondary alignment module 307 and a node expansion module 309, wherein:
[0091] The influence matrix determination module 301 is used to calculate the second or third power of the full graph adjacency matrix corresponding to the graph node, and determine the influence matrix based on the calculation result.
[0092] The primary alignment module 303 is used to select a category set with the largest number of labeled nodes as a first benchmark, and determine a primary alignment node based on the first benchmark and the influence matrix, wherein the category set of labeled nodes is a labeled node set obtained by initially classifying the graph nodes.
[0093] The candidate pseudo-label determination module 305 is used to determine the influence ranking of each category on the node based on the influence matrix, and determine a set of candidate pseudo-labels for the node.
[0094] The secondary alignment module 307 is used to determine a secondary alignment benchmark based on the node candidate pseudo-label set, the first benchmark and a preset expected number of nodes, and determine a secondary alignment node based on the secondary alignment benchmark and an influence matrix.
[0095] The node expansion module 309 is used to expand the original training node set based on the first alignment node and the second alignment node.
[0096] In one embodiment of the present application, the influence matrix determination module is further used to:
[0097] The influence row vectors of each category on each node are determined based on the power matrix of the full-graph adjacency matrix, and the influence matrix is determined based on the influence row vectors.
[0098] In one embodiment of the present application, the primary alignment module is further used for:
[0099] For the influence row vector corresponding to the category, the influence values corresponding to the labeled nodes are removed, the remaining influence values are sorted by size, and the corresponding unlabeled nodes are selected as the primary alignment nodes based on the sorting result combined with the first benchmark.
[0100] In one embodiment of the present application, the secondary alignment module is further used for:
[0101] A category set with the least number of candidate pseudo labels for nodes is selected as a second benchmark, and a secondary alignment benchmark is determined by combining a preset expected number of points and the first benchmark.
[0102] In one embodiment of the present application, the secondary alignment module is further used for:
[0103] For the influence column vector corresponding to the node candidate pseudo-label set, remove the influence values corresponding to the labeled nodes and the first-aligned nodes, sort the remaining influence values by size, and select the corresponding unlabeled nodes as the second-aligned nodes based on the sorting result combined with the second-alignment benchmark.
[0104] Each module in the above-mentioned semi-supervised graph node expansion device based on quadratic alignment can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0105] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a semi-supervised graph node expansion method based on quadratic alignment is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0106] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0107] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0108] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0109] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0110] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0111] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0112] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0113] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A semi-supervised graph node expansion method based on quadratic alignment, characterized in that: The method comprises: Calculate the second or third power of the full graph adjacency matrix corresponding to the graph nodes, and determine the influence matrix based on the calculation results; Selecting a category set with the largest number of labeled nodes as a first benchmark, and determining an alignment node based on the first benchmark and the influence matrix, wherein the category set of labeled nodes is a set of labeled nodes obtained by performing an initial classification on the graph nodes; Determine the influence ranking of each category on the node based on the influence matrix, and determine a set of candidate pseudo labels for the node; Determine a secondary alignment benchmark based on the node candidate pseudo-label set, the first benchmark and a preset expected number of nodes, and determine a secondary alignment node based on the secondary alignment benchmark and an influence matrix; The original training node set is expanded based on the first alignment node and the second alignment node.
2. According to the semi-supervised graph node expansion method based on quadratic alignment according to claim 1, it is characterized in that: Determining the influence matrix based on the calculation results includes: The influence row vectors of each category on each node are determined based on the power matrix of the full-graph adjacency matrix, and the influence matrix is determined based on the influence row vectors.
3. According to the semi-supervised graph node expansion method based on quadratic alignment according to claim 2, it is characterized in that: The determining of an alignment node based on the first benchmark and the influence matrix comprises: For the influence row vector corresponding to the category, the influence values corresponding to the labeled nodes are removed, the remaining influence values are sorted by size, and the corresponding unlabeled nodes are selected as the primary alignment nodes based on the sorting result combined with the first benchmark.
4. According to the semi-supervised graph node expansion method based on quadratic alignment according to claim 1, it is characterized in that: Determining the secondary alignment benchmark based on the node candidate pseudo-label set, the first benchmark and the preset expected number of nodes includes: A category set with the least number of candidate pseudo labels for nodes is selected as a second benchmark, and a secondary alignment benchmark is determined by combining a preset expected number of points and the first benchmark.
5. According to the method of claim 4, the semi-supervised graph node expansion method based on quadratic alignment is characterized in that: Determining the secondary alignment node based on the secondary alignment benchmark and the influence matrix includes: For the influence column vector corresponding to the node candidate pseudo-label set, remove the influence values corresponding to the labeled nodes and the first-aligned nodes, sort the remaining influence values by size, and select the corresponding unlabeled nodes as the second-aligned nodes based on the sorting result combined with the second-alignment benchmark.
6. A semi-supervised graph node expansion device based on quadratic alignment, characterized in that: The device comprises: An influence matrix determination module is used to calculate the second or third power of the full graph adjacency matrix corresponding to the graph node, and determine the influence matrix based on the calculation result; A primary alignment module is used to select a category set with the largest number of labeled nodes as a first benchmark, and determine a primary alignment node based on the first benchmark and an influence matrix, wherein the category set of labeled nodes is a labeled node set obtained by performing an initial classification on the graph nodes; A candidate pseudo-label determination module is used to determine the influence ranking of each category on the node based on the influence matrix, and determine a set of candidate pseudo-labels for the node; A secondary alignment module, used to determine a secondary alignment benchmark based on the node candidate pseudo-label set, the first benchmark and a preset expected number of nodes, and to determine a secondary alignment node based on the secondary alignment benchmark and an influence matrix; The node expansion module is used to expand the original training node set based on the first alignment node and the second alignment node.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. 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 of the method according to any one of claims 1 to 5 are implemented.