A node classification method based on relational aggregation hypergraph
By constructing a hypergraph structure with explicit and implicit relationships and combining the global attention mechanism and hypergraph neural network, the problem of insufficient high-order information in traditional hypergraphs is solved, and the accuracy of node classification is improved.
Patent Information
- Application Number
- CN202211685347.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-12-27
AI Technical Summary
The traditional hypergraph construction method only considers a single relationship and cannot fully extract higher-order information, which affects the accuracy of node classification.
By constructing a hypergraph structure of explicit and implicit relationships, combining the global attention mechanism and hypergraph neural network, the embedded representation of nodes is aggregated to improve classification accuracy.
It effectively supplements the sparseness of single information representation, improves the accuracy of node classification, and maintains the global structure information of the network.
Smart Images

Figure CN115983341B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of complex network technology, and in particular to a hypergraph node classification method based on relationship aggregation. Background Art
[0002] Graphs are a highly abstract form of linked data, used to represent the relationships between multiple entities in networks such as the internet, social networks, and biological networks. In traditional graph modeling, an edge connects only two nodes, often modeling only two-dimensional pairwise relationships between nodes, making it difficult to describe multivariate, higher-order relationships found in the real world. Hyperedges in hypergraphs, however, can encompass any number of nodes, enabling the representation of higher-order relationships, such as multiple authors collaborating on a paper in a scientific collaboration network or multiple users purchasing the same item online. Compared to conventional graph structures, hypergraphs possess a stronger ability to characterize and mine nonlinear, higher-order relationships between data samples, enabling more accurate modeling of multivariate relationships. Consequently, hypergraphs are widely used for node classification tasks in a variety of fields, including image segmentation, high-dimensional spatial clustering, multimodal data modeling, recommender systems, and social networks. Furthermore, with the outstanding performance of graph neural networks in various tasks, applying graph neural networks to hypergraphs and learning representations from them has become a research hotspot in recent years.
[0003] However, faced with increasingly complex network structures and increasingly rich node features, traditional hypergraph construction methods only consider single relationships and cannot fully reflect the high-order information between nodes in graph data with high-dimensional features. This has significant limitations in modeling high-order relational data. For example, in a hypergraph based on scientific research collaboration, only the relationship between multiple authors collaborating on a paper is modeled, while the higher-order relationships generated by the connections between multiple papers or authors are ignored. In social recommendations based on hypergraphs, only the interactive relationships between users and projects are modeled, while the higher-order relationships generated by the connections between users and products are ignored. This inevitably leads to suboptimal node representation and affects the effectiveness of node classification tasks. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a node classification method based on a relationship aggregation hypergraph, which can solve the problems of incomplete extraction of single feature information in traditional hypergraph-based node classification methods. By aggregating explicit and implicit relationships to construct a relationship aggregation hypergraph structure and calculating the embedded representation of nodes through a neural network on the hypergraph, the accuracy of node classification is improved, effectively compensating for the sparsity of single information representation and better maintaining the global structure of the network.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] A node classification method based on a relationship aggregation hypergraph comprises the following steps:
[0007] S1. Define explicit and implicit relationships based on the structure and node characteristics of high-order relationship graph data;
[0008] S2. Construct explicit hyperedges based on explicit relations;
[0009] S3. Construct implicit hyperedges based on implicit relations;
[0010] S4. Define the implicit feature correlation coefficient, use the global attention mechanism to calculate the importance between the target node and the neighbor nodes in the implicit hyperedge, and aggregate it with the explicit hyperedge to generate a hypergraph structure with relationship aggregation;
[0011] S5. Use hypergraph neural network to embed the generated relation aggregation hypergraph structure;
[0012] S6. Send the trained node embedding representation to the softmax classifier to classify the nodes according to the inherent labels.
[0013] A further improvement of the technical solution of the present invention is that: in S1, the definitions of explicit relationships and implicit relationships are given according to the structure of high-order relationship graph data and node characteristics, and all relationships between nodes can be expressed as the union of explicit relationships and implicit relationships.
[0014] A further improvement of the technical solution of the present invention is that in S2, the explicit hyperedge is constructed based on the explicit relationships in the network data, such as friend relationships and enemy relationships in social networks, citation relationships and co-author relationships in paper collaboration networks, and protein-protein interaction relationships in biological networks.
[0015] A further improvement of the technical solution of the present invention is that in S3, the implicit hyperedge is constructed by using the KNN and K-means methods to represent the implicit relationship between nodes from both local and global perspectives. For a given target node v, its k nearest neighbors and the cluster with the nearest centroid vertex are selected to form an implicit hyperedge.
[0016] A further improvement of the technical solution of the present invention is that in S4, the method for generating a relationship aggregation hypergraph structure specifically includes the following steps:
[0017] S4.1. Assume a set of input node features Here n is the number of nodes and F is the feature dimension of a single node. The self-attention mechanism is introduced to set the weight vector W a ∈R 2×F and the learnable parameter a.
[0018]
[0019] e ijIt represents the similarity coefficient between node j and node i in the feature space. The larger the value, the closer the two nodes are in the feature space.
[0020] S4.2. Inject the implicit hyperedge correlation matrix constructed based on the implicit relationship into the attention mechanism as a mask to obtain the implicit feature correlation coefficient α between node i and node j ij :
[0021]
[0022] where Z i Represents the set of all nodes whose target node is in a hyperedge built based on an implicit relationship.
[0023] S4.3, set the threshold β, if α ij ≥β, that is, if the implicit feature similarity coefficient with the target node is greater than the threshold β, then v j Add to E to generate a new hyperedge E A , forming a hypergraph structure G of relationship aggregation A =(V,E A ,W), where W is the weight matrix representing the vertices belonging to different hyperedges.
[0024] A further improvement of the technical solution of the present invention is that the node embedding method based on the hypergraph neural network described in S5 specifically includes the following steps:
[0025] S5.1. The node-edge connection relationship in the relational aggregation hypergraph is represented by a weighted association matrix. That is, the connection between the node and the explicit hyperedge is represented by the association matrix H, and the connection between the node and the implicit hyperedge is represented by H. l Indicates that the two are aggregated and α ij Fill in the corresponding data and get the weighted correlation matrix H A ;
[0026] S5.2. The input of the hypergraph neural network is the correlation matrix H A And node feature X, the embedding representation update formula of the node is:
[0027]
[0028] where X (l) ∈R F is the feature of the node in layer l, σ is the nonlinear activation function, D v The diagonal matrix representing the vertex degree, the vertex degree is the number of hyperedges associated with the vertex, D e The diagonal matrix representing the hyperedge degree, which is the number of vertices in the hyperedge, E A(l) is the feature of the hyperedge at layer l.
[0029] A further improvement of the technical solution of the present invention is that in S6, the trained node embedding representation is fed into the softmax classifier, and the final output is an N×M matrix, which corresponds to the probability of each node belonging to the category. The loss function of the model is the NLLLoss (negative log-likelihood loss) function:
[0030]
[0031] Where N is the number of samples, M is the sample category, and p mn The probability that the nth sample output by the model belongs to the mth category.
[0032] in
[0033]
[0034] When the label of the mth sample is n, y n =1 otherwise y n =0
[0035] Due to the adoption of the above technical solution, the technical advancements achieved by the present invention are:
[0036] 1. A new hypergraph-based node classification modeling method is proposed, which not only represents the explicit relationships in the network structure information but also considers the implicit relationships between nodes, thus supplementing the high-order information in the hypergraph structure.
[0037] 2. Combining the global attention mechanism to perform weighted calculations on the hypergraph’s association matrix, and using a hypergraph neural network to achieve an aggregated representation of implicit and explicit information in graph data, improving the effectiveness of node embedding;
[0038] 3. The present invention conducts a large number of comparative experiments on public network datasets. The results show that the method proposed in the present invention has a certain effect on improving node classification results. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a schematic diagram of the model matching process in the present invention;
[0040] Figure 2 It is the overall model diagram of the present invention;
[0041] Figure 3 This is a case of hyperedge construction of the paper collaboration network in this invention. DETAILED DESCRIPTION
[0042] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments:
[0043] like Figure 1 and 2 As shown, a node classification method based on a relationship aggregation hypergraph includes the following steps:
[0044] S1. Define explicit and implicit relationships based on the structure and node characteristics of high-order relationship graph data;
[0045] In the traditional hypergraph G, there is a node set V = {v1, v2, ..., v n}, use A(V)={A1,A2,…,A m} represents the attribute set of the node, then A i (v j ) means node v j The value of the i-th attribute of . If A i (v j )={v k |v k ∈A j (v j )}, any v j ∈V,v k ∈A i (v j ). Then node v j With v k The relationship is called the display relationship, denoted by R e . Any v j ∈V,v k ∈V, define f(A i (v j ),A i (v k )) represents node v j With v k The relationship is called implicit relationship, denoted by R i Therefore, all relationships between nodes can be expressed as R = {R i}∪{R e}.
[0046] S2. Construct an explicit hypergraph based on explicit relations;
[0047] Traditional hypergraphs are usually represented by G = (V, E), where V = {v1,…,v n} represents a set of n nodes, E={e1,…,e m} represents a set of m hyperedges in a hypergraph, where each hyperedge is an unordered set of nodes In traditional hypergraph G, nodes are connected by explicit relations R e Connect together to form a hyperedge set For the convenience of description, the traditional hypergraph is defined as an explicit hypergraph, and E is called an explicit hyperedge. Figure 3 Taking the paper collaboration network as an example, authors with collaborative relationships are connected by a hyperedge. At this time, the collaborative relationship shown in the hypergraph is an explicit relationship, and the hypergraph structure established based on this relationship is an explicit hypergraph.
[0048] S3. Based on the implicit relationship, construct an implicit hypergraph, which includes the following two steps:
[0049] A1. Leveraging the fundamental principle of the KNN algorithm that samples of the same category should cluster together in feature space, we can mine implicit relationships between nodes in feature space. For each target node, we find its K nearest neighbors. This target node and its K nearest neighbors form a hyperedge.
[0050] A2. Use the K-MEANS method to correct the hyperedges generated by KNN. First, group all vertices directly into k clusters, and then link all vertices in the same cluster through hyperedges. For the target vertex, calculate its distance to the center point of each cluster, and select the edge of the nearest center point vertex as the hyperedge of the vertex. Hyperedge set based on implicit relationship Among them, p hyperedges are generated by KNN and q hyperedges are generated by k-means.
[0051] S4. Define the implicit feature correlation coefficient, use the global attention mechanism to calculate the importance between the target node and the neighbor nodes in the implicit hyperedge, and aggregate it with the explicit hyperedge to generate a hypergraph structure with relationship aggregation;
[0052] B1. Assume a set of input node features Here n is the number of nodes and F is the feature dimension of a single node. The self-attention mechanism is introduced to set the weight vector W a ∈R 2×F and the learnable parameter a.
[0053]
[0054] e ij It represents the similarity coefficient between node j and node i in the feature space. The larger the value, the closer the two nodes are in the feature space.
[0055] B2. Inject the implicit hyperedge correlation matrix constructed based on the implicit relationship into the attention mechanism as a mask to obtain the implicit feature correlation coefficient α between node i and node j ij :
[0056]
[0057] where Z i Represents the set of all nodes whose target node is in a hyperedge built based on an implicit relationship.
[0058] B3. Set the threshold β, if α ij ≥β, that is, if the implicit feature similarity coefficient with the target node is greater than the threshold β, then vj Add to E to generate a new hyperedge E A , forming a hypergraph structure G of relationship aggregation A =(V,E A ,W), where W is the weight matrix representing the vertices belonging to different hyperedges. l ={Φ}, RAH degenerates into a traditional hypergraph.
[0059] S5. Use hypergraph neural network to embed the generated relation aggregation hypergraph structure;
[0060] S5.1. The node-edge connection relationship in the relational aggregation hypergraph is represented by a weighted association matrix. That is, the connection between the node and the explicit hyperedge is represented by the association matrix H, and the connection between the node and the implicit hyperedge is represented by H. l Indicates that the two are aggregated and α ij Fill in the corresponding data and get the weighted correlation matrix H A .
[0061] S5.2. The input of the hypergraph neural network is the correlation matrix H A And node feature X, the embedding representation update formula of the node is:
[0062]
[0063] where X (l) ∈R F is the feature of the node in layer l, and σ is the nonlinear activation function. v The diagonal matrix representing the vertex degree, where the vertex degree is the number of hyperedges associated with the vertex. e The diagonal matrix representing the hyperedge degree, which is the number of vertices in the hyperedge, E A(l) is the feature of the hyperedge at layer l.
[0064] S6. Send the trained node embedding representation to the softmax classifier to classify the nodes according to the inherent labels.
[0065] The final output of the model is an N×M matrix, which corresponds to the probability of each node belonging to the category. The loss function of the model is the NLLLoss (negative log-likelihood loss) function:
[0066]
[0067] Where N is the number of samples, M is the sample category, and p mn The probability that the nth sample output by the model belongs to the mth category.
[0068] in
[0069]
[0070] When the label of the mth sample is n, y n =1 otherwise y n =0
[0071] We used the Cora and 20newsgroups datasets, two widely used graph datasets, for our experiments. The statistical results of the datasets are shown in Table 1.
[0072] Table 1 Dataset statistics
[0073]
[0074] The proposed method was compared with other models, and the results are shown in Table 2: the relational aggregation hypergraph neural network model (RAHGNN) outperformed the comparison models. This shows that hypergraphs constructed by aggregating explicit and implicit relationships can better capture high-level information than ordinary graphs and homogeneous hypergraphs on datasets with different node feature dimensions, thereby achieving more accurate node representations, verifying the effectiveness of the proposed method.
[0075] Table 2 Comparison of results
[0076]
[0077] In order to better reflect the performance of the relational aggregation hypergraph neural network model (RAHGNN) in node classification, different proportions of data sets were selected to conduct experiments on different models. Taking the Cora data set as an example, in addition to using a fixed 5.2% data set for training, a certain proportion of data was randomly re-sampled on the Cora data set to conduct comparative experiments with other models. The experimental results are shown in Table 3. As the number of training samples increases, the classification accuracy increases steadily. When the random sample selection and the sequential sample selection experiments were conducted separately, the classification results were relatively stable, which shows that the model of the present invention can better capture the high-order relationships in the network and improve the accuracy of node classification.
[0078] Table 3: Comparative experiments on different partitions of the Cora dataset
[0079]
[0080] In order to illustrate the role of the implicit hyperedge and explicit hyperedge construction modules in the present invention, ablation experiments were conducted on the Cora dataset and the 20news dataset. That is, the model is divided into four modules: KNN to construct implicit hyperedges, K-means to construct implicit hyperedges, explicit hyperedges based on explicit relationships, and relationship aggregation based on the global attention mechanism. In the experiment, the four modules were removed one by one to obtain the experimental results shown in Table 4. The experiment shows that removing any module in the model will reduce the accuracy of the model. However, the performance results of different hyperedge construction methods on different datasets are not the same. The construction method of the relationship aggregation hypergraph has good scalability on different datasets. For different data distribution forms, the proposed method can achieve good results.
[0081] Table 4 Effects of different hyperedge construction methods on node classification accuracy
[0082]
[0083] In summary, this invention addresses the incomplete extraction of single-feature information in traditional hypergraph modeling methods. By aggregating explicit and implicit relationships to construct a hypergraph structure, and computing node embeddings through a neural network on the hypergraph, the accuracy of node classification is improved. This effectively compensates for the sparsity inherent in single-feature representations and better preserves the global structure of the network.
Claims
1. A node classification method based on a relational aggregation hypergraph, characterized by: The following steps are involved: S1. Define explicit and implicit relationships based on the structure and node characteristics of high-order relationship graph data; S2. Construct explicit hyperedges based on explicit relations; The specific operation of S2 is as follows: Traditional hypergraph: Traditional hypergraph is represented by G = (V, E), where V = {v1,…,v n } represents a set of n nodes, E={e1,…,e m } represents a set of m hyperedges in a hypergraph, where each hyperedge is an unordered set of nodes When the number of nodes connected by hyperedges is 2, the hypergraph degenerates into a normal graph; Unlike traditional graphs where an edge can only connect two vertices, the hypergraph structure does not restrict the degree of vertices, that is, each hyperedge can connect any number of vertices. Therefore, it is called a high-order representation of the graph. The traditional hypergraph constructed by explicit relations is defined as an explicit hypergraph, and E is called an explicit hyperedge. S3. Construct implicit hyperedges based on implicit relations; In S3, KNN and K-means are used to extract high-order relationships between nodes from local and global perspectives and construct implicit hyperedges. In order to capture global information in the feature space and avoid the influence of noise data, outliers and poor parameter selection, the K-MEANS method is used to correct the hyperedges generated by KNN. The hyperedge set based on implicit relationships is Among them, p hyperedges are generated by KNN, and q hyperedges are generated by k-means; S4. Define the implicit feature correlation coefficient, use the global attention mechanism to calculate the importance between the target node and the neighbor nodes in the implicit hyperedge, and aggregate it with the explicit hyperedge to generate a hypergraph structure with relationship aggregation; The specific operation of S4 is: Implicit feature correlation coefficient α ij : The importance coefficient between a node and its neighbor nodes sharing implicit hyperedges in the implicit hyperedge set e ij is the similarity coefficient between nodes, Z i is the set of neighbor nodes of the node, and exp is the exponential function with e as the base; Relational aggregation hypergraph RAH: Suppose a node set V = {v1, v2, ..., v n }, between explicit hyperedge E and implicit hyperedge E l In the i ∈E,v j ∈E l and If α ij ≥β, that is, if the implicit feature similarity coefficient with the target node is greater than the threshold β, then v j Add to E to generate a new hyperedge E A , forming a hypergraph structure G of relationship aggregation A =(V,E A ,W), where W is the weight matrix representing the vertices belonging to different hyperedges. l ={Φ}, RAH degenerates into a traditional hypergraph; S5. Use hypergraph neural network to embed the generated relation aggregation hypergraph structure; S6. Send the trained node embedding representation to the softmax classifier to classify the nodes according to the inherent labels.
2. A node classification method based on a relationship aggregation hypergraph according to claim 1, characterized in that: The specific operations of S1 are as follows: Explicit relationship definition: In the traditional hypergraph G, there is a node set V = {v1, v2, ..., v n }, use A(V)={A1,A2,…,A m } represents the attribute set of the node, then A i (v j ) means node v j The value of the i-th attribute of i (v j )={v k |v k ∈A j (v j )}, any v j ∈V,v k ∈A i (v j ), then node v j With v k The relationship is called the display relationship, denoted by R e ; Implicit relationship definition: In the traditional hypergraph G, there is a node set V = {v1, v2, ..., v n }, use A(V)={A1,A2,…,A m } represents the attribute set of the node, then A i (v j ) means node v j The value of the i-th attribute of j ∈V,v k ∈V, define f(A i (v j ),A i (v k )) represents node v j With v k The relationship is called implicit relationship, denoted by R i , so all relationships between nodes can be expressed as R = {R i }∪{R e }.
3. The node classification method based on the relationship aggregation hypergraph according to claim 1, characterized in that: The specific steps of S5 are as follows: The hypergraph structure of relationship aggregation is represented by the weighted association matrix H A Indicates that the input of the neural network is the correlation matrix H A The embedding representation update formula of node feature X node is: The training process of the model can be divided into two steps: vertex convolution and hyperedge convolution: Vertex convolution, node relationships are aggregated onto hyperedges, Hyperedge convolution, which obtains the embedded representation of the node from the features of the hyperedge, Among them, X (l) ∈R F is the feature of the node in layer l, σ is the nonlinear activation function, D v The diagonal matrix representing the vertex degree, the vertex degree is the number of hyperedges associated with the vertex, D e The diagonal matrix representing the hyperedge degree, which is the number of vertices in the hyperedge, E A(l) is the feature of the hyperedge at layer l.
4. The node classification method based on the relationship aggregation hypergraph according to claim 1, characterized in that: The S6 specifically includes the following steps: The node embedding representation is fed into the softmax classifier. The final output of the model is an N×M matrix, which corresponds to the probability of each node belonging to the category. The loss function of the model selects the negative log-likelihood loss NLLLoss function: Where N is the number of samples, M is the sample category, and p mn The probability that the nth sample output by the model belongs to the mth category; in When the label of the mth sample is n, y n =1 otherwise y n =0.
Citation Information
Patent Citations
Hyperedge link prediction method based on hypergraph convolution
CN112417219A
Public transportation group classification method based on hypergraph attention network
CN115146695A