Classification method and device for nodes in graph structure, equipment and medium
By aggregating information in a hybrid curvature graph neural network (XMan-GNN), the problem of insufficient node classification accuracy in heterologous graph structures is solved, and efficient classification is achieved in both heterologous and homologous graphs.
Patent Information
- Application Number
- CN202511631446.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-02-17
AI Technical Summary
When processing heterogeneous graph structure data, graph neural networks suffer from information loss due to heterogeneous mixing, and existing methods have not been able to effectively solve this problem.
A hybrid curvature graph neural network (XMan-GNN) is used to map the feature representation of the target node to a hybrid curvature space. By calculating the attention score in each submanifold to aggregate information, heterogeneous mixing is suppressed, thereby improving the accuracy of node classification.
It significantly improves the accuracy of node classification, especially in heterogeneous graphs, while maintaining efficient classification capabilities for homogeneous graphs, demonstrating strong generalization ability and robustness.
Smart Images

Figure CN121542831A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of artificial intelligence technology, and in particular relates to a method, apparatus, device and medium for classifying nodes in a graph structure. Background Technology
[0002] Graph Neural Networks (GNNs) are used to process graph-structured data and have wide applications in various fields. GNNs update node representations by iteratively aggregating information from neighboring nodes, thus obtaining node representations rich in contextual and graph structural information. However, the node processing of GNNs is more suitable for nodes connected to the same category. If the connected nodes belong to different categories, information loss due to "heterophily mixing" occurs during the iterative aggregation of neighboring node information to update the node representation. That is, information from neighboring nodes of different categories is mixed together, eroding the discriminative information of the target node representation and reducing the accuracy of node classification. Summary of the Invention
[0003] This application provides a method, apparatus, device, and medium for classifying nodes in a graph structure, which can improve the accuracy of node classification.
[0004] In a first aspect, embodiments of this application provide a method for classifying nodes in a graph structure, comprising: mapping the original feature representation of a target node in the graph structure to a hybrid curvature space to obtain an input feature representation of the target node, wherein the hybrid curvature space is a product space of multiple submanifolds, each submanifold corresponding to a node category, and different submanifolds having different curvature parameters; inputting the input feature representation into a hybrid curvature graph neural network, calculating the attention score of the connection edge between the target node and its neighboring nodes through the hybrid curvature graph neural network, and aggregating the information obtained from the neighboring nodes in each submanifold based on the attention score to obtain the target feature representation of the target node in the hybrid curvature space, wherein the attention score is used to characterize the probability that the target node and its neighboring nodes belong to the node categories corresponding to each submanifold; and determining the classification result of the target node based on the target feature representation of the target node and the hyperplanes in each submanifold.
[0005] Secondly, embodiments of this application provide a node classification device in a graph structure, comprising: a feature transformation module, used to map the original feature representation of a target node in the graph structure to a hybrid curvature space to obtain an input feature representation of the target node, wherein the hybrid curvature space is a product space of multiple submanifolds, each submanifold corresponding to a node category, and the curvature parameters of different submanifolds are different; a model processing module, used to input the input feature representation into a hybrid curvature graph neural network, calculate the attention score of the connection edge between the target node and its neighboring nodes through the hybrid curvature graph neural network, and aggregate the information obtained from the neighboring nodes in each submanifold based on the attention score to obtain the target feature representation of the target node in the hybrid curvature space, wherein the attention score is used to characterize the probability that the target node and its neighboring nodes belong to the node categories corresponding to each submanifold; and a classification module, used to determine the classification result of the target node based on the target feature representation of the target node and the hyperplanes in each submanifold.
[0006] Thirdly, embodiments of this application provide a node classification device in a graph structure, comprising: a processor and a memory storing computer program instructions; the processor executes the computer program instructions to implement the node classification method in the graph structure of the first aspect.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the node classification method in the graph structure of the first aspect.
[0008] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method for classifying nodes in a graph structure as described in the first aspect.
[0009] This application provides a method, apparatus, device, and medium for classifying nodes in a graph structure. The method maps the original feature representation of a target node in the graph structure to a hybrid curvature space. The input feature representation of the target node in the hybrid curvature space is input into a hybrid curvature graph neural network. The hybrid curvature graph neural network can calculate the attention scores of the connection edges between the target node and its neighboring nodes. Based on the attention scores, information obtained from neighboring nodes is aggregated in each submanifold to obtain the target feature representation of the target node in the hybrid curvature space. Based on this target feature representation and the hyperplane opening of each submanifold, the classification result of the target node is determined. Attention scores characterize the probability that a target node and its neighboring nodes belong to the same node category in each submanifold. The higher the probability that a target node and its neighboring nodes belong to the same node category in each submanifold, the more information obtained from neighboring nodes will flow into that submanifold. Conversely, the lower the probability that a target node and its neighboring nodes belong to the same node category in each submanifold, the less information obtained from neighboring nodes will flow into that submanifold, or even not at all. Attention scores can constrain information propagation to submanifolds related to node categories, fundamentally suppressing the adverse effects of "heterogeneous mixing" and improving the accuracy of node classification. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart illustrating a method for classifying nodes in a graph structure according to an embodiment of this application; Figure 2 A schematic diagram illustrating an example of the relationship between a submanifold and a point in a hybrid curvature space provided in an embodiment of this application; Figure 3 A schematic diagram illustrating an example of multi-submanifold aggregation, illustrating the information provided for embodiments of this application; Figure 4a A schematic diagram illustrating an example of the classification accuracy of various algorithms provided in the embodiments of this application under different homologation rates with an average degree of 0.5; Figure 4b A schematic diagram illustrating an example of the classification accuracy of various algorithms provided in the embodiments of this application under different homologation rates under an average degree of 5; Figure 4c A schematic diagram illustrating an example of the classification accuracy of various algorithms provided in the embodiments of this application under different matching rates with an average degree of 20; Figure 5aA schematic diagram illustrating an example of the classification accuracy of various algorithms provided in this application under different layers and multiple datasets. Figure 5b A schematic diagram illustrating an example of the population distance ratio of XMan-GNN under different layer numbers and different dataset conditions provided in this application embodiment; Figure 6 A schematic diagram of the structure of a node classification device in a graph structure provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a node classification device in a graph structure provided in an embodiment of this application. Detailed Implementation
[0012] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples. It should be noted that the acquisition, storage, use, and processing of information and data in the embodiments of this application are all authorized by users or relevant organizations and comply with the relevant provisions of national laws and regulations.
[0013] Graph Neural Networks (GNNs) are used to process graph-structured data and have wide applications in various fields. GNNs update node representations by iteratively aggregating information from neighboring nodes, thus obtaining node representations rich in contextual and graph structural information. Graph-structured data can be categorized into homophily and heterophily graphs. Homophily graphs are graphs where connected nodes share the same label, which characterizes the node category. For example, in an encyclopedia knowledge graph, nodes represent knowledge points, and connected nodes generally belong to the same category of knowledge; for instance, connected nodes might all be historical knowledge points. Heterophily graphs, on the other hand, are graphs where connected nodes have different labels, meaning the connected nodes belong to different categories. For example, in an abnormal payment network graph, nodes connected to abnormal users are mostly connected to nodes of normal users. The node processing mechanism of GNNs aligns more closely with the homophily principle in homophily graphs. However, in heterogeneous graphs, due to the different categories of connected nodes, information loss due to "heterogeneous mixing" occurs during the process of updating the node representation by iteratively aggregating the information of neighboring nodes. That is, the information of neighboring nodes of different categories is mixed together, which erodes the discriminative row of the node representation and causes the mechanism of updating the node representation by iteratively aggregating the information of neighboring nodes to fail, thereby reducing the accuracy of node classification.
[0014] In some cases, to improve the discriminative ability of node classification in heterogeneous scenarios, a multi-channel filter structure can be introduced to adaptively process the local adaptability of different nodes. However, this method is limited to the local topological structure dimension of nodes and does not consider the global distribution relationship of different types of nodes in heterogeneous scenarios. It fails to separate nodes based on their categories, still resulting in information loss due to "heterogeneous mixing," and the accuracy of node classification remains low. In other cases, to improve the discriminative ability of node classification in heterogeneous scenarios, a multi-order rooted tree can be constructed based on the hop count of the neighboring nodes of a node in the graph structure. Information from neighboring nodes is then distributed to different neuron blocks according to different hop counts, achieving hierarchical encoding of information. However, this method relies on the hierarchical processing of the graph structure rather than the separation of node categories. During information aggregation, it cannot distinguish between nodes of the same and different categories, still resulting in information loss due to "heterogeneous mixing," and the accuracy of node classification remains low.
[0015] This application provides a method, apparatus, device, and medium for classifying nodes in a graph structure, and proposes a novel graph neural network, which can be called a hybrid curvature graph neural network, or simply XMan-GNN. The hybrid curvature graph neural network can model the feature representation of nodes in a hybrid curvature space, which can be composed of multiple submanifolds. Each node category corresponds to one submanifold. Attention scores between nodes are obtained through a self-attention mechanism. Based on these attention scores, information transmission can be restricted to the submanifold corresponding to the category of neighboring nodes. That is, information is dynamically guided into the corresponding submanifold, achieving consistent information transmission between node categories and avoiding harmful "heterogeneous mixing," thereby improving the accuracy of node classification, especially significantly improving the classification accuracy on heterogeneous graphs.
[0016] The following describes the method, apparatus, device, and medium for classifying nodes in the graph structure provided in this application. For ease of understanding, a brief introduction is given first to the graph structure, nodes, and node classification involved in the embodiments of this application. A graph structure includes nodes and connecting edges. Connecting edges are used to connect related nodes. The node categories in a graph structure may be different; that is, a graph structure may include nodes of various different categories. In some examples, the graph structure may be an undirected graph with attributes, which can be used... It means that, among them, Represents a set of nodes. This represents the i-th node. Represents the set of connecting edges, nodes Corresponding to a d-dimensional eigenvector The feature vector is the feature representation of the node. For the characteristic matrix and eigenvectors It can be viewed as a characteristic matrix The i-th row in the table. Node categories can be distinguished by category labels, for example, node Corresponding category tags , The number of categories. Graph structures can be homophilic graphs or heterophilic graphs, and are not limited here. If two connected nodes have the same category label, that is, the two connected nodes have the same node category, these two nodes can be called homophilic nodes. If two connected nodes have different category labels, that is, the two connected nodes have different node categories, these two nodes can be called heterophilic nodes. To quantify the homophility of a graph structure, the homophility rate of the graph structure can be used to measure the homophility of the graph structure. The homophility rate of the graph structure can reflect the consistency between the node categories and the graph structure. For example, the homophility rate of the graph structure can be obtained according to the following formula (1): (1) in, It is the isomatch rate; This represents the total number of connecting edges; Represents a node and nodes The connecting edges between them; Represents a node and nodes Belonging to the same node category; This represents the number of connecting edges that connect nodes of the same node category. The homo-matching rate can be used to determine whether a graph structure is homo-matching or hetero-matching. If the homo-matching rate is greater than or equal to a preset homo-matching rate threshold, the graph structure is determined to be homo-matching; if the homo-matching rate is less than the preset homo-matching rate threshold, the graph structure is determined to be hetero-matching. The preset homo-matching rate threshold can be set according to the scenario, requirements, experience, etc., and is not limited here. For example, the preset homo-matching rate threshold can be set to 0.5.
[0017] The application areas of graph structures are not limited here. Graph structures can include, but are not limited to, abnormal payment network graph structures, encyclopedic knowledge graph structures, protein graph structures, communication operation network graph structures, internet social graph structures, e-commerce relationship graph structures, etc. The type of node is related to the application area of the graph structure. Nodes can represent specific technical objects and have feature representations that can capture the key information of the node, such as the node's own attributes and characteristics. The node's own attributes and characteristics are related to the node type. The feature representation of a node can be a vector obtained by mapping the node's own attributes and characteristics with clear technical meaning to a real-valued vector space. For example, in the case of abnormal payment network graph structures and internet social graph structures, nodes can represent users. The feature representation of a node can represent, but is not limited to, the user's payment characteristics and social characteristics. Payment characteristics can include, but are not limited to, one or more of the following: payment amount, payment frequency, payment time period, payment quantity, payment success rate, etc. Social characteristics can include, but are not limited to, one or more of the following: demographic attributes, occupational attributes, shared content preferences, shared content frequency, active time, interaction rate, etc. In the case of encyclopedic knowledge graph structures, nodes can represent knowledge points. The feature representation of a node can represent, but is not limited to, the knowledge point topic, the people involved in the knowledge point, etc. Knowledge points involve one or more of the following: numerical values, the number of times a knowledge point has been edited, and the users who participated in editing the knowledge point. If the graph structure is a protein graph, then nodes can represent amino acids, and the feature representation of a node can represent, but is not limited to, one or more of the following: amino acid type, amino acid physical characteristics, amino acid chemical characteristics, amino acid geometric characteristics, and amino acid accessible surface area. If the graph structure is a communication network graph, then nodes can represent communication devices, and the feature representation of a node can represent, but is not limited to, one or more of the following: device type, throughput, number of sessions, bandwidth utilization, packet loss rate, device communication package type, device activity, and device service preference type. The type of a node and the attributes or features represented by its feature representation are not limited here. The terms "original feature representation," "input feature representation," "target feature representation," "latent feature representation," "updated feature representation," and "aggregated feature representation" used below all refer to feature representations. Node categories can be pre-defined; by classifying nodes in the graph structure, the node category of the nodes in the graph structure can be determined. For example, nodes in an abnormal payment network graph structure can be classified to determine whether they are normal or abnormal user nodes; nodes in an internet social graph structure can be classified to determine whether they are user nodes with movie preferences, food preferences, photography preferences, or outdoor sports preferences; nodes in an encyclopedia knowledge graph structure can be classified to determine whether they are historical, economic, mathematical, or computer science nodes, etc. Examples are not provided here.
[0018] This application provides a method for classifying nodes in a graph structure, which can be applied to scenarios where nodes in a graph structure are classified. This method for classifying nodes in a graph structure can be executed by a device or equipment for classifying nodes in a graph structure, and is not limited thereto. Figure 1 A flowchart illustrating a method for classifying nodes in a graph structure according to an embodiment of this application is shown below. Figure 1 As shown, the method for classifying nodes in this graph structure may include steps S101 to S103.
[0019] In step S101, the original feature representation of the target node in the graph structure is mapped to the hybrid curvature space to obtain the input feature representation of the target node.
[0020] The target node can be any node in the graph structure, and it can be the node to be classified. The original feature representation of the target node can characterize the features of the target node and can be implemented as a feature vector. The original feature representation of the target node can be the original feature representation of the target node in Euclidean space. It is necessary to map the original feature representation to a mixed curvature space. The input feature representation of the target node is the feature representation obtained by mapping the original feature representation to the mixed curvature space.
[0021] The mixed curvature space is a product space of multiple submanifolds, each corresponding to a node class, and the curvature parameters differ between submanifolds. The submanifolds are multi-dimensional manifolds, and each submanifold can be locally approximated as a Euclidean space. The topological space of the submanifold. any point in The tangent space at this point can be represented as: The tangent space represents a first-order linear approximation of the submanifold near that point. The submanifold is a Riemannian manifold equipped with a Riemannian metric. The Riemannian metric can be expressed as... Family inner product can be defined on the tangent space. And can be accessed at any time. Smooth changes. Manifolds equipped with Riemannian metrics. This can be called a Riemannian manifold. A submanifold is a constant curvature space (CCS), meaning a smooth submanifold has suppressed tangential curvature throughout the entire region. When the curvature... When, the submanifold is a hyperbolic space; when When, the submanifold is a spherical space; when At this point, the submanifold degenerates into Euclidean space. In the embodiments of this application, submanifolds with different curvatures can be uniformly modeled into a general form using the mathematical tool of gyrovector space. Specifically, the submanifold can adopt... -3D model ( -stereographic model). For curvature parameters and dimensions The submanifold, corresponding to - The three-dimensional model can be represented by the following formula (2): (2) in, for - 3D model; A point is a point on a submanifold, and a point on a submanifold corresponds to a node in the graph structure. The square of the Euclidean distance; This is the curvature parameter. - The Riemannian metric of the solid model can be represented by the following equations (3) and (4): (3) (4) in, Riemannian measurement; Points on a submanifold The conformal factor; is the identity matrix; the definitions of other parameters can be found in the relevant explanation of equation (2) above, and will not be repeated here.
[0022] The mixed curvature space can be the Cartesian product of multiple submanifolds. For example, the mixed curvature space can be represented by the following equation (5): (5) in, For a mixed curvature space; For the j-th submanifold - 3D model. This represents a point in the mixed curvature space, where points correspond to nodes. The feature representation can be obtained by concatenating the coordinates of each submanifold, as shown in the following equation (6): (6) Among them, in equation (6) For point Feature representation; For point The coordinates of the j-th submanifold; other parameters can be found in the relevant descriptions in the above embodiments, and will not be repeated here. For example, Figure 2 A schematic diagram illustrating an example of the relationship between a submanifold and a point in a hybrid curvature space provided in an embodiment of this application, as shown below. Figure 2 As shown, the hybrid curvature space includes submanifold 21, submanifold 22, and submanifold 23, with submanifold 21 corresponding to... - Corresponding to 3D model 24 and submanifold 22 - Corresponding to 3D model 25 and submanifold 23 - 3D model 26, points on the submanifold can be mapped to the corresponding... - In the solid model, the coordinates of the point in submanifold 21 are x[1], the coordinates of the point in submanifold 22 are x[2], and the coordinates of the point in submanifold 23 are x[3].
[0023] Correspondingly, the tangent space of a point in the mixed curvature space can be the Cartesian product of the tangent spaces of each submanifold. For example, the tangent space of the mixed curvature space can be represented by the following equation (7): (7) in, The tangent space of the mixed curvature space; Let be the tangent space of the submanifolds. Operations can be performed independently on each submanifold to obtain the results, and then the operation structures can be concatenated to achieve various operations within the mixed curvature space.
[0024] In some examples, a nonlinear multilayer perceptron (MLP) and exponential mapping can be used to map the original feature representation of the target node to obtain the input feature representation of the target node. The nonlinear MLP can adjust the dimension of the original feature representation of the target node. For example, the original feature representation can be a D-dimensional feature vector, which can be mapped to a dC-dimensional input feature representation using the nonlinear MLP, where C can be the number of submanifolds and d is the dimension of each submanifold. The exponential mapping can map the original feature representation of the target node from Euclidean space to a mixed curvature space. For example, the original feature representation of the target node can be mapped to the input feature representation according to the following equation (8): (8) in, This represents the original features of the target node; This refers to the computation of a nonlinear multilayer perceptron. This is the exponential mapping operation. The exponential mapping operation can be calculated according to the following formula (9): (9) in, As a variable; This is the curvature parameter.
[0025] In step S102, the input feature representation is input into the hybrid curvature graph neural network. The attention score of the connection edge between the target node and its neighboring nodes is calculated through the hybrid curvature graph neural network. Based on the attention score, the information obtained from the neighboring nodes is aggregated in each submanifold to obtain the target feature representation of the target node in the hybrid curvature space.
[0026] Hybrid curvature graph neural networks can include multiple graph convolutional layers. The processing performed by each graph convolutional layer is essentially the same, except that the feature representation output by each graph convolutional layer becomes the feature representation input to the next graph convolutional layer. The feature representation input to the first graph convolutional layer is the input feature representation, and the feature representation output by the last graph convolutional layer is the target feature representation. The target feature representation is the feature representation of the target node in the hybrid curvature space after aggregating information from its neighboring nodes. In each graph convolutional layer, attention scores can be calculated for the edges connecting the target node and its neighboring nodes. Based on these attention scores, information obtained from neighboring nodes is aggregated across submanifolds. This aggregated feature representation of the target node obtained in each submanifold is then combined with the aggregated feature representation of the target node in that graph convolutional layer to obtain the feature representation of the target node in the hybrid curvature space. The attention score characterizes the probability that the target node and its neighboring nodes belong to the same node category in each submanifold. The attention score can include multiple elements, each of which can be an attention sub-score. An attention sub-score characterizes the probability that the target node and its neighboring nodes belong to the same node category in a submanifold. For example, the attention score can be represented as... , For the first Nodes obtained from layer graph convolutional layers and nodes Attention score of the connecting edges, Characterizable by the first Nodes obtained from layer graph convolutional layers and nodes The probability that nodes belong to the same category as the r-th submanifold, i.e., the r-th Nodes obtained from layer graph convolutional layers and nodes Attention sub-scores are the node categories belonging to the same submanifold (r-th submanifold). The more similar the features of two nodes belonging to the same node category, the closer their attention sub-scores are to 1; conversely, the greater the difference in features between two nodes belonging to the same node category, the closer their attention sub-scores are to 0. Based on these attention scores, information from neighboring nodes is aggregated across submanifolds. The higher the probability that the target node and its neighbors belong to the same node category in each submanifold, the more information from the neighbors will flow into that submanifold. Conversely, the lower the probability that the target node and its neighbors belong to the same node category, the less information from the neighbors will flow into that submanifold, or even none at all. For example... Figure 3A schematic diagram of an example of multi-submanifold aggregation, illustrating the information provided in the embodiments of this application, such as... Figure 3 As shown, the graph structure includes nodes v1, v2, v3, and v4. When nodes v1, v2, v3, and v4 are neighboring nodes, their information is aggregated in submanifolds 21, 22, and 23 based on attention scores. Node v1, as a neighboring node, is more likely to belong to the node category corresponding to submanifold 21, and less likely to belong to the node categories corresponding to submanifolds 22 and 23. Correspondingly, more information from node v1 flows into submanifold 21, and less into submanifolds 22 and 23. Node v3, as a neighbor node, is more likely to belong to the node category corresponding to submanifold 22. Nodes v2 and v3, as neighbors, are less likely to belong to the node categories corresponding to submanifolds 21 and 23, respectively. Correspondingly, more information from nodes v2 and v3 flows into submanifold 22, and less into submanifolds 21 and 23. Similarly, node v4, as a neighbor node, is more likely to belong to the node category corresponding to submanifold 23, and less likely to belong to the node categories corresponding to submanifolds 21 and 22. Again, more information from node v4 flows into submanifold 23, and less into submanifolds 21 and 22. By aggregating neighbor node information through attention scores, information propagation can be constrained to submanifolds related to node categories, fundamentally suppressing the adverse effects of heterogeneous signal mixing.
[0027] In step S103, the classification result of the target node is determined based on the target feature representation of the target node and the hyperplane in each submanifold.
[0028] The target feature is represented as the feature representation of the target node in the mixed curvature space. Multinomial Logistic Regression (MLR) can be extended to achieve multi-class classification of nodes in the mixed curvature space. Operations in the mixed curvature space are equivalent to the sum of operations on each submanifold; correspondingly, multinomial logistic regression in the mixed curvature space is also equivalent to the sum of multinomial logistic regressions on each submanifold. The core of multinomial logistic regression lies in the distance from a point to the hyperplane. Based on the target feature representation of the target node and the hyperplanes in each submanifold, the distance from the target node to the hyperplane in each submanifold is calculated. Then, based on the distance from the target node to the hyperplane in each submanifold, the multinomial logistic regression expression on each submanifold is obtained. Summarizing the multinomial logistic regression expressions on each submanifold yields the multinomial logistic regression expression in the mixed curvature space, thus obtaining the classification result of the target node. The classification result of the target node represents the node category of the target node.
[0029] In this embodiment, the original feature representation of the target node in the graph structure is mapped to a hybrid curvature space. The input feature representation of the target node in the hybrid curvature space is input into a hybrid curvature graph neural network. The hybrid curvature graph neural network can calculate the attention score of the connection edges between the target node and its neighboring nodes. Based on the attention score, the information obtained from the neighboring nodes is aggregated in each submanifold to obtain the target feature representation of the target node in the hybrid curvature space. Based on this target feature representation and the hyperplane of each submanifold, the classification result of the target node is determined. The attention score is used to characterize the probability that the target node and its neighboring nodes belong to the same node category in each submanifold. The higher the probability that the target node and its neighboring nodes belong to the same node category in each submanifold, the more information obtained from the neighboring nodes will flow into that submanifold. The lower the probability that the target node and its neighboring nodes belong to the same node category in each submanifold, the less information obtained from the neighboring nodes will flow into that submanifold, or even not at all. By using the attention score, information propagation can be constrained to submanifolds related to node categories, fundamentally suppressing the adverse effects of "heterogeneous mixing" and improving the accuracy of node classification.
[0030] Through experimentation, the node classification method in the graph structure provided in this application embodiment demonstrates superior overall performance and significant progress compared to existing algorithms. The following comparison of experimental results between the node classification method in the graph structure provided in this application embodiment and other existing algorithms illustrates the excellence of the node classification method in the graph structure provided in this application embodiment. For ease of explanation, the node classification method in the graph structure provided in this application embodiment will be referred to as XMan-GNN in the following text. XMan-GNN is combined with MLP, Graph Convolutional Network (GCN), Graph Attention Network (GAT), Hyperbolic Graph Convolutional Network (HGCN), Fully Hyperbolic Neural Networks (HyboNet), Hyperbolic Transformer (HypFormer), Simplified Graph Transformer (SGFormer), Scalable Global Graph Transformer (GOAT), Polynomial Graph Transformer (PolyFormer), Polynomial-Expressive Graph Transformer (PolyNormer), and GCN adapted to homophily and heterophily graphs. Graph neural networks with heterophily features (H2GCN), generalized PageRank GNN (GPR-GNN), frequency adaptive graph convolutional network (FAGCN), graph neural network leveraging global homophily (GloGNN), adaptive channel mixing graph convolutional network (ACM-GCN), and graph complementation learning.This paper compares the performance of several algorithms, including GOAL, Attention-based Deep Propagation Graph Neural Network (AERO-GNN), Ordered Graph Neural Network (Ordered GNN), Graph Neural Network with Possion-Charlier filters (PCNet), and Multiset to Multiset Graph Neural Network (M2M-GNN), to illustrate the effectiveness of XMan-GNN.
[0031] In the experiment, eight publicly available heterograph datasets and six widely used homograph datasets were selected, covering various fields such as encyclopedia websites, e-commerce platforms, and citation networks. The training, validation, and test sets obtained from the heterograph datasets were partitioned according to the configuration provided by the PyTorch Geometric library to ensure fairness. Each algorithm was run 10 times on each dataset, with different partitions for the training, validation, and test sets in each run. The average accuracy of node classification across the 10 runs was used to compare the performance of XMan-GNN with other algorithms. Information on the homograph and heterograph datasets is shown in Table 1 below. Table 1
[0032] The XMan-GNN in this embodiment can be trained using the Riemann Adam optimizer, with the learning rate selected from {0.01, 0.005} and the weight decay coefficient selected from {1e-4, 5e-4, 1e-3, 5e-3}. The curvature parameter of each submanifold is learned synchronously during node embedding optimization. The number of layers in the XMan-GNN is uniformly set to 2, and the hidden dimension is adjusted from {32, 64, 128, 256}. The scaling factor α of the initial residual connection is adjusted within the range of {0.3, 0.4, 0.5, 0.6, 0.7}. The initial feature transformation uses a single linear layer, and the dropout ratio is set to 0.2 to 0.8. The hyperparameters of the baseline method can be set according to the standard configuration.
[0033] Table 2 shows the classification accuracy of XMan-GNN and other algorithms on the heterogeneous graph dataset: Table 2 ,
[0034] Table 2 shows the average ranking of each algorithm's classification accuracy on eight heterograph datasets. As can be seen from Table 2, XMan-GNN achieved the highest classification accuracy on five of the eight heterograph datasets, with an average ranking of 1.5, the highest average ranking among the 21 algorithms tested, outperforming the previous best algorithm, M2M-GNN. Although XMan-GNN did not achieve the best results on the heterograph datasets Amazon-Ratings and BlogCatalog, even simple MLPs perform well on these two datasets, indicating that these datasets themselves are quite challenging. General-purpose GNN models (such as GCN and GAT) struggled to break 50% accuracy on most heterograph datasets, highlighting the shortcomings of traditional graph neural network information transfer mechanisms in handling heterograph problems. Hypercurvature GNNs (such as HGCN, HyboNet, and HypFormer) perform differently on different heterogeneous graph datasets, indicating that simply transferring the space to a hypercurvature space without changing the information transmission mechanism is unlikely to significantly improve classification accuracy on heterogeneous graph datasets.
[0035] Table 3 shows the classification accuracy of XMan-GNN and other algorithms on the same image dataset: Table 3 ,
[0036] Table 3 shows the average ranking of each algorithm's classification accuracy on six datasets with identical image pairs. As can be seen from Table 3, XMan-GNN achieved the highest classification accuracy on all six datasets with identical image pairs, indicating that XMan-GNN performs equally well on such datasets without sacrificing its ability to handle datasets with dissimilar image pairs. Models designed for dissimilar image pairs (such as Ordered GNN and M2M-GNN) perform well on some datasets but poorly on some datasets with identical image pairs, lacking consistency. XMan-GNN's average ranking is significantly higher than the average ranking of these models designed for dissimilar image pairs, indicating that XMan-GNN has stronger generalization ability. Graph Transformer algorithms such as SGFormer, GOAT, PolyFormer, and PolyNormer significantly outperform those on datasets with identical image pairs, demonstrating the limitations of the self-attention mechanism of graph Transformer algorithms when dealing with dissimilar image pairs.
[0037] To further evaluate the performance of XMan-GNN under different matching ratios, a stochastic block model was used to generate 15 graph structures with different matching ratios and average degrees. Each graph structure contains 5 node categories, with each category corresponding to 500 nodes. Node features were sampled from a Gaussian distribution centered at the vertices of the hypercube, with a dimension of 256. Nodes were randomly divided into 10%, 45%, and 45% for training, validation, and testing, respectively. Figure 4a The classification accuracy of various algorithms with different homomatch rates is shown under the condition of an average degree of 0.5. Figure 4b The classification accuracy of various algorithms with different homologous ratios under a mean degree of 5 is shown. Figure 4c The diagram shows the classification accuracy of various algorithms under different matching rates with an average degree of 20. Degree represents the average degree. Figure 4a , Figure 4b , Figure 4c As shown, XMan-GNN exhibits consistent robustness in heterogeneous scenarios. In scenarios with low homogeneous rates, XMan-GNN significantly outperforms other algorithms. In particular, under low degree conditions, XMan-GNN's performance is comparable to that of MLP. These experimental results demonstrate that even when neighboring nodes have different labels, XMan-GNN can still effectively distinguish between interactions of "valid information" and interactions of "disturbing information" through its heterogeneous information transmission mechanism.
[0038] To further evaluate the robustness of XMan-GNN to the oversmoothing problem caused by heterogeneous mixing, experiments were conducted on multiple datasets to test the performance of various algorithms under different layer counts. Figure 5a This diagram illustrates the classification accuracy of various algorithms under different numbers of layers and multiple datasets. The horizontal axis represents the number of layers in the graph neural network, and the vertical axis represents the classification accuracy. Figure 5a As can be seen, XMan-GNN maintains a high classification accuracy even with an increasing number of layers. In contrast, basic information transfer models like GCN and HGCN show a sharp drop in classification accuracy after 16 layers, indicating that these algorithms are susceptible to oversmoothing. Although FAGCN and SGFormer perform well on datasets with similar image types, their performance on datasets with different image types is still significantly lower than that of XMan-GNN on such datasets. The group distance ratio (GRR) can also be used as an indicator to quantify XMan-GNN's resistance to oversmoothing. The GRR is the ratio of the inter-group distance to the intra-group distance of a node; a lower GRR indicates more severe oversmoothing. Figure 5b The figure shows the population distance ratio of XMan-GNN under different number of layers and different dataset conditions, such as Figure 5bAs shown, XMan-GNN maintains a stable group distance ratio on both heterogeneous and homogeneous mapping datasets under different layer counts. Based on the above experimental results, it can be demonstrated that XMan-GNN has strong robustness in dealing with oversmoothing problems.
[0039] In some embodiments, the hybrid curvature graph neural network includes multiple graph convolutional layers. In each graph convolutional layer, attention scores are calculated for the connection edges between the target node and its neighbors based on the latent feature representations of the target node and its neighbors, as input to the graph convolutional layer. These attention scores are used as weight coefficients to calculate information obtained from the neighbors. This information is then aggregated to obtain the aggregated feature representations of the target node in each submanifold. An updated feature representation is obtained by concatenating the aggregated feature representations of the target node in each submanifold, resulting in the output feature representation of the target node from the graph convolutional layer. The latent feature representations are the input data of the graph convolutional layer. The output feature representations are the output data of the graph convolutional layer, representing the feature representation of the target node in the hybrid curvature space obtained by the graph convolutional layer. The attention scores for the connection edges between the target node and its neighbors in the graph convolutional layer can be calculated using an attention mechanism based on the latent feature representations of the target node and its neighbors.
[0040] In some examples, the latent feature representations of the target node and the latent feature representations of the neighboring nodes can be mapped to the tangent space of the mixed curvature space to obtain the projected feature representations of the target node and the neighboring nodes. Based on the projected feature representations of the target node, the projected feature representations of the neighboring nodes, and the number of submanifolds, the attention score of the connection edge between the target node and the neighboring nodes is obtained. The latent feature representation is the feature representation in the mixed curvature space. The mixed curvature space has a complex structure and more complex operations. In order to simplify the operations, the latent feature representation can be projected to the tangent space of the mixed curvature space using a logarithmic mapping. The tangent space is a Euclidean space, and the operations in the tangent space are relatively simpler. For example, the projected feature representation of the node can be obtained according to the following equation (10): (10) in, For the first Nodes in a layered graph convolutional layer The implicit feature representation is also for the first Nodes output by the layer graph convolutional layer The output feature representation, , Represents the mixed curvature space; For the logarithmic mapping at the origin of the mixed curvature space; The weight matrix is a learnable matrix; For the first Nodes in a layered graph convolutional layer The projection feature representation of the target node and the projection feature representation of the neighboring nodes can both be calculated according to the above equation (10). The logarithmic mapping can be calculated according to the following equation (11): (11) in, is a variable; is the curvature parameter.
[0041] The attention scores between the target node and its neighbors can be calculated using a normalized exponential function, based on the projected feature representations of the target node, the projected feature representations of its neighbors, and the number of submanifolds. For example, the attention scores can be calculated using the following equation (12): (12) in, For the first Target node in layer graph convolutional layer and neighboring nodes The attention scores of the connecting edges are such that the r-th element is the r-th attention sub-score representing the target node. and neighboring nodes The probability of a node belonging to the node category corresponding to the r-th submanifold; For parameter matrices; Use the LeakyReLU activation function; For the first Target node in layer graph convolutional layer The projection feature representation; For the first Neighboring nodes in a layered graph convolutional layer The projection feature representation; The number of submanifolds; It is a normalized exponential function.
[0042] In some examples, the projected feature representations of neighboring nodes can be mapped to the mixed curvature space to obtain the computational feature representations of neighboring nodes in the mixed curvature space; the attention score and computational feature representations, which are used as weighting coefficients, are processed using the screw space scalar multiplication algorithm to obtain the information obtained from neighboring nodes corresponding to each submanifold; for each submanifold, the information obtained from each neighboring node corresponding to the submanifold is aggregated using the screw space midpoint algorithm to obtain the aggregated feature representation of the target node in the submanifold. The projected feature representations can be mapped from the tangent space to the mixed curvature space using the exponential mapping algorithm to obtain the computational feature representations. The screw space scalar multiplication algorithm can perform scalar multiplication operations in the mixed curvature space. The screw space midpoint algorithm can perform midpoint weighting operations in the mixed curvature space. The information obtained from neighboring nodes corresponding to each submanifold can be considered as information flowing into the submanifold. The aggregated feature representation of the target node in the submanifold can be the feature representation of the target node after the information of the neighboring nodes is aggregated and updated. For example, the aggregated feature representation of the target node in the submanifold can be obtained according to the following equations (13) and (14): (13) (14) in, For the target node in the r-th submanifold From neighboring nodes The information obtained; For the target node The set of neighboring nodes; For the first Target node in layer graph convolutional layer and neighboring nodes Attention score of the connecting edges; This is a spinor space scalar multiplication operation; For the first Neighboring nodes in a layered graph convolutional layer The projection feature representation; For exponential mapping; Operations at the midpoint of spinor space; For the first The aggregated feature representation of the target node in the r-th submanifold of the layer graph convolutional layer; for The corresponding conformal factor. In this embodiment, the spinor space scalar multiplication operation can be selected from the Möbius scalar multiplication operation, and the spinor space midpoint operation can be selected from the Möbius spinor midpoint operation. The Möbius scalar multiplication operation and the Möbius spinor midpoint operation can be calculated according to the following equations (15) and (16): (15) (16) in, These are the weighting coefficients; It is the conformal factor; and For variables.
[0043] After obtaining the aggregated feature representations of the target node in each submanifold, the updated feature representations of the target node can be obtained by concatenating the aggregated feature representations of the target node in each submanifold. The updated feature representation of the target node can be the feature representation of the target node in the mixed curvature space obtained by concatenating the aggregated feature representations of the target node in each submanifold. For example, the updated feature representation of the target node can be shown in the following equation (17): (17) in, For the first In the layered graph convolutional layer; For the first The aggregated feature representation of the target node in the r-th submanifold of the layer graph convolutional layer; It is a mixed curvature space.
[0044] Since the information aggregation processing of neighboring nodes in the graph convolutional layer can blur the features of the target node itself, in order to better preserve the original features of the target node, an input feature representation obtained by mapping the original feature representation of the target node to the hybrid curvature space can be introduced to realize the residual connection strategy. In some instances, the screw space midpoint algorithm can be used to weight the input feature representation and the updated feature representation of the target node to obtain the output feature representation of the target node output by the graph convolutional layer. The screw space midpoint algorithm can perform a weighted average of the input feature representation and the updated feature representation to obtain the output feature representation of the target node. For example, the output feature representation of the target node can be shown in the following equation (18): (18) in, For the first Output feature representation of target nodes in a layered graph convolutional layer; This is the preset scaling factor; The input feature representation for the target node; for Corresponding conformal factor; for The corresponding conformal factor.
[0045] In the above embodiments, the latent feature representation of the target node input to the first graph convolutional layer is the input feature representation; the output feature representation of the target node output from the previous graph convolutional layer is the latent feature representation of the target node input to the next graph convolutional layer; and the output feature representation of the target node output from the last graph convolutional layer is the target feature representation. For example, the input feature representation of the target node is used as the input data of the first graph convolutional layer, and the output feature representation of the target node output after processing by the first graph convolutional layer is used as the input data of the second graph convolutional layer, and so on, until the target feature representation of the target node is output after the last graph convolutional layer.
[0046] In some embodiments, the target feature representation of the target node may include the feature representation of the target node in each submanifold. The probability of the target node belonging to each node category in the mixed curvature space can be obtained by combining the category probabilities of the target node in each submanifold, thereby determining the classification result of the target node. Specifically, the distance from the target node to the hyperplane in each submanifold can be calculated; the category probability of the target node belonging to each node category in each submanifold can be calculated based on the distance; the target probability of the target node belonging to each node category in the mixed curvature space can be calculated based on the category probability of the target node belonging to the corresponding node category in each submanifold; and the classification result of the target node can be determined based on the target probability.
[0047] The hyperplane of a submanifold can be defined as the set of lines orthogonal to the tangent vector and containing the transects of the midpoints of the submanifold. For example, the hyperplane can be represented by the following equation (19): (19) in, Let be the hyperplane of the r-th submanifold; It is the tangent vector; For points of a submanifold; This is a screw space addition operation. In this embodiment, the screw space addition operation can be the Möbius addition operation, which is shown in the following equation (20): (20) in, and As a variable; This is the curvature parameter.
[0048] The distance from the target node to the hyperplane and the probability of the target node belonging to each node category in the submanifold can be expressed by the following equations (21) to (23): (twenty one) (twenty two) (twenty three) in, The distance from the target node to the hyperplane; For the target node with curvature parameter The probability that a submanifold belongs to the class of the k-th node; It is a normalized exponential function; For the target node with curvature parameter The probability that a submanifold belongs to the class of the k-th node; ; The definitions of other parameters can be found in the relevant descriptions in the above embodiments, and will not be repeated here.
[0049] The target probability of a target node belonging to any node class in the mixed curvature space can be obtained by taking the sign of the sum of the squares of the target node's class probabilities in each submanifold and the inner product of the target node's class probabilities in each submanifold. For example, the target probability of a target node belonging to any node class in the mixed curvature space can be obtained by the following equations (24) and (25): (twenty four) (25) in, The target probability of the target node belonging to each node category in the hybrid curvature space; , and For the corresponding submanifold in the r-th submanifold , and The definitions of other parameters can be found in the relevant descriptions in the above embodiments, and will not be repeated here.
[0051] The target probability comprises multiple elements, the number of which is the same as the number of submanifolds. Each element corresponds to the probability that the target node belongs to a node class in the mixed curvature space. The classification result of the target node can be the node class corresponding to the element with the highest value in the target probability. For example, the classification result of the target node can be shown in the following equation (26): (26) in, This represents the classification result of the target node; the definitions of other parameters can be found in the relevant descriptions in the above embodiments, and will not be repeated here.
[0052] This application also provides a device for classifying nodes in a graph structure. Figure 6 This is a schematic diagram of the structure of a node classification device in a graph structure provided in an embodiment of this application, as shown below. Figure 6As shown, the node classification device 300 in this graph structure may include a feature transformation module 301, a model processing module 302, and a classification module 303.
[0053] The feature transformation module 301 can be used to map the original feature representation of the target node in the graph structure to the mixed curvature space to obtain the input feature representation of the target node. The mixed curvature space is the product space of multiple submanifolds, each submanifold corresponds to a node category, and the curvature parameters of different submanifolds are different.
[0054] The model processing module 302 can be used to input the input feature representation into the hybrid curvature graph neural network, calculate the attention score of the connection edge between the target node and the neighboring nodes through the hybrid curvature graph neural network, and aggregate the information obtained from the neighboring nodes in each submanifold based on the attention score to obtain the target feature representation of the target node in the hybrid curvature space. The attention score is used to characterize the probability that the target node and the neighboring nodes belong to the node category corresponding to each submanifold.
[0055] The classification module 303 can be used to determine the classification result of the target node based on the target feature representation of the target node and the hyperplane in each submanifold.
[0056] In some embodiments, the hybrid curvature graph neural network includes multiple graph convolutional layers. The model processing module 302 can be used to: in each graph convolutional layer, calculate the attention score of the connection edge between the target node and its neighboring nodes based on the latent feature representation of the target node and the latent feature representation of its neighboring nodes as inputs to the graph convolutional layer; use the attention score as a weight coefficient to calculate the information obtained from the neighboring nodes; aggregate the information obtained from each neighboring node to obtain the aggregated feature representation of the target node in each submanifold; and update the feature representation based on the concatenated aggregated feature representation of the target node in each submanifold to obtain the output feature representation of the target node output by the graph convolutional layer; wherein, the latent feature representation of the target node input to the first graph convolutional layer is the input feature representation, the output feature representation of the target node output to the previous graph convolutional layer is the latent feature representation of the target node input to the next graph convolutional layer, and the output feature representation of the target node output to the last graph convolutional layer is the target feature representation.
[0057] In some embodiments, the model processing module 302 can be used to: map the latent feature representation of the target node and the latent feature representation of the neighboring nodes to the tangent space of the mixed curvature space to obtain the projected feature representation of the target node and the projected feature representation of the neighboring nodes; and obtain the attention score of the connection edge between the target node and the neighboring nodes based on the projected feature representation of the target node, the projected feature representation of the neighboring nodes and the number of submanifolds.
[0058] In some embodiments, the model processing module 302 can be used to: map the projected feature representations of neighboring nodes to a hybrid curvature space to obtain the computational feature representations of neighboring nodes in the hybrid curvature space; process the attention scores and computational feature representations as weight coefficients using a screw space scalar multiplication algorithm to obtain the information obtained from neighboring nodes corresponding to each submanifold; and for each submanifold, aggregate the information obtained from each neighboring node corresponding to the submanifold using a screw space midpoint algorithm to obtain the aggregated feature representation of the target node in the submanifold.
[0059] In some embodiments, the model processing module 302 can be used to: perform weighted processing on the input feature representation and updated feature representation of the target node using the screw space midpoint algorithm to obtain the output feature representation of the target node output by the graph convolutional layer.
[0060] In some embodiments, the feature transformation module 301 can be used to: perform mapping processing on the original feature representation of the target node using a nonlinear multilayer perceptron and an exponential mapping to obtain the input feature representation of the target node.
[0061] In some embodiments, the target feature representation of the target node includes the feature representation of the target node in each submanifold. The classification module 303 can be used to: calculate the distance from the target node to the hyperplane in each submanifold; calculate the class probability of the target node belonging to each node class in each submanifold based on the distance; calculate the target probability of the target node belonging to each node class in the mixed curvature space based on the class probability of the target node belonging to the corresponding node class in each submanifold; and determine the classification result of the target node based on the target probability.
[0062] It should be noted that the node classification device 300 in this graph structure is a device corresponding to the node classification method in the graph structure described above. All implementation methods in the above method embodiments are applicable to the embodiments of this device and can achieve the same technical effect.
[0063] This application also provides a device for classifying nodes in a graph structure. Figure 7 This is a schematic diagram of the structure of a node classification device in a graph structure provided in an embodiment of this application, as shown below. Figure 7 As shown, the classification device 400 for nodes in the graph structure includes a memory 401, a processor 402, and a computer program stored in the memory 401 and capable of running on the processor 402.
[0064] In some examples, the processor 402 described above may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that may be configured to implement the embodiments of this application.
[0065] Memory 401 may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the classification method of nodes in the diagram structure according to embodiments of this application.
[0066] The processor 402 runs a computer program corresponding to the executable program code by reading the executable program code stored in the memory 401, so as to implement the node classification method in the graph structure in the above embodiment.
[0067] In some examples, the node classification device 400 in the graph structure may also include a communication interface 403 and a bus 404. For example, Figure 7 As shown, the memory 401, processor 402, and communication interface 403 are connected through bus 404 and complete communication with each other.
[0068] The communication interface 403 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application. Input devices and / or output devices can also be connected through the communication interface 403.
[0069] Bus 404 includes hardware, software, or both, that couples components of the classified devices 400 in the graph structure together. For example, and not as a limitation, bus 404 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 404 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0070] This application also provides a computer-readable storage medium storing computer program instructions. When executed by a processor, these computer program instructions can implement the node classification method in the graph structure described in the above embodiments and achieve the same technical effect. To avoid repetition, further details are omitted here. The aforementioned computer-readable storage medium may include non-transitory computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, etc., and is not limited thereto.
[0071] This application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the node classification method in the graph structure of the above embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0072] It should be clarified that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. For the device embodiments, equipment embodiments, computer-readable storage medium embodiments, and computer program product embodiments, the relevant parts can be referred to the description section of the method embodiments. This application is not limited to the specific steps and structures described above and shown in the figures. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application. Furthermore, for the sake of brevity, detailed descriptions of known methods and techniques are omitted here.
[0073] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0074] Those skilled in the art will understand that the above embodiments are exemplary and not restrictive. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Based on a study of the drawings, specification, and claims, those skilled in the art should be able to understand and implement other variations of the disclosed embodiments. In the claims, the term "comprising" does not exclude other means or steps; the quantifier "a" does not exclude a plurality; the terms "first" and "second" are used to identify names and not to indicate any particular order. No reference numerals in the claims should be construed as limiting the scope of protection. The functionality of multiple parts appearing in the claims can be implemented by a single hardware or software module. The appearance of certain technical features in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.
Claims
1. A method of classifying nodes in a graph structure, characterized by, The method comprises the following steps: mapping an original feature representation of a target node in a graph structure to a mixed curvature space to obtain an input feature representation of the target node, the mixed curvature space being a product space of a plurality of submanifolds, each submanifold corresponding to a node category, and curvature parameters of different submanifolds being different; inputting the input feature representation into a mixed curvature graph neural network, calculating an attention score of a connection edge between the target node and a neighbor node through the mixed curvature graph neural network, and aggregating information obtained from the neighbor node in each submanifold based on the attention score to obtain a target feature representation of the target node in the mixed curvature space, the attention score being used to represent a possibility that the target node and the neighbor node belong to a node category corresponding to each submanifold; determining a classification result of the target node based on the target feature representation of the target node and a hyperplane in each submanifold.
2. The method of claim 1, wherein, The mixed curvature graph neural network comprises a plurality of graph convolution layers; the inputting the input feature representation into the mixed curvature graph neural network, the calculating the attention score of the connection edge between the target node and the neighbor node through the mixed curvature graph neural network, and the aggregating the information obtained from the neighbor node in each submanifold based on the attention score to obtain the target feature representation of the target node in the mixed curvature space comprise: in each graph convolution layer, calculating the attention score of the connection edge between the target node and the neighbor node according to a hidden feature representation of the target node and a hidden feature representation of the neighbor node input into the graph convolution layer; calculating the information obtained from the neighbor node by taking the attention score as a weight coefficient, and aggregating the information obtained from each neighbor node to obtain an aggregated feature representation of the target node in each submanifold; obtaining an output feature representation of the target node output by the graph convolution layer based on an updated feature representation obtained by splicing the aggregated feature representation of the target node in each submanifold; wherein the hidden feature representation of the target node input into a first graph convolution layer is the input feature representation, the output feature representation of the target node output by a previous graph convolution layer is the hidden feature representation of the target node input into a next graph convolution layer, and the output feature representation of the target node output by a last graph convolution layer is the target feature representation.
3. The method of claim 2, wherein, the calculating the attention score of the connection edge between the target node and the neighbor node according to the hidden feature representation of the target node and the hidden feature representation of the neighbor node input into the graph convolution layer comprises: mapping the hidden feature representation of the target node and the hidden feature representation of the neighbor node to a tangent space of the mixed curvature space to obtain a projected feature representation of the target node and a projected feature representation of the neighbor node; obtaining the attention score of the connection edge between the target node and the neighbor node according to the projected feature representation of the target node, the projected feature representation of the neighbor node, and the number of submanifolds.
4. The method of claim 3, wherein, The attention score is calculated as a weight coefficient to obtain information from the neighbor nodes, and the information obtained from each neighbor node is aggregated to obtain an aggregated feature representation of the target node in each sub-manifold, including: Mapping the projected feature representation of the neighbor nodes to the hybrid curvature space to obtain the calculated feature representation of the neighbor nodes in the hybrid curvature space; Using the spinor space number multiplication algorithm to process the attention score as a weight coefficient and the calculated feature representation to obtain information from the neighbor nodes corresponding to each sub-manifold; For each sub-manifold, the information obtained from each neighbor node corresponding to the sub-manifold is aggregated using the spinor space midpoint algorithm to obtain the aggregated feature representation of the target node in the sub-manifold.
5. The method of claim 2, wherein, The updated feature representation after splicing the aggregated feature representation of the target node in each sub-manifold is obtained, and the output feature representation of the target node output by the graph convolution layer is obtained, including: Using the spinor space midpoint algorithm to weight process the input feature representation of the target node and the updated feature representation to obtain the output feature representation of the target node output by the graph convolution layer.
6. The method of claim 1, wherein, Mapping the original feature representation of the target node in the graph structure to the hybrid curvature space to obtain the input feature representation of the target node, including: Using a nonlinear multilayer perceptron and an exponential mapping to map process the original feature representation of the target node to obtain the input feature representation of the target node.
7. The method of claim 1, wherein, The target feature representation of the target node includes the feature representation of the target node in each sub-manifold; Based on the target feature representation of the target node and the hyperplane in each sub-manifold, the classification result of the target node is determined, including: Calculating the distance from the target node to the hyperplane in each sub-manifold; According to the distance, the class probability of the target node belonging to each node category in each sub-manifold is calculated; According to the class probability of the target node belonging to the node category corresponding to each sub-manifold, the target probability of the target node belonging to each node category in the hybrid curvature space is calculated; According to the target probability, the classification result of the target node is determined.
8. An apparatus for classifying nodes in a graph structure, characterized by Including: A feature transformation module is configured to map the original feature representation of the target node in the graph structure to the hybrid curvature space to obtain the input feature representation of the target node, and the hybrid curvature space is a product space of multiple sub-manifolds, each sub-manifold corresponds to a node category, and the curvature parameters of different sub-manifolds are different; A model processing module is configured to input the input feature representation into a hybrid curvature graph neural network, calculate the attention score of the connection edge between the target node and the neighbor node through the hybrid curvature graph neural network, aggregate the information obtained from the neighbor nodes in each sub-manifold based on the attention score, and obtain the target feature representation of the target node in the hybrid curvature space, the attention score is used to represent the possibility that the target node and the neighbor node belong to the node category corresponding to each sub-manifold. A classification module is configured to determine a classification result of the target node based on the target feature representation of the target node and the hyperplane in each sub-manifold.
9. A device for classifying nodes in a graph structure, characterized in that The method comprises: a processor and a memory storing computer program instructions; the processor executes the computer program instructions to implement the method for classifying nodes in a graph structure according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the method for classifying nodes in a graph structure according to any one of claims 1 to 7.
11. A computer program product, characterised in that, The computer program is executed by the processor to implement the method for classifying nodes in a graph structure according to any one of claims 1 to 7.