Multidimensional database fused metabolomics large model construction method
By combining a globally unique ID mapping and a dynamic graph generator with a multimodal feature matrix, the heterogeneity problem of multi-source metabolomics databases is solved, achieving efficient fusion and cross-database generalization of multi-source data, improving the model's expressive and dynamic relationship capture capabilities, and supporting disease diagnosis and drug development.
Patent Information
- Application Number
- CN202510799019.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2026-01-27
- 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 ability, and manual feature engineering is cumbersome and may introduce information loss.
A globally unique ID is assigned to each metabolite using the InChIKey hash value, and a cross-database metabolite mapping table is established. A dynamic graph generator is used to generate dynamic edge weights by combining multimodal feature matrices and prior path adjacency matrices. An adaptive weight is assigned to different modal features using a multimodal graph attention mechanism. Graph convolution 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 a meta-learning method for inner and outer loop optimization.
It significantly improves the model's cross-library generalization ability, achieves efficient fusion of multi-source heterogeneous metabolomics data, enhances the model's expressive power and dynamic relationship capture ability, and provides powerful tool support for disease diagnosis, drug development and personalized medicine.
Smart Images

Figure CN120708689B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of metabolomics large model construction technology, and more specifically, it relates to a method for constructing metabolomics large models by multidimensional database fusion. Background Technology
[0002] Metabolomics is the science that studies the metabolite profiles within organisms, with wide applications in disease diagnosis, drug development, and personalized medicine. With advancements in biotechnology, various metabolomics databases such as KEGG, HMDB, and MetaboLights have been established, encompassing metabolite concentration data, mass spectrometry maps, and pathway descriptions. However, these data come from diverse sources and are presented in various formats, including numerical concentration data, graphical mass spectrometry data, and knowledge-based text descriptions, resulting in significant data heterogeneity and dimensionality differences.
[0003] Existing multimodal data fusion methods typically employ feature engineering to convert data from different modalities into a unified feature vector, followed by simple concatenation or weighted fusion. For example, numerical data might be standardized, graph-based data might have features extracted using convolutional neural networks, and textual data might have semantic features extracted using the BERT model. These methods require extensive manual feature engineering and fail to capture the dynamic relationships between metabolites. Furthermore, traditional methods often use fixed metabolic pathway graphs as the graph structure, which cannot adapt to differences between different databases, resulting in insufficient cross-database generalization ability.
[0004] Therefore, current technologies face the following problems when processing multi-source heterogeneous metabolomics data: heterogeneous data are difficult to fuse effectively, fixed graph structures cannot capture dynamic relationships, manual feature engineering is cumbersome and may introduce information loss, and the generalization ability across databases is limited. Therefore, there is an urgent need for a new method that can dynamically model metabolite relationships, optimize multi-source data fusion, and improve the generalization ability of the model, so as to make full use of cross-database knowledge and improve the effect in practical applications. Summary of the Invention
[0005] This invention provides a method for constructing a large metabolomics model by fusing multidimensional databases. It aims to solve the technical problem that the heterogeneity and dimensional differences of multi-source metabolomics databases lead to the loss of underlying biochemical correlations by traditional fusion methods, which reduces the generalization ability of AI models.
[0006] A method for constructing large-scale metabolomics models based on multidimensional database fusion includes the following steps:
[0007] S1. Based on numerical data, graph data, and knowledge data from multiple databases, a globally unique ID is established using the InChIKey hash value to map the same metabolite in different databases, resulting in a cross-database metabolite mapping table. The data from multiple databases are then uniformly encoded and concatenated to obtain a multimodal feature matrix.
[0008] S2. Based on the dynamic graph generator, according to the multimodal feature matrix and the prior path adjacency matrix, the prior adjacency matrix is fused with feature cosine similarity and learnable parameters to generate dynamic edge weights. Based on this, a metabolic relationship graph is obtained. Then, a multimodal graph attention mechanism is used to assign adaptive weights to numerical, graph and text features. Graph convolution message passing is performed to obtain a node embedding matrix that integrates multimodal information and an optimized dynamic metabolic relationship graph.
[0009] S3. Each database is split into meta-tasks. Each task consists of a support set and a query set. For each meta-task, the inner loop uses dynamic graphs to train a task-specific classifier. The outer loop uses query set loss to jointly optimize the parameters of the dynamic graph generator and the meta-model, resulting in a generalized meta-learning model and a robust dynamic graph generator.
[0010] This invention achieves precise cross-database mapping by assigning globally unique IDs to metabolites using the InChIKey hash value, and uniformly encodes multi-source heterogeneous data (including numerical, graph, and knowledge-based data) into a multimodal feature matrix, avoiding information loss due to data heterogeneity in traditional methods. Simultaneously, the model employs a dynamic graph generator, combining the multimodal feature matrix and prior path adjacency matrix, generating dynamic edge weights through feature cosine similarity and learnable parameters to construct a metabolic relationship graph. Furthermore, it utilizes 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. The method also includes an optimized dynamic metabolic relationship graph. Furthermore, by employing a meta-learning approach, each database is divided into meta-tasks. The inner loop uses the dynamic graph to train a task-specific classifier, while the outer loop jointly optimizes the dynamic graph generator and meta-model parameters using query set loss, significantly improving the model's cross-database generalization ability. Therefore, this invention achieves efficient fusion of multi-source heterogeneous metabolomics data through globally unique ID mapping, multimodal feature matrix construction, dynamic metabolic relationship graph generation, and meta-learning optimization. This significantly enhances the model's expressive power, dynamic relationship capture ability, and cross-database 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 adopted as a unified standard, and the initial ID is generated by performing the SHA256 hash algorithm on InChIKey;
[0013] The first n characters of the hash value of the initial ID are extracted as the basic global identifier GID; when different compounds accidentally generate the same global identifier GID, a check code of the CAS registration number is added to distinguish them, and a cross-library metabolite mapping table is obtained based on this.
[0014] Preferably, obtaining the multimodal feature matrix includes the following steps:
[0015] Numerical data processing: Perform Z-score transformation on the concentration data of each metabolite, calculate the seven-dimensional statistics of each metabolite across samples, and obtain the concentration matrix;
[0016] Spectral data processing: A one-dimensional convolutional autoencoder is used to compress the original spectral signal and output a 32-bit vector as spectral features;
[0017] Text data processing: The BioBERT biomedical language model is used to extract the semantic vectors of the tags, and then the extracted semantic vectors are compressed to 128 dimensions through a fully connected layer;
[0018] Multimodal feature fusion: Features obtained from numerical data processing, graph data processing, and text data processing are spliced together for each metabolite to obtain a multimodal feature matrix.
[0019] Preferably, obtaining the metabolic relationship diagram includes the following steps:
[0020] Prior pathway adjacency matrix acquisition: Metabolic pathway structures are imported from the KEGG database in the multi-source database. The known biochemical reaction relationships between metabolites are represented by an adjacency matrix. If a reaction exists, it is 1; otherwise, it is 0. Based on this, the prior pathway adjacency matrix is obtained.
[0021] Computational Feature Similarity Network: Based on the multimodal feature matrix, the similarity of each pair of metabolite feature vectors is calculated using a similarity algorithm, and the feature similarity matrix is obtained accordingly;
[0022] Integrating prior pathways and data similarity: An automatically learnable balancing parameter is introduced, which is mapped to a weight value between 0 and 1 through the Sigmoid function. The prior pathway adjacency matrix and the feature similarity matrix are weighted and summed based on the weight values to obtain a dynamic adjacency matrix.
[0023] The dynamic adjacency matrix is symmetrically normalized to obtain the normalized metabolic relationship graph.
[0024] Preferably, the steps for obtaining the node embedding matrix are as follows:
[0025] Modal alignment projection: The numerical feature matrix, the graph feature matrix, and the text feature matrix are projected onto a unified dimension through a fully connected layer to obtain the three projected modal feature matrices;
[0026] Modal importance weighting: For each metabolite, the three modal feature matrices after projection are concatenated, and then the importance score of each modality is calculated through an attention network. The importance score is normalized using the softmax function to obtain the weight, and the modal weight matrix is obtained based on this. The three modal feature matrices of each metabolite are weighted and fused based on the obtained modal weight matrix to obtain the 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 an attention mechanism, and aggregates the neighbor features in a weighted manner.
[0028] The second-layer GAT uses the output of the first-layer GAT as a new feature, locates second-order neighbors based on the same adjacency matrix, and aggregates cross-jump features in a second time; based on this, a node embedding matrix that integrates multimodal information and an optimized dynamic metabolic relationship graph are obtained.
[0029] Preferably, step S3 includes the following steps:
[0030] Metatask construction: Each database is treated 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 a task-specific classifier, and the query set is used to evaluate the generalization ability of the model. Based on this, a metatask set is obtained, which contains k metatasks. Each metatask 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] Co-optimization of dynamic graph 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 new sample raw data is input, step S1 is reused, and a similarity expansion graph between the new sample raw data and global nodes is calculated through a robust dynamic graph generator. Single-step inner loop adaptation is performed based on the annotation, and the unlabeled samples are predicted using a fine-tuned classifier to obtain the new sample predicted label and the real-time expanded dynamic metabolic relationship graph.
[0035] The beneficial effects of this invention include:
[0036] This invention achieves precise cross-database mapping by assigning globally unique IDs to metabolites using the InChIKey hash value, and uniformly encodes multi-source heterogeneous data (including numerical, graph, and knowledge-based data) into a multimodal feature matrix, avoiding information loss due to data heterogeneity in traditional methods. Simultaneously, the model employs a dynamic graph generator, combining the multimodal feature matrix and prior path adjacency matrix, generating dynamic edge weights through feature cosine similarity and learnable parameters to construct a metabolic relationship graph. Furthermore, it utilizes 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. The method also includes an optimized dynamic metabolic relationship graph. Furthermore, by employing a meta-learning approach, each database is divided into meta-tasks. The inner loop uses the dynamic graph to train a task-specific classifier, while the outer loop jointly optimizes the dynamic graph generator and meta-model parameters using query set loss, significantly improving the model's cross-database generalization ability. Therefore, this invention achieves efficient fusion of multi-source heterogeneous metabolomics data through globally unique ID mapping, multimodal feature matrix construction, dynamic metabolic relationship graph generation, and meta-learning optimization. This significantly enhances the model's expressive power, dynamic relationship capture ability, and cross-database generalization ability, providing powerful tool support for practical applications such as disease diagnosis, drug development, and personalized medicine. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is an overall step diagram provided for an embodiment of the present invention.
[0039] Figure 2 A schematic diagram illustrating the specific steps of step S2 provided in an embodiment of the present invention. Detailed Implementation
[0040] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.
[0041] See Figure 1 As shown, the method for constructing a large metabolomics model by fusing multidimensional databases includes the following steps:
[0042] S1. Based on numerical data, graph data, and knowledge data from multiple databases, a globally unique ID is established using the InChIKey hash value to map the same metabolite in different databases, resulting in a cross-database metabolite mapping table. The data from multiple databases are then uniformly encoded and concatenated to obtain a multimodal feature matrix.
[0043] Step S1 includes the following steps:
[0044] In this embodiment, the numerical data comes from the MetaboLights database and is a metabolite concentration matrix; the spectral data comes from the HMDB database and is raw mass spectrometry / NMR spectra; and the knowledge data comes from the KEGG database and is a textual description of metabolic pathways.
[0045] The metabolite IDs in the MetaboLights, HMDB, and KEGG databases 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 address the heterogeneity of metabolite identifiers across different databases and establish a globally unique mapping relationship, which specifically includes the following steps:
[0047] InChIKey Extraction: Obtain the standard InChIKey of metabolites from a database API. The InChIKey is a 27-bit International Chemical Substance Identifier used to uniquely identify chemical molecules. For example, the InChIKey of glucose is: WQZGKKKJIJFFOK-GASJEMHNSA-N.
[0048] Hash Mapping: A globally unique ID (GID) is generated by performing SHA256 calculation on the InChIKey, where the hashing process uses the following formula:
[0049] GID=SHA256(InChIKey)[0:16];
[0050] Where: SHA256(·) represents a 256-bit secure hash algorithm used to generate unique hash values; [0:16] represents extracting the first 16 bits of the hash value as a globally unique ID (GID);
[0051] Collision resolution: In the hash mapping process, if different metabolites collide with the same hash value (probability less than 10), collision resolution will occur. -15 If a conflict is not found, a hierarchical strategy is adopted to eliminate it, that is, checksum processing is performed based on the CAS registry number:
[0052] GID′=GID+checksum(CAS) number );
[0053] In the formula: checksum represents the checksum operation performed on the CAS number; CAS number Indicates the CAS number;
[0054] Based on the hash mapping and conflict resolution, a cross-library metabolite mapping table is obtained.
[0055] After establishing the cross-library metabolite mapping table, it is necessary to perform unified encoding of heterogeneous data, converting numerical, graphical, and textual data into feature vectors of a unified dimension. To handle multimodal data, a 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 cross-sample statistical characteristics of each metabolite 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, the same type of metabolite is found according to the classification system of the KEGG database, and the missing values are filled with the mean concentration of the same type of metabolite.
[0057] Graph data processing: A 1D convolutional autoencoder is used to extract spectral features. The autoencoder consists of an encoder and a decoder. The encoder extracts spectral features through convolutional and pooling layers, and the decoder maps the extracted spectral features back to the spectral space to achieve reconstruction. The autoencoder is trained by minimizing the reconstruction loss to learn spectral features, and 32-dimensional spectral features are output based on the trained autoencoder. For missing spectral data, 32-dimensional zero vectors are used for padding. 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, ensuring the cleanliness and consistency of the input text. Based on the maximum input length limit of the BioBERT biomedical language model, the text is segmented to ensure that each segment does not exceed the model's maximum input length. A [CLS] marker is added at the beginning of each segment, and a [SEP] marker is added at the end 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] marker 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 the backpropagation algorithm to ensure that the vector after dimensionality reduction retains as much of the original semantic information as possible.
[0062] When pathway descriptions are missing, metabolite names are used as substitutes. The metabolite names are input into the BioBERT model, and their 768-dimensional semantic vectors are extracted and compressed to 128 dimensions through the same fully connected layer. This ensures that each metabolite has a complete 128-dimensional textual feature vector, avoiding the impact of missing data on subsequent multimodal feature fusion.
[0063] Multimodal feature fusion: For each metabolite, features obtained from numerical data processing, graph data processing, and text data processing are spliced together to obtain a multimodal feature matrix, where rows correspond to metabolites and columns correspond to 167-dimensional fused features.
[0064] S2. Based on the dynamic graph generator, according to the multimodal feature matrix and the prior path adjacency matrix, the prior adjacency matrix is fused with feature cosine similarity and learnable parameters to generate dynamic edge weights. Based on this, a metabolic relationship graph is obtained. Then, a multimodal graph attention mechanism is used to assign adaptive weights to numerical, graph and text features. Graph convolution message passing is performed to obtain a node embedding matrix that integrates multimodal information and an optimized dynamic metabolic relationship graph.
[0065] Prior pathway adjacency matrix acquisition: Metabolic pathway structures are imported from the KEGG database in the multi-source database. The known biochemical reaction relationships between metabolites are represented by an adjacency matrix. If a reaction exists, it is 1; otherwise, it is 0. Based on this, the prior pathway adjacency matrix is obtained.
[0066] Computational Feature Similarity Network: Based on the multimodal feature matrix, the similarity of each pair of metabolite feature vectors is calculated using a similarity algorithm, and the feature similarity matrix is obtained accordingly;
[0067] In this embodiment, cosine similarity is used to measure the feature similarity between metabolites. Given the feature vectors M of metabolite i and metabolite j, i and M j The cosine similarity S between metabolite i and metabolite j is obtained by measuring cosine similarity. ij The cosine similarity of each pair of metabolites was calculated to obtain... Let N be a fully connected similarity matrix, where N represents the number of metabolites and the value range of the matrix is [-1, 1], representing the similarity between metabolites;
[0068] Integrating Prior Pathways and Data Similarity: To simultaneously consider prior biochemical pathway knowledge and data-driven feature similarity, an automatically learnable balancing parameter is introduced. This parameter is mapped to a weight value between 0 and 1 using the Sigmoid function. Based on these weight values, the prior pathway adjacency matrix and the feature similarity matrix are weighted and summed to obtain a dynamic adjacency matrix, as shown in the following expression:
[0069] A dyn =σ(α)·A prior +(1-σ(α))·S;
[0070] In the formula: σ represents a learnable balancing parameter that controls the weights of the prior path adjacency matrix and feature similarity, with an initial value set to 0.5; where σ represents the Sigmoid function, used to constrain α to the interval [0,1]; A prior A represents the prior path adjacency matrix; dyn Represents a dynamic adjacency matrix;
[0071] The dynamic adjacency matrix is symmetrically normalized to obtain the normalized metabolic graph, as shown in the following expression:
[0072]
[0073] In the formula: 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, the dynamic metabolic relationship diagram is as follows: Where M represents the multimodal feature matrix of the metabolite; This represents the dynamic adjacency matrix after symmetric normalization.
[0075] Modal alignment projection: The numerical feature matrix, the graph feature matrix, and the text feature matrix are projected onto a unified dimension through a fully connected layer to obtain the three projected modal feature matrices;
[0076] Modal importance weighting: For each metabolite, the three modal feature matrices after projection are concatenated, and then the importance score of each modality is calculated through an attention network. The importance score is then normalized using a softmax function to obtain the weight, based on which the modal weight matrix is obtained. Based on the obtained modal weight matrix, the three modal feature matrices of each metabolite are weighted and fused to obtain the fused feature matrix F. fused ;
[0077] In this embodiment, if mass spectrum data is missing, the corresponding modal feature matrix of the mass spectrum is a 32-dimensional zero vector. After processing by the fully connected layer, it is still zero. The dot product of the zero vector and the attention vector is still not zero. After the leakyReLU activation, it is still not zero. During softmax normalization, the modal weights of the spectrum have a reduced proportion in the multimodal weights because the activation value is 0. Based on this, the missing spectral data is suppressed.
[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 an attention mechanism, and aggregates the neighbor features in a weighted manner. The specific expression is as follows:
[0079]
[0080] In the formula: Indicates that node i is in The neighbor set in the ; || represents the feature concatenation operation; b (1) This represents the attention weight vector of the first layer of GAT, where T represents the transpose; This represents the learnable weight matrix of the first layer of GAT; The fused feature matrix of node j is represented by ELU; ELU represents the linear unit activation function; LeakyReLU represents the leaky ReLU activation function; Softmax... j This indicates that the attention scores of all neighboring nodes j of all nodes i are normalized using Softmax along the j-th dimension. This represents the fusion feature matrix of the i-th node;
[0081] The second-layer GAT uses the output of the first-layer GAT as new features, locates second-order neighbors based on the same adjacency matrix, and aggregates cross-hop features a second time. Based on this, a node embedding matrix incorporating multimodal information and an optimized dynamic metabolic relationship graph are obtained, as shown in the following expression:
[0082]
[0083] In the formula: H represents the embedding vector of node j output by the first layer GAT; (2) This represents the final node embedding matrix output by the second-layer GAT; This represents the learnable weight matrix of the second-layer GAT; b represents the attention coefficient of node i to its neighbor node j in the second-layer GAT; (2) This represents the attention weight vector of the second-layer GAT; This represents the embedding vector of node i output by the first layer of GAT.
[0084] In this embodiment, by fusing the KEGG pathway adjacency matrix and the feature cosine similarity matrix, learnable parameters are used to generate dynamic weights via a sigmoid function to adjust the contribution ratio of the two types of edges, and then symmetric normalization is applied to stabilize the graph structure. This method effectively improves the association coverage of metabolites not included in HMDB while maintaining the directional constraints of enzymatic reactions. Secondly, heterogeneous feature dimensions are aligned through fully connected layers, and modal attention networks are used to allocate weights (e.g., lipid metabolite mass spectrometry weights > 0.7). A two-layer GAT structure is designed: the first layer aggregates direct neighbor reaction partners, and the second layer captures indirect regulatory nodes, combined with edge attention to filter noisy edges. This mechanism significantly enhances the discriminative power of node embedding, achieving an F1-score of 92.7% for cross-library metabolite classification (compared to a single-modal baseline of 80.3%, validated with KEGG / HMDB / METLIN three libraries).
[0085] S3. Each database is split into meta-tasks. Each task consists of a support set and a query set. For each meta-task, the inner loop uses dynamic graphs to train a task-specific classifier. The outer loop uses query set loss to jointly optimize the parameters of the dynamic graph generator and the meta-model, resulting in a generalized meta-learning model and a robust dynamic graph generator.
[0086] Step S3 includes the following steps:
[0087] Meta-task construction: For the i-th database D i m metabolite samples (including labels) were randomly selected as the support set. Where h j The node embedding matrix represents the j-th metabolite; y j This represents the label of the j-th metabolite; simultaneously from the same database D i Sample n metabolite samples as a query set Used to evaluate the performance of the classifier; h k The node embedding matrix represents the k-th metabolite; y kThe label represents the k-th metabolite; the label is based on the KEGG and HMDB databases and contains different category information, such as disease association labels in the KEGG database and concentration anomaly labels in the HMDB database.
[0088] Finally, the meta-tasks for each task are constructed. All meta-tasks are built 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, and calculate the loss function. 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, as shown in the following expression:
[0090]
[0091] In the formula: 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 classifier The output predicted value;
[0092] Using support set S i Single-step update of gradient on:
[0093]
[0094] In the formula: η represents the inner loop learning rate; Represents the cross-entropy loss function; η represents the learning rate; θ ′ i θ represents the updated values of the classifier parameters corresponding to task i; θ represents the parameters of the current global classifier. Indicating support for set S i The gradient of the classifier calculated above;
[0095] Outer loop: Evaluate the model adapted for each task based on the query set, and calculate the meta-loss:
[0096]
[0097] In the formula: This represents the cross-entropy loss of the query set; This represents the total loss across multiple tasks; K represents the number of tasks. Indicates in query set Q i The loss function on task i calculates the classifier on task i. Classification error on the query set;
[0098] Update the parameters of the dynamic graph generator and classifier:
[0099]
[0100] Where: β represents the outer loop learning rate; φ represents the parameters of the dynamic graph generator, including the graph similarity weight α and parameters related to the graph neural network (GAT); Indicates the original loss The gradient with respect to the parameter φ of the dynamic graph generator; Indicates the original loss The gradient with respect to the parameters θ of the global classifier;
[0101] Co-optimization of dynamic graph 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 embodiment, by splitting each database into independent meta-tasks, the inner loop fine-tunes the task-specific classifier to adapt to the local data distribution, and the outer loop jointly optimizes the dynamic graph generator and meta-model parameters, achieving the co-evolution of the graph structure and the classifier. This framework enables the model to achieve 90% classification accuracy in the new database with only 50 labeled samples (conventional models require 500+ samples, and the test covers 8 metabolite databases).
[0103] S4. When new sample raw data is input, step S1 is reused. The similarity expansion graph between the new sample raw data and global nodes is calculated through the robust dynamic graph generator. Single-step inner loop adaptation is performed based on the annotation. The unlabeled samples are predicted using the fine-tuned classifier to obtain the new sample predicted label and the real-time expanded dynamic metabolic relationship graph.
[0104] The multimodal feature matrix of the new metabolite is obtained by reusing step S1. Where N new D represents the number of metabolites in the new sample; D represents the total dimension of the multimodal features.
[0105] Calculate the feature similarity between the new metabolite and existing metabolites to obtain similarity values; update the dynamic adjacency matrix based on the similarity, and integrate the new metabolite into the existing dynamic graph to form an expanded dynamic adjacency matrix A. dyn,new Based on this, an expanded dynamic metabolic relationship diagram was obtained:
[0106] Based on the expanded dynamic graph and a small number of labeled samples (fine-tuning the support set); the generalized meta-learning model trained in step S3 is fine-tuned using the support set data, the model parameters are updated to adapt to the new task, and the adapted task-specific classifier is obtained. Based on the adapted task-specific classifier, the query set data is predicted, the prediction results are output, and the prediction results of the new samples (such as disease risk probability, metabolite function annotation, etc.) are obtained.
[0107] In this embodiment, efficient prediction of new metabolomics samples is achieved through dynamic expansion and rapid meta-knowledge inference. Dynamic graph expansion ensures that new metabolites can be integrated into existing metabolic relationship networks, while meta-knowledge inference uses a small amount of labeled data to quickly adjust the model to adapt to new tasks. The whole process maintains the dynamics and generalization ability of the framework, and can flexibly cope with the challenges of new data and new tasks.
[0108] In summary, this invention effectively integrates numerical, graphical, and knowledge-based heterogeneous data from multiple databases through globally unique IDs and multimodal feature fusion, solving the problems of data silos and heterogeneity in metabolomics. The core of this invention utilizes a dynamic graph generator combined with prior pathways and adaptive feature similarity to generate a metabolic network that inherits biological pathway knowledge and dynamically captures data-driven relationships. Furthermore, a multimodal graph attention mechanism assigns optimal weights to different features, significantly improving the discriminative power of node embedding. Finally, a meta-learning framework is introduced, decomposing multiple databases into meta-tasks for collaborative optimization through internal and external loops. The internal loop training task... A dedicated classifier is used to adapt to local data distribution, while the outer loop jointly optimizes the dynamic graph structure and meta-model parameters to improve generalization ability. The resulting robust dynamic graph generator and generalized meta-model can not only achieve rapid zero-sample adaptation when facing new samples through similarity calculation and graph expansion, but also update the metabolic relationship graph structure simultaneously, thereby ensuring high prediction accuracy while continuously improving the metabolic interaction knowledge base. Ultimately, it realizes in-depth utilization of cross-database data, strong generalization in small sample scenarios, interpretability of model predictions, and real-time evolution capability of metabolic networks, providing an efficient, adaptive, and scalable intelligent analysis framework for metabolomics research.
[0109] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for constructing a large-scale metabolomics model based on multidimensional database fusion, characterized in that, Includes the following steps: S1. Based on numerical data, graph data, and knowledge data from multiple databases, a globally unique ID is established using the InChIKey hash value to map the same metabolite in different databases, resulting in a cross-database metabolite mapping table. The data from multiple databases are then uniformly encoded and concatenated to obtain a multimodal feature matrix. S2. Based on the dynamic graph generator, according to the multimodal feature matrix and the prior path adjacency matrix, the prior adjacency matrix is fused with feature cosine similarity and learnable parameters to generate dynamic edge weights. Based on this, a metabolic relationship graph is obtained. Then, a multimodal graph attention mechanism is used to assign adaptive weights to numerical, graph and text features. Graph convolution message passing is performed to obtain a node embedding matrix that integrates multimodal information and an optimized dynamic metabolic relationship graph. Obtaining the metabolic relationship diagram includes the following steps: Prior pathway adjacency matrix acquisition: Metabolic pathway structures are imported from the KEGG database in the multi-source database. The known biochemical reaction relationships between metabolites are represented by an adjacency matrix. If a reaction exists, it is 1; otherwise, it is 0. Based on this, the prior pathway adjacency matrix is obtained. Computational Feature Similarity Network: Based on the multimodal feature matrix, the similarity of each pair of metabolite feature vectors is calculated using a similarity algorithm, and the feature similarity matrix is obtained accordingly; Integrating prior pathways and data similarity: An automatically learnable balancing parameter is introduced, which is mapped to a weight value between 0 and 1 through the Sigmoid function. The prior pathway adjacency matrix and the feature similarity matrix are weighted and summed based on the weight values to obtain a dynamic adjacency matrix. The dynamic adjacency matrix is symmetrically normalized to obtain the normalized metabolic relationship graph. The steps to obtain the node embedding matrix are as follows: Modal alignment projection: The numerical feature matrix, the graph feature matrix, and the text feature matrix are projected onto a unified dimension through a fully connected layer to obtain the three projected modal feature matrices; Modal importance weighting: For each metabolite, the three modal feature matrices after projection are concatenated, and then the importance score of each modality is calculated through an attention network. The importance score is normalized using the softmax function to obtain the weight, and the modal weight matrix is obtained based on this. The three modal feature matrices of each metabolite are weighted and fused based on the obtained modal weight matrix to obtain the 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 an attention mechanism, and aggregates the neighbor features in a weighted manner. The second-layer GAT uses the output of the first-layer GAT as a new feature, locates second-order neighbors based on the same adjacency matrix, and aggregates cross-jump features in a second time; based on this, a node embedding matrix that integrates multimodal information and an optimized dynamic metabolic relationship graph are obtained; S3. Each database is split into meta-tasks. Each task consists of a support set and a query set. For each meta-task, the inner loop uses dynamic graphs to train a task-specific classifier. The outer loop uses query set loss to jointly optimize the parameters of the dynamic graph generator and the meta-model, resulting in a generalized meta-learning model and a robust dynamic graph generator.
2. The method for constructing a large metabolomics model based on multidimensional database fusion 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 adopted as a unified standard, and the initial ID is generated by performing the SHA256 hash algorithm on InChIKey; The first n characters of the hash value of the initial ID are extracted as the basic global identifier GID; when different compounds accidentally generate the same global identifier GID, a check code of the CAS registration number is added to distinguish them, and a cross-library metabolite mapping table is obtained based on this.
3. The method for constructing a large metabolomics model based on multidimensional database fusion according to claim 1, characterized in that, Obtaining the multimodal feature matrix includes the following steps: Numerical data processing: Perform Z-score transformation on the concentration data of each metabolite, calculate the seven-dimensional statistics of each metabolite across samples, and obtain the concentration matrix; Spectral data processing: A one-dimensional convolutional autoencoder is used to compress the original spectral signal and output a 32-bit vector as spectral features; Text data processing: The BioBERT biomedical language model is used to extract the semantic vectors of the tags, and then the extracted semantic vectors are compressed to 128 dimensions through a fully connected layer; Multimodal feature fusion: Features obtained from numerical data processing, graph data processing, and text data processing are spliced together for each metabolite to obtain a multimodal feature matrix.
4. The method for constructing a large metabolomics model based on multidimensional database fusion according to claim 1, characterized in that, Step S3 includes the following steps: Metatask construction: Each database is treated 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 a task-specific classifier, and the query set is used to evaluate the generalization ability of the model. Based on this, a metatask set is obtained, which contains k metatasks. Each metatask 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. Co-optimization of dynamic graph 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.
5. The method for constructing a large metabolomics model based on multidimensional database fusion according to claim 1, characterized in that, When new sample raw data is input, step S1 is reused. The robust dynamic graph generator calculates the similarity expansion graph between the new sample raw data and global nodes. Based on the annotation, a single-step inner loop adaptation is performed. The fine-tuned classifier is used to predict unlabeled samples, and the predicted label of the new sample and the real-time expanded dynamic metabolic relationship graph are obtained.
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