Path-based K-hop hypergraph neural network convolution method

By introducing the HyperGINE module and binary nested convolution method into the K-hop hypergraph neural network, the problem of high-order relationship expression and computational complexity in the hypergraph is solved, and more efficient feature extraction and downstream task prediction are achieved.

CN119623513AActive Publication Date: 2025-03-14XIAMEN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411786935.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-14
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The existing K-hop hypergraph neural network has limitations in terms of expression ability and computational complexity, making it difficult to effectively capture the higher-order non-Euclidean relationship in the hypergraph and reduce the computational cost.

Method used

A path-based K-hop hypergraph neural network convolution method is proposed. The node and hyper-edge information are aggregated through the HyperGINE module, and the path features are extracted using dual transformation and binary nested convolution, reducing the computational complexity and improving feature extraction accuracy.

Benefits of technology

It significantly improves the characterization capability of hypergraphs, improves the performance of downstream tasks, and reduces the computational complexity of path characterization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623513A_ABST
    Figure CN119623513A_ABST
Patent Text Reader

Abstract

The invention provides a path-based K-hop hypergraph neural network convolution method, which comprises the following steps of: S1, creating a hypergraph neural network model for a graph downstream task, and initializing the model; s2, acquiring shortest paths of different distances between nodes (hyperedges) and central nodes or hyperedges of the shortest paths; s3, aggregating node features on the super edges directly connected with the nodes; after the hypergraph is subjected to dual transformation, aggregation of hyperedges is carried out in the same way; step S4, acquiring node features updated after low-order aggregation as path features for high-order HyperGINE to perform node K-hop neighborhood aggregation; after the hypergraph data is subjected to dual transformation, obtaining corresponding aggregation representations of different hops; step S5, updating the neighborhood aggregation result of the respective K hops; and S6, completing extraction of hypergraph features by stacking the KHGNN layers formed in the steps S3, S4 and S5, and performing task prediction through an output network matched with a downstream task. According to the invention, efficient prediction of downstream tasks can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image recognition, and in particular to a semi-supervised learning method for directional target segmentation using SAM as a guide. Background Art

[0002] Graph Neural Networks (GNNs), as an effective tool for processing non-Euclidean structured data, have been widely used in computational chemistry, social networks, personalized recommendations and other fields. However, traditional GNNs can only capture pairwise relationships between data samples, which limits their expressive power. Unlike GNNs, Hypergraph Neural Networks (HGNNs) can capture high-order non-Euclidean relationships between real-world entities through unpaired hyperedge connections involving any number of nodes. Most existing HGNNs are based on Clique Expansion (CE) technology for message passing, but such a two-stage transmission method has the following problems:

[0003] 1. Node to hyperedge: The information of multiple nodes is compressed into the hyperedge with limited feature capacity, resulting in information loss;

[0004] 2. Hyperedge to node: Hyperedge features are equally assigned to all adjacent nodes, reducing the feature distinguishability of the nodes.

[0005] This slow diffusion mechanism exacerbates the over-squashing and over-smoothing problems, significantly reducing the utilization efficiency of hypergraph information.

[0006] K-hop graph neural networks (K-hop GNNs) have been shown to outperform traditional GNNs in terms of expressiveness, especially by using path features to pass encapsulated contextual information and message passing within K hops, providing rich semantic information for relational modeling, 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 K-hop HGNN faces 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 commonly used methods in K-hop graph neural networks not applicable to K-hop HGNNs;

[0009] 2. Limited expressiveness: Only K-hop node neighborhoods are aggregated while hyperedges in high-order relationships are ignored, which limits the expressiveness of HGNN;

[0010] 3. Difficulty in feature aggregation: Due to the differences in feature space, 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 lot of computing resources, which limits the extraction of path features by complex operators.

[0012] In view of this, it is urgent 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 the present invention is to provide a path-based K-hop hypergraph neural network convolution method, which reduces the calculation complexity of the model while improving the feature extraction accuracy, thereby achieving accurate prediction of downstream tasks.

[0014] The present invention is implemented as follows: a path-based K-hop hypergraph neural network convolution method, the method comprising:

[0015] Step S1, creating a hypergraph neural network model for graph downstream tasks and initializing the model;

[0016] Step S2, obtaining training graph data, and obtaining the shortest paths of different distances between nodes and their central nodes or hyperedges through the association matrix between nodes and hyperedges; similarly, obtaining the shortest paths between hyperedges and their central nodes or hyperedges;

[0017] Step S3, inputting the training graph data into the HyperGINE module of the model, directly transferring the features to the target node by aggregating the node features on the hyperedges directly connected to the nodes and adding the features of the corresponding hyperedges; after the hypergraph undergoes dual transformation, the HyperGINE aggregation of the hyperedges is performed in the same manner; wherein the HyperGINE module includes a node representation learning module and a hyperedge representation learning module;

[0018] Step S4, obtaining updated node features after low-order aggregation, using these low-order features as path features for high-order HyperGINE to aggregate the node K-hop neighborhood; obtaining corresponding aggregation representations of different hops after the hypergraph data undergoes dual transformation;

[0019] Step S5, updating the features of the results of K-hop neighborhood aggregation of the nodes and hyperedges through the update layer;

[0020] Step S6: extract the hypergraph features by stacking at least two KHGNN layers formed by steps S3, S4 and S5, and perform task prediction through an output network that matches the downstream task.

[0021] Further, when the downstream task is chemical molecular property prediction, the node is defined as an atomic node, the hyperedge is an atomic chemical bond, the node features and hyperedge features of the input model are atomic features and bond features, respectively, the atomic features contain 9-dimensional information, specifically atomic number, atomic chirality label, total degree of the atom, atomic formal charge, the total number of hydrogen atoms connected to the atom, the number of unpaired electrons of the atom, the type of hybrid orbital of the atom, whether the atom is an aromatic atom, and whether the atom is in a ring structure, and the bond features contain 3-dimensional information, specifically bond type, bond stereochemistry, and an indicator of whether the bond is a conjugated bond;

[0022] The chemical molecular property prediction is to predict whether the target molecule has the property of inhibiting HIV virus replication based on the information of each atom in the molecule, and output the prediction result through the model output layer.

[0023] Furthermore, the graph data in step S2 includes a graph and its extended hypergraph. For general graph data, edges are regarded as hyperedges to thereby convert them into a hypergraph.

[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 including node features, hyperedge features, node first-order neighborhood, hyperedge first-order neighborhood, and connection relationships between nodes and hyperedges, the node uses HyperGINE to aggregate its neighboring nodes and hyperedge information; after the dual transformation, the hyperedge aggregates the 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 collection of nodes. ε represents the set of hyperedges, ε={e1,…,e m}, n and m represent the total number of nodes and hyperedges respectively, h v and h eRepresent their respective feature embeddings. According to the association matrix between nodes and hyperedges, we obtain the shortest path connection relationship between nodes at different distances, as well as the central node or hyperedge of the shortest path between them. i The set of k-th hop neighbor nodes is defined as This includes all the i Starting from a node that is reachable through at least k hyperedges, move node v i The set of K-hop neighbor nodes is defined as Represents node v i The set of K-hop neighbor nodes of node v i The k-th hop neighbor hyperedge set of is defined as It contains all hyperedges reachable through at least k nodes and is represented by Indicates that it is directly connected to node v i connected hyperedges;

[0029] Define hyperedge e b The k-th hop neighbor hyperedge set is This includes the hyperedge e through at least k nodes. b All hyperedges reachable by Represents the hyperedge e b The set of K-hop neighbor hyperedges, hyperedge e b The set of k-th hop neighbor nodes of in represents the direct and 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, which are used to transform node features h v and the hyperedge feature h e Mapped into similar feature space, Represents the hyperedge e b The set of all directly connected nodes, Represents node v i The set of all directly connected hyperedges, Indicates that on the hyperedge e b The connected nodes do not connect to node v i A collection of nodes that transmit information;

[0033] The hyperedge representation learning module is used to learn hyperedges. First, the graph data is dually transformed, the nodes in the hypergraph are transformed into dual hyperedges corresponding to the dual hypergraph, and the hyperedges are transformed into dual nodes corresponding to the dual hypergraph. Under this transformation, the HyperGINE formula for updating the hyperedge features is as follows:

[0034]

[0035] in, Represents the hyperedge e b The set of all directly connected nodes, Represents node v i The set of all directly connected hyperedges, Indicates that at node v i The connected hyperedges do not go to hyperedge e b A collection of hyperedges that convey information.

[0036] Furthermore, in step S4, the training graph data obtained by preprocessing in step S2 is input, and the training graph data includes node features, node k-order neighborhoods, and the shortest path center between nodes. The shortest path center features extracted by low-order HyperGINE are used as path features to guide the aggregation of high-order nodes. For hyperedge features, the training graph data including hyperedge features, hyperedge k-order neighborhoods, and the shortest path center between hyperedges is input, and the aggregation of high-order hyperedges is guided by the same method.

[0037] In K-hop node representation learning:

[0038] When the number of hops k of the node aggregation is even, the preprocessed training graph data and the central node of the shortest path between nodes are HyperGINE convolutional features Input into the corresponding benchmark model HyperGINE module, at this time, the k-th hop aggregation function of the l-th layer is expressed as:

[0039]

[0040] in, represents the k-th hop node aggregation function in the l-th layer KHGNN, Represents the current node v i The output of the aggregation function of the k-th hop node in the l-th layer, represents the node feature output of the l-1th layer KHGNN, Indicates the first layer of KHGNN The output of the jump node aggregation function, Respectively represent the node v i and v j No. Hop neighbor node set, node v i and The length of the shortest path between them varies from 0 to k, and the set Represents node v i The set of all nodes whose shortest path length is from 0 to k-1. At this time, Represents node v i The shortest path length is only a set of nodes k. When k = 0, node v i Establish a self-connection and inherit the characteristics of the previous layer, that is,

[0041] When the number of hops k of the node aggregation is an odd number, the preprocessed training graph data and the central hyperedge of the shortest path between nodes are HyperGINE convolutional features Input into the corresponding benchmark model HyperGINE module, at this time, node v i The k-th hop message passing is expressed as:

[0042]

[0043] in, Also following the node convolution of HyperGINE, it represents the k-th hop node aggregation function in the l-th layer KHGNN, Represents the current node v i The output of the aggregation function of the k-th hop node in the l-th layer, Indicates the first layer of KHGNN The output of the jump hyperedge aggregation function, f and g represent the learnable linear mapping, Represents node v i No. Hop neighbor super edge set, Represents the hyperedge e j No. Hop neighbor node set, Represents the distance from node v i The node set is smaller than k; at this time, Represents node v i The set of nodes whose shortest path length is only k;

[0044] In K-hop hyperedge representation learning:

[0045] The input hypergraph is subjected to a dual transformation. Through this transformation, the hyperedge e and node v in the hypergraph are converted into the dual node e and dual hyperedge v in the dual hypergraph. At this time, HyperGINE is directly applied to the K-hop hyperedge representation learning. When the number of hops k of the hyperedge aggregation is even, the preprocessed training graph data and the central hyperedge of the shortest path between hyperedges are used. HyperGINE convolutional features Input into the corresponding benchmark model HyperGINE, the hyperedge e b The corresponding hidden state Calculated by the following formula:

[0046]

[0047] in, According to the definition of hyperedge convolution in HyperGINE, it represents the hyperedge aggregation function of the kth hop in the lth layer KHGNN, Represents the hyperedge e b The set of hyperedges with distance less than k;

[0048] When the number of hops k of the hyperedge aggregation is an odd number, the preprocessed training graph data (including the hyperedge features, the k-order neighborhood of the hyperedge) and the central node of the shortest path between the hyperedges are HyperGINE convolutional features Input to the corresponding benchmark model HyperGINE module, the hyperedge k-hop hidden state It is given by the following formula:

[0049]

[0050] in, It is consistent with the definition of hyperedge convolution in HyperGINE, and represents the k-th hop hyperedge aggregation function in the l-th layer KHGNN.

[0051] Furthermore, the HyperGINE module also includes selectively adding relative degree encoding during the aggregation process, and the specific process is as follows:

[0052] Defining a Hypergraph The k-th hop connectivity between its nodes is denoted as where ε k represents a high-order hyperedge constructed by binary nested convolution, and ε1=ε, node v i and v j The kth hop relative degree between Defined as the number of hyperedges connecting two nodes in the kth 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 is, represents the k-th hop relative degree set between any nodes, that is, for node v i and v j The kth hop relative degree between have represents the k-th hop node aggregation function in the l-th layer KHGNN, represents the output of the previous layer of KHGNN, Represents the resulting latent variable of the k / 2-order low-order convolution of the current KHGNN layer, which is used to calculate the current k-order convolution;

[0057] Similarly, relative degree encoding can be added to the aggregation function of hyperedges in the same way.

[0058] The present invention has the following advantages: by proposing a hypergraph isomorphic neural network HyperGINE to directly transmit hypergraph node and hyperedge information; on this basis, the hypergraph neural network model extracts features including node, hyperedge and path structure from low-order convolutions through bisection nested convolutions, further guides the aggregation of nodes and hyperedges in different K-hop neighborhoods, promotes effective interaction between distant nodes and hyperedges, enables them to learn complex long-distance relationships, and realizes that on the basis of reducing the computational complexity of path representation, by enabling distant nodes and hyperedges in the hypergraph to interact through paths, the representation ability of the hypergraph is significantly improved, and the performance of downstream tasks is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.

[0060] Figure 1 This is an execution flow chart of a path-based K-hop hypergraph neural network convolution method of the present invention.

[0061] Figure 2 Schematic diagram of the convolution process of the HyperGINE module in a specific embodiment of the present invention.

[0062] Figure 3 It is a schematic diagram of the path-based K-hop hypergraph neural network structure of the present invention.

[0063] Figure 4 It is a schematic diagram of the HyperGINE module structure of the present invention. DETAILED DESCRIPTION

[0064] The embodiment of the present application provides a path-based K-hop hypergraph neural network convolution method to solve the problem of low prediction efficiency of downstream tasks. In particular, it can be used to achieve accurate prediction of chemical molecular properties while reducing computational complexity to a certain extent.

[0065] The technical solution in the embodiment of the present application has the following general idea: a path-based K-hop hypergraph neural network convolution method of the present invention, specifically a K-hop hypergraph neural network (KHGNN), directly transmits hypergraph node and hyperedge information by proposing a benchmark model HyperGINE; on this basis, the present invention extracts features containing node, hyperedge and path structure from low-order convolution by bisection nested convolution, thereby realizing the representation of long-distance relationships, further guiding the aggregation of nodes and hyperedges in different K-hop neighborhoods, promoting effective interaction between distant nodes and hyperedges, and also adopts a relative degree encoding mechanism based on the number of paths between nodes and hyperedges. The present invention guides the aggregation of node and hyperedge information in the dual hypergraph through path features, so that it can learn complex relationships at long distances. On the basis of reducing the computational complexity of path representation, by enabling distant nodes and hyperedges in the hypergraph to interact through paths, the representation ability of the hypergraph is significantly improved, and the performance of downstream tasks is greatly improved.

[0066] In order to better understand the above technical solution, the technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0067] See also Figure 1 and Figure 2 As shown, the present invention provides a path-based K-hop hypergraph neural network convolution method, the method comprising:

[0068] Step S1, creating a hypergraph neural network model for graph downstream tasks and initializing the model;

[0069] Step S2, obtaining training graph data, and obtaining the shortest paths of different distances between nodes and their central nodes or hyperedges through the association matrix between nodes and hyperedges; similarly, obtaining the shortest paths between hyperedges and their central nodes or hyperedges;

[0070] Step S3, inputting the training graph data into the HyperGINE module of the model, directly transferring the features to the target node by aggregating the node features on the hyperedges directly connected to the nodes and adding the features of the corresponding hyperedges; after the hypergraph undergoes dual transformation, the HyperGINE aggregation of the hyperedges is performed in the same manner; wherein the HyperGINE module includes a node representation learning module and a hyperedge representation learning module;

[0071] Step S4, obtaining updated node features after low-order aggregation, using these low-order features as path features for high-order HyperGINE to aggregate the node K-hop neighborhood; obtaining corresponding aggregation representations of different hops after the hypergraph data undergoes dual transformation;

[0072] Step S5, updating the features of the results of K-hop neighborhood aggregation of the nodes and hyperedges through the update layer;

[0073] Step S6: extract the hypergraph features by stacking at least two KHGNN layers formed by steps S3, S4 and S5, and perform task prediction through an output network that matches the downstream task.

[0074] Preferably, when the downstream task is chemical molecular property prediction, the node is defined as an atomic node, the hyperedge is an atomic chemical bond, the node features and hyperedge features of the input model are atomic features and bond features, respectively, the atomic features contain 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 type of hybrid orbital of the atom, whether the atom is an aromatic atom, and whether the atom is in a ring structure, and the bond features contain 3-dimensional information, specifically bond type, bond stereochemistry, and whether the indicator bond is a conjugated bond;

[0075] Specifically, the atomic features are encoded as:

[0076] 1.Atomic Number(atom.GetAtomicNum())

[0077] Represents the atomic number of the atom (its number on the periodic table).

[0078] For example: Carbon (C) is 6, Nitrogen (N) is 7, and Oxygen (O) is 8.

[0079] 2.Chirality(atom.GetChiralTag())

[0080] Represents the chirality label of an atom, that is, describes whether an atom has a chiral center and its chirality type.

[0081] Common chiral tags include:

[0082] CHI_UNSPECIFIED (chiral)

[0083] CHI_TETRAHEDRAL_CW (clockwise)

[0084] CHI_TETRAHEDRAL_CCW (Counterclockwise)

[0085] 3.Degree(atom.GetTotalDegree())

[0086] Represents the total degree of an atom, i.e. the number of other atoms (excluding implicit hydrogens) directly connected to it.

[0087] For example:

[0088] The carbon number of methane (CH4) is 4.

[0089] The number of carbon atoms in the double bond of ethylene (C2H4) is 2.

[0090] 4.Formal Charge(atom.GetFormalCharge())

[0091] Represents the formal charge of an atom, that is, the net charge of the atom in a molecule.

[0092] Common values:

[0093] Positive and negative integers (such as +1, -1).

[0094] For neutral molecules, this is usually 0.

[0095] 5.Number of Hydrogens(atom.GetTotalNumHs())

[0096] Represents the sum of the number of explicit and implicit hydrogen atoms attached to this atom.

[0097] For example:

[0098] Methane (CH4) has 4 hydrogen atoms attached to its carbon atom.

[0099] In a benzene ring (C6H6), there is one hydrogen atom on each carbon atom.

[0100] 6.Number ofRadical Electrons(atom.GetNumRadicalElectrons())

[0101] Represents the number of unpaired electrons in the atom.

[0102] For most stable molecules, this value is usually 0.

[0103] 7.Hybridization(atom.GetHybridization())

[0104] Represents the type of hybrid orbital of an atom.

[0105] Common types:

[0106] SP3 (e.g. carbon atoms in methane).

[0107] SP2 (e.g. double-bonded carbon atoms in ethylene).

[0108] SP (e.g. triple-bonded carbon atom in acetylene).

[0109] 8.IsAromatic(atom.GetIsAromatic())

[0110] Indicates whether the atom is an aromatic atom (i.e., whether it participates in the conjugated system of the aromatic ring).

[0111] Value: Boolean True or False.

[0112] For example: the carbon atoms in the benzene ring (C6H6) are aromatic atoms.

[0113] 9.Is in Ring (atom.IsInRing())

[0114] Indicates whether the atom is in a ring structure.

[0115] Value: Boolean True or False.

[0116] For example:

[0117] Returns True for carbon atoms in a benzene ring.

[0118] Returns False for carbon atoms in straight chain alkanes.

[0119] Encode the key features as:

[0120] 1.Bond Type(bond.GetBondType())

[0121] Indicates the type of bond, that is, the order or nature of the chemical bond.

[0122] Possible types include (depending on the contents of allowable_features['possible_bond_type_list']):

[0123] SINGLE: Single key (such as CC).

[0124] DOUBLE: double bond (eg C=C).

[0125] TRIPLE: triple bond (such as C≡C).

[0126] AROMATIC: Aromatic bond (such as the CC bond in a benzene ring).

[0127] Data is stored as a string representation of the key type (for example, "SINGLE").

[0128] 2.Bond Stereochemistry(bond.GetStereo())

[0129] Represents the stereochemical information of a chemical bond, that is, the spatial configuration of the bond.

[0130] Common bond stereochemistry types (depending on the contents of allowable_features['possible_bond_stereo_list']):

[0131] STEREONONE: No stereochemical information.

[0132] STEREOZ (cis): The priority atoms at both ends of the bond are on the same side.

[0133] STEREOE(trans): The priority atoms at both ends of the bond are on opposite sides.

[0134] STEREOCIS: cis, but with a different definition than Z (often used in cyclic compounds).

[0135] STEREOTRANS: trans, but defined differently than E.

[0136] 3.Is Conjugated(bond.GetIsConjugated())

[0137] Indicates whether the bond is conjugated.

[0138] Conjugated bonds usually appear in molecules with conjugated systems (such as aromatic compounds, alkenes, etc.).

[0139] Value: Boolean True or False.

[0140] True: the bond is a conjugated bond.

[0141] False: The bond is not conjugated.

[0142] The chemical molecular property prediction is to predict whether the target molecule has the property of inhibiting HIV virus replication based on the information of each atom in the molecule, and output the prediction result through the model output layer.

[0143] Preferably, the graph data in step S2 includes a graph and its extended hypergraph. For general graph data, the edges are regarded as hyperedges to convert them into hypergraphs. For example, in the prediction of chemical molecular properties, the graph is a molecular connection graph, and the hypergraph corresponds to a hypergraph composed of binary nested convolutions, that is, the center of the shortest path (node ​​or hyperedge) is regarded as a high-order hyperedge. At this time, it can be regarded as an extended high-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, both 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 the present invention is an extension of the graph isomorphism network GIN.

[0145] Preferably, in step S3, by inputting training graph data including node features, hyperedge features, node first-order neighborhood, hyperedge first-order neighborhood, and connection relationships between nodes and hyperedges, the node uses HyperGINE to aggregate its neighboring nodes and hyperedge information; after the dual transformation, the hyperedge aggregates the surrounding hyperedges and node information through HyperGINE.

[0146] In one specific embodiment, the training hypergraph data is defined as in Represents a collection of nodes. ε represents the set of hyperedges, ε={e1,…,e m}, n and m represent the total number of nodes and hyperedges respectively, h v and h e Represent their respective feature embeddings. According to the association matrix between nodes and hyperedges, we obtain the shortest path connection relationship between nodes at different distances, as well as the central node or hyperedge of the shortest path between them. i The set of k-th hop neighbor nodes is defined as This includes all the i Starting from a node that is reachable through at least k hyperedges, move node v i The set of K-hop neighbor nodes is defined as Represents node v i The set of K-hop neighbor nodes. i The k-th hop neighbor hyperedge set of is defined as It contains all hyperedges reachable through at least k nodes and is represented by Indicates that it is directly connected to node v i connected hyperedges;

[0147] Define hyperedge e b The k-th hop neighbor hyperedge set is This includes the hyperedge e through at least k nodes. b All hyperedges reachable by Represents the hyperedge e b The set of K-hop neighbor hyperedges, hyperedge e b The set of k-th hop neighbor nodes of in represents the direct and hyperedge e b Connected nodes.

[0148] Preferably, the update layer in step S5 is implemented using a two-layer perceptron. Specifically, the feature of the K-hop neighborhood aggregation obtained by the node in step S4 is Input to the update layer of KHGNN for update, and the update function is expressed as:

[0149]

[0150] in, is the updated aggregate feature of the ith node in the lth layer, λt is the corresponding learnable parameter of the tth hop, and MLP represents a two-layer perceptron; Represents the result of the t-th hop hyperedge aggregation function output in the l-th layer KHGNN.

[0151] Similarly, the features of the hyperedge K-hop neighborhood aggregation obtained in step S4 are Input to the update layer of KHGNN for update, and its update function is expressed as:

[0152]

[0153] in, is the updated aggregate feature of the b-th hyperedge at layer l, λt is the corresponding learnable parameter of the t-th hop, and 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 expressed as follows:

[0155]

[0156] Among them, the READOUT function is the output layer function corresponding to the downstream task. is the node feature extracted by L KHGNN layers, is the hyper-edge feature extracted by L KHGNN layers, 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 at layer l i Features Adopt node features from the previous layer and hyperedge features Update, where f and g represent learnable linear mappings, which are used to transform node features h v and the hyperedge feature he Mapped into similar feature space, Represents the hyperedge e b The set of all directly connected nodes, Represents node v i The set of all directly connected hyperedges, Indicates that on the hyperedge e b The connected nodes do not connect to node v i A collection of nodes that transmit information;

[0160] The hyperedge representation learning module is used to learn hyperedges. First, the graph data is dually transformed, the nodes in the hypergraph are transformed into dual hyperedges corresponding to the dual hypergraph, and the hyperedges are transformed into dual nodes corresponding to the dual hypergraph. Under this transformation, the HyperGINE formula for updating the hyperedge features is as follows:

[0161]

[0162] Hyperedge e at layer l b Features Adopt node features from the previous layer and hyperedge features Update, similarly, f and g represent learnable linear mappings, Represents the hyperedge e b The set of all directly connected nodes, Represents node v i The set of all directly connected hyperedges, Indicates that at node v i The connected hyperedges do not go to hyperedge e b A collection of hyperedges that convey information.

[0163] In order to reduce the computational and parameter requirements of many paths, binary nested convolution is introduced in the KHGNN layer. From a top-down perspective, high-order paths are recursively divided around the center position. From a bottom-up perspective, the central node (hyperedge) uses HyperGINE convolution to iteratively merge the features of the left and right segments of the path, while injecting structural features. In this process, the convolution of the central node (hyperedge) not only updates its features, but also merges the features of multiple paths to generate comprehensive high-order path features, which serve as semantic information to guide the aggregation of distant nodes and hyperedges. In this way, a more complete representation of the hypergraph is obtained to cope with different downstream tasks. Please refer to the attached Figure 2 ,The binary nested convolution approach utilizes convolution to approximate alternative path information as semantic features to guide the aggregation of distant nodes and hyperedges. Figure 2 The process of learning a 3-hop node representation for node v1 in KHGNN is briefly described in Fig. 2. Specifically, node v2 aggregates its first-hop neighbors by utilizing hyperedges as paths to update the feature This convolution can also be seen as splicing together the length-1 paths around v2 and constructing a high-order hyperedge v2 whose path endpoints are v1, v3, and v5 to indicate the positional relationship between them. Therefore, the hidden state As a path feature, it guides the message passing between nodes v1, v3, and v5. The convolution operation of hyperedges e2 and e4 is the same.

[0164] Preferably, in step S4, the training graph data preprocessed in step S2 is input, the training graph data includes node features, node k-order neighborhoods and shortest path centers between nodes, and binary nested convolution is used to take the shortest path center features extracted by low-order HyperGINE as path features to guide the aggregation of high-order nodes; for hyperedge features, the training graph data including hyperedge features, hyperedge k-order neighborhoods and shortest path centers between hyperedges is input, and the aggregation of high-order hyperedges is guided by the same method; the principle of the binary nested convolution in step S4 is to use the low-order HyperGINE convolution result as the path (hyperedge) feature of the high-order HyperGINE through binary nested convolution to guide the message transmission between distant nodes and hyperedges.

[0165] Specifically, in K-hop node representation learning:

[0166] When the number of hops k of node aggregation is even, the preprocessed training graph data (including node features, node k-order neighborhoods, and the center node of the shortest path between nodes) is HyperGINE convolutional features Input into the corresponding benchmark model HyperGINE module, at this time, the k-th hop aggregation function of the l-th layer is expressed as:

[0167]

[0168] in, represents the k-th hop node aggregation function in the l-th layer KHGNN, Represents the current node v i The output of the aggregation function of the k-th hop node in the l-th layer, represents the node feature output of the l-1th layer KHGNN, Indicates the first layer of KHGNN The output of the jump node aggregation function, Respectively represent the node v i and v j No. Hop neighbor node set, node v i and The length of the shortest path between them varies from 0 to k, and the set Represents node vi The set of all nodes whose shortest path length is from 0 to k-1. At this time, Represents node v i The shortest path length is only a set of nodes k. When k = 0, node v i Establish a self-connection and inherit the characteristics of the previous layer, that is,

[0169] When the number of hops k of the node aggregation is an odd number, the preprocessed training graph data and the central hyperedge of the shortest path between nodes are HyperGINE convolutional features Input into the corresponding benchmark model HyperGINE module, at this time, node v i The k-th hop message passing is expressed as:

[0170]

[0171] in, Also following the node convolution of HyperGINE, it represents the k-th hop node aggregation function in the l-th layer KHGNN, Represents the current node v i The output of the aggregation function of the k-th hop node in the l-th layer, Indicates the first layer of KHGNN The output of the jump hyperedge aggregation function, f and g represent the learnable linear mapping, Represents node v i No. Hop neighbor super edge set, Represents the hyperedge e j No. Hop neighbor node set, Represents the distance from node v i The node set is smaller than k; at this time, Represents node v i The set of nodes whose shortest path length is only k;

[0172] In K-hop hyperedge representation learning:

[0173] In order to make HyperGINE applicable to hyperedge aggregation, the input hypergraph needs to be dually transformed. Through this transformation, the hyperedge e and node v in the hypergraph are converted into dual node e and dual hyperedge v in the dual hypergraph. At this time, HyperGINE can be directly applied to K-hop hyperedge representation learning. When the number of hops k of hyperedge aggregation is even, the preprocessed training graph data (including hyperedge features, k-order neighborhood of hyperedges) and the center hyperedge of the shortest path between hyperedges are transformed into the dual node e and dual hyperedge v in the dual hypergraph. HyperGINE convolutional features Input into the corresponding benchmark model HyperGINE, the hyperedge e b The corresponding hidden state Calculated by the following formula:

[0174]

[0175] in, According to the definition of hyperedge convolution in HyperGINE, it represents the hyperedge aggregation function of the kth hop in the lth layer KHGNN, Represents the hyperedge e b The set of hyperedges with distance less than k;

[0176] When the number of hops k of the hyperedge aggregation is an odd number, the preprocessed training graph data (including the hyperedge features, the k-order neighborhood of the hyperedge) and the central node of the shortest path between the hyperedges are HyperGINE convolutional features Input to the corresponding benchmark model HyperGINE module, the hyperedge k-hop hidden state It is given by the following formula:

[0177]

[0178] in, It is consistent with the definition of hyperedge convolution in HyperGINE, and represents the k-th hop hyperedge aggregation function in the l-th layer KHGNN.

[0179] Preferably, the steps S3 and S4 further include selectively adding relative degree coding during the polymerization process, and the specific process is as follows:

[0180] Defining a Hypergraph The k-th hop connectivity between its nodes is denoted as where ε k represents the high-order hyperedge constructed by binary nested convolution, and ε1 = ε (that is, the connection state of the most original graph, that is, the connection of the dataset graph itself, and the subsequent high-order k-order hyperedge ε k The shortest path center between nodes acts as the node v i and v j The kth hop relative degree between Defined as the number of hyperedges connecting two nodes in the kth 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 is, represents the k-th hop relative degree set between any nodes, that is, for node v i and v j The kth hop relative degree between have represents the k-th hop node aggregation function in the l-th layer KHGNN, represents the output of the previous layer of KHGNN, Represents the resulting latent variable of the k / 2-order low-order convolution of the current KHGNN layer, which is used to calculate the current k-order convolution;

[0185] Similarly, relative degree encoding can be added to the aggregation function of hyperedges in the same way.

[0186] Reference 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 binary nested convolution, the low-order convolution result is used as the input of the update function and reused as a path feature to guide the high-order neighborhood aggregation 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 the present invention is compared with graph neural networks such as HGNN, GAT, GatedGCN, PNA, DGN, EGT, GP and SAN in graph classification datasets. Among them, HGNN, GAT, GatedGCN, PNA, DGN are graph neural network methods based on message passing, and EGT, GP and SAN are graph neural network methods based on attention. Specifically, evaluation is performed on 9 graph datasets: ZINC, MNIST, CIFAR10, MolHIV, MolPCBA, PascalVOC-SP, Peptides-func, Peptides-struct and PCQM-Contact. It includes tasks such as graph classification, graph regression, node classification, etc. Table 1 is the dataset used for graph-level tasks, and 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 SOTA models on short-range graph benchmark datasets. The results are reported as the mean ± standard deviation of 5 random seeds. From Table 2, we can see that 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 show that compared with the attention mechanism, appropriate path features can more effectively model the relationship between nodes, thereby providing more suitable graph embeddings for downstream tasks.

[0194] Table 3

[0195]

[0196] Table 3 KHGNN results on 4 tasks from the long-range graph benchmark. Values ​​are expressed in percentages. From Table 3, it can be seen that KHGNN surpasses the locality constraints of traditional message passing by making information flow along all shortest paths. KHGNN uses its bisection nested convolution operator to capture the comprehensive features of nodes, edges, and structures in the path, so that long-range interactions can be modeled more accurately. This ability to encode multiple relationship paths enables KHGNN to outperform graph attention, producing the best results on all evaluated datasets. That is, the experimental effect of the method of the present invention on long-range graphs is better.

[0197] In summary, the method of the present invention has the following advantages:

[0198] (1) Enhanced representation of high-order relations: Nodes and hyperedges encapsulate key structural and connection information that reinforce each other, and the robust interaction between them seamlessly integrates low-order structural and connection details into high-order positional hyperedges, providing rich semantic information for modeling complex relations.

[0199] (2) Comprehensive path feature extraction: The convolution method embodies the dichotomy of the path. By iteratively nesting downward, the method effectively captures the features of the underlying nodes, hyperedges, and their related structures. Since the method synthesizes the upward path through the center point, it injects more extensive structural information and ensures a comprehensive path representation.

[0200] (3) Optimizing efficiency: As the receptive field of the aggregation expands, the increase in the number and length of paths poses a challenge to complex operators, which will incur huge computational and parameter overheads. 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] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. A path-based K-hop hypergraph neural network convolution method, characterized by: The method comprises: Step S1, creating a hypergraph neural network model for graph downstream tasks and initializing the model; Step S2, obtaining training graph data, and obtaining the shortest paths of different distances between nodes and their central nodes or hyperedges through the association matrix between nodes and hyperedges; similarly, obtaining the shortest paths between hyperedges and their central nodes or hyperedges; Step S3, inputting the training graph data into the HyperGINE module of the model, directly transferring the features to the target node by aggregating the node features on the hyperedges directly connected to the nodes and adding the features of the corresponding hyperedges; after the hypergraph undergoes dual transformation, the HyperGINE aggregation of the hyperedges is performed in the same manner; wherein the HyperGINE module includes a node representation learning module and a hyperedge representation learning module; Step S4, obtaining updated node features after low-order aggregation, using these low-order features as path features for high-order HyperGINE to aggregate the node K-hop neighborhood; obtaining corresponding aggregation representations of different hops after the hypergraph data undergoes dual transformation; Step S5, updating the features of the results of K-hop neighborhood aggregation of the nodes and hyperedges through the update layer; Step S6: extract the hypergraph features by stacking at least two KHGNN layers formed by steps S3, S4 and S5, and perform task prediction through an output network that matches the downstream task.

2. The path-based K-hop hypergraph neural network convolution method according to claim 1, characterized in that: When the downstream task is chemical molecular property prediction, the node is defined as an atomic node, the hyperedge is an atomic chemical bond, and the node features and hyperedge features of the input model are atomic features and bond features, respectively. The atomic features contain 9-dimensional information, specifically atomic number, atomic chirality label, total degree of the atom, atomic formal charge, the total number of hydrogen atoms connected to the atom, the number of unpaired electrons of the atom, the type of hybrid orbital 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 an indicator of whether the bond is a conjugated bond; The chemical molecular property prediction is to predict whether the target molecule has the property of inhibiting HIV virus replication based on the information of each atom in the molecule, and output the prediction result through the model output layer.

3. The path-based K-hop hypergraph neural network convolution method according to claim 1, characterized in that: In step S3, by inputting training graph data including node features, hyperedge features, node first-order neighborhood, hyperedge first-order neighborhood, and connection relationship between nodes and hyperedges, the node uses HyperGINE to aggregate its neighboring nodes and hyperedge information; after the dual transformation, the hyperedge aggregates the surrounding hyperedges and node information through HyperGINE.

4. The path-based K-hop hypergraph neural network convolution method according to claim 1, characterized in that: The update layer in step S5 is implemented using a two-layer perceptron.

5. The path-based K-hop hypergraph neural network convolution method according to claim 1, characterized in that: The output network in step S6 is implemented using a global average pooling layer and a MIP layer.

6. The path-based K-hop hypergraph neural network convolution method according to claim 1, characterized in that: The training hypergraph data is defined as in Represents a collection of nodes. ε represents the set of hyperedges, ε={e1,…,e m }, n and m represent the total number of nodes and hyperedges respectively, h v and h e Represent their respective feature embeddings. According to the association matrix between nodes and hyperedges, we obtain the shortest path connection relationship between nodes at different distances, as well as the central node or hyperedge of the shortest path between them. i The set of k-th hop neighbor nodes is defined as This includes all the i Starting from a node that is reachable through at least k hyperedges, move node v i The set of K-hop neighbor nodes is defined as Represents node v i The set of K-hop neighbor nodes of node v i The k-th hop neighbor hyperedge set of is defined as It contains all hyperedges reachable through at least k nodes and is represented by Indicates that it is directly connected to node v i connected hyperedges; Define hyperedge e b The k-th hop neighbor hyperedge set is This includes the hyperedge e through at least k nodes. b All hyperedges reachable by Represents the hyperedge e b The set of K-hop neighbor hyperedges, hyperedge e b The set of k-th hop neighbor nodes of in represents the direct and hyperedge e b Connected nodes.

7. The path-based K-hop hypergraph neural network convolution method according to claim 6, characterized in that: The node representation learning module is used to aggregate node features, and the corresponding HyperGINE formula is expressed as follows: Where f and g represent learnable linear mappings, which are used to transform node features h v and the hyperedge feature h e Mapped into similar feature space, Represents the hyperedge e b The set of all directly connected nodes, Represents node v i The set of all directly connected hyperedges, Indicates that on the hyperedge e b The connected nodes do not connect to node v i A collection of nodes that transmit information; The hyperedge representation learning module is used to learn hyperedges. First, the graph data is dually transformed, the nodes in the hypergraph are transformed into dual hyperedges corresponding to the dual hypergraph, and the hyperedges are transformed into dual nodes corresponding to the dual hypergraph. Under this transformation, the HyperGINE formula for updating the hyperedge features is as follows: in, Represents the hyperedge e b The set of all directly connected nodes, Represents node v i The set of all directly connected hyperedges, Indicates that at node v i The connected hyperedges do not go to hyperedge e b A collection of hyperedges that convey information.

8. The path-based K-hop hypergraph neural network convolution method according to claim 6, characterized in that: In the step S4, the training graph data obtained by preprocessing in step S2 is input, and the training graph data includes node features, node k-order neighborhoods, and the shortest path center between nodes. The shortest path center features extracted by low-order HyperGINE are used as path features to guide the aggregation of high-order nodes. For hyperedge features, the training graph data including hyperedge features, hyperedge k-order neighborhoods, and the shortest path center between hyperedges is input, and the aggregation of high-order hyperedges is guided by the same method. In K-hop node representation learning: When the number of hops k of the node aggregation is even, the preprocessed training graph data and the central node of the shortest path between nodes are HyperGINE convolutional features Input into the corresponding benchmark model HyperGINE module, at this time, the k-th hop aggregation function of the l-th layer is expressed as: in, represents the k-th hop node aggregation function in the l-th layer KHGNN, Represents the current node v i The output of the aggregation function of the k-th hop node in the l-th layer, represents the node feature output of the l-1th layer KHGNN, Indicates the first layer of KHGNN The output of the jump node aggregation function, Respectively represent the node v i and v j No. Hop neighbor node set, node v i and The length of the shortest path between them varies from 0 to k, and the set Represents node v i The set of all nodes whose shortest path length is from 0 to k-1. At this time, Represents node v i The shortest path length is only a set of nodes k. When k = 0, node v i Establish a self-connection and inherit the characteristics of the previous layer, that is, When the number of hops k of the node aggregation is an odd number, the preprocessed training graph data and the center hyperedge of the shortest path between nodes are HyperGINE convolutional features Input into the corresponding benchmark model HyperGINE module, at this time, the node v i The k-th hop message passing is expressed as: in, represents the k-th hop node aggregation function in the l-th layer KHGNN, Represents the current node v i The output of the aggregation function of the k-th hop node in the l-th layer, Indicates the first layer of KHGNN The output of the jump hyperedge aggregation function, f and g represent the learnable linear mapping, Represents node v i No. Hop neighbor super edge set, Represents the hyperedge e j No. Hop neighbor node set, Represents the distance from node v i The set of nodes less than k; Represents node v i The set of nodes whose shortest path length is only k; In K-hop hyperedge representation learning: The input hypergraph is subjected to a dual transformation. Through this transformation, the hyperedge e and node v in the hypergraph are converted into the dual node e and dual hyperedge v in the dual hypergraph. At this time, HyperGINE is directly applied to the K-hop hyperedge representation learning. When the number of hops k of the hyperedge aggregation is even, the preprocessed training graph data and the central hyperedge of the shortest path between hyperedges are used. HyperGINE convolutional features Input into the corresponding benchmark model HyperGINE, the hyperedge e b The corresponding hidden state Calculated by the following formula: in, represents the k-th hop hyperedge aggregation function in the l-th layer KHGNN, Represents the hyperedge e b The set of hyperedges with distance less than k; When the number of hops k of the hyperedge aggregation is an odd number, the preprocessed training graph data and the central node of the shortest path between the hyperedges are HyperGINE convolutional features Input to the corresponding benchmark model HyperGINE module, the hyperedge k-hop hidden state It is given by the following formula: in, represents the k-th hop hyperedge aggregation function in the l-th layer KHGNN.

9. The path-based K-hop hypergraph neural network convolution method according to claim 6, characterized in that: The HyperGINE module also includes selectively adding relative degree encoding during the aggregation process, the specific process is as follows: Defining a Hypergraph The k-th hop connectivity between its nodes is denoted as where ε k represents a high-order hyperedge constructed by binary nested convolution, and ε1=ε, node v i and v j The kth hop relative degree between Defined as the number of hyperedges connecting two nodes in the kth hop: Where |·| represents the cardinality of the set, the aggregation function of the node is modified as follows: in is with The corresponding learnable vector representation is, represents the k-th hop relative degree set between any nodes, that is, for node v i and v j The kth hop relative degree between have represents the k-th hop node aggregation function in the l-th layer KHGNN, represents the output of the previous layer of KHGNN, Represents the resulting latent variable of the k / 2-order low-order convolution of the current KHGNN layer, which is used to calculate the current k-order convolution; Similarly, relative degree encoding can be added to the aggregation function of hyperedges in the same way.

Citation Information

Patent Citations

  • Network fault prediction method and device based on self-supervised unwrapping hypergraph attention

    CN115174421A

  • Link prediction method based on hypergraph neural network

    CN118214707A

  • System and method for molecular property prediction using hypergraph message passing neural network (HMPNN)

    EP4120138A1

  • Conditioning graph neural networks on graph affinity measure features

    US20230281430A1