A path-based k-hop hypergraph neural network convolution method
By using the HyperGINE module and the bipartite nested convolution method, the problems of K-hop hypergraph neural networks in terms of expressive power and computational complexity are solved, improving the representation ability of hypergraphs and the performance of downstream tasks, especially achieving accurate prediction in the prediction of chemical molecular properties.
Patent Information
- Application Number
- CN202411786935.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-12-06
AI Technical Summary
Existing K-hop hypergraph neural networks suffer from limited expressive power, high computational complexity, information loss, and reduced feature discriminability, especially when dealing with complex path information.
We employ a path-based K-hop hypergraph neural network convolution method, using the HyperGINE module to pass hypergraph node and hyperedge information. By combining dual transformation and bisection nested convolution, we extract the features of nodes and hyperedges, perform high-order aggregation and updates, and reduce computational complexity.
It improves the characterization ability of hypergraphs and significantly enhances the performance of downstream tasks, especially in the prediction of chemical molecular properties, achieving accurate prediction while reducing computational complexity.
Smart Images

Figure CN119623513B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, and in particular to a semi-supervised learning method for directional target segmentation guided by SAM. Background Technology
[0002] Graph Neural Networks (GNNs), as an effective tool for processing non-Euclidean structured data, have been widely applied in computational chemistry, social networks, and personalized recommendations. However, traditional GNNs can only capture pairwise relationships between data samples, limiting their expressive power. Unlike GNNs, Hypergraph Neural Networks (HGNNs) can capture higher-order non-Euclidean relationships between real-world entities through non-pairwise hyperedge connections involving any number of nodes. Most existing HGNNs rely on clique expansion (CE) for message passing, but this two-stage passing method has the following problems:
[0003] 1. Node to Hyperedge: Information from multiple nodes is compressed into a hyperedge with limited feature capacity, resulting in information loss;
[0004] 2. Hyperedge to Node: Hyperedge features are assigned equally to all neighboring nodes, reducing the feature distinguishability of nodes.
[0005] This slow diffusion mechanism exacerbates the over-squashing and over-smoothing problems, significantly reducing the efficiency of hypergraph information utilization.
[0006] K-hop graph neural networks (K-hop GNNs) have been shown to outperform traditional GNNs in terms of expressive power, especially by leveraging path features to pass encapsulated contextual information and perform message passing within a K-hop range, providing rich semantic information for relation modeling and thus achieving good performance in practical applications. However, research on path-based K-hop hypergraph neural networks (K-hop HGNNs) is relatively scarce.
[0007] Designing the K-hop HGNN presents the following challenges:
[0008] 1. Structural differences between hypergraphs and normal graphs: The number of nodes in a hyperedge is not fixed, which makes the methods commonly used in K-hop graph neural networks unsuitable for K-hop HGNNs;
[0009] 2. Limited expressive power: HGNN's expressive power is limited by aggregating only the neighborhood of K-hop nodes while ignoring hyperedges in higher-order relations;
[0010] 3. Difficulty in feature aggregation: Due to the differences in feature spaces, commonly used summation operators can only aggregate node or edge features, making it difficult to effectively represent complex path information;
[0011] 4. High computational complexity: As the path length increases, the number of paths grows exponentially, requiring a large amount of computational resources, which limits the extraction of path features by complex operators.
[0012] Therefore, there is an urgent need to study an efficient convolution method suitable for K-hop HGNN, which can achieve accurate prediction of downstream tasks while reducing computational complexity. Summary of the Invention
[0013] The technical problem to be solved by this invention is to provide a path-based K-hop hypergraph neural network convolution method that reduces the computational complexity of the model while improving the accuracy of feature extraction, thereby achieving accurate prediction of downstream tasks.
[0014] This invention is implemented as follows: a path-based K-hop hypergraph neural network convolution method, the method comprising:
[0015] Step S1: Create a hypergraph neural network model for downstream graph tasks and initialize the model;
[0016] Step S2: Obtain training graph data. Through the correlation matrix between nodes and hyperedges, obtain the shortest paths between nodes at different distances and their center nodes or hyperedges; similarly, obtain the shortest paths between hyperedges and their center nodes or hyperedges.
[0017] Step S3: Input the training graph data into the HyperGINE module of the model, aggregate the node features on the hyperedges that are directly connected to the nodes, add the features of the corresponding hyperedges, and directly pass the features to the target node; after the hypergraph undergoes dual transformation, the HyperGINE aggregation of the hyperedges is performed in the same way; wherein the HyperGINE module includes a node representation learning module and a hyperedge representation learning module.
[0018] Step S4: Obtain the updated node features after low-order aggregation, and use these low-order features as path features for high-order HyperGINE to aggregate the K-hop neighborhood of nodes; after the hypergraph data undergoes dual transformation, obtain the corresponding aggregation representations of different hops.
[0019] Step S5: The result of aggregating the K-hop neighborhoods of each node and hyperedge is used to update the features through the update layer;
[0020] Step S6: Extract hypergraph features by stacking at least two KHGNN layers formed by steps S3, S4 and S5, and perform task prediction through the output network that matches the downstream task.
[0021] Furthermore, when the downstream task is to predict the properties of chemical molecules, nodes are defined as atomic nodes, and hyperedges are atomic chemical bonds. The node features and hyperedge features input to the model are atomic features and bond features, respectively. The atomic features contain 9-dimensional information, specifically atomic number, atomic chirality label, total degree of atom, atomic formal charge, the total number of hydrogen atoms connected to the atom, the number of unpaired electrons of the atom, the hybridization type of the atom, whether the atom is an aromatic atom, and whether the atom is in a ring structure. The bond features contain 3-dimensional information, specifically bond type, bond stereochemistry, and whether the indicator bond is a conjugated bond.
[0022] The chemical molecular property prediction involves predicting whether a target molecule has the property of inhibiting HIV virus replication based on the information of each atom in the molecule, and outputting the prediction results through the model output layer.
[0023] Furthermore, the graph data in step S2 includes the graph and its extended hypergraph. For general graph data, it is converted into a hypergraph by treating edges as hyperedges.
[0024] Furthermore, the node representation learning module and the hyperedge representation learning module adopt the same structure, both including a linear layer for node feature mapping, a linear layer for hyperedge feature mapping, a residual connection, and an MLP layer.
[0025] Furthermore, in step S3, by inputting training graph data containing node features, hyperedge features, node first-order neighborhood, hyperedge first-order neighborhood, and connection relationships between nodes and hyperedges, the nodes use HyperGINE to aggregate their neighboring nodes and hyperedge information; after the dual transformation, the hyperedges aggregate surrounding hyperedges and node information through HyperGINE.
[0026] Furthermore, the update layer in step S5 is implemented using a two-layer perceptron.
[0027] Furthermore, the output network in step S6 is implemented using a global average pooling layer and a MIP layer.
[0028] Furthermore, the training hypergraph data is defined as... in Represents a set of nodes. ε denotes the hyperedge set, ε = {e1,…,e...} m}, where n and m represent the total number of nodes and hyperedges, respectively, and h v and h eRepresenting their respective feature embeddings, based on the correlation matrix between nodes and hyperedges, the shortest path connections between nodes at different distances are obtained, as well as the center node or hyperedge of the shortest path between them, and node v i The set of the k-th hop neighbor nodes is defined as This includes all from v i Starting from a node reachable by at least k hyperedges, node v i The set of K-hop neighbors is defined as Represents node v i The set of K-hop neighbors, node v i The k-th hop neighbor superedge set is defined as It contains all hyperedges reachable through at least k nodes, and uses Indicates direct connection with node v i Connected hyperedges;
[0029] Define hyperedge e b The k-th hop neighbor superedge set is This includes starting from the hyperedge e via at least k nodes. b All reachable hyperedges, Indicates the superedge e b K-jump neighbor superedge set, superedge e b The set of the k-th hop neighbor nodes is represented as in Indicates direct connection with the hyperedge e b Connected nodes.
[0030] Furthermore, the node representation learning module is used to aggregate node features, and the corresponding HyperGINE formula is expressed as follows:
[0031]
[0032] Where f and g represent learnable linear mappings, used to map node features h respectively. v and hyperedge features h e Mapped to a similar feature space, Indicates the superedge e b The set of all directly connected nodes Represents node v i The set of all directly connected hyperedges, Indicates that at the hyperedge e b The connected nodes do not send to node v i A set of nodes that transmit information;
[0033] The hyperedge representation learning module is used to learn hyperedges. First, the graph data undergoes a dual transformation, converting nodes in the hypergraph into corresponding dual hyperedges of the dual hypergraph, and hyperedges into corresponding dual nodes of the dual hypergraph. Under this transformation, the HyperGINE formula for updating hyperedge features is as follows:
[0034]
[0035] in, Indicates the superedge e b The set of all directly connected nodes Represents node v i The set of all directly connected hyperedges, This indicates that at node v i The connected hyperedges do not extend to hyperedge e. b A set of superedges that transmit information.
[0036] Furthermore, in step S4, the preprocessed training graph data obtained in step S2 is input. The training graph data includes node features, node k-order neighborhoods, and shortest path centers between nodes. Using bipartite nested convolution, the shortest path center features extracted by the low-order HyperGINE are used as path features to guide the aggregation of high-order nodes. For hyperedge features, the training graph data containing hyperedge features, hyperedge k-order neighborhoods, and shortest path centers between hyperedges is input, and the same method is used to guide the aggregation of high-order hyperedges.
[0037] In K-hop node representation learning:
[0038] When the hop count k of node aggregation is even, the preprocessed training graph data and the center node of the shortest path between nodes are used. HyperGINE convolutional features When input into the corresponding baseline model HyperGINE module, the k-th hop aggregation function of the l-th layer is expressed as:
[0039]
[0040] in, This represents the aggregation function of the k-th hop node in the l-th layer KHGNN. Indicates the current node v i The output of the aggregation function of the k-th hop node in the l-th layer. This represents the node feature output of the (l-1)th layer KHGNN. In the l-th layer of KHGNN, the first... The output of the jump node aggregation function, They represent nodes v respectively i and v j The Jump neighbor set, node v i and The shortest path lengths between them range from 0 to k, and the set... Indicates to node v i The set of all nodes whose shortest path length ranges from 0 to k-1. Indicates to node v i The set of nodes whose shortest path length is only k, where k = 0, node v i Establish a self-connect, inheriting the characteristics of the previous layer, that is
[0041] When the number of hops k in node aggregation is odd, the preprocessed training graph data and the center hyperedge of the shortest path between nodes are used. HyperGINE convolutional features When input into the corresponding baseline model HyperGINE module, node v i The k-th hop message passing is represented as:
[0042]
[0043] in, Similarly, following the HyperGINE node convolution, represents the aggregation function of the k-th hop node in the l-th layer of the KHGNN. Indicates the current node v i The output of the aggregation function of the k-th hop node in the l-th layer. In the l-th layer of KHGNN, the first... The output of the jump hyperedge aggregation function, where f and g represent learnable linear mappings, respectively. Represents node v i The Jump to the neighbor's super set. Indicates the superedge e j The Jump neighbor node set, Indicates distance from node v i The set of nodes less than k; at this point, Indicates to node v i The set of nodes whose shortest path length is only k;
[0044] In learning the K-jump hyperedge representation:
[0045] A dual transformation is performed on the input hypergraph. Through this transformation, hyperedges e and nodes v in the hypergraph are transformed into dual nodes e and dual hyperedges v in the dual hypergraph. HyperGINE is then directly applied to learn the hyperedge representations with K hops. When the number of hops k in hyperedge aggregation is even, the preprocessed training graph data and the center hyperedge of the shortest path between hyperedges are used. HyperGINE convolutional features The hyperedge e is input into the corresponding baseline model HyperGINE. b The corresponding hidden state Calculated using the following formula:
[0046]
[0047] in, According to the definition of hyperedge convolution in HyperGINE, represents the k-th hop hyperedge aggregation function in the l-th layer of KHGNN. Indicates the relationship with the hyperedge e b The set of hyperedges with a distance less than k;
[0048] When the hop count k of hyperedge aggregation is odd, the preprocessed training graph data (containing hyperedge features and the k-order neighborhood of the hyperedge) and the center node of the shortest path between hyperedges are used. HyperGINE convolutional features Input into the corresponding baseline model HyperGINE module, hyperedge k-jump hidden state Given by the following formula:
[0049]
[0050] in, Consistent with the definition of hyperedge convolution in HyperGINE, it represents the k-th hop hyperedge aggregation function in the l-th layer of KHGNN.
[0051] Furthermore, the HyperGINE module also includes selectively incorporating relative degree encoding during the aggregation process, specifically as follows:
[0052] Define hypergraph The k-th hop connectivity between its nodes is denoted as Where ε k Let ε1 represent a higher-order hyperedge constructed through nested binary convolutions, where ε1 = ε, and node v i and v j relative degree of the k-th jump between Defined as the number of hyperedges connecting two nodes in the k-th hop:
[0053]
[0054] Where |·| represents the cardinality of the set, the aggregation function of the node is modified as follows:
[0055]
[0056] in Is with The corresponding learnable vector representation, Let v represent the set of relative degrees of the k-th hop between any nodes, i.e., for node v i and v j relative degree of the k-th jump between have This represents the aggregation function of the k-th hop node in the l-th layer KHGNN. This represents the output of the previous KHGNN layer. This represents the latent variable resulting from the k / 2-order low-order convolution of the current KHGNN layer, used to calculate the current k-order convolution.
[0057] Similarly, the same approach can be used to add relative degree encoding to the aggregation function of the hyperedge.
[0058] This invention has the following advantages: By proposing a hypergraph isomorphic neural network, HyperGINE, to directly transmit hypergraph node and hyperedge information; based on this, the hypergraph neural network model extracts features containing node, hyperedge, and path structure from low-order convolutions through bipartite nested convolutions, further guiding the aggregation of nodes and hyperedges in different K-hop neighborhoods, promoting effective interaction between distant nodes and hyperedges, enabling them to learn complex relationships at long distances. This significantly improves the representation capability of the hypergraph and greatly enhances the performance of downstream tasks by enabling distant nodes and hyperedges in the hypergraph to interact through paths, while reducing the computational complexity of path representation. Attached Figure Description
[0059] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0060] Figure 1 This is a flowchart illustrating the execution of a path-based K-hop hypergraph neural network convolution method according to the present invention.
[0061] Figure 2 This is a schematic diagram of the convolution process of the HyperGINE module in a specific embodiment of the present invention.
[0062] Figure 3 This is a schematic diagram of the path-based K-hop hypergraph neural network structure of the present invention.
[0063] Figure 4 This is a schematic diagram of the HyperGINE module structure of the present invention. Detailed Implementation
[0064] This application provides a path-based K-hop hypergraph neural network convolution method to address the problem of low prediction efficiency in downstream tasks. In particular, it can be used to achieve accurate prediction of chemical molecule properties while reducing computational complexity to a certain extent.
[0065] The technical solution in this application embodiment follows the following general idea: This invention provides a path-based K-hop hypergraph neural network convolution method, specifically a K-hop hypergraph neural network (KHGNN). It proposes a baseline model, HyperGINE, to directly transmit hypergraph node and hyperedge information. Based on this, the invention extracts features containing node, hyperedge, and path structures from low-order convolutions through bipartite nested convolutions, thereby achieving long-distance relationship representation. This further guides the aggregation of nodes and hyperedges in different K-hop neighborhoods, promoting effective interaction between distant nodes and hyperedges. A relative degree encoding mechanism based on the number of paths between nodes and hyperedges is also employed. This invention guides the aggregation of node and hyperedge information in the dual hypergraph through path features, enabling it to learn complex long-distance relationships. By reducing the computational complexity of path representation and enabling distant nodes and hyperedges in the hypergraph to interact through paths, the invention significantly improves the representation capability of the hypergraph and substantially enhances the performance of downstream tasks.
[0066] To better understand the above technical solution, the technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0067] Please see Figure 1 and Figure 2 As shown, this invention provides a path-based K-hop hypergraph neural network convolution method, the method comprising:
[0068] Step S1: Create a hypergraph neural network model for downstream graph tasks and initialize the model;
[0069] Step S2: Obtain training graph data. Through the correlation matrix between nodes and hyperedges, obtain the shortest paths between nodes at different distances and their center nodes or hyperedges; similarly, obtain the shortest paths between hyperedges and their center nodes or hyperedges.
[0070] Step S3: Input the training graph data into the HyperGINE module of the model, aggregate the node features on the hyperedges that are directly connected to the nodes, add the features of the corresponding hyperedges, and directly pass the features to the target node; after the hypergraph undergoes dual transformation, the HyperGINE aggregation of the hyperedges is performed in the same way; wherein the HyperGINE module includes a node representation learning module and a hyperedge representation learning module.
[0071] Step S4: Obtain the updated node features after low-order aggregation, and use these low-order features as path features for high-order HyperGINE to aggregate the K-hop neighborhood of nodes; after the hypergraph data undergoes dual transformation, obtain the corresponding aggregation representations of different hops.
[0072] Step S5: The result of aggregating the K-hop neighborhoods of each node and hyperedge is used to update the features through the update layer;
[0073] Step S6: Extract hypergraph features by stacking at least two KHGNN layers formed by steps S3, S4 and S5, and perform task prediction through the output network that matches the downstream task.
[0074] Preferably, when the downstream task is to predict the properties of chemical molecules, nodes are defined as atomic nodes, and hyperedges are atomic chemical bonds. The node features and hyperedge features input to the model are atomic features and bond features, respectively. The atomic features contain 9-dimensional information, specifically atomic number, atomic chirality label, total degree of atom, atomic formal charge, the total number of hydrogen atoms connected to the atom, the number of unpaired electrons of the atom, the hybridization type of the atom, whether the atom is an aromatic atom, and whether the atom is in a ring structure. The bond features contain 3-dimensional information, specifically bond type, bond stereochemistry, and whether the indicator bond is a conjugated bond.
[0075] Specifically, atomic features are encoded as follows:
[0076] 1.Atomic Number(atom.GetAtomicNum())
[0077] Atomic number (number on the periodic table) represents the atom.
[0078] For example: carbon (C) is 6, nitrogen (N) is 7, and oxygen (O) is 8.
[0079] 2.Chirality(atom.GetChiralTag())
[0080] A chiral label represents an atom, describing whether an atom has a chiral center and its chiral type.
[0081] Common chiral labels include:
[0082] CHI_UNSPECIFIED (Chiral)
[0083] CHI_TETRAHEDRAL_CW (clockwise)
[0084] CHI_TETRAHEDRAL_CCW (counterclockwise)
[0085] 3.Degree(atom.GetTotalDegree())
[0086] The total degree of an atom represents the number of other atoms (excluding implicit hydrogen) directly bonded to that atom.
[0087] For example:
[0088] Methane (CH4) has 4 carbon atoms.
[0089] The double bond carbon atom number of ethylene (C2H4) is 2.
[0090] 4.Formal Charge(atom.GetFormalCharge())
[0091] The formal charge of an atom represents the net charge of that atom within the molecule.
[0092] Common values:
[0093] Positive and negative integers (e.g., +1, -1).
[0094] For neutral molecules, it is usually 0.
[0095] 5.Number of Hydrogens(atom.GetTotalNumHs())
[0096] It represents the total number of explicit and implicit hydrogen atoms bonded to that atom.
[0097] For example:
[0098] Methane (CH4) has four hydrogen atoms on its carbon atoms.
[0099] In the benzene ring (C6H6), each carbon atom has one hydrogen atom.
[0100] 6.Number ofRadical Electrons(atom.GetNumRadicalElectrons())
[0101] This represents the number of unpaired electrons in that atom.
[0102] For most stable molecules, this value is typically 0.
[0103] 7.Hybridization(atom.GetHybridization())
[0104] Represents the hybrid orbital type of an atom.
[0105] Common types:
[0106] SP3 (e.g., carbon atoms in methane).
[0107] SP2 (e.g., the double-bonded carbon atom in ethylene).
[0108] SP (e.g., the triple-bonded carbon atom in acetylene).
[0109] 8.IsAromatic(atom.GetIsAromatic())
[0110] This indicates whether the atom is an aromatic atom (i.e., whether it participates in the conjugation system of an aromatic ring).
[0111] Values: Boolean values True or False.
[0112] For example, the carbon atom in the benzene ring (C6H6) is an aromatic atom.
[0113] 9. Is in Ring(atom.IsInRing())
[0114] This indicates whether the atom is in a ring structure.
[0115] Values: Boolean values True or False.
[0116] For example:
[0117] The carbon atom in the benzene ring returns True.
[0118] The carbon atom in a straight-chain alkane returns False.
[0119] Encode the key features as:
[0120] 1.Bond Type(bond.GetBondType())
[0121] It indicates the type of bond, that is, the order or property of the chemical bond.
[0122] Possible types include (depending on the contents of allowable_features['possible_bond_type_list']):
[0123] SINGLE: Single key (e.g., CC).
[0124] DOUBLE: Double bond (e.g., C=C).
[0125] TRIPLE: Triple bond (e.g., C≡C).
[0126] AROMATIC: Aromatic bond (such as the C-C bond in a benzene ring).
[0127] Data is stored as a string key (e.g., "SINGLE").
[0128] 2.Bond Stereochemistry(bond.GetStereo())
[0129] It represents the stereochemical information of chemical bonds, that is, the spatial configuration of the bonds.
[0130] Common bond stereochemical types (depending on the contents of allowable_features['possible_bond_stereo_list']):
[0131] STEREONONE: No stereochemical information.
[0132] STEREOZ (cis): Priority atoms at both ends of the bond are on the same side.
[0133] STEREOE (trans): Priority atoms at both ends of the bond are on opposite sides.
[0134] STEREOCIS: cis, but defined differently from Z (often used for cyclic compounds).
[0135] STEREOTRANS: trans, but defined differently from E.
[0136] 3.Is Conjugated(bond.GetIsConjugated())
[0137] Indicates whether the bond is a conjugate bond.
[0138] Conjugated bonds are commonly found in molecules with conjugated systems (such as aromatic compounds and alkenes).
[0139] Values: Boolean values True or False.
[0140] True: The bond is a conjugate bond.
[0141] False: The key is not a conjugate key.
[0142] The chemical molecular property prediction involves predicting whether a target molecule has the property of inhibiting HIV virus replication based on the information of each atom in the molecule, and outputting the prediction results through the model output layer.
[0143] Preferably, the graph data in step S2 includes the graph and its extended hypergraph. For general graph data, it is converted into a hypergraph by treating edges as hyperedges. For example, in the prediction of chemical molecular properties, the graph is a molecular connectivity graph, and the corresponding hypergraph is a hypergraph constructed by bisection nested convolutions. That is, the center (node or hyperedge) of the shortest path is regarded as a higher-order hyperedge. At this time, it can be regarded as an extended higher-order hypergraph from another perspective, with one for each hop.
[0144] Preferably, the node representation learning module and the hyperedge representation learning module adopt the same structure, each including a linear layer for node feature mapping, a linear layer for hyperedge feature mapping, a residual connection, and an MLP layer. The HyperGINE module of this invention is an extension of the graph isomorphic network GIN.
[0145] Preferably, in step S3, by inputting training graph data containing node features, hyperedge features, node first-order neighborhood, hyperedge first-order neighborhood, and connection relationships between nodes and hyperedges, the nodes use HyperGINE to aggregate their neighboring nodes and hyperedge information; after the dual transformation, the hyperedges aggregate surrounding hyperedges and node information through HyperGINE.
[0146] In one specific embodiment, the training hypergraph data is defined as in Represents a set of nodes. ε denotes the hyperedge set, ε = {e1,…,e...} m}, where n and m represent the total number of nodes and hyperedges, respectively, and h v and h e Representing their respective feature embeddings, based on the correlation matrix between nodes and hyperedges, the shortest path connections between nodes at different distances are obtained, as well as the center node or hyperedge of the shortest path between them, and node v i The set of the k-th hop neighbor nodes is defined as This includes all from v i Starting from a node reachable by at least k hyperedges, node v i The set of K-hop neighbors is defined as Represents node v i The set of K-hop neighbors. Node v i The k-th hop neighbor superedge set is defined as It contains all hyperedges reachable through at least k nodes, and uses Indicates direct connection with node v i Connected hyperedges;
[0147] Define hyperedge e b The k-th hop neighbor superedge set is This includes starting from the hyperedge e via at least k nodes. b All reachable hyperedges, Indicates the superedge e b K-jump neighbor superedge set, superedge e b The set of the k-th hop neighbor nodes is represented as in Indicates direct connection with the hyperedge e b Connected nodes.
[0148] Preferably, the update layer in step S5 is implemented using a two-layer perceptron. Specifically, it aggregates the features of the K-hop neighborhood obtained by the node in step S4. The input is fed into the update layer of the KHGNN for updating, and the update function is expressed as:
[0149]
[0150] in, The updated aggregated features of the i-th node in layer l are λt, which is the corresponding t-th hop learnable parameter. MLP represents a two-layer perceptron. This represents the output of the aggregation function for the t-th hop hyperedge in the l-th layer of the KHGNN.
[0151] Similarly, the features of the super-edge K-hop neighborhoods obtained in step S4 are aggregated. The input is fed into the update layer of the KHGNN for updating, and its update function is expressed as:
[0152]
[0153] in, Let λt be the aggregated feature of the updated b-th hyperedge in layer l, and let λt be the corresponding t-th hop learnable parameter. MLP represents a two-layer perceptron.
[0154] Preferably, the output network in step S6 is implemented using a global average pooling layer and an MLP layer. Specifically, the output layer function is represented as follows:
[0155]
[0156] The READOUT function is the output layer function corresponding to the downstream task. The node features are obtained after passing through L KHGNN layers. The hyperedge features are obtained after being extracted through L KHGNN layers, where L≥2.
[0157] Preferably, the node representation learning module is used to aggregate node features, and the corresponding HyperGINE formula is expressed as follows:
[0158]
[0159] Node v in layer l i Features Employing node features from the previous layer and hyperedge features The update is performed, where f and g represent learnable linear mappings, used to respectively update the node features h. v and hyperedge features he Mapped to a similar feature space, Indicates the superedge e b The set of all directly connected nodes Represents node v i The set of all directly connected hyperedges, Indicates that at the hyperedge e b The connected nodes do not send to node v i A set of nodes that transmit information;
[0160] The hyperedge representation learning module is used to learn hyperedges. First, the graph data undergoes a dual transformation, converting nodes in the hypergraph into corresponding dual hyperedges of the dual hypergraph, and hyperedges into corresponding dual nodes of the dual hypergraph. Under this transformation, the HyperGINE formula for updating hyperedge features is as follows:
[0161]
[0162] The hyperedge e of layer l b Features Employing node features from the previous layer and hyperedge features To perform the update, similarly, f and g represent learnable linear mappings, Indicates the superedge e b The set of all directly connected nodes Represents node v i The set of all directly connected hyperedges, This indicates that at node v i The connected hyperedges do not extend to hyperedge e. b A set of superedges that transmit information.
[0163] To alleviate the computational and parameter requirements of numerous paths, a bipartite nested convolution is introduced into the KHGNN layer. From a top-down perspective, higher-order paths are recursively partitioned around the center position. From a bottom-up perspective, the center node (hyperedge) iteratively merges the features of the left and right segments of the path using HyperGINE convolution, while injecting structural features. In this process, the convolution of the center node (hyperedge) not only updates its features but also merges the features of multiple paths, generating comprehensive higher-order path features as semantic information to guide the aggregation of distant nodes and hyperedges. This results in a more complete representation of the hypergraph to handle different downstream tasks. (See Appendix for details.) Figure 2 The binary nested convolution method uses convolution to approximate path information as semantic features to guide the aggregation of distant nodes and hyperedges. Figure 2 The text briefly explains the process of learning the 3-hop node representation of node v1 in KHGNN. Specifically, node v2 updates its features by aggregating its first-hop neighborhood using hyperedges as paths. This convolution is also viewed as concatenating paths of length 1 around v2, constructing a higher-order hyperedge v2 with path endpoints v1, v3, and v5 to represent their positional relationships. Therefore, the hidden state... As path features, they guide message passing between nodes v1 and v3, v5. The convolution operations of hyperedges e2 and e4 are the same.
[0164] Preferably, in step S4, the training graph data obtained from the preprocessing in step S2 is input. The training graph data includes node features, k-order neighborhoods of nodes, and shortest path centers between nodes. Using bipartite nested convolution, the shortest path center features extracted by the low-order HyperGINE are used as path features to guide the aggregation of high-order nodes. For hyperedge features, training graph data containing hyperedge features, k-order neighborhoods of hyperedges, and shortest path centers between hyperedges are input, and the same method is used to guide the aggregation of high-order hyperedges. The principle of bipartite nested convolution in step S4 is to use the convolution result of the low-order HyperGINE as the path (hyperedge) feature of the high-order HyperGINE through bipartite nested convolution to guide message passing between distant nodes and hyperedges.
[0165] Specifically, in K-hop node representation learning:
[0166] When the hop count k of node aggregation is even, the preprocessed training graph data (containing node features and the k-order neighborhood of each node) and the center node of the shortest path between nodes are used. HyperGINE convolutional features When input into the corresponding baseline model HyperGINE module, the k-th hop aggregation function of the l-th layer is expressed as:
[0167]
[0168] in, This represents the aggregation function of the k-th hop node in the l-th layer KHGNN. Indicates the current node v i The output of the aggregation function of the k-th hop node in the l-th layer. This represents the node feature output of the (l-1)th layer KHGNN. In the l-th layer of KHGNN, the first... The output of the jump node aggregation function, They represent nodes v respectively i and v j The Jump neighbor set, node v i and The shortest path lengths between them range from 0 to k, and the set... Indicates to node vi The set of all nodes whose shortest path length ranges from 0 to k-1. Indicates to node v i The set of nodes whose shortest path length is only k, where k = 0, node v i Establish a self-connect, inheriting the characteristics of the previous layer, that is
[0169] When the number of hops k in node aggregation is odd, the preprocessed training graph data and the center hyperedge of the shortest path between nodes are used. HyperGINE convolutional features When input into the corresponding baseline model HyperGINE module, node v i The k-th hop message passing is represented as:
[0170]
[0171] in, Similarly, following the HyperGINE node convolution, represents the aggregation function of the k-th hop node in the l-th layer of the KHGNN. Indicates the current node v i The output of the aggregation function of the k-th hop node in the l-th layer. In the l-th layer of KHGNN, the first... The output of the jump hyperedge aggregation function, where f and g represent learnable linear mappings, respectively. Represents node v i The Jump to the neighbor's super set. Indicates the superedge e j The Jump neighbor node set, Indicates distance from node v i The set of nodes less than k; at this point, Indicates to node v i The set of nodes whose shortest path length is only k;
[0172] In learning the K-jump hyperedge representation:
[0173] To enable HyperGINE to be applied to hyperedge aggregation, a dual transformation needs to be performed on the input hypergraph. This transformation converts hyperedge e and node v in the hypergraph into dual node e and dual hyperedge v in the dual hypergraph. At this point, HyperGINE can be directly applied to K-hop hyperedge representation learning. When the hop count k of hyperedge aggregation is even, the preprocessed training graph data (containing hyperedge features and k-order neighborhoods of hyperedges) and the center hyperedge of the shortest path between hyperedges are used. HyperGINE convolutional features The hyperedge e is input into the corresponding baseline model HyperGINE. b The corresponding hidden state Calculated using the following formula:
[0174]
[0175] in, According to the definition of hyperedge convolution in HyperGINE, represents the k-th hop hyperedge aggregation function in the l-th layer of KHGNN. Indicates the relationship with the hyperedge e b The set of hyperedges with a distance less than k;
[0176] When the hop count k of hyperedge aggregation is odd, the preprocessed training graph data (containing hyperedge features and the k-order neighborhood of the hyperedge) and the center node of the shortest path between hyperedges are used. HyperGINE convolutional features Input into the corresponding baseline model HyperGINE module, hyperedge k-jump hidden state Given by the following formula:
[0177]
[0178] in, Consistent with the definition of hyperedge convolution in HyperGINE, it represents the k-th hop hyperedge aggregation function in the l-th layer of KHGNN.
[0179] Preferably, steps S3 and S4 further include selectively adding relative degree encoding during the aggregation process, specifically as follows:
[0180] Define hypergraph The k-th hop connectivity between its nodes is denoted as Where ε k This represents a higher-order hyperedge constructed through nested binary convolutions, where ε1 = ε (i.e., the connection state of the original graph, which is the connection of the dataset graph itself, and the subsequent higher-order k-order hyperedges ε). k (The shortest path center between nodes is used as the reference), node v i and v j relative degree of the k-th jump between Defined as the number of hyperedges connecting two nodes in the k-th hop:
[0181]
[0182] Where |·| represents the cardinality of the set, the aggregation function of the node is modified as follows:
[0183]
[0184] in Is with The corresponding learnable vector representation, Let v represent the set of relative degrees of the k-th hop between any nodes, i.e., for node v i and v j relative degree of the k-th jump between have This represents the aggregation function of the k-th hop node in the l-th layer KHGNN. This represents the output of the previous KHGNN layer. This represents the latent variable resulting from the k / 2-order low-order convolution of the current KHGNN layer, used to calculate the current k-order convolution.
[0185] Similarly, the same approach can be used to add relative degree encoding to the aggregation function of the hyperedge.
[0186] Reference Appendix Figure 3 and Figure 4 The framework diagram of KHGNN is as follows: First, the input hypergraph is transformed to obtain the dual hypergraph; second, through bipartite nested convolutions, the results of low-order convolutions are used as input to the update function and reused as path features to guide the aggregation of higher-order neighborhoods of hyperedges / nodes. Finally, different heads are used to adjust the hypergraph representation to a form suitable for various downstream tasks.
[0187] The hypergraph neural network KHGNN of this invention is compared with other graph neural networks such as HGNN, GAT, GatedGCN, PNA, DGN, EGT, GP, and SAN on graph classification datasets. HGNN, GAT, GatedGCN, PNA, and DGN are message-passing based graph neural network methods, while EGT, GP, and SAN are attention-based graph neural network methods. Specifically, the evaluation is performed on nine graph datasets: ZINC, MNIST, CIFAR10, MolHIV, MolPCBA, PascalVOC-SP, Peptides-func, Peptides-struct, and PCQM-Contact. Table 1 shows the datasets used for graph-level tasks, including graph classification, graph regression, and node classification. The corresponding experimental results are shown in Tables 2 and 3.
[0188] Table 1
[0189]
[0190] Table 2
[0191]
[0192]
[0193] Table 2 compares the performance of KHGNN and the state-of-the-art (SOTA) model on short-range graph benchmark datasets. The results are reported as mean ± standard deviation for five random seeds. As shown in Table 2, our model sets new state-of-the-art performance on ZINC, MNIST, CIFAR10, and MolHIV by simultaneously expanding the receptive fields of nodes and edges. These results also demonstrate that appropriate path features can more effectively model the relationships between nodes compared to attention mechanisms, thus providing more suitable graph embeddings for downstream tasks.
[0194] Table 3
[0195]
[0196] Table 3 shows the KHGNN results on four tasks from the remote graph benchmark. Values are expressed as percentages. As can be seen from Table 3, KHGNN overcomes the locality constraints of traditional message passing by allowing information to flow along all shortest paths. KHGNN utilizes its bipartite nested convolution operator to capture the comprehensive features of nodes, edges, and structures within paths, thus enabling more accurate modeling of remote interactions. This ability to encode multiple relational paths allows KHGNN to outperform graph attention, resulting in best performance on all evaluated datasets. In other words, the method of this invention performs better on remote graphs.
[0197] In summary, the method of the present invention has the following advantages:
[0198] (1) Enhanced representation of higher-order relations: Nodes and hyperedges encapsulate key structural and connection information that reinforce each other. Their robust interaction seamlessly integrates low-order structural and connection details into higher-order hyperedges, providing rich semantic information for modeling complex relations.
[0199] (2) Comprehensive path feature extraction: The convolution method embodies the binary division of the path. Through downward iterative nesting, this method effectively captures the features of the bottom-level nodes, hyperedges, and their related structures. Since this method synthesizes upward paths through the center point, it injects broader structural information, ensuring a comprehensive path representation.
[0200] (3) Efficiency optimization: As the receptive domain of aggregation expands, the increase in the number and length of paths poses a challenge to complex operators, which will bring huge computational and parameter overhead. KHGNN solves this problem by reusing low-order convolutions, thereby minimizing the computational and parameter costs associated with extracting a large number of path features.
[0201] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A path-based K-hop hypergraph neural network convolution method, characterized in that: The method comprises: Step S1, creating a hypergraph neural network model for a graph downstream task, and initializing the model; Step S2, obtaining training graph data, and obtaining the shortest path and the center node or hyperedge between nodes at different distances through an association matrix between nodes and hyperedges; similarly, the shortest path and the center node or hyperedge between hyperedges are obtained; Step S3, inputting the training graph data into the HyperGINE module of the model, aggregating the node features on the hyperedges directly connected to the node, adding the features of the corresponding hyperedges, and directly transmitting the features to the target node; after the hypergraph is transformed by duality, the HyperGINE aggregation of the hyperedge is performed in the same way; wherein the HyperGINE module comprises a node representation learning module and a hyperedge representation learning module; Step S4, obtaining the updated node features after low-order aggregation, taking these low-order features as path features for high-order HyperGINE to aggregate the K-hop neighborhood of the node; after the hypergraph data is transformed by duality, the corresponding aggregation representation of different hops is obtained; Step S5, updating the features through the update layer according to the aggregation results of the K-hop neighborhood of the node and the hyperedge; Step S6, completing the extraction of the hypergraph features by stacking at least two KHGNN layers formed by steps S3, S4 and S5, and performing task prediction through an output network matched with the downstream task; When the downstream task is chemical molecule property prediction, the node is defined as an atomic node, the hyperedge is defined as an atomic chemical bond, the node features and the hyperedge features input into the model are respectively atomic features and bond features, the atomic features include 9-dimensional information, specifically, atomic number, atomic chirality label, total degree of the atom, atomic formal charge, the sum of the number of hydrogen atoms connected to the atom, the number of unpaired electrons of the atom, the hybrid orbital type of the atom, whether the atom is an aromatic atom, and whether the atom is in a ring structure, and the bond features include 3-dimensional information, specifically, bond type, bond stereochemistry, and whether the bond is a conjugated bond; The chemical molecule property prediction is to predict whether the target molecule has the property of inhibiting HIV virus replication according to the information of each atom in the molecule, and the prediction result is output through the model output layer.
2. The path-based K-hop hypergraph neural network convolution method of claim 1, wherein: In step S3, the node aggregates the neighborhood node and hyperedge information by inputting the training graph data containing node features, hyperedge features, node 1-hop neighborhood, hyperedge 1-hop neighborhood, and the connection relationship between the node and the hyperedge; after duality transformation, the hyperedge aggregates the surrounding hyperedge and node information through HyperGINE.
3. The path-based K-hop hypergraph neural network convolution method of claim 1, wherein: The update layer in step S5 is implemented by a two-layer perceptron.
4. The path-based K-hop hypergraph neural network convolution method of claim 1, wherein: The output network in step S6 is implemented by a global average pooling layer and an MLP layer.
5. The path-based K-hop hypergraph neural network convolution method of claim 1, wherein: Define the training hypergraph data as ,in Represents a set of nodes. , Denotes the set of superedges. n and m represent the total number of nodes and the total number of hyperedges, respectively. and Representing their respective feature embeddings, based on the correlation matrix between nodes and hyperedges, the shortest path connections between nodes at different distances are obtained, along with the center node or hyperedge of the shortest path between them, and the nodes are then... The set of k-th hop neighbors is defined as This includes all from Starting from a node reachable by at least k hyperedges, connect the nodes... The set of K-hop neighbors is defined as follows: Represents a node The set of K-hop neighbors, the nodes The k-th hop neighbor superedge set is defined as This contains all hyperedges reachable through at least k nodes, and uses... Indicates direct connection to the node Connected hyperedges; Definition of hyperedge The k-hop neighbor hyperedge set of where all hyperedges reachable by at least k nodes from hyperedge are included, denotes the k-hop neighbor hyperedge set of hyperedge The k-hop neighbor node set of hyperedge is denoted as where denotes the nodes directly connected to hyperedge .
6. The path-based K-hop hypergraph neural network convolution method of claim 5, wherein: The node representation learning module is used to aggregate the node features, and the corresponding HyperGINE formula is as follows: wherein and denote learnable linear mappings for mapping node features and superedge features into a similar feature space, respectively, denotes a superedge directly connected to all nodes in the set denotes a node directly connected to all superedges in the set denotes a set of nodes that do not transmit information to node in superedge . The super-edge representation learning module is used for learning super-edges, and first performs dual transformation on graph data, converts nodes in a hypergraph into dual hyper-edges of a corresponding dual hypergraph, and converts hyper-edges into dual nodes of the corresponding dual hypergraph. Under this transformation, the HyperGINE formula for updating hyper-edge features is as follows: wherein, represents a hyperedge all the nodes directly connected to the hyperedge, represents a node all the hyperedges directly connected to the node, represents the hyperedges connected to the node that do not pass information to the hyperedge the set of hyperedges that pass information to the hyperedge.
7. The path-based K-hop hypergraph neural network convolution method of claim 5, wherein: In the step S4, the training graph data obtained by the preprocessing in the step S2 is input, the training graph data includes node features, node k-order neighborhoods and shortest path centers between nodes, the shortest path center features extracted by the low-order HyperGINE are used as path features to guide the aggregation of high-order nodes by using the binary nested convolution; for the hyper-edge features, the training graph data including hyper-edge features, hyper-edge k-order neighborhoods and shortest path centers between hyper-edges is input, and the same method is used to guide the aggregation of high-order hyper-edges; In K-hop node representation learning: When the hop number k of the node aggregation is even, the preprocessed training graph data and the center node of the shortest path between the nodes are input into the corresponding reference model HyperGINE module, at this time, the first order HyperGINE convolution feature is input into the corresponding reference model HyperGINE module, at this time, the first order HyperGINE convolution feature of the first hop aggregation function is represented as: wherein, denotes the layer of the layer KHGNN, denotes the node feature output of the layer KHGNN, denotes the output of the -hop node aggregation function in the layer KHGNN, denotes the -hop neighbor node set of the node and , the shortest path length between is from 0 to , the set denotes the set of all nodes with the shortest path length from 0 to to the node , at this time, denotes the set of nodes with the shortest path length only k to the node , when , the node establishes a self-connection and inherits the features of the previous layer, that is, When the number of hops k aggregated by the node is odd, the preprocessed training graph data and the center hyperedge of the shortest path between the nodes order HyperGINE convolutional features are input into the corresponding reference model HyperGINE module, at which time, the node The first hop message passing is expressed as: wherein, denotes the kth hop neighbor set of node in layer KHGNN, and denote learnable linear mappings, denotes the kth hop neighbor hyperedge set of node in layer KHGNN, denotes the kth hop neighbor node set of hyperedge in layer KHGNN, denotes the set of nodes whose distance to node is less than ; denotes the set of nodes whose shortest path length to node is exactly k. In K-hop super-edge representation learning: Perform a dual transformation on the input hypergraph. Through this transformation, the hyperedges in the hypergraph... and nodes Transformed into the dual node of the dual hypergraph and dual hyperedge At this point, HyperGINE is directly applied to the learning of hyperedge representations with K hops. When the number of hops k in hyperedge aggregation is even, the preprocessed training graph data and the central hyperedge of the shortest path between hyperedges are used. HyperGINE convolutional features The hyperedge is input into the corresponding baseline model HyperGINE. The corresponding hidden state Calculated using the following formula: wherein, denotes the layer KHGNN in the skip-edge aggregation function, denotes the set of hyper-edges whose distance is less than k; When the number of hops k of the super-edge aggregation is odd, the preprocessed training graph data and the center node of the shortest path between the super-edges order HyperGINE convolutional features are input into the corresponding reference model HyperGINE module, and the k-hop hidden state of the super-edge is given by the following formula: wherein, represents the layer KHGNN in which skip hyperedge aggregation function.
8. The path-based K-hop hypergraph neural network convolution method of claim 5, wherein: The HyperGINE module further includes selectively adding relative degree coding in the aggregation process, and the specific process is as follows: Define hypergraph The first node between its nodes Jump connectivity is denoted as ,in This represents a higher-order hyperedge constructed through nested binary convolutions, and ,node and Between the first Jump relative degree Defined as in the first Number of superedges connecting two nodes in a jump: where denotes the cardinality of a set, then the aggregation function of a node is modified as follows: in Is with The corresponding learnable vector representation, Represents the first node between any two nodes. The set of relative degrees of jump, that is, for a node and Between the first Jump relative degree have , Indicates the first In the KHGNN layer, the first Jump node aggregation function, This represents the output of the previous KHGNN layer. This represents the latent variable resulting from the k / 2-order low-order convolution of the current KHGNN layer, used to compute the current k-order convolution. , indicating to node The shortest path length ranges from 0 to The set of all nodes; Similarly, the same method is used to add relative degree coding to the aggregation function of the hyper-edge.