Hypergraph forgetting method based on hyperedge size selection and coverage rate aggregation

Through a method based on hyperedge size selection and coverage aggregation, the problem of balancing computational efficiency and model performance of hypergraph neural networks in large-scale hypergraph processing is solved, achieving efficient computation and accurate model output.

CN120706468AActive Publication Date: 2025-09-26SHANDONG UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510823301.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-09-26
Estimated Expiration
2045-06-19

AI Technical Summary

Technical Problem

Existing hypergraph neural network methods are computationally inefficient when processing large-scale hypergraphs, and existing partitioning methods fail to fully consider the size of hyperedges, making it difficult to balance computational efficiency and model performance.

Method used

Through a method based on hyperedge size selection and coverage aggregation, the hyperedges that account for the top 40% after sorting are selected as the core hyperedge set and distributed to the subgraph. The hypergraph neural network is used for independent training, and the weighted aggregation is performed in combination with the node coverage calculation weights to generate the model output.

Benefits of technology

It effectively improves computational efficiency and reduces computational overhead while maintaining the accuracy and stability of the model, especially showing better scalability when processing large-scale hypergraphs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120706468A_ABST
    Figure CN120706468A_ABST
Patent Text Reader

Abstract

The invention provides a hypergraph forgetting method based on hyperedge size selection and coverage rate aggregation, and belongs to the technical field of computer system models.The hypergraph forgetting method based on hyperedge size selection and coverage rate aggregation comprises the steps that an input hypergraph and a division number are received, and the hyperedge size of each hyperedge in the hypergraph is calculated; sorting the hyperedges in the hypergraph in a descending order according to the sizes of the hyperedges; selecting the hyperedges which account for forty percent of the first hyperedges after sorting as a core hyperedge set, and taking the rest hyperedges as a random hyperedge set; distributing the core hyperedge set to each sub-graph, and uniformly distributing the random hyperedge set to the sub-graphs in a non-overlapping manner; initializing node features in the sub-graph, wherein the node features are used for representing initial state information of nodes; according to the method, the problem of low calculation efficiency of an existing hypergraph neural network method during large-scale hypergraph processing can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer system models, and in particular relates to a hypergraph forgetting method based on hyperedge size selection and coverage aggregation. Background Art

[0002] Hypergraphs, as an important data structure, are widely used in fields such as social network analysis, knowledge graph processing, recommender systems, and bioinformatics. In microbial interaction networks, hypergraphs can be used to model complex, high-order relationships between microorganisms. For example, a method and apparatus for establishing a microbial high-order network based on a hypergraph clustering model reduces the hypergraph association matrix to obtain a connectivity matrix between vertices, thereby enabling cluster analysis between microorganisms. Hypergraphs have a wide range of applications in social network analysis, including community detection and event evolution. Hypergraphs can identify communities or groups within social networks. Because hyperedges can connect multiple nodes, they can more effectively represent high-order relationships between users. In protein interaction networks (PPIs), hypergraphs can be used to represent protein-protein interactions. Each molecular species is represented as a node, and each reaction as a hyperlink connecting all involved molecular species. This representation allows for a more natural representation of biochemical reaction networks. In genome-scale metabolic networks, hypergraph learning is used to tease out missing reactions in the network. Metabolic networks, or any biochemical reaction network, have a very natural hypergraph representation, where each molecular species is a node and each reaction is a hyperlink connecting all involved molecular species.

[0003] With the rapid growth of data, hypergraph processing and analysis face enormous computational challenges. Hypergraph neural networks, as an emerging deep learning model, have achieved remarkable results in tasks such as node classification and link prediction by learning features and transferring information from hypergraph structures.

[0004] However, existing hypergraph neural network methods suffer from low computational efficiency when processing large-scale hypergraphs. Current mainstream solutions include sampling and partitioning. Sampling methods construct subgraphs for training by randomly selecting some nodes or hyperedges, but this method is prone to losing important structural information, resulting in degraded model performance. Partitioning methods divide the hypergraph into multiple subgraphs for separate training. While this can improve computational efficiency, the lack of an effective information sharing mechanism often leads to inconsistencies in the training results between subgraphs. Especially when processing hypergraphs with complex high-order relationships, improving computational efficiency while ensuring model performance has become a key difficulty in current research. Furthermore, most existing hypergraph partitioning methods use random partitioning or heuristic methods based on node degree, failing to fully consider the important feature of hyperedge size. This can result in the partitioning results potentially destroying key structural information of the original hypergraph. Therefore, achieving efficient computation and maintaining model performance during hypergraph neural network training is a technical problem that needs to be urgently addressed. Summary of the Invention

[0005] In view of this, the present invention provides a hypergraph forgetting method based on hyperedge size selection and coverage aggregation, which can solve the problem of low computational efficiency of existing hypergraph neural network methods when processing large-scale hypergraphs.

[0006] The present invention is achieved in that:

[0007] The present invention provides a hypergraph forgetting method based on hyperedge size selection and coverage aggregation, which includes the following steps:

[0008] S10, receiving an input hypergraph and a partition number, and calculating a hyperedge size for each hyperedge in the hypergraph;

[0009] S20, sorting the hyperedges in the hypergraph in descending order according to the size of the hyperedges;

[0010] S30, selecting the hyperedges that account for the top 40% after sorting as a core hyperedge set, and the remaining hyperedges as a random hyperedge set;

[0011] S40, distributing the core hyperedge set to each subgraph, and distributing the random hyperedge set to the subgraph evenly and without overlap;

[0012] S50, initializing node features in the subgraph, where the node features are used to represent initial state information of the nodes;

[0013] S60, independently training each of the subgraphs using a hypergraph neural network, updating the node features through layer-by-layer feature propagation, and obtaining final node features of each of the subgraphs;

[0014] S70, calculating the node coverage rate in each of the subgraphs, where the node coverage rate is the ratio of the number of nodes in the subgraph to the number of nodes in the hypergraph;

[0015] S80, calculating the weight of each subgraph based on the node coverage;

[0016] S90: Perform weighted aggregation on the final node features of each subgraph according to the weight to generate a model output.

[0017] The present invention provides a hypergraph forgetting method based on hyperedge size selection and coverage aggregation, achieving the following technical benefits: The proposed hypergraph forgetting method, based on hyperedge size selection and coverage aggregation, effectively addresses the challenge of balancing computational efficiency and model performance in hypergraph neural networks for large-scale data processing. First, by introducing hyperedge size as a core metric and combining node average degree and clustering coefficient to rank hyperedge importance, this method achieves a rational partitioning of the hypergraph structure. Experimental results demonstrate that selecting 40% of core hyperedges preserves the key structural features of the hypergraph while significantly reducing computational overhead. Second, a core hyperedge sharing mechanism ensures that each subgraph contains key structural information, effectively avoiding the information loss that can occur with random partitioning methods. Third, by introducing a weighted aggregation strategy based on node coverage, the contributions of different subgraphs are fully considered, improving the accuracy and stability of the model output. Experimental results on a standard dataset demonstrate that compared to existing methods, this method reduces training time by approximately 40% while maintaining comparable accuracy. The present invention exhibits improved scalability, particularly when processing large-scale hypergraphs. Furthermore, the proposed method is versatile and can be used in conjunction with different types of hypergraph neural network models, expanding its scope of application. Through rational hyperedge selection and effective feature aggregation, the present invention achieves a good balance between computational efficiency and model performance, providing a practical solution for processing large-scale hypergraph data.

[0018] On the basis of the above technical solution, the hypergraph forgetting method based on hyperedge size selection and coverage aggregation of the present invention can also be improved as follows:

[0019] Wherein, the step S10 specifically includes:

[0020] Step 101: Receive an original hypergraph data structure, the original hypergraph data structure including a node set and a hyperedge set, and receive a preset partition value, the preset partition value is determined according to data scale and computing resources;

[0021] Step 102: Establish a hash table data structure for storing the hyperedge size information, wherein the key value of the hash table data structure is the hyperedge number, and the storage value of the hash table data structure is the hyperedge size;

[0022] Step 103: Count the nodes of each hyperedge, obtain the hyperedge size information, and store the hyperedge size information in the hash table data structure;

[0023] Step 104: introducing a node validity judgment function to filter invalid nodes and abnormal nodes in the hyperedge;

[0024] Step 105: adopt a parallel computing strategy to process the hyperedge set in blocks, with each computing unit responsible for the node counting task of a subset, thereby improving computing efficiency.

[0025] Furthermore, the step S20 specifically includes:

[0026] Step 201: construct a ranking score function, wherein the ranking score function includes a hyperedge size term, a node average degree term, and a clustering coefficient term;

[0027] Step 202: Calculate the node average degree of each hyperedge, where the node average degree is calculated using an arithmetic mean method.

[0028] Step 203: Calculate the clustering coefficient of each hyperedge, where the clustering coefficient is calculated using a local density evaluation method.

[0029] Step 204: sort the hyperedges in descending order using an improved quick sort algorithm, wherein the quick sort algorithm selects the middle element as a reference value;

[0030] Step 205: Establish a secondary sorting rule, which considers the hyperedge number and creation time in turn to handle the case of the same score.

[0031] Furthermore, the step S30 specifically includes:

[0032] Step 301: Determine a selection threshold based on the sorting result, where the selection threshold is determined by the total number of hyperedges and a preset selection ratio.

[0033] Step 302: Mark the top 40% of the hyperedges in the sorting results as core hyperedges, and construct a core hyperedge set;

[0034] Step 303: Mark the remaining 60% of hyperedges as random hyperedges to construct a random hyperedge set;

[0035] Step 304: Introduce a boundary processing mechanism. When hyperedges with the same ranking score cross the selection threshold, all hyperedges with the same score are grouped into the same set.

[0036] Step 305: Verify the connectivity of the core hyperedge set to ensure that there is no isolated subgraph structure.

[0037] Furthermore, the step S40 specifically includes:

[0038] Step 401: copy the core hyperedge set into each subgraph to construct the initial structure of the subgraph;

[0039] Step 402: Using a cyclic allocation strategy, sequentially allocate hyperedges in the random hyperedge set to different subgraphs;

[0040] Step 403: Introduce a load balancing mechanism to record the number of hyperedges currently contained in each subgraph and give priority to allocating resources to subgraphs with fewer hyperedges.

[0041] Step 404: Maintain an allocation mapping table to record the subgraph number assigned to each hyperedge to ensure that there is no duplicate allocation;

[0042] Step 405: Verify the structural characteristics of each subgraph, including the calculation and evaluation of node coverage and edge density indicators.

[0043] Furthermore, the step S50 specifically includes:

[0044] Step 501: Initialize node intrinsic characteristics, which include node attribute information and external data source characteristics;

[0045] Step 502: Calculate node neighbor information, and perform feature aggregation on the neighbor information using an average pooling method;

[0046] Step 503: Generate node position codes, where the position codes are calculated using a sine-cosine coding method.

[0047] Step 504: Fusing the inherent features, the neighbor information, and the position code to obtain an initial node feature matrix;

[0048] Step 505: normalize the initial node feature matrix to ensure that features from different sources have similar value ranges.

[0049] Furthermore, the step S60 specifically includes:

[0050] Step 601: Construct a hypergraph neural network model, wherein the hypergraph neural network model includes multiple feature propagation layers;

[0051] Step 602: Using a batch gradient descent algorithm to perform model training, wherein the learning rate of the batch gradient descent algorithm adopts a decay strategy;

[0052] Step 603: Introduce a residual connection mechanism to combine features from different layers to improve training effect;

[0053] Step 604: Use an early stopping strategy to terminate training early when the validation set performance indicator does not improve for multiple consecutive rounds.

[0054] Step 605: Post-process the node features of each subgraph, including feature normalization and outlier processing operations.

[0055] Furthermore, the step S70 specifically includes:

[0056] Step 701: Calculate the ratio of the number of nodes in each subgraph to the number of nodes in the original hypergraph;

[0057] Step 702: Calculate the quality factor of each subgraph, where the quality factor takes into account the importance of the node;

[0058] Step 703: Maintain node access counts and record the number of times each node appears in different subgraphs.

[0059] Step 704: introduce a connection number threshold. When the number of connections of a node in the subgraph is lower than the connection number threshold, the node is not counted in the coverage rate.

[0060] Step 705: Calculate the final node coverage by combining the node quantity ratio and the quality factor.

[0061] Furthermore, the step S80 specifically includes:

[0062] Step 801: Set the initial value of the temperature parameter, which is updated using an exponential decay strategy.

[0063] Step 802: Calculate the weight of each subgraph based on the node coverage and the temperature parameter;

[0064] Step 803: introduce a minimum weight constraint to ensure that the weight of each subgraph is not less than a preset threshold;

[0065] Step 804: normalize the weights so that the sum of all weights is equal to 1;

[0066] Step 805: Verify the rationality of weight allocation and evaluate the impact of weights on feature aggregation.

[0067] Furthermore, the step S90 specifically includes:

[0068] Step 901: Calculate a global information matrix, where the global information matrix is ​​obtained using an average pooling method.

[0069] Step 902: Align features of different sub-graphs to ensure that the features have the same dimension and scale;

[0070] Step 903: Introduce a feature selection mechanism to screen and combine features based on their importance.

[0071] Step 904: performing weighted summation on the subgraph features based on the weights, and introducing the global information matrix for supplementation;

[0072] Step 905: Generate a final model output, where the model output includes the fused node feature representation.

[0073] 1. The calculation process of the hyperedge size is as follows:

[0074] S e =∑ v∈e 1;

[0075] Where S e is the size of the hyperedge e; v is a node; e is a hyperedge; this formula represents the calculation of the number of nodes contained in the hyperedge.

[0076] 2. The hyperedge ranking score is calculated as follows:

[0077] R e =S e +αD e +βC e ;

[0078] Where R e is the ranking score of hyperedge e; S e is the size of the hyperedge; D e is the average degree of hyperedge nodes; C e is the clustering coefficient of the hyperedge; α, β are weight coefficients, ranging from 0 to 1; this formula takes into account the multidimensional characteristics of the hyperedge, making the sorting more reasonable.

[0079] 3. Node feature initialization process:

[0080] X (0) =F I +γN+δP;

[0081] Where, X (0) is the initial node feature matrix; F I is the inherent feature of the node; N is the neighbor information of the node; P is the position code of the node; γ and δ are balance parameters with values ​​ranging from 0 to 1; this initialization method integrates multi-source information.

[0082] 4. Feature propagation process of hypergraph neural network:

[0083]

[0084] Where, X (l) is the node feature matrix of the first layer; D v is the node degree diagonal matrix; D fis the hyperedge degree diagonal matrix; H is the incidence matrix; W (l) is the weight matrix of the lth layer; σ is the activation function; ∈ (l) is the error term of the lth layer, ranging from 0 to 0.1.

[0085] 5. Node coverage calculation:

[0086]

[0087] Where C i is the node coverage of subgraph i; |V i | is the number of nodes in subgraph i; |V| is the number of nodes in the original hypergraph; Q i is the quality factor of subgraph i; λ is an adjustment parameter ranging from 0 to 0.5; this formula takes into account the quantity ratio and quality factors.

[0088] 6. Subgraph weight calculation:

[0089]

[0090] Where w i is the weight of subgraph i; C i is the node coverage of subgraph i; τ is the temperature parameter, ranging from 0.1 to 1; k is the number of subgraphs; the formula is normalized using the softmax function.

[0091] 7. Final feature aggregation calculation:

[0092]

[0093] Where, F final is the final aggregate feature; w i is the weight of subgraph i; is the final layer feature of subgraph i; L is the total number of layers; M is the global information matrix; μ is the global information weight, ranging from 0 to 0.3.

[0094] The design principles and innovations of these formulas are as follows:

[0095] The hyperedge ranking score formula considers three dimensions: size, degree, and clustering coefficient, which is more comprehensive than the traditional method that only considers size;

[0096] Node feature initialization integrates inherent features, neighbor information and position encoding to improve the expressiveness of features;

[0097] The feature propagation process uses a normalized Laplace operator and introduces an error term to enhance robustness;

[0098] The node coverage calculation takes into account both quantity ratio and quality factors, making the evaluation more accurate;

[0099] The weight calculation uses a softmax function with a temperature parameter, which can adjust the smoothness of the weight distribution;

[0100] The final feature aggregation introduces a global information matrix, which helps maintain global consistency.

[0101] Compared with the prior art, the formula system of the present invention has the following advantages:

[0102] Consider more comprehensive factors and integrate multi-dimensional features;

[0103] Introducing multiple adjustable parameters to make it more adaptable;

[0104] The addition of error terms and quality factors improves robustness;

[0105] A temperature regulation mechanism is designed to control the weight distribution;

[0106] Incorporate global information and balance local and global features.

[0107] The following is the process of deriving and establishing each equation or formula:

[0108] 1. Derivation of the formula for calculating the size of the hyperedge:

[0109] The most basic calculation of hyperedge size is a simple count:

[0110] S e =∑ v∈e 1;

[0111] This is a basic statistic obtained directly by enumerating the nodes in the hyperedge and counting them.

[0112] 2. Derivation process of the hyperedge ranking score calculation formula:

[0113] First consider a single hyperedge size:

[0114]

[0115] Then introduce the node average degree information:

[0116]

[0117] Finally, add the clustering coefficient term to get the complete form:

[0118] R e =S e +αD e +βC e ;

[0119] in:

[0120] Node average degree calculation:

[0121]

[0122] Where, d v is the degree of node v; |e| is the number of nodes in hyperedge e;

[0123] Clustering coefficient calculation:

[0124]

[0125] Where u~v means nodes u and v are connected. 3. Derivation of node feature initialization process: Basic feature representation:

[0126]

[0127] Add neighbor information:

[0128]

[0129] Finally, position encoding is introduced:

[0130] X (0) =F I +γN+δP;

[0131] in:

[0132] Neighbor information aggregation:

[0133]

[0134] Positional encoding calculation:

[0135] P i,2k =sin(i / 10000 2k / d );

[0136] P i,2k+1 =cos(i / 10000 2k / d ).

[0137] 4. Hypergraph Neural Network Feature Propagation Derivation: Initial Propagation Form:

[0138]

[0139] Add degree normalization:

[0140]

[0141] Introducing learnable weights:

[0142]

[0143] Finally, add the activation function and error term:

[0144] 5. Node coverage calculation derivation:

[0145] Basic coverage:

[0146]

[0147] Introducing quality factor:

[0148]

[0149] The quality factor is calculated as:

[0150]

[0151] d v Represents the degree of node v.

[0152] 6. Derivation of subgraph weight calculation:

[0153] Initial weights:

[0154]

[0155] Normalization processing:

[0156]

[0157] Introducing temperature parameters to achieve soft allocation:

[0158] 7. Final feature aggregation calculation derivation:

[0159] Basic weighted sum:

[0160]

[0161] Introducing global information:

[0162]

[0163] The global information matrix is ​​calculated as:

[0164]

[0165] Supplementary instructions for parameter acquisition:

[0166] 1. α and β are optimized on the validation set through grid search;

[0167] 2. γ and δ are obtained through back-propagation training;

[0168] 3. τ is set through experience, with an initial value of 1 and decreases with each training round;

[0169] 4. μ is determined through ablation experiments on the validation set;

[0170] 5. W (l) Learned through model training;

[0171] 6.∈ (l) The noise is generated using Gaussian noise with a mean of 0 and a variance of 0.01.

[0172] The effects of these equations are:

[0173] 1. The hyperedge ranking score calculation takes structural features into account and can better identify important hyperedges;

[0174] 2. Feature initialization integrates multi-source information to provide richer node representation;

[0175] 3. The feature propagation process enhances the feature extraction capability through normalization and nonlinear transformation;

[0176] 4. Coverage calculation combined with structural importance makes the division more reasonable;

[0177] 5. The weight calculation adopts a soft allocation mechanism to avoid the information loss caused by hard partitioning;

[0178] 6. Feature aggregation maintains a balance between local features and global consistency.

[0179] Compared to existing technologies, the hypergraph forgetting method based on hyperedge size selection and coverage aggregation proposed by the present invention offers the following advantages: The proposed hypergraph forgetting method effectively addresses the challenge of balancing computational efficiency and model performance in hypergraph neural networks for large-scale data processing. First, by introducing hyperedge size as a core metric and combining node average degree and clustering coefficient to rank hyperedge importance, a rational partitioning of the hypergraph structure is achieved. Experimental results show that selecting 40% of core hyperedges preserves the key structural features of the hypergraph while significantly reducing computational overhead. Second, a core hyperedge sharing mechanism ensures that each subgraph contains key structural information, effectively avoiding the information loss that can occur with random partitioning methods. Third, by introducing a weighted aggregation strategy based on node coverage, the contributions of different subgraphs are fully considered, improving the accuracy and stability of the model output. Experimental results on a standard dataset show that compared with existing methods, the present invention reduces training time by approximately 40% while maintaining comparable accuracy. The present invention exhibits improved scalability, particularly when processing large-scale hypergraphs. Furthermore, the proposed method is versatile and can be used in conjunction with different types of hypergraph neural network models, expanding its scope of application. Through rational hyperedge selection and effective feature aggregation, the present invention achieves a good balance between computational efficiency and model performance, providing a practical solution for processing large-scale hypergraph data. BRIEF DESCRIPTION OF THE DRAWINGS

[0180] Figure 1 Flowchart of a hypergraph forgetting method based on hyperedge size selection and coverage aggregation;

[0181] Figure 2 This is a flowchart of Example 3 of a hypergraph forgetting method based on hyperedge size selection and coverage aggregation. DETAILED DESCRIPTION

[0182] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0183] like Figure 1 FIG. 1 is a flow chart of a hypergraph forgetting method based on hyperedge size selection and coverage aggregation provided by the present invention. The process includes the following steps:

[0184] S10, receiving an input hypergraph and a partition number, and calculating a hyperedge size for each hyperedge in the hypergraph;

[0185] S20, sorting the hyperedges in the hypergraph in descending order according to the size of the hyperedges;

[0186] S30, selecting the hyperedges that account for the top 40% after sorting as the core hyperedge set, and the remaining hyperedges as the random hyperedge set;

[0187] S40, assigning the core hyperedge set to each subgraph, and assigning the random hyperedge set to the subgraph evenly and without overlap;

[0188] S50, initializing node features in the subgraph, where the node features are used to represent initial state information of the nodes;

[0189] S60: Use a hypergraph neural network to independently train each subgraph, update node features through layer-by-layer feature propagation, and obtain the final node features of each subgraph;

[0190] S70, calculating the node coverage in each subgraph, where the node coverage is the ratio of the number of nodes in the subgraph to the number of nodes in the hypergraph;

[0191] S80, calculating the weight of each subgraph based on the node coverage;

[0192] S90: Perform weighted aggregation on the final node features of each subgraph according to the weights to generate model output.

[0193] In the above technical solution, step S10 specifically includes:

[0194] Step 101: Receive an original hypergraph data structure, which includes a node set and a hyperedge set, and receive a preset partition value, which is determined based on data scale and computing resources;

[0195] Step 102: Establish a hash table data structure for storing hyperedge size information, where the key value of the hash table data structure is the hyperedge number, and the storage value of the hash table data structure is the hyperedge size;

[0196] Step 103: Count the nodes of each hyperedge, obtain the hyperedge size information, and store the hyperedge size information in a hash table data structure;

[0197] Step 104: introduce a node validity judgment function to filter out invalid nodes and abnormal nodes in the hyperedge;

[0198] Step 105: adopt a parallel computing strategy to divide the hyperedge set into blocks for processing, with each computing unit responsible for the node counting task of a subset, thereby improving computing efficiency.

[0199] Furthermore, in the above technical solution, step S20 specifically includes:

[0200] Step 201: construct a ranking score function, which includes a hyperedge size term, a node average degree term, and a clustering coefficient term;

[0201] Step 202: Calculate the node average degree of each hyperedge, where the node average degree is calculated using the arithmetic mean method.

[0202] Step 203: Calculate the clustering coefficient of each hyperedge, where the clustering coefficient is calculated using a local density evaluation method.

[0203] Step 204: sort the hyperedges in descending order using an improved quick sort algorithm, where the quick sort algorithm selects the middle element as the reference value;

[0204] Step 205: Establish a secondary sorting rule, which considers the hyperedge number and creation time in turn to handle the case of the same score.

[0205] Furthermore, in the above technical solution, step S30 specifically includes:

[0206] Step 301: Determine a selection threshold based on the sorting result, where the selection threshold is determined by the total number of hyperedges and a preset selection ratio.

[0207] Step 302: Mark the top 40% of the hyperedges in the sorting results as core hyperedges, and construct a core hyperedge set;

[0208] Step 303: Mark the remaining 60% of hyperedges as random hyperedges to construct a random hyperedge set;

[0209] Step 304: Introduce a boundary processing mechanism. When hyperedges with the same ranking score cross a selection threshold, all hyperedges with the same score are grouped into the same set.

[0210] Step 305: Verify the connectivity of the core hyperedge set to ensure that there is no isolated subgraph structure.

[0211] Furthermore, in the above technical solution, step S40 specifically includes:

[0212] Step 401: Copy the core hyperedge set into each subgraph to construct the initial structure of the subgraph;

[0213] Step 402: Using a cyclic allocation strategy, allocate hyperedges in the random hyperedge set to different subgraphs in turn;

[0214] Step 403: Introduce a load balancing mechanism to record the number of hyperedges currently contained in each subgraph and give priority to allocating resources to subgraphs with fewer hyperedges.

[0215] Step 404: Maintain an allocation mapping table to record the subgraph number assigned to each hyperedge to ensure that there is no duplicate allocation;

[0216] Step 405: Verify the structural characteristics of each subgraph, including the calculation and evaluation of node coverage and edge density indicators.

[0217] Furthermore, in the above technical solution, step S50 specifically includes:

[0218] Step 501: Initialize node intrinsic features, which include node attribute information and external data source features;

[0219] Step 502: Calculate node neighbor information, and perform feature aggregation on the neighbor information using the average pooling method;

[0220] Step 503: Generate node position codes, where the position codes are calculated using a sine-cosine coding method.

[0221] Step 504: Integrate inherent features, neighbor information, and position encoding to obtain an initial node feature matrix;

[0222] Step 505: Normalize the initial node feature matrix to ensure that features from different sources have similar value ranges.

[0223] Furthermore, in the above technical solution, step S60 specifically includes:

[0224] Step 601: Build a hypergraph neural network model, which includes multiple feature propagation layers.

[0225] Step 602: Use a batch gradient descent algorithm to train the model, and the learning rate of the batch gradient descent algorithm adopts a decay strategy;

[0226] Step 603: Introduce a residual connection mechanism to combine features from different layers to improve training effect;

[0227] Step 604: Use an early stopping strategy to terminate training early when the validation set performance indicator does not improve for multiple consecutive rounds.

[0228] Step 605: Post-process the node features of each subgraph, including feature normalization and outlier processing operations.

[0229] Furthermore, in the above technical solution, step S70 specifically includes:

[0230] Step 701: Calculate the ratio of the number of nodes in each subgraph to the number of nodes in the original hypergraph;

[0231] Step 702: Calculate the quality factor of each subgraph, where the quality factor takes into account the importance of the node;

[0232] Step 703: Maintain node access counts and record the number of times each node appears in different subgraphs.

[0233] Step 704: introduce a connection number threshold. When the number of connections of a node in the subgraph is lower than the connection number threshold, it is not counted in the coverage rate.

[0234] Step 705: Calculate the final node coverage by combining the node quantity ratio and the quality factor.

[0235] Furthermore, in the above technical solution, step S80 specifically includes:

[0236] Step 801: Set the initial value of the temperature parameter, and update the temperature parameter using an exponential decay strategy;

[0237] Step 802: Calculate the weight of each subgraph based on the node coverage and temperature parameters;

[0238] Step 803: introduce a minimum weight constraint to ensure that the weight of each subgraph is not less than a preset threshold;

[0239] Step 804: normalize the weights so that the sum of all weights is equal to 1;

[0240] Step 805: Verify the rationality of weight allocation and evaluate the impact of weights on feature aggregation.

[0241] Furthermore, in the above technical solution, step S90 specifically includes:

[0242] Step 901: Calculate the global information matrix, which is obtained by using the average pooling method;

[0243] Step 902: Align features of different sub-graphs to ensure that the features have the same dimension and scale;

[0244] Step 903: Introduce a feature selection mechanism to screen and combine features based on their importance.

[0245] Step 904: perform weighted summation on the subgraph features based on the weights, and introduce a global information matrix for supplementation;

[0246] Step 905: Generate the final model output, which includes the fused node feature representation.

[0247] The specific implementation of step S10 is to receive the input hypergraph and the number of partitions, and calculate the size of each hyperedge in the hypergraph. First, the system receives the original hypergraph data structure, which contains a node set and a hyperedge set, and receives a preset partition value. The partition value is usually set between 2 and 8, and the specific value needs to be weighed according to the data scale and computing resources. Then, the size of each hyperedge is calculated. The calculation of the hyperedge size adopts the node counting method, which is obtained by traversing the nodes contained in the hyperedge and accumulating them. The specific calculation formula is Se =E v∈e 1, where S e Represents the size of the hyperedge e, and v represents the node. In practical applications, the calculation of the hyperedge size needs to take into account the validity of the node, so a node validity judgment function is introduced, which is used to filter invalid or abnormal nodes. In addition, in order to improve computing efficiency, the system adopts a parallel computing strategy to divide the hyperedge set into blocks, and each computing unit is responsible for the node counting task of a subset. Finally, the calculated hyperedge size information is stored in a data structure for subsequent sorting operations. The main purpose of this step is to obtain the basic feature information of the hyperedge and provide an important basis for the subsequent hyperedge selection and allocation. In the specific implementation, the hash table data structure is used by default to store the hyperedge size information for fast query and update. The time complexity of the hyperedge size calculation is O(|E|·|V max |), where |E| is the number of hyperedges, |V max | is the number of nodes contained in the maximum hyperedge.

[0248] The specific implementation of step S20 is to sort the hyperedges in the hypergraph in descending order according to the hyperedge size. Based on the hyperedge size information calculated in step S10, the system needs to sort all hyperedges. The sorting process first constructs the sorting score calculation formula R e =S e +αD e +βC e , where R e is the ranking score of hyperedge e, S e is the hyperedge size, D e is the average degree of hyperedge nodes, C e is the clustering coefficient of the hyperedge. Parameters α and β are weight coefficients, which are obtained by grid search method optimization on the validation set, ranging from 0 to 1, and the default initial value is set to 0.5. e The calculation adopts the arithmetic mean method, and the specific calculation formula is: where d v Represents the degree of node v. Clustering coefficient C e The calculation adopts the local density evaluation method, and the specific calculation formula is: The sorting algorithm used is a modified quick sort algorithm, which has good performance when processing large amounts of data. To handle the possibility of identical scores during the sorting process, the system introduces a secondary sorting rule that considers factors such as hyperedge ID and creation time. The sorted results are stored in descending order to facilitate subsequent hyperedge selection. This step primarily establishes a ranking of hyperedge importance, providing a basis for selecting core hyperedges. The time complexity of hyperedge sorting is O(|E|log|E|), where |E| is the number of hyperedges.

[0249] The specific implementation of step S30 is to select the hyperedges that account for the top 40% after sorting as the core hyperedge set, and the remaining hyperedges as the random hyperedge set. According to the sorting result obtained in step S20, the system needs to determine the selection ratio of core hyperedges. Through experimental verification, setting the selection ratio to 40% can achieve a good balance between maintaining key structural information and controlling computational overhead. The selection process of core hyperedges first calculates the selection threshold, and the threshold position is determined by the total number of hyperedges and the selection ratio. Then, the hyperedges that account for the top 40% of the sorting results are marked as core hyperedges, and the core hyperedge set E is constructed. mandatory The remaining 60% hyperedges form a random hyperedge set E remaining To ensure the stability of the selection results, the system introduces a boundary processing mechanism. When hyperedges with the same ranking score cross the selection threshold, the consistency principle is applied to classify all hyperedges with the same score into the same set. In addition, the system also needs to verify the connectivity of the core hyperedge set to ensure that no isolated subgraph structures appear. The purpose of this step is to achieve hyperedge classification and provide a foundation for subsequent subgraph construction. The time complexity of hyperedge selection is O(|E|).

[0250] The specific implementation of step S40 is to distribute the core hyperedge set to each subgraph, and distribute the random hyperedge set to the subgraph evenly and without overlap. mandatory Copy to each subgraph to ensure that each subgraph contains important structural information. Then, for a random hyperedge set E remaining Perform uniform distribution, and the distribution process adopts a cyclic distribution strategy to distribute random hyperedges to different subgraphs in turn. In order to ensure the uniformity of distribution, the system introduces a load balancing mechanism to record the number of hyperedges currently contained in each subgraph, and give priority to allocating hyperedges to subgraphs with fewer hyperedges. At the same time, the system needs to maintain an allocation mapping table to record the subgraph number to which each hyperedge is assigned to ensure that there is no repeated allocation. In the distribution process, the connectivity constraints of the subgraphs also need to be considered to avoid the generation of non-connected subgraph structures as much as possible. After the distribution is completed, the system verifies the structural characteristics of each subgraph, including indicators such as node coverage and edge density, to ensure the rationality of the distribution results. The main purpose of this step is to achieve effective partitioning of the hypergraph and provide a basis for subsequent independent training. The time complexity of hyperedge allocation is O(|E remaining |).

[0251] The specific implementation of step S50 is to initialize the node features in the subgraph. The node features are used to represent the initial state information of the node. The node feature initialization adopts the multi-source information fusion method. The specific calculation formula is X (0) =F I +γN+δP, where X (0) is the initial node feature matrix, F Iis the inherent feature of the node, N is the neighbor information of the node, and P is the position code. Parameters N and δ are balance parameters obtained through back propagation training and range from 0 to 1. Intrinsic feature F I Contains the attribute information of the node, which can be a predefined feature vector or a feature representation obtained from an external data source. The calculation of the neighbor information N uses the average pooling method, and the specific formula is in Represents the neighbor set of node i. The position code P uses the sine-cosine coding method, and the calculation formula is P i,2k =sin(i / 10000 2k / d ) and P i,2k+1 =cos(i / 10000 2k / d ), where d is the feature dimension. During initialization, the system also performs feature normalization to ensure that features from different sources have similar numerical ranges. The main purpose of this step is to provide a rich initial feature representation for the node, laying the foundation for subsequent feature propagation. The time complexity of node feature initialization is O(|V|·d), where |V| is the number of nodes and d is the feature dimension.

[0252] The specific implementation of step S60 is to use a hypergraph neural network to independently train each subgraph, update the node features through layer-by-layer feature propagation, and obtain the final node features of each subgraph. The core formula of the feature propagation process is where X (l) is the node feature matrix of the lth layer, D v is the node degree diagonal matrix, D f is the hyperedge degree diagonal matrix, H is the incidence matrix, W (l) is the weight matrix of the lth layer, σ is the activation function, ∈ (l) is the error term of the lth layer. The training process adopts the batch gradient descent algorithm, the initial value of the learning rate is set to 0.01, and the learning rate decay strategy is used. Each training round includes two stages: forward propagation and backpropagation. The forward propagation stage calculates the update of node features, and the backpropagation stage calculates the gradient and updates the model parameters. In order to improve the training effect, the system adopts a residual connection mechanism to combine the features of different layers. At the same time, the early stopping strategy is introduced. When the performance indicators on the validation set have not improved for multiple consecutive rounds, the training process is terminated early. After the training is completed, the node features of each subgraph are post-processed, including feature normalization and outlier processing. The main purpose of this step is to learn the deep feature representation of the nodes in each subgraph. The time complexity of feature propagation is O(L·|E|·d), where L is the number of layers.

[0253] The specific implementation of step S70 is to calculate the node coverage in each subgraph. The node coverage is the ratio of the number of nodes in the subgraph to the number of nodes in the hypergraph. The calculation of the node coverage adopts an improved ratio calculation method. The specific formula is: Among them C i is the node coverage of subgraph i, |V i | is the number of nodes in subgraph i, |V| is the number of nodes in the original hypergraph, Q i is the quality factor of subgraph i, and λ is the adjustment parameter. i The calculation of takes into account the importance of the node, and the specific formula is During coverage calculation, the system maintains node access counts, recording the number of times each node appears in different subgraphs. A threshold mechanism is also introduced: if a node's number of connections in a subgraph falls below a threshold, the node is excluded from coverage calculation. This step primarily assesses the quality of the subgraph partitioning and provides a basis for subsequent weight calculations. The time complexity of coverage calculation is O(k·|V|), where k is the number of subgraphs.

[0254] The specific implementation of step S80 is to calculate the weight of each subgraph based on the node coverage. The weight calculation uses the softmax function based on the temperature parameter, and the specific formula is: where w i is the weight of subgraph i, C i is the node coverage of subgraph i, and τ is the temperature parameter. The temperature parameter τ is set empirically, initially set to 1, and decreases exponentially with each training round. During weight calculation, the system ensures that the sum of all weights is 1, satisfying the probability distribution requirements. Furthermore, a minimum weight constraint is introduced to ensure that the weight of each subgraph is not too small, thus preventing loss of valid information. The main purpose of this step is to assign appropriate importance weights to different subgraphs and provide guidance for feature aggregation. The time complexity of weight calculation is O(k).

[0255] The specific implementation of step S90 is to perform weighted aggregation on the final node features of each subgraph according to the weights to generate the model output. Feature aggregation adopts the weighted summation method and introduces global information supplement. The specific formula is: Among them F final is the final aggregate feature, w i is the weight of subgraph i, is the final layer feature of subgraph i, M is the global information matrix, and μ is the global information weight. The calculation of the global information matrix M adopts the average pooling method, and the specific formula is During the aggregation process, the system must align features to ensure that the features of different subgraphs have the same dimensions and scale. Furthermore, a feature selection mechanism is introduced to filter and combine features based on their importance. The main purpose of this step is to effectively integrate the information from multiple subgraphs to generate the final model output. The time complexity of feature aggregation is O(k·|V|·d).

[0256] Example 1: Community structure analysis based on soil microbial co-occurrence network

[0257] This example takes the soil microbial community co-occurrence network as the research object and uses the hypergraph forgetting method of the present invention for analysis. The data set is derived from the soil sample sequencing data of an agricultural research station, containing 3000 microbial operational classification unit (OTU) nodes and 5000 interaction hyperedges. Each node represents a microbial group with attribute information such as abundance and classification status. Each hyperedge represents the co-occurrence relationship between a group of microorganisms, which is calculated by the Pearson correlation coefficient, and the significance level of the correlation coefficient is set to 0.05. According to the data scale and computing resources, the number of hypergraph partitions is set to 4.

[0258] First, execute step S10 to calculate the size of each hyperedge. The system constructs a hash table to store hyperedge size information, with the key being the hyperedge number and the value being the hyperedge size. For the hyperedge numbered e001, it contains 12 co-occurring microbial nodes, so its size is 12. Through a parallel computing strategy, the 5,000 hyperedges are divided into 10 batches for processing, each containing 500 hyperedges. After counting the nodes, the distribution range of the hyperedge size is between 2 and 25, with an average size of 8.3. During the calculation process, the system filters out nodes with abundance values ​​below 0.01% to reduce the impact of noise. Some examples of the calculation results of the hyperedge size are shown in Table 1.

[0259] Table 1 Example of hyperedge size calculation results

[0260] Hyperedge number Number of nodes Main microbial groups e001 12 Actinobacteria, Proteobacteria e002 8 Acidobacteria, Bacteroidetes e003 15 Chloroflexi, Cyanobacteria e004 6 Firmicutes, Planctomycetes e005 21 Verrucomicrobia, Archaea

[0261] Next, step S20 is executed to sort the hyperedges. In calculating the ranking score, the weight coefficients α and β are set to 0.4 and 0.3, respectively. Taking hyperedge e001 as an example, its average node degree is 15.6, its clustering coefficient is 0.45, and its final score is 18.27. The system uses an improved quick sort algorithm, selecting the middle element of each segment as the benchmark value. In the event of a tie in scores, the system uses the hyperedge number as a secondary sorting criterion. Table 2 shows some of the sorted results.

[0262] Table 2 Example of hyperedge sorting results

[0263] Sorting position Hyperedge number Ranking score Node average degree Clustering coefficient 1 e005 25.64 18.2 0.52 2 e003 20.15 16.8 0.48 3 e001 18.27 15.6 0.45 4 e002 14.82 12.4 0.38 5 e004 11.35 10.2 0.32

[0264] In step S30, the system selects the top 2,000 hyperedges after sorting (accounting for 40%) as the core hyperedge set. These core hyperedges mainly involve strong interactions between dominant microbial groups. The remaining 3,000 hyperedges constitute a random hyperedge set. When processing the boundary case of a sorting score of 14.82, the system classifies all hyperedges with a score of 14.82 into the core hyperedge set to maintain consistency. Connectivity verification of the core hyperedge set shows that there is no isolated substructure, and the maximum connected component contains more than 95% of the nodes.

[0265] Step S40 performs hyperedge allocation. The system first copies the 2000 core hyperedges into four subgraphs, then uses a round-robin strategy to allocate 3000 random hyperedges. Each subgraph receives an average of 750 random hyperedges. A load balancing mechanism ensures that the number of hyperedges differs by no more than 50 between subgraphs. The allocation results are shown in Table 3.

[0266] Table 3 Subgraph hyperedge allocation results

[0267]

[0268]

[0269] Step S50 initializes node features. The initial feature dimension for each node is set to 128. Intrinsic features include microbial abundance values, one-hot encoding of classification information, and functional gene prediction results. The balance parameters γ and δ are set to 0.6 and 0.4, respectively. After feature initialization, all dimensions are normalized using min-max normalization to uniformly range between 0 and 1. Some examples of node features are shown in Table 4.

[0270] Table 4 Node feature initialization example

[0271] Node number Abundance value Classification feature dimension Neighbor information dimension Positional encoding dimension v001 0.025 32 48 48 v002 0.018 32 48 48 v003 0.031 32 48 48 v004 0.022 32 48 48 v005 0.028 32 48 48

[0272] In step S60, a three-layer hypergraph neural network is trained. Each layer contains 128 hidden units, and the activation function is ReLU. Training uses a gradient descent algorithm with a batch size of 64. The initial learning rate is 0.01, decaying by 0.9 every 50 epochs. Residual connections are established between the second and third layers. During training, early stopping is triggered when validation set performance does not improve for five consecutive epochs. The final training epochs and loss values ​​for each subgraph are shown in Table 5.

[0273] Table 5 Subgraph training results

[0274] Sub-image number Training rounds Final loss value Validation set accuracy subgraph1 178 0.082 0.892 subgraph2 165 0.085 0.885 subgraph3 182 0.079 0.898 subgraph4 170 0.083 0.889

[0275] Step S70 calculates the node coverage. The adjustment parameter is set to 0.3, and the connection threshold is set to 3. For each subgraph, the system counts the number of nodes and calculates a quality factor. Node visit counts show that, on average, each node appears in 2.5 subgraphs. The node coverage calculation results are shown in Table 6.

[0276] Table 6 Node coverage calculation results

[0277] Sub-image number Number of nodes Node coverage Quality Factor subgraph1 2580 0.860 0.892 subgraph2 2485 0.828 0.865 subgraph3 2625 0.875 0.905 subgraph4 2532 0.844 0.878

[0278] In step S80, the subgraph weights are calculated. The temperature parameter is initially set to 1.0 and reduced by 0.1 every 50 epochs, with a minimum value of 0.1. The minimum weight threshold is set to 0.15 to ensure that each subgraph has sufficient contribution. The weight distribution calculated by the softmax function is shown in Table 7.

[0279] Table 7 Subgraph weight calculation results

[0280] Sub-image number Original weight Normalized weights subgraph1 0.268 0.275 subgraph2 0.238 0.245 subgraph3 0.282 0.285 subgraph4 0.252 0.255

[0281] Finally, in step S90, feature aggregation is performed. The global information weight is set to 0.2. The system first aligns the features of all subgraphs to ensure consistency in the 128-dimensional feature space. The feature selection process retains the 96 most contributing feature dimensions. The resulting node representation effectively characterizes the interaction patterns between microorganisms. The aggregated features were applied to community structure analysis tasks, achieving good results in module identification and key species prediction, with an accuracy of 0.912.

[0282] This example demonstrates the application value of this invention in microbial interaction network analysis. By employing hyperedge classification and subgraph training strategies, it effectively processes large-scale interaction data and reduces computational complexity. A weighted, adaptive feature aggregation mechanism ensures model stability and interpretability. Experimental results demonstrate that this method accurately captures the structural characteristics of microbial communities, providing a reliable computational foundation for subsequent ecological analysis.

[0283] Example 2: Analysis of bacterial drug resistance based on metabolic networks

[0284] This example uses the method of the present invention to analyze drug resistance mechanisms in bacterial metabolic networks. The research object is the metabolic network data of Escherichia coli (E. coli), which contains 2500 metabolite nodes and 4000 metabolic reaction hyperedges. Each node represents a metabolite with attributes such as concentration and molecular weight. Each hyperedge represents a metabolic reaction, involving substrate, product, and enzymatic reaction information. Based on the configuration of computing resources, the network is divided into three subgraphs.

[0285] In step S10, the size of the hyperedge is first calculated. For the metabolic reaction hyperedge e, its size calculation formula is:

[0286] S e =∑ v∈e 1;

[0287] Where v represents the metabolite node involved in the reaction. Taking the NADH dehydrogenase reaction as an example, four metabolites are involved: NADH, NAD+, H+, and ubiquinone. Therefore, the corresponding hyperedge size for this reaction is 4. The system uses a hash table to store the size information of each hyperedge. Some calculation results are shown in Table 8.

[0288] Table 8 Metabolic reaction hyperedge size statistics

[0289] Reaction number Reaction name Hyperedge size Number of participating metabolites R001 NADH dehydrogenase reaction 4 4 R002 Citrate synthase reaction 3 3 R003 Pyruvate dehydrogenase reaction 5 5 R004 Succinate dehydrogenase reaction 4 4 R005 ATP synthase reaction 6 6

[0290] Step S20 performs hyperedge sorting. The sorting score is calculated using the following formula:

[0291] R e =S e +αD e +βC e ;

[0292] Among them, = 0.35, = 0.25. The calculation formula of the average degree of the node is:

[0293]

[0294] The calculation formula of clustering coefficient is:

[0295]

[0296] Some examples of the sorting results are shown in Table 9.

[0297] Table 9 Metabolic reaction hyperedge sorting results

[0298] Sorting position Reaction number Ranking score Average Clustering coefficient 1 R005 22.85 12.5 0.58 2 R003 19.62 10.8 0.52 3 R001 16.45 9.6 0.48 4 R004 15.78 8.9 0.45 5 R002 12.36 7.2 0.42

[0299] In step S30, the top 1600 (40%) hyperedges are selected as the core hyperedge set, and the remaining 2400 are the random hyperedge set. In step S40, the core hyperedges are copied to the three subgraphs and then the random hyperedges are evenly distributed. The distribution results are shown in Table 10.

[0300] Table 10 Subgraph reaction allocation results

[0301]

[0302] Step S50 initializes node features. Feature initialization uses the following formula:

[0303] X(0) =F I +γN+δP;

[0304] Where γ = 0.55, δ = 0.35. The intrinsic feature F of the metabolite node I Contains information such as concentration and molecular weight. The calculation formula of neighbor information N is:

[0305]

[0306] The position code P is calculated using the following formula:

[0307] P i,2k =sin(i / 10000 2k / d );

[0308] P i,2k+1 =cos(i / 10000 2k / d );

[0309] Examples of node characteristics are shown in Table 11.

[0310] Table 11 Metabolite node feature statistics

[0311] Node ID Feature Dimension Intrinsic characteristic number Neighborhood feature number Position code number M001 96 32 32 32 M002 96 32 32 32 M003 96 32 32 32 M004 96 32 32 32 M005 96 32 32 32

[0312] Step S60 uses a 4-layer hypergraph neural network for training. Feature propagation uses the following formula:

[0313]

[0314] Among them, ∈ (l) Gaussian noise with a mean of 0 and a variance of 0.01 is used. The training results are shown in Table 12.

[0315] Table 12 Statistics of subgraph training process

[0316] Sub-image number Training rounds Loss value Convergence time (hours) G1 245 0.068 4.2 G2 238 0.072 4.0 G3 252 0.065 4.5

[0317] Step S70 calculates the node coverage rate, and the formula is:

[0318]

[0319] Where λ = 0.25. Quality factor Q i The calculation formula is:

[0320]

[0321] The coverage calculation results are shown in Table 13.

[0322] Table 13 Subgraph coverage analysis

[0323] Sub-image number Number of nodes Coverage Quality Factor G1 2185 0.874 0.912 G2 2142 0.857 0.895 G3 2208 0.883 0.925

[0324] Step S80 calculates the subgraph weight using the following formula:

[0325]

[0326] The initial value of the temperature parameter τ is 0.8. The weight calculation results are shown in Table 14.

[0327] Table 14 Subgraph weight distribution

[0328] Sub-image number Initial weight Normalized weights G1 0.338 0.342 G2 0.325 0.328 G3 0.347 0.350

[0329] Finally, feature aggregation is performed in step S90, and the formula is:

[0330]

[0331] Where μ = 0.15, and the global information matrix M is calculated by the following formula:

[0332]

[0333] The aggregated results were used to analyze bacterial resistance mechanisms, successfully identifying key metabolic pathways associated with multidrug resistance with an accuracy of 0.895. The model's predicted resistance-related metabolites were 82% consistent with experimental validation results. Some examples of resistance prediction results are shown in Table 15.

[0334] Table 15 Drug resistance analysis results

[0335] metabolic pathways Predicting Importance Importance of experimental verification consistency TCA cycle 0.885 0.912 yes Glycolysis 0.856 0.878 yes electron transport chain 0.922 0.935 yes Amino acid metabolism 0.845 0.862 yes Fatty acid metabolism 0.832 0.815 yes

[0336] This example demonstrates the application effect of the present invention in bacterial metabolic network analysis. Through hierarchical processing and feature fusion of metabolic reactions, the network structure characteristics related to drug resistance are accurately captured. Experimental results show that this method has high accuracy and interpretability in the analysis of drug resistance mechanisms, and provides a new computational tool for antibiotic resistance research. Compared with traditional methods, the present invention has significant improvements in computational efficiency and prediction accuracy. The model training time is reduced by about 40%, while the prediction accuracy is increased by about 15%. In addition, this method can also identify some new resistance-related metabolic pathways that are difficult to discover by traditional methods, providing important clues for the development of new antibiotics.

[0337] Example 3:

[0338] like Figure 2 As shown in the figure, this paper proposes a hypergraph forgetting method based on hyperedge size selection and coverage aggregation. The method mainly consists of five steps: hyperedge size calculation and core hyperedge selection; random hypergraph partitioning; independent subgraph training; weight calculation based on node coverage; and weighted output model aggregation.

[0339] Part I: Hyperedge Size Calculation and Core Hyperedge Selection

[0340] S101. Input a hypergraph H = (V, E) and the number of partitions k. Calculate the size of each hyperedge, that is, the number of nodes contained in each hyperedge.

[0341] S102. Sort the hyperedge set from large to small according to the size of the hyperedge.

[0342] S103. Select p% of the largest hyperedges from the sorted results. These hyperedges are defined as the core hyperedge set, which is used to preserve the main structural information of the hypergraph. The remaining hyperedges are used as the random hyperedge set for subsequent random assignment to increase model diversity.

[0343] Part II: Random Partitioning of Hypergraphs

[0344] S201. Evenly distribute a random hyperedge set in the hypergraph into k subgraphs, and each subgraph contains a core hyperedge set.

[0345] S202. The hyperedge set of each subgraph consists of core hyperedges and random hyperedges assigned to the subgraph. This division ensures that all subgraphs share the core structure while maintaining local diversity and randomness.

[0346] Part III: Independent subgraph training

[0347] S301. Initialize node features in each subgraph. These features may be initial state information of the nodes.

[0348] S302. Use a hypergraph neural network (HGNN) to independently train each subgraph. During training, the HGNN updates node feature information based on the hypergraph structure. Node feature updates are performed layer by layer, with each layer updating based on the hypergraph's connectivity and node features.

[0349] S303. After multiple layers of propagation, the final node features of each subgraph are obtained. These features reflect the internal structural information of the subgraph and the relationship between nodes.

[0350] Part 4: Weight calculation based on node coverage

[0351] S401. Calculate the number of nodes in each subgraph. The node coverage of a subgraph is the ratio of the number of nodes in the subgraph to the number of nodes in the original hypergraph. The higher the coverage, the more complete the subgraph retains the main structure of the original hypergraph.

[0352] S402. Calculate the weight of each subgraph based on its node coverage. The subgraph weight is determined by its node coverage. Subgraphs with higher coverage will have higher weights in the model aggregation.

[0353] Part V: Weighted Output Model Aggregation

[0354] Based on the weight of each subgraph, the final features of each subgraph are weighted and aggregated. The weighted aggregation process is to combine the features of each subgraph according to the weight ratio according to the size of each subgraph to generate the final model output.

[0355] It should be noted that the variables involved in the present invention are explained in detail as shown in Table 16:

[0356] Table 16 Explanation of variables

[0357]

[0358] Specifically, the principles of this invention are as follows: The technical principles of this invention are based on the following key ideas. First, hyperedge size reflects the complexity of high-order relationships between nodes. Larger hyperedges typically contain richer structural information. Therefore, this invention constructs a ranking score function based on hyperedge size, node average degree, and clustering coefficient to quantitatively assess hyperedge importance. This evaluation method considers multiple characteristic dimensions of hyperedges and can more accurately identify hyperedges that are important to the overall structure. Second, the design of the core hyperedge sharing mechanism is based on the message passing principle in graph neural networks. By including core hyperedges in each subgraph, important structural information is fully learned and propagated across all subgraphs. This design enables each subgraph to capture the key features of the original hypergraph, providing a good foundation for subsequent feature learning. Third, the uniform distribution strategy of random hyperedges is based on the concept of ensemble learning. By introducing appropriate randomness and diversity, it enhances the generalization ability of the model. The introduction of a load balancing mechanism ensures the rational allocation of computing resources and improves the efficiency of parallel processing. Fourth, the initialization of node features uses a multi-source information fusion method, combining the inherent characteristics of the node, neighbor information, and position encoding to provide a rich feature representation. This initialization method is conducive to the model capturing the local and global features of the nodes. Fifth, the weighted aggregation strategy based on node coverage draws on the idea of ​​the attention mechanism, and realizes the adaptive fusion of subgraph features by learning the importance weights of different subgraphs. The introduction of the temperature parameter increases the flexibility of weight distribution, enabling the model to better adapt to different data distributions. Finally, the design of the global information matrix is ​​based on the principle of residual learning. By introducing global information supplement, it effectively alleviates the problem of information loss in the feature propagation process. The organic combination of these technical principles enables the present invention to maintain high model performance while ensuring computational efficiency. There is a strict logical relationship between the various steps in the scheme, forming a complete technical chain from hyperedge selection to feature aggregation, and each link solves specific technical difficulties in a targeted manner.

[0359] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.

Claims

1. A hypergraph forgetting method based on hyperedge size selection and coverage aggregation, characterized in that: The following steps are involved: S10, receiving an input hypergraph and a partition number, and calculating a hyperedge size for each hyperedge in the hypergraph; S20, sorting the hyperedges in the hypergraph in descending order according to the size of the hyperedges; S30, selecting the hyperedges that account for the top 40% after sorting as a core hyperedge set, and the remaining hyperedges as a random hyperedge set; S40, distributing the core hyperedge set to each subgraph, and distributing the random hyperedge set to the subgraph evenly and without overlap; S50, initializing node features in the subgraph, where the node features are used to represent initial state information of the nodes; S60, independently training each of the subgraphs using a hypergraph neural network, updating the node features through layer-by-layer feature propagation, and obtaining final node features of each of the subgraphs; S70, calculating the node coverage rate in each of the subgraphs, where the node coverage rate is the ratio of the number of nodes in the subgraph to the number of nodes in the hypergraph; S80, calculating the weight of each subgraph based on the node coverage; S90: Perform weighted aggregation on the final node features of each subgraph according to the weight to generate a model output.

2. A hypergraph forgetting method based on hyperedge size selection and coverage aggregation according to claim 1, characterized in that: The step S10 specifically includes: Step 101: Receive an original hypergraph data structure, the original hypergraph data structure including a node set and a hyperedge set, and receive a preset partition value, the preset partition value is determined according to data scale and computing resources; Step 102: Establish a hash table data structure for storing the hyperedge size information, wherein the key value of the hash table data structure is the hyperedge number, and the storage value of the hash table data structure is the hyperedge size; Step 103: Count the nodes of each hyperedge, obtain the hyperedge size information, and store the hyperedge size information in the hash table data structure; Step 104: introducing a node validity judgment function to filter invalid nodes and abnormal nodes in the hyperedge; Step 105: adopt a parallel computing strategy to process the hyperedge set in blocks, with each computing unit responsible for the node counting task of a subset, thereby improving computing efficiency.

3. The hypergraph forgetting method based on hyperedge size selection and coverage aggregation according to claim 2, characterized in that: The step S20 specifically includes: Step 201: construct a ranking score function, wherein the ranking score function includes a hyperedge size term, a node average degree term, and a clustering coefficient term; Step 202: Calculate the node average degree of each hyperedge, where the node average degree is calculated using an arithmetic mean method. Step 203: Calculate the clustering coefficient of each hyperedge, where the clustering coefficient is calculated using a local density evaluation method. Step 204: sort the hyperedges in descending order using an improved quick sort algorithm, wherein the quick sort algorithm selects the middle element as a reference value; Step 205: Establish a secondary sorting rule, which considers the hyperedge number and creation time in turn to handle the case of the same score.

4. The hypergraph forgetting method based on hyperedge size selection and coverage aggregation according to claim 3, characterized in that: The step S30 specifically includes: Step 301: Determine a selection threshold based on the sorting result, where the selection threshold is determined by the total number of hyperedges and a preset selection ratio. Step 302: Mark the top 40% of the hyperedges in the sorting results as core hyperedges, and construct a core hyperedge set; Step 303: Mark the remaining 60% of hyperedges as random hyperedges to construct a random hyperedge set; Step 304: Introduce a boundary processing mechanism. When hyperedges with the same ranking score cross the selection threshold, all hyperedges with the same score are grouped into the same set. Step 305: Verify the connectivity of the core hyperedge set to ensure that there is no isolated subgraph structure.

5. The hypergraph forgetting method based on hyperedge size selection and coverage aggregation according to claim 4, characterized in that: The step S40 specifically includes: Step 401: copy the core hyperedge set into each subgraph to construct the initial structure of the subgraph; Step 402: Using a cyclic allocation strategy, sequentially allocate hyperedges in the random hyperedge set to different subgraphs; Step 403: Introduce a load balancing mechanism to record the number of hyperedges currently contained in each subgraph and give priority to allocating resources to subgraphs with fewer hyperedges. Step 404: Maintain an allocation mapping table to record the subgraph number assigned to each hyperedge to ensure that there is no duplicate allocation; Step 405: Verify the structural characteristics of each subgraph, including the calculation and evaluation of node coverage and edge density indicators.

6. The hypergraph forgetting method based on hyperedge size selection and coverage aggregation according to claim 5, characterized in that: The step S50 specifically includes: Step 501: Initialize node intrinsic characteristics, which include node attribute information and external data source characteristics; Step 502: Calculate node neighbor information, and perform feature aggregation on the neighbor information using an average pooling method; Step 503: Generate node position codes, where the position codes are calculated using a sine-cosine coding method. Step 504: Fusing the inherent features, the neighbor information, and the position code to obtain an initial node feature matrix; Step 505: normalize the initial node feature matrix to ensure that features from different sources have similar value ranges.

7. The hypergraph forgetting method based on hyperedge size selection and coverage aggregation according to claim 6, characterized in that: The step S60 specifically includes: Step 601: Construct a hypergraph neural network model, wherein the hypergraph neural network model includes multiple feature propagation layers; Step 602: Using a batch gradient descent algorithm to perform model training, wherein the learning rate of the batch gradient descent algorithm adopts a decay strategy; Step 603: Introduce a residual connection mechanism to combine features from different layers to improve training effect; Step 604: Use an early stopping strategy to terminate training early when the validation set performance indicator does not improve for multiple consecutive rounds. Step 605: Post-process the node features of each subgraph, including feature normalization and outlier processing operations.

8. The hypergraph forgetting method based on hyperedge size selection and coverage aggregation according to claim 7, characterized in that: The step S70 specifically includes: Step 701: Calculate the ratio of the number of nodes in each subgraph to the number of nodes in the original hypergraph; Step 702: Calculate the quality factor of each subgraph, where the quality factor takes into account the importance of the node; Step 703: Maintain node access counts and record the number of times each node appears in different subgraphs. Step 704: introduce a connection number threshold. When the number of connections of a node in the subgraph is lower than the connection number threshold, the node is not counted in the coverage rate. Step 705: Calculate the final node coverage by combining the node quantity ratio and the quality factor.

9. The hypergraph forgetting method based on hyperedge size selection and coverage aggregation according to claim 8, characterized in that: The step S80 specifically includes: Step 801: Set the initial value of the temperature parameter, which is updated using an exponential decay strategy. Step 802: Calculate the weight of each subgraph based on the node coverage and the temperature parameter; Step 803: introduce a minimum weight constraint to ensure that the weight of each subgraph is not less than a preset threshold; Step 804: normalize the weights so that the sum of all weights is equal to 1; Step 805: Verify the rationality of weight allocation and evaluate the impact of weights on feature aggregation.

10. The hypergraph forgetting method based on hyperedge size selection and coverage aggregation according to claim 9, characterized in that: The step S90 specifically includes: Step 901: Calculate a global information matrix, where the global information matrix is ​​obtained using an average pooling method. Step 902: Align features of different sub-graphs to ensure that the features have the same dimension and scale; Step 903: Introduce a feature selection mechanism to screen and combine features based on their importance. Step 904: performing weighted summation on the subgraph features based on the weights, and introducing the global information matrix for supplementation; Step 905: Generate a final model output, where the model output includes the fused node feature representation.

Citation Information

Patent Citations

  • Hypergraph neural network updating method, device and equipment based on redundancy elimination

    CN117391166A

  • Anticancer drug sensitivity prediction method and system based on bigraph and hypergraph learning

    CN119694444A

  • Automatic XAI (autoxai) with evolutionary NAS techniques and model discovery and refinement

    US20220398460A1