Multi-dimensional database fused metabonomics large model construction method
By combining global unique ID mapping and dynamic graph generator with multimodal feature matrix, the heterogeneity problem of multi-source metabolomics databases is solved, efficient fusion and cross-library generalization of multi-source data are achieved, and the model's expression and dynamic relationship capture capabilities are improved, supporting disease diagnosis and drug development.
Patent Information
- Application Number
- CN202510799019.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-06-16
AI Technical Summary
Existing multimodal data fusion methods cannot effectively capture the dynamic relationships between metabolites, resulting in insufficient cross-library generalization capabilities. Manual feature engineering is tedious and may introduce information loss.
Metabolites are assigned globally unique IDs through InChIKey hash values, a cross-library metabolite mapping table is established, and a dynamic graph generator is used to generate dynamic edge weights in combination with the multimodal feature matrix and the prior pathway adjacency matrix. The multimodal graph attention mechanism is used to assign adaptive weights to different modal features, and graph convolutional message passing is performed to generate a node embedding matrix that integrates multimodal information and an optimized dynamic metabolic relationship graph. At the same time, the database is split into meta-tasks through meta-learning methods for internal and external loop optimization.
It significantly improves the cross-library generalization capability of the model, realizes the efficient integration of multi-source heterogeneous metabolomics data, enhances the model's expressive power and dynamic relationship capture capabilities, and provides powerful tool support for disease diagnosis, drug development and personalized medicine.
Smart Images

Figure CN120708689A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of metabolomics large model construction, and more specifically, relates to a method for constructing a metabolomics large model by integrating multidimensional databases. Background Art
[0002] Metabolomics, the study of metabolite profiles within organisms, is widely used in fields such as disease diagnosis, drug development, and personalized medicine. With advances in biotechnology, numerous metabolomics databases, such as KEGG, HMDB, and MetaboLights, have been established. These databases contain information such as metabolite concentration data, mass spectrometry profiles, and pathway descriptions. However, these data come from diverse sources and in various formats, including numerical concentration data, chromatographic mass spectrometry data, and knowledge-based text descriptions, resulting in significant heterogeneity and dimensionality.
[0003] Existing multimodal data fusion methods typically employ feature engineering, converting data from different modalities into a unified feature vector followed by simple concatenation or weighted fusion. For example, numerical data may be normalized, features extracted from graph data using convolutional neural networks, and semantic features extracted from text data using the BERT model. These methods require extensive manual feature engineering and fail to capture the dynamic relationships between metabolites. Furthermore, traditional methods typically use fixed metabolic pathway diagrams as the graph structure, which cannot adapt to differences between different databases and results in insufficient cross-database generalization capabilities.
[0004] Therefore, current technologies have the following problems when processing multi-source heterogeneous metabolomics data: heterogeneous data are difficult to effectively fuse, fixed graph structures cannot capture dynamic relationships, manual feature engineering is cumbersome and may introduce information loss, and cross-database generalization capabilities are limited. Therefore, there is an urgent need for a new method that can dynamically model metabolite relationships, optimize multi-source data fusion, and enhance the generalization ability of the model to fully utilize cross-database knowledge and improve the effect in practical applications. Summary of the Invention
[0005] The present invention provides a method for constructing a large metabolomics model by fusing multidimensional databases, aiming to solve the technical problem that the heterogeneity and dimensionality differences of the current metabolomics multi-source databases cause traditional fusion methods to lose the underlying biochemical associations and reduce the generalization ability of the AI model.
[0006] A method for constructing a large metabolomics model by integrating multidimensional databases includes the following steps:
[0007] S1. Based on the InChIKey hash value, a globally unique ID is established for numerical data, spectral data, and knowledge data from multiple databases. The same metabolite in different databases is mapped to obtain a cross-library metabolite mapping table. The data from multiple databases are uniformly encoded and spliced to obtain a multimodal feature matrix.
[0008] S2. Based on the dynamic graph generator, the prior adjacency matrix is fused with feature cosine similarity and learnable parameters to generate dynamic edge weights based on the multimodal feature matrix and the prior pathway adjacency matrix. This dynamic edge weighting is then used to generate a metabolic relationship graph. A multimodal graph attention mechanism is then used to assign adaptive weights to numerical, spectral, and textual features. Graph convolutional message passing is then performed to obtain a node embedding matrix that integrates multimodal information and an optimized dynamic metabolic relationship graph.
[0009] S3. Split each database into meta-tasks. Each task consists of a support set and a query set. For each meta-task, the inner loop uses the dynamic graph to train a task-specific classifier. The outer loop jointly optimizes the dynamic graph generator and meta-model parameters through the query set loss to obtain a generalized meta-learning model and a robust dynamic graph generator.
[0010] The present invention uses InChIKey hash values to assign globally unique IDs to metabolites, achieving accurate mapping across databases and uniformly encoding multi-source heterogeneous data (including numerical, spectral, and knowledge-based) into a multimodal feature matrix, avoiding information loss caused by data heterogeneity in traditional methods. At the same time, the model uses a dynamic graph generator, combines the multimodal feature matrix and the prior pathway adjacency matrix, generates dynamic edge weights through feature cosine similarity and learnable parameters, constructs a metabolic relationship graph, and uses a multimodal graph attention mechanism to assign adaptive weights to different modal features, performs graph convolutional message passing, and generates a node embedding matrix that integrates multimodal information. and the optimized dynamic metabolic relationship graph; in addition, the method splits each database into meta-tasks through a meta-learning method, the inner loop uses the dynamic graph to train the task-specific classifier, and the outer loop jointly optimizes the dynamic graph generator and meta-model parameters through the query set loss, which significantly improves the cross-library generalization ability of the model; therefore, the invention realizes the efficient fusion of multi-source heterogeneous data of metabolomics through global unique ID mapping, multimodal feature matrix construction, dynamic metabolic relationship graph generation and meta-learning optimization, significantly improving the model's expression ability, dynamic relationship capture ability and cross-library generalization ability, providing powerful tool support for practical applications such as disease diagnosis, drug development and personalized medicine.
[0011] Preferably, the cross-library metabolite mapping table is obtained based on the following steps:
[0012] The international standard compound identifier InChIKey is used as a unified standard, and the SHA256 hash algorithm is used to generate the initial ID for InChIKey;
[0013] The first n characters of the hash value of the initial ID are intercepted as the basic global identifier GID; when different compounds accidentally generate the same global identifier GID, the check code of the CAS registration number is appended to distinguish them, and a cross-library metabolite mapping table is obtained based on this.
[0014] Preferably, obtaining the multimodal feature matrix comprises the following steps:
[0015] Numerical data processing: Z-score transformation is performed on the concentration data of each metabolite, and the seven-dimensional statistics of each metabolite across samples are calculated to obtain the concentration matrix;
[0016] Spectral data processing: Use a one-dimensional convolutional autoencoder to compress the original spectrogram signal and output a 32-bit vector as the spectrogram feature;
[0017] Text data processing: The BioBERT biomedical language model is used to extract the labeled semantic vectors, which are then compressed to 128 dimensions using a fully connected layer.
[0018] Multimodal feature fusion: For each metabolite, the features obtained based on numerical data processing, spectral data processing, and text data processing are spliced to obtain a multimodal feature matrix.
[0019] Preferably, obtaining the metabolic relationship diagram comprises the following steps:
[0020] Acquisition of prior pathway adjacency matrix: Based on the KEGG database from the multi-source database, the metabolic pathway structure is imported, and the known biochemical reaction relationship between metabolites is represented by the adjacency matrix, where the value is 1 if the reaction exists and 0 otherwise. Based on this, the prior pathway adjacency matrix is obtained;
[0021] Calculate the feature similarity network: Based on the multimodal feature matrix, the similarity of each pair of metabolite feature vectors is calculated through the similarity algorithm, and the feature similarity matrix is obtained based on this;
[0022] Fusion of prior pathways and data similarity: Introducing an automatically learnable balance parameter, where the balance parameter is mapped to a weight value between 0 and 1 through a Sigmoid function. Based on the weight value, a weighted summation is performed on the prior pathway adjacency matrix and the feature similarity matrix to obtain a dynamic adjacency matrix.
[0023] The dynamic adjacency matrix is symmetrically normalized to obtain a normalized metabolic relationship graph.
[0024] Preferably, the steps of obtaining the node embedding matrix are as follows:
[0025] Modality alignment projection: The numerical feature matrix, the graph feature matrix, and the text feature matrix are projected to a unified dimension through a fully connected layer to obtain the three modality feature matrices after projection;
[0026] Modality importance weighting: For each metabolite, the three modal feature matrices after splicing and projection are concatenated. The importance scores of each modality are then calculated through the attention network. The importance scores are normalized using the softmax function to obtain weights, based on which the modality weight matrix is obtained. Based on the obtained modality weight matrix, the three modal feature matrices of each metabolite are weightedly fused to obtain a fused feature matrix.
[0027] Graph structure information propagation: It includes two layers of GAT. The first layer of GAT locates the first-order neighbors of each metabolite according to the dynamic adjacency matrix, calculates the neighbor weights using the attention mechanism, and weightedly aggregates the neighbor features.
[0028] The second-layer GAT uses the output of the first-layer GAT as a new feature, locates the second-order neighbors based on the same adjacency matrix, and aggregates cross-hop features secondary to obtain a node embedding matrix that integrates multimodal information and an optimized dynamic metabolic relationship graph.
[0029] Preferably, step S3 includes the following steps:
[0030] Meta-task construction: Each database is considered as an independent task. For each task, its dataset is randomly divided into a support set and a query set. The support set is used to train the task-specific classifier, and the query set is used to evaluate the generalization ability of the model. Based on this, a meta-task set is obtained, which contains k meta-tasks, and each meta-task contains a support set and a query set.
[0031] Inner loop: Initialize a corresponding classifier for each meta-task, train the classifier on the support set, calculate the loss function, and update the classifier parameters using gradient descent based on the value of the loss function;
[0032] Outer loop: Evaluate the loss of each task on the query set to obtain the total loss, backpropagate the total loss to the parameters of the dynamic graph generator, update the dynamic graph generator to optimize cross-task knowledge sharing, and obtain the optimized dynamic graph generator parameters based on this;
[0033] Collaborative optimization of dynamic graphs and model parameters: Based on the optimized dynamic graph generator parameters, a new dynamic metabolic relationship graph is generated and the classifier parameters are updated. Based on this, a generalized meta-learning model and a robust dynamic graph generator are obtained.
[0034] Preferably, when the original data of a new sample is input, step S1 is reused, and the similarity expansion map between the original data of the new sample and the global node is calculated by the robust dynamic graph generator, and a single-step inner loop adaptation is performed based on the annotation. The fine-tuned classifier is used to predict the unlabeled sample to obtain the predicted label of the new sample and the real-time expanded dynamic metabolic relationship map.
[0035] The beneficial effects of the present invention include:
[0036] The present invention uses InChIKey hash values to assign globally unique IDs to metabolites, achieving accurate mapping across databases and uniformly encoding multi-source heterogeneous data (including numerical, spectral, and knowledge-based) into a multimodal feature matrix, avoiding information loss caused by data heterogeneity in traditional methods. At the same time, the model uses a dynamic graph generator, combines the multimodal feature matrix and the prior pathway adjacency matrix, generates dynamic edge weights through feature cosine similarity and learnable parameters, constructs a metabolic relationship graph, and uses a multimodal graph attention mechanism to assign adaptive weights to different modal features, performs graph convolutional message passing, and generates a node embedding matrix that integrates multimodal information. and the optimized dynamic metabolic relationship graph; in addition, the method splits each database into meta-tasks through a meta-learning method, the inner loop uses the dynamic graph to train the task-specific classifier, and the outer loop jointly optimizes the dynamic graph generator and meta-model parameters through the query set loss, which significantly improves the cross-library generalization ability of the model; therefore, the invention realizes the efficient fusion of multi-source heterogeneous data of metabolomics through global unique ID mapping, multimodal feature matrix construction, dynamic metabolic relationship graph generation and meta-learning optimization, significantly improving the model's expression ability, dynamic relationship capture ability and cross-library generalization ability, providing powerful tool support for practical applications such as disease diagnosis, drug development and personalized medicine. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0038] Figure 1 This is a flowchart of the overall steps provided by an embodiment of the present invention.
[0039] Figure 2 This is a schematic diagram of the specific steps of step S2 provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to make the technical problems, technical solutions and beneficial effects to be solved by this application more clearly understood, this application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0041] See also Figure 1 As shown, the method for constructing a large metabolomics model by integrating multidimensional databases includes the following steps:
[0042] S1. Based on the InChIKey hash value, a globally unique ID is established for numerical data, spectral data, and knowledge data from multiple databases. The same metabolite in different databases is mapped to obtain a cross-library metabolite mapping table. The data from multiple databases are uniformly encoded and spliced to obtain a multimodal feature matrix.
[0043] The step S1 comprises the following steps:
[0044] In this embodiment, the numerical data comes from the MetaboLights database, which is a metabolite concentration matrix; the spectral data comes from the HMDB database, which is a mass spectrometry / NMR original spectrum; the knowledge data comes from the KEGG database, which is a metabolic pathway text description;
[0045] The metabolite IDs in the MetaboLights database, HMDB database, and KEGG database have different identifier formats, for example: KEGG metabolite ID (format: C00031); HMDB metabolite ID (format: HMDB0000122); MetaboLights metabolite ID (format: MTBLC12345);
[0046] Therefore, it is necessary to solve the heterogeneity problem of metabolite identifiers in different databases and establish a globally unique mapping relationship, which specifically includes the following steps:
[0047] InChIKey extraction: Get the standard InChIKey of metabolites from the database API, where InChIKey is a 27-bit international chemical identifier that uniquely identifies a chemical molecule. For example, the InChIKey of glucose is: WQZGKKKJIJFFOK-GASJEMHNSA-N;
[0048] Hash mapping: Generate a globally unique ID (GID) by performing a SHA256 calculation on the InChIKey, where the hashing process uses the following formula:
[0049] GID=SHA256(InChIKey)[0:16];
[0050] Where: SHA256(·) represents the 256-bit secure hash algorithm, which is used to generate a unique hash value; [0:16] means the first 16 bits of the hash value are truncated as the globally unique ID (GID);
[0051] Conflict resolution: During the hash mapping process, if different metabolites collide with the same hash value (with a probability less than 10 -15 ), a hierarchical strategy is used to eliminate conflicts, that is, verification and processing based on CAS registration numbers:
[0052] GID′=GID+checksum(CAS number );
[0053] Where: checksum represents the checksum operation on the CAS number; CAS number Indicates CAS number;
[0054] A cross-library metabolite mapping table is obtained based on the hash mapping and conflict resolution.
[0055] After establishing the cross-library metabolite mapping table, it is necessary to uniformly encode heterogeneous data and convert numerical, spectral, and textual data into feature vectors of uniform dimensions. In order to process multimodal data, a sub-modal processing method is adopted:
[0056] Numerical data processing: The concentration of each metabolite in different samples is standardized to ensure that the concentration data of each metabolite are comparable; then the statistical characteristics of each metabolite across samples are calculated, including mean, standard deviation, skewness, kurtosis, median, and first and third quartiles; then the statistical characteristics are aggregated to obtain a 7-dimensional feature vector; for missing numerical data, similar metabolites are found according to the classification system of the KEGG database, and the missing values are filled with the mean concentration of similar metabolites.
[0057] Spectral data processing: Use a 1D convolutional autoencoder to extract spectrogram features. The autoencoder consists of two parts: an encoder and a decoder. The encoder extracts spectrogram features through convolutional layers and pooling layers, and the decoder maps the extracted spectrogram features back to the spectrogram space for reconstruction; train the autoencoder to learn the spectrogram features by minimizing the reconstruction loss, and output 32-dimensional spectrogram features based on the trained autoencoder; for missing spectrogram data, use 32-dimensional zero vectors to fill it, and the subsequent graph neural network automatically identifies the zero vectors and reduces their weights.
[0058] Text data processing: The BioBERT biomedical language model is used to encode the text. Before encoding, the pathway description text needs to be preprocessed, including:
[0059] The input pathway description text is segmented to remove stop words, punctuation marks, and other irrelevant characters to ensure the neatness and consistency of the input text. The text is segmented according to the maximum input length limit of the BioBERT biomedical language model to ensure that each segment does not exceed the maximum input length of the model. The [CLS] marker is added to the beginning of each segment and the [SEP] marker is added to the end of each segment to help the model identify the start and end positions of the text.
[0060] The preprocessed text is input into the BioBERT model, which automatically generates the corresponding semantic vector. The 768-dimensional semantic vector corresponding to the [CLS] tag is extracted from the model output. This vector represents the semantic information of the entire input text.
[0061] A fully connected layer is used to compress the 768-dimensional semantic vector to 128 dimensions. In this embodiment, 128 dimensions are chosen because they reduce computational complexity while preserving semantic information, making them suitable for subsequent data processing and model training. During the dimensionality reduction process, the parameters of the fully connected layer can be optimized using a backpropagation algorithm to ensure that the reduced vector retains as much of the original semantic information as possible.
[0062] When pathway descriptions are missing, metabolite names are used as substitutes. Metabolite names are input into the BioBERT model to extract their 768-dimensional semantic vectors, which are then compressed to 128 dimensions through the same fully connected layer. This ensures that each metabolite has a complete 128-dimensional text feature vector, preventing subsequent multimodal feature fusion from being affected by missing data.
[0063] Multimodal feature fusion: For each metabolite, the features obtained based on numerical data processing, spectral data processing, and text data processing are spliced to obtain a multimodal feature matrix, where rows correspond to metabolites and columns correspond to 167-dimensional fusion features.
[0064] S2. Based on the dynamic graph generator, the prior adjacency matrix is fused with feature cosine similarity and learnable parameters to generate dynamic edge weights based on the multimodal feature matrix and the prior pathway adjacency matrix. This dynamic edge weighting is then used to generate a metabolic relationship graph. A multimodal graph attention mechanism is then used to assign adaptive weights to numerical, spectral, and textual features. Graph convolutional message passing is then performed to obtain a node embedding matrix that integrates multimodal information and an optimized dynamic metabolic relationship graph.
[0065] Acquisition of prior pathway adjacency matrix: Based on the KEGG database from the multi-source database, the metabolic pathway structure is imported, and the known biochemical reaction relationship between metabolites is represented by the adjacency matrix, where the value is 1 if the reaction exists and 0 otherwise. Based on this, the prior pathway adjacency matrix is obtained;
[0066] Calculate the feature similarity network: Based on the multimodal feature matrix, the similarity of each pair of metabolite feature vectors is calculated through the similarity algorithm, and the feature similarity matrix is obtained based on this;
[0067] In this embodiment, cosine similarity is used to measure the feature similarity between metabolites. Given the feature vectors M of metabolites i and j, i and M j , the cosine similarity S of metabolite i and metabolite j is obtained by cosine similarity measurement ij ; obtained by calculating the cosine similarity of each pair of metabolites is a fully connected similarity matrix, where N represents the number of metabolites and the range of the matrix is [-1,1], which represents the similarity between metabolites;
[0068] Fusion of prior pathway and data similarity: To simultaneously consider prior biochemical pathway knowledge and data-driven feature similarity, an automatically learnable balance parameter is introduced. The balance parameter is mapped to a weight value between 0 and 1 through a Sigmoid function. Based on the weight value, the prior pathway adjacency matrix and the feature similarity matrix are weighted and summed to obtain a dynamic adjacency matrix. The specific expression is as follows:
[0069] A dyn =σ(α)·A prior +(1-σ(α))·S;
[0070] Where: represents a learnable balance parameter that controls the weight of the prior path adjacency matrix and feature similarity, and its initial value is set to 0.5; where σ represents the Sigmoid function, which is used to constrain α to the interval [0,1]; A prior represents the prior path adjacency matrix; A dyn represents a dynamic adjacency matrix;
[0071] The dynamic adjacency matrix is symmetrically normalized to obtain a normalized metabolic relationship graph, which is specifically expressed as follows:
[0072]
[0073] Where: D represents the degree matrix, defined as That is, the degree of node i is the number of nodes connected to it;
[0074] Based on this output, the dynamic metabolic relationship diagram is: Where M represents the multimodal feature matrix of metabolites; Represents the symmetric normalized dynamic adjacency matrix.
[0075] Modality alignment projection: The numerical feature matrix, the graph feature matrix, and the text feature matrix are projected to a unified dimension through a fully connected layer to obtain the three modality feature matrices after projection;
[0076] Modality importance weighting: For each metabolite, the three modality feature matrices after splicing and projection are concatenated, and then the importance scores of each modality are calculated through the attention network. The importance scores are normalized using the softmax function to obtain weights, based on which the modality weight matrix is obtained. Based on the obtained modality weight matrix, the three modality feature matrices of each metabolite are weightedly fused to obtain the fused feature matrix F. fused ;
[0077] In this embodiment, if the mass spectrum data is missing, the corresponding behavior of the modal feature matrix corresponding to the mass spectrum is a 32-dimensional zero vector, which is still zero after processing by the fully connected layer, and is still not zero after the dot product of the zero vector and the attention vector, and is still not zero after activation by leakyReLU. During softmax normalization, the spectrogram modal weight has an activation value of 0, so its proportion in the multimodal weight is reduced, thereby suppressing the missing spectrogram data.
[0078] Graph structure information propagation: It includes two layers of GAT (graph attention network). The first layer of GAT locates the first-order neighbors of each metabolite according to the dynamic adjacency matrix, calculates the neighbor weights using the attention mechanism, and weightedly aggregates the neighbor features. The specific expression is as follows:
[0079]
[0080] Where: Indicates that node i is The neighbor set in ;|| represents the feature splicing operation; b (1) represents the attention weight vector of the first layer of GAT, and T represents transpose; Represents the learnable weight matrix of the first layer of GAT; Represents the fusion feature matrix of node j; ELU represents the linear unit activation function; LeakyReLU represents the ReLU activation function with leakage; Softmax j Indicates that the attention scores of all neighbor nodes j of all nodes i are Softmax normalized along the j dimension; Represents the fusion feature matrix of the i-th node;
[0081] The second-layer GAT uses the output of the first-layer GAT as a new feature, locates the second-order neighbors based on the same adjacency matrix, and aggregates cross-hop features twice. Based on this, the node embedding matrix that integrates multimodal information and the optimized dynamic metabolic relationship graph are obtained. The specific expression is as follows:
[0082]
[0083] Where: represents the embedding vector of node j output by the first layer GAT; H (2) represents the final node embedding matrix output by the second layer GAT; Represents the learnable weight matrix of the second layer GAT; represents the attention coefficient of node i to neighbor node j in the second layer GAT; b (2) Represents the attention weight vector of the second layer GAT; Represents the embedding vector of node i output by the first layer GAT.
[0084] In this example, by fusing the KEGG pathway adjacency matrix and the feature cosine similarity matrix, a learnable parameter is used to generate dynamic weights through Sigmoid to adjust the contribution ratio of the two types of edges, and then the graph structure is stabilized by symmetric normalization. This method allows the dynamic graph to maintain the directional constraints of the enzymatic reaction while effectively improving the association coverage of metabolites not included in HMDB; secondly, the fully connected layer is used to align the heterogeneous feature dimensions, and the modal attention network is used to assign weights (such as lipid metabolite mass spectrum weight > 0.7). A two-layer GAT structure is designed: the first layer aggregates direct neighbor reaction partners, the second layer captures indirect regulatory nodes, and edge attention is combined to filter noisy edges. This mechanism significantly enhances the discriminability of node embedding, and the cross-library metabolite classification F1-score reaches 92.7% (compared to the single-modal baseline of 80.3%, verified by the KEGG / HMDB / METLIN three libraries).
[0085] S3. Split each database into meta-tasks. Each task consists of a support set and a query set. For each meta-task, the inner loop uses the dynamic graph to train a task-specific classifier. The outer loop jointly optimizes the dynamic graph generator and meta-model parameters through the query set loss to obtain a generalized meta-learning model and a robust dynamic graph generator.
[0086] The step S3 comprises the following steps:
[0087] Meta-task construction: For the i-th database D i , randomly sample m metabolite samples (including labels) as the support set where h j represents the node embedding matrix of the j-th metabolite; y j Represents the label of the j-th metabolite; at the same time from the same database D i Sample n metabolite samples as the query set Used to evaluate the performance of the classifier; h k represents the node embedding matrix of the k-th metabolite; y kRepresents the label of the k-th metabolite; the label is obtained based on the KEGG and HMDB databases, and contains different category information, such as disease-related labels in the KEGG database and concentration abnormality labels in the HMDB database;
[0088] Finally, the meta-task of each task is constructed All meta-tasks are constructed into a cloud task set K represents the number of tasks;
[0089] Inner loop: Initialize a corresponding classifier for each meta-task, train the classifier on the support set, calculate the loss function, and update the classifier parameters using gradient descent based on the value of the loss function. The classifier uses a lightweight graph neural network classification head for task adaptation, which is expressed as follows:
[0090]
[0091] Where: h represents the node embedding matrix of metabolites; W1 and b1 represent the weights and biases of the hidden layer; W2 and b2 represent the weights and biases of the output layer; σ represents the ReLU activation function; Represents a classifier The predicted value of the output;
[0092] Use the support set S i Perform a single-step update on the gradient:
[0093]
[0094] Where: η represents the inner loop learning rate; represents the cross entropy loss function; η represents the learning rate; θ ′ i represents the updated value of the classifier parameters corresponding to task i; θ represents the parameters of the current global classifier; Indicates that in the support set S i The gradient of the classifier calculated above;
[0095] Outer loop: Evaluate the adapted model for each task based on the query set and calculate the meta-loss:
[0096]
[0097] Where: represents the cross entropy loss of the query set; represents the comprehensive loss on multiple tasks; K represents the number of tasks; In the query set Q i The loss function on the task i is calculated based on the classifier Classification error on the query set;
[0098] Update the dynamic graph generator and classifier parameters:
[0099]
[0100] Where: β represents the outer loop learning rate; φ represents the dynamic graph generator parameters, including the graph similarity weight α and parameters related to the graph neural network (GAT); Indicates the loss of yuan Gradient of the dynamic graph generator parameter φ; Indicates the loss of yuan Gradient of the global classifier parameter θ;
[0101] Collaborative optimization of dynamic graphs and model parameters: Based on the optimized dynamic graph generator parameters, a new dynamic metabolic relationship graph is generated and the classifier parameters are updated. Based on this, a generalized meta-learning model and a robust dynamic graph generator are obtained.
[0102] In this example, by splitting each database into independent meta-tasks, fine-tuning the task-specific classifier to adapt to the local data distribution in an inner loop, and jointly optimizing the dynamic graph generator and meta-model parameters in an outer loop, we achieve the co-evolution of the graph structure and classifier. This framework enables the model to achieve 90% classification accuracy in a new database with only 50 annotated samples (compared to conventional models requiring 500+ samples and tested across eight metabolite databases).
[0103] S4. When the raw data of a new sample is input, step S1 is reused, and the similarity expansion map between the raw data of the new sample and the global node is calculated through the robust dynamic graph generator. A single-step inner loop adaptation is performed based on the annotation, and the fine-tuned classifier is used to predict the unlabeled samples to obtain the predicted labels of the new samples and the real-time expanded dynamic metabolic relationship map.
[0104] Reuse step S1 to obtain the multimodal feature matrix of the new metabolite where N new represents the number of metabolites in the new sample; D represents the total dimension of the multimodal feature;
[0105] Calculate the feature similarity between the new metabolite and the existing metabolites to obtain the similarity value; update the dynamic adjacency matrix based on the similarity, integrate the new metabolite into the existing dynamic graph, and form the expanded dynamic adjacency matrix A dyn,new ; Based on this, we get the expanded dynamic metabolic relationship diagram:
[0106] Based on the expanded dynamic graph and a small number of annotated samples (fine-tuning support set); use the support set data to fine-tune the generalized meta-learning model trained in step S3, update the model parameters to adapt to the new task, obtain the adapted task-specific classifier, predict the query set data based on the adapted task-specific classifier, output the prediction results, and obtain the prediction results of the new samples (such as disease risk probability, metabolite function annotation, etc.).
[0107] In this example, efficient prediction of new metabolomics samples was achieved through dynamic expansion and rapid meta-knowledge reasoning. Dynamic graph expansion ensured that new metabolites could be integrated into the existing metabolic relationship network, while meta-knowledge reasoning used a small amount of annotated data to quickly adjust the model to adapt it to new tasks. The entire process maintained the dynamic nature and generalization capabilities of the framework, enabling it to flexibly respond to the challenges of new data and new tasks.
[0108] In summary, the present invention effectively integrates numerical, spectral and knowledge-based heterogeneous data from multiple source databases through global unique ID and multimodal feature fusion, solves the problem of metabolomics data islands and heterogeneity, and the core of the present invention combines the prior pathway and adaptive feature similarity through a dynamic graph generator to generate a metabolic network that can inherit biological pathway knowledge and dynamically capture data-driven relationships, and assigns optimal weights to different features through a multimodal graph attention mechanism, significantly improving the discriminative power of node embedding; further introducing a meta-learning framework, the multi-database is disassembled into meta-tasks for internal and external loop collaborative optimization, where the internal loop training task A dedicated service classifier is used to adapt to local data distribution, and the outer loop jointly optimizes the dynamic graph structure and metamodel parameters to improve generalization ability. The resulting robust dynamic graph generator and generalized metamodel can not only achieve zero-sample rapid adaptation through similarity calculation and graph expansion when facing new samples, but also synchronously update the metabolic relationship graph structure, thereby ensuring high prediction accuracy while continuously improving the metabolic interaction knowledge base; ultimately achieving in-depth utilization of cross-library data, strong generalization in small sample scenarios, interpretability of model predictions, and real-time evolution of metabolic networks, providing an efficient, adaptive and scalable intelligent analysis framework for metabolomics research.
[0109] The above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for constructing a large metabolomics model by integrating multidimensional databases, characterized in that: The following steps are involved: S1. Based on the InChIKey hash value, a globally unique ID is established for numerical data, spectral data, and knowledge data from multiple databases. The same metabolite in different databases is mapped to obtain a cross-library metabolite mapping table. The data from multiple databases are uniformly encoded and spliced to obtain a multimodal feature matrix. S2. Based on the dynamic graph generator, the prior adjacency matrix is fused with feature cosine similarity and learnable parameters to generate dynamic edge weights based on the multimodal feature matrix and the prior pathway adjacency matrix. This dynamic edge weighting is then used to generate a metabolic relationship graph. A multimodal graph attention mechanism is then used to assign adaptive weights to numerical, spectral, and textual features. Graph convolutional message passing is then performed to obtain a node embedding matrix that integrates multimodal information and an optimized dynamic metabolic relationship graph. S3. Split each database into meta-tasks. Each task consists of a support set and a query set. For each meta-task, the inner loop uses the dynamic graph to train a task-specific classifier. The outer loop jointly optimizes the dynamic graph generator and meta-model parameters through the query set loss to obtain a generalized meta-learning model and a robust dynamic graph generator.
2. The method for constructing a large metabolomics model by fusion of multidimensional databases according to claim 1, characterized in that: The cross-library metabolite mapping table is obtained based on the following steps: The international standard compound identifier InChIKey is used as a unified standard, and the SHA256 hash algorithm is used to generate the initial ID for InChIKey; The first n characters of the hash value of the initial ID are intercepted as the basic global identifier GID; when different compounds accidentally generate the same global identifier GID, the check code of the CAS registration number is appended to distinguish them, and a cross-library metabolite mapping table is obtained based on this.
3. The method for constructing a large metabolomics model by fusion of multidimensional databases according to claim 1, characterized in that: Obtaining the multimodal feature matrix includes the following steps: Numerical data processing: Z-score transformation is performed on the concentration data of each metabolite, and the seven-dimensional statistics of each metabolite across samples are calculated to obtain the concentration matrix; Spectral data processing: Use a one-dimensional convolutional autoencoder to compress the original spectrogram signal and output a 32-bit vector as the spectrogram feature; Text data processing: The BioBERT biomedical language model is used to extract the labeled semantic vectors, which are then compressed to 128 dimensions using a fully connected layer. Multimodal feature fusion: For each metabolite, the features obtained based on numerical data processing, spectral data processing, and text data processing are spliced to obtain a multimodal feature matrix.
4. The method for constructing a large metabolomics model by fusion of multidimensional databases according to claim 1, characterized in that: Obtaining the metabolic relationship diagram comprises the following steps: Acquisition of prior pathway adjacency matrix: Based on the KEGG database from the multi-source database, the metabolic pathway structure is imported, and the known biochemical reaction relationship between metabolites is represented by the adjacency matrix, where the value is 1 if the reaction exists and 0 otherwise. Based on this, the prior pathway adjacency matrix is obtained; Calculate the feature similarity network: Based on the multimodal feature matrix, the similarity of each pair of metabolite feature vectors is calculated through the similarity algorithm, and the feature similarity matrix is obtained based on this; Fusion of prior pathways and data similarity: Introducing an automatically learnable balance parameter, where the balance parameter is mapped to a weight value between 0 and 1 through a Sigmoid function. Based on the weight value, a weighted summation is performed on the prior pathway adjacency matrix and the feature similarity matrix to obtain a dynamic adjacency matrix. The dynamic adjacency matrix is symmetrically normalized to obtain a normalized metabolic relationship graph.
5. The method for constructing a large metabolomics model by fusion of multidimensional databases according to claim 1, characterized in that: The steps to obtain the node embedding matrix are as follows: Modality alignment projection: The numerical feature matrix, the graph feature matrix, and the text feature matrix are projected to a unified dimension through a fully connected layer to obtain the three modality feature matrices after projection; Modality importance weighting: For each metabolite, the three modal feature matrices after splicing and projection are concatenated. The importance scores of each modality are then calculated through the attention network. The importance scores are normalized using the softmax function to obtain weights, based on which the modality weight matrix is obtained. Based on the obtained modality weight matrix, the three modal feature matrices of each metabolite are weightedly fused to obtain a fused feature matrix. Graph structure information propagation: It includes two layers of GAT. The first layer of GAT locates the first-order neighbors of each metabolite according to the dynamic adjacency matrix, calculates the neighbor weights using the attention mechanism, and weightedly aggregates the neighbor features. The second-layer GAT uses the output of the first-layer GAT as a new feature, locates the second-order neighbors based on the same adjacency matrix, and aggregates cross-hop features twice; Based on this, we obtain the node embedding matrix that integrates multimodal information and the optimized dynamic metabolic relationship graph.
6. The method for constructing a large metabolomics model by fusion of multidimensional databases according to claim 1, characterized in that: The step S3 comprises the following steps: Meta-task construction: Each database is considered as an independent task. For each task, its dataset is randomly divided into a support set and a query set. The support set is used to train the task-specific classifier, and the query set is used to evaluate the generalization ability of the model. Based on this, a meta-task set is obtained, which contains k meta-tasks, and each meta-task contains a support set and a query set. Inner loop: Initialize a corresponding classifier for each meta-task, train the classifier on the support set, calculate the loss function, and update the classifier parameters using gradient descent based on the value of the loss function; Outer loop: Evaluate the loss of each task on the query set to obtain the total loss, backpropagate the total loss to the parameters of the dynamic graph generator, update the dynamic graph generator to optimize cross-task knowledge sharing, and obtain the optimized dynamic graph generator parameters based on this; Collaborative optimization of dynamic graphs and model parameters: Based on the optimized dynamic graph generator parameters, a new dynamic metabolic relationship graph is generated and the classifier parameters are updated. Based on this, a generalized meta-learning model and a robust dynamic graph generator are obtained.
7. The method for constructing a large metabolomics model by fusion of multidimensional databases according to claim 1, characterized in that: When the raw data of a new sample is input, step S1 is reused, and the similarity expansion map between the raw data of the new sample and the global node is calculated through the robust dynamic graph generator. A single-step inner loop adaptation is performed based on the annotation, and the fine-tuned classifier is used to predict the unlabeled sample to obtain the predicted label of the new sample and the real-time expanded dynamic metabolic relationship map.
Citation Information
Patent Citations
Channel analysis modeling method based on mass spectrum metabonomics
CN113049664A
Hybrid modal clustering method and device based on generative graph structure matching
CN118211093A
Detection method of tea tree secondary metabolites
CN118883764A
Iodine metabolism abnormity early warning method, device and equipment based on multi-modal feature fusion
CN119811691A
Drug screening and disease model construction method for liver organoid
CN119851750A
Cited By
Auxiliary diagnosis method and system based on multi-modal decoupling dynamic graph learning
CN121662356A
A Diagnostic Aid Method and System Based on Multimodal Decoupling Dynamic Graph Learning
CN121662356B