Microbial fermentation process product recognition method and system based on deep learning

By fusing hard and soft constraints through a graph variational autoencoder and a VOC-metabolite association mapping network, and combining confidence-weighted message passing and a causal sparse attention network, the accuracy problem of early product identification in microbial fermentation was solved, achieving higher concentration inference and identification accuracy.

CN122361689APending Publication Date: 2026-07-10HANSHAN NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANSHAN NORMAL UNIV
Filing Date
2026-04-10
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing deep learning methods suffer from insufficient metabolic network topological constraints and insufficient signal-to-noise ratio of a single detection source in the early stages of microbial fermentation due to sparse HPLC observations and extremely low product concentrations, resulting in missed or misjudged product identification.

Method used

By fusing HPLC hard constraints and mass spectrometry soft constraints through a graph variational autoencoder and a VOC-metabolite association mapping network, and combining a confidence-weighted message-passing graph neural network and a causal sparse attention network, dual-source constraint full-node metabolite concentration inference and product synthesis identification are achieved.

Benefits of technology

It improves the accuracy of inferring the concentration of metabolites at all nodes under sparse observation conditions, reduces the occurrence of missed detections and misjudgments in product identification in the early stage of fermentation, and improves the accuracy of product identification in the early stage of fermentation through the application of the technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122361689A_ABST
    Figure CN122361689A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of microbial fermentation process monitoring and deep learning, and discloses a microbial fermentation process product identification method and system based on deep learning, which comprises the following steps: acquiring a metabolic network directed graph structure and multi-source detection data; training a graph variational autoencoder; performing multi-scale decomposition and feature extraction on tail gas mass spectrum signals, generating node-level soft constraint information through a VOC-metabolite correlation mapping network; performing double-source constraint condition inference in the latent space of the graph variational autoencoder by fusing HPLC hard constraints and mass spectrum soft constraints, and generating full-node metabolite concentration inference values; and outputting fermentation early product identification results after feature extraction through a confidence weighted message passing graph neural network and a causal sparse attention network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microbial fermentation process monitoring and deep learning technology, and more specifically, to a method and system for identifying microbial fermentation process products based on deep learning. Background Technology

[0002] In microbial fermentation, product identification relies on the detection and analysis of metabolite concentrations within the fermentation system. Existing deep learning-based product identification methods typically use metabolite concentration data obtained through offline high-performance liquid chromatography (HPLC) as model input. They utilize deep neural networks to learn the mapping relationship between metabolite concentration changes and product formation states, thereby determining the synthesis progress of the target product. During fermentation, online mass spectrometry can acquire tail gas spectral signals in real time, reflecting the release of volatile metabolic byproducts, serving as an auxiliary process monitoring tool. In the later stages of fermentation, when product concentrations are high, HPLC data can provide sufficient feature information for the deep learning model, resulting in high product identification accuracy.

[0003] However, in the early stages of fermentation, the concentration of the target product is extremely low, and offline HPLC detection is limited by the sampling cycle, only covering a limited amount of metabolite node concentration information in the metabolic network. Existing deep learning methods face two major challenges when processing data at this stage: First, graph neural network models based on the metabolic network topology suffer from severe underconstraint inference of the concentration of unobserved nodes when only a small number of HPLC observation nodes are used as input. Multiple sets of drastically different inference results can satisfy known sparsity constraints, leading to non-unique and unreliable estimation of the metabolic state of the entire network. Second, the extremely low product concentration results in very weak changes in key intermediate metabolites associated with product synthesis, making it difficult for deep learning models to extract effective product synthesis initiation signals from low signal-to-noise ratio data from a single detection source, causing missed detections or misjudgments in product identification in the early stages of fermentation. Summary of the Invention

[0004] This invention provides a method and system for identifying products in microbial fermentation processes based on deep learning, which solves the technical problems in related technologies such as reliance on a single data source for early product identification in fermentation processes, insufficient utilization of metabolic network topological constraints, and insufficient accuracy in inferring the concentration of metabolites across all nodes under sparse observation conditions.

[0005] This invention discloses a method for identifying products of microbial fermentation processes based on deep learning, comprising:

[0006] The directed graph structure of the metabolic network of the target microorganism, the metabolomics dataset of historical fermentation batches, the tail gas spectral signal matrix output in real time by the online mass spectrometer, and the sparse metabolite concentration data detected periodically by high performance liquid chromatography were obtained, and the data were normalized.

[0007] The graph variational autoencoder was trained using the metabolomics dataset of the historical fermentation batches to obtain the trained graph variational autoencoder. The encoder of the graph variational autoencoder uses the adjacency matrix of the directed graph of the metabolic network as the topological constraint and encodes the complete metabolite concentration vector into the latent space through graph convolution operation. The decoder samples from the latent distribution and reconstructs the metabolite concentration vector through graph convolution operation.

[0008] The tail mass spectrometry signal matrix is ​​decomposed at multiple scales and its features are extracted. After correlation mapping, the mass spectrometry inference soft constraint value and the corresponding correlation confidence score of each node in the metabolic network are generated.

[0009] The observed node concentration values ​​detected by high performance liquid chromatography are used as hard constraints, and the soft constraint values ​​inferred by mass spectrometry and the associated confidence scores are used as elastic constraints. The results are iteratively optimized in the latent space of the trained graph variational autoencoder to generate dual-source constrained full-node metabolite concentration inference values.

[0010] Based on the inferred metabolite concentration values ​​of the dual-source constraint full nodes, the product synthesis has started probability values ​​output by the product identification and classification network. The product synthesis has started probability values ​​are compared with preset judgment thresholds to generate early fermentation product identification results.

[0011] Furthermore, the loss function of the graph variational autoencoder during the training phase includes a reconstruction loss term and a KL divergence regularization term. The reconstruction loss term is the mean square error between the reconstructed concentration value and the true concentration value of each node. The KL divergence regularization term is the KL divergence between the posterior distribution of the encoder output and the standard normal prior distribution. The KL divergence regularization term is multiplied by the regularization weight coefficient and then summed with the reconstruction loss term. The encoder achieves differentiability of the sampling process through reparameterization techniques. After sampling the noise vector from the standard normal distribution, it performs element-wise operations with the mean parameter and standard deviation parameter of the encoder output to obtain the latent vector.

[0012] Furthermore, the tail gas spectral signal matrix is ​​subjected to multi-scale decomposition and feature extraction, including:

[0013] The tail gas spectrum signal matrix is ​​decomposed along the time axis using a multi-scale wavelet decomposition algorithm to obtain the low-frequency trend component matrix and the mid-frequency periodic component matrix.

[0014] The low-frequency trend component matrix and the mid-frequency periodic component matrix are respectively input into the encoding layer of the pre-trained recurrent generative adversarial network at the corresponding scale to extract low-frequency metabolic association mass spectrometry features and mid-frequency metabolic association mass spectrometry features, respectively. The recurrent generative adversarial network includes a generator and a discriminator. The generator includes a recurrent encoding layer and a recurrent decoding layer. The discriminator and the generator are trained alternately in an adversarial manner. After training, the recurrent encoding layer of the generator is used as the feature extraction encoding layer.

[0015] Further, the generation of mass spectrometry inference soft constraint values ​​and corresponding association confidence scores for each node in the metabolic network through association mapping processing includes:

[0016] The low-frequency metabolism correlation mass spectrometry features and the mid-frequency metabolism correlation mass spectrometry features are concatenated along the feature dimension to obtain fused mass spectrometry features, and the fused mass spectrometry features are input into the VOC-metabolite association mapping network;

[0017] The VOC-metabolite association mapping network comprises a feature transformation layer, a graph topology mapping layer, and a dual-head output layer. The feature transformation layer maps the fused mass spectrometry features into an intermediate feature matrix aligned with the dimensions of the metabolic network nodes through multi-layer fully connected operations. The graph topology mapping layer performs graph convolution operations on the intermediate feature matrix using the adjacency matrix as a topological constraint, outputting a topology-enhanced feature matrix. The dual-head output layer performs linear transformations on each row of the topology-enhanced feature matrix, with one output head generating the mass spectrometry inference soft constraint value for each node and the other output head generating the association confidence score for each node through a sigmoid activation function.

[0018] The training loss function of the VOC-metabolite association mapping network includes a regression loss based on soft constraint values ​​and a binary cross-entropy loss based on association confidence scores. The binary cross-entropy loss uses the label indicating whether there is a direct metabolic association between each node and the mass spectrometer-detectable volatile components as a supervision signal.

[0019] Further, the iterative optimization in the latent space of the trained graph variational autoencoder includes:

[0020] Sampling points are initialized in the latent space. In each iteration, the current sampling point is decoded to output the current reconstructed concentration vector. The gradient of the optimization objective function with respect to the current sampling point is calculated, and the sampling point is updated along the gradient descent direction. The optimization objective function includes a hard consistency loss term for observed nodes, a weighted consistency loss term for mass spectrometry soft constraint nodes, and a prior regularization term for the latent space. The hard consistency loss term is a measure of the difference between the reconstructed concentration value of the observed node and the measured value by high-performance liquid chromatography. The weighted consistency loss term is the sum of the difference measure between the reconstructed concentration value and the mass spectrometry inferred soft constraint value of each node multiplied by the association confidence score of the corresponding node. The prior regularization term is a norm measure of the current sampling point.

[0021] During the iteration process, the encoder and decoder parameters of the graph variational autoencoder are kept fixed, and only the latent space sampling points are used as optimizable variables;

[0022] The weighting coefficient of the hard consistency loss term is greater than the weighting coefficient of the weighted consistency loss term.

[0023] Furthermore, in the iterative optimization process, a progressively increasing strategy is adopted for the weight coefficient of the weighted consistency loss term. In the early stage of the iteration, a small weight coefficient is used to guide the optimization by the hard consistency loss term and the prior regularization term. As the number of iterations increases, the weight coefficient is gradually increased so that the mass spectrometry soft constraint gradually participates in the constraint.

[0024] Furthermore, after generating the inferred metabolite concentration values ​​for the dual-source constrained full node, the method further includes:

[0025] The overall inferred confidence of each node is calculated. The overall inferred confidence is obtained by weighted fusion of the indicator function term and the associated confidence score term. The indicator function term takes a value of 1 when the node belongs to the set of observed nodes in high performance liquid chromatography, and a value of 0 otherwise. The associated confidence score term is the associated confidence score of the soft constraint of the corresponding node in mass spectrometry. The two terms are multiplied by the fusion coefficient and the complementary fusion coefficient respectively and then summed.

[0026] The inferred metabolite concentration values ​​of the dual-source constrained full nodes are used as feature vectors of each node in the directed graph of the metabolic network. The comprehensive inference confidence is used as the node weight and input into the confidence weighted message passing graph neural network for iterative aggregation calculation to generate the confidence-aware context feature representation of each node.

[0027] The confidence-weighted message passing graph neural network includes a message calculation unit, a confidence gating unit, and a feature update unit. The message calculation unit calculates the message vector transmitted from the source node to the target node. The confidence gating unit scales the message vector based on the comprehensive inference confidence of the source node. The feature update unit aggregates all gated messages received by the target node and fuses them with the target node's own features to update the target node's feature representation.

[0028] The confidence-aware contextual feature representations of each node are global pooled and then input into the product identification and classification network to generate early fermentation product identification results.

[0029] Furthermore, after generating the confidence-aware contextual feature representations for each node, the process also includes:

[0030] The confidence-aware contextual feature representations of each node at multiple consecutive detection times are global pooled and arranged in time sequence. They are then input into a causal sparse attention network for temporal feature extraction to generate a temporal enhanced metabolic state feature vector.

[0031] The causal sparse attention network comprises a causal masking attention layer and a low-frequency long-range connection layer. The causal masking attention layer applies a causal mask to the feature sequence, restricting each time step to focus only on the features of the current and previous time steps. It calculates the attention score by projecting the features of each time step onto a learnable query matrix and a key matrix, and then performs weighted aggregation. The low-frequency long-range connection layer applies a learnable long-range connection bias parameter to time steps with a time span of not less than a time span threshold, multiplies it by a long-range enhancement coefficient, and then superimposes it onto the attention weights to enhance the ability to capture slowly changing trends.

[0032] The time-enhanced metabolic state feature vector is used as the input feature of the product identification and classification network to generate early fermentation product identification results.

[0033] Furthermore, the time-series enhanced metabolic state feature vector is input into the product synthesis initiation discrimination branch and the node-level abnormal accumulation detection branch, respectively;

[0034] The product synthesis initiation discrimination branch is a fully connected classification network that outputs a probability value indicating that product synthesis has been initiated.

[0035] The node-level abnormal accumulation detection branch outputs the abnormal accumulation probability value of each metabolite through a fully connected layer and a Sigmoid activation function. The abnormal accumulation probability value represents the probability that the corresponding metabolite node will show an accumulation trend that exceeds the normal early fermentation range.

[0036] Combining the product synthesis start probability value and the abnormal accumulation probability value of each metabolite, when the product synthesis start probability value is not less than the judgment threshold, or when the number of nodes whose abnormal accumulation probability value exceeds the node-level threshold reaches the preset node number threshold, it is determined that product synthesis has started and an early fermentation product identification result is generated.

[0037] The product synthesis initiation discrimination branch and the node-level anomaly accumulation detection branch are jointly trained. The product synthesis initiation discrimination branch uses the product synthesis initiation label as the supervision signal and adopts binary cross-entropy loss. The node-level anomaly accumulation detection branch uses the node-by-node label of whether abnormal accumulation occurs at each metabolite node as the supervision signal and adopts node-by-node binary cross-entropy loss. The losses of the two branches are weighted and summed before joint parameter updates.

[0038] This invention provides a deep learning-based system for identifying products of microbial fermentation processes, comprising:

[0039] The data acquisition and preprocessing module is used to acquire the directed graph structure of the metabolic network of the target microorganism, the metabolomics dataset of historical fermentation batches, the tail gas spectrometry signal matrix output in real time by the online mass spectrometer, and the sparse metabolite concentration data detected periodically by high performance liquid chromatography, and to normalize the various types of data.

[0040] The graph variational autoencoder training module is used to train the graph variational autoencoder using the metabolomics dataset of the historical fermentation batches, so as to obtain the trained graph variational autoencoder.

[0041] The mass spectrometry soft constraint generation module is used to perform multi-scale decomposition and feature extraction on the tail mass spectrometry signal matrix, and generate the mass spectrometry inference soft constraint value and corresponding association confidence score of each node in the metabolic network through correlation mapping processing.

[0042] The dual-source constraint inference module is used to take the observed node concentration values ​​detected by high performance liquid chromatography as hard constraints, and the soft constraint values ​​and associated confidence scores inferred by mass spectrometry as elastic constraints. Iterative optimization is performed in the latent space of the trained graph variational autoencoder to generate dual-source constraint full node metabolite concentration inference values.

[0043] The product identification module is used to infer the product synthesis start probability value based on the dual-source constrained full-node metabolite concentration value, output the product synthesis start probability value through the product identification classification network, compare the product synthesis start probability value with the preset judgment threshold, and generate the early fermentation product identification result.

[0044] The beneficial effects of this invention are as follows:

[0045] This invention transforms tail gas chromatography-mass spectrometry (GC-MS) signals into node-level soft constraint information through a VOC-metabolite association mapping network. It then integrates HPLC hard constraints and GC soft constraints in the latent space of a graph variational autoencoder to perform dual-source constraint inference. This solves the technical problem of under-constraint and non-uniqueness of metabolite concentration inference across all nodes due to sparse HPLC observations in the early stages of fermentation, achieving improved accuracy in metabolite concentration inference under sparse observation conditions. Furthermore, by using a confidence-weighted message-passing graph neural network to regulate message-passing amplitude based on comprehensive inference confidence, and combining this with a causal sparse attention network to enhance the ability to capture slow metabolic trend changes across sampling periods, this invention addresses the technical problem of insufficient signal-to-noise ratio from a single detection source and difficulty in extracting product synthesis initiation signals due to extremely low product concentrations in the early stages of fermentation. This reduces the occurrence of missed detections and misjudgments in product identification during the early stages of fermentation. Attached Figure Description

[0046] Figure 1 This is a flowchart of a deep learning-based method for identifying products in microbial fermentation processes, provided in an embodiment of the present invention.

[0047] Figure 2 This is a schematic diagram showing the concentration comparison before and after standardization of HPLC sparse observation nodes provided in an embodiment of the present invention;

[0048] Figure 3This is a schematic diagram of the 8-dimensional distribution of the initial latent sampling points of the graph variational autoencoder provided in an embodiment of the present invention;

[0049] Figure 4 This is a schematic diagram comparing the soft constraint values ​​of mass spectrometry at each node with the correlation confidence level provided in the embodiments of the present invention;

[0050] Figure 5 This is a schematic diagram comparing the inferred values ​​and observed / soft constraint values ​​of dual-source constraint optimization provided in an embodiment of the present invention;

[0051] Figure 6 This is a schematic diagram of the confidence distribution of node comprehensive inference provided in an embodiment of the present invention;

[0052] Figure 7 This is a schematic diagram of the convergence curve of the objective function in the latent space optimization iterative process provided in an embodiment of the present invention;

[0053] Figure 8 This is a schematic diagram of the probability distribution for detecting abnormal accumulation nodes provided in an embodiment of the present invention. Detailed Implementation

[0054] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.

[0055] In microbial fermentation, product identification relies on the detection and analysis of metabolite concentrations within the fermentation system. Existing deep learning-based product identification methods typically use metabolite concentration data obtained through offline high-performance liquid chromatography (HPLC) as model input. They utilize deep neural networks to learn the mapping relationship between metabolite concentration changes and product formation states, thereby determining the synthesis progress of the target product. Simultaneously, online mass spectrometry can acquire tail gas spectral signals in real time during fermentation, reflecting the release of volatile metabolic byproducts, serving as an auxiliary process monitoring tool. In the later stages of fermentation, when product concentrations are high, HPLC data can provide sufficient feature information for the deep learning model, resulting in high product identification accuracy.

[0056] However, in the early stages of fermentation, the concentration of the target product is extremely low, and offline HPLC detection is limited by the sampling cycle, only covering a limited amount of metabolite node concentration information in the metabolic network. Existing deep learning methods face two major challenges when processing data at this stage: First, graph neural network models based on the metabolic network topology suffer from severe underconstraint inference of the concentration of unobserved nodes when only a small number of HPLC observation nodes are used as input. Multiple sets of drastically different inference results can satisfy known sparsity constraints, leading to non-unique and unreliable estimation of the metabolic state of the entire network. Second, the extremely low product concentration results in very weak changes in key intermediate metabolites associated with product synthesis, making it difficult for deep learning models to extract effective product synthesis initiation signals from low signal-to-noise ratio data from a single detection source, causing missed detections or misjudgments in product identification in the early stages of fermentation.

[0057] According to an embodiment of this invention, this invention provides a deep learning-based method for identifying products in a microbial fermentation process. This method integrates soft constraint information at the metabolic node level provided by online mass spectrometry signals with hard constraint information provided by HPLC under the condition that HPLC observations are sparse and product concentrations are extremely low in the early stage of fermentation. It then reliably infers the concentration of all nodes in the metabolic network and identifies whether product synthesis has started based on this information.

[0058] It should be understood that the method of this embodiment is executed by a computing device connected to a fermentation monitoring system. The fermentation monitoring system includes a high-performance liquid chromatography (HPLC) detection device for periodic offline detection of metabolite concentrations and an online mass spectrometer for real-time acquisition of fermentation exhaust gas signals. The computing device acquires data from the aforementioned detection device and performs all subsequent data processing steps.

[0059] At least one embodiment of the present invention discloses a method for identifying products of microbial fermentation processes based on deep learning, such as... Figure 1 As shown, it includes the following steps:

[0060] Step 1: Obtain the directed graph structure of the metabolic network and multi-source detection data;

[0061] The study aimed to acquire the directed graph structure of the metabolic network of the target microorganism, metabolomics datasets of historical fermentation batches, tail gas spectral signal matrix output by online mass spectrometer in real time during fermentation, and sparse metabolite concentration data detected periodically by HPLC.

[0062] The directed graph structure of the metabolic network is represented as follows: , Let be the set of metabolite nodes, with a total number of nodes. , Let be the set of directed edges for metabolic reactions, and the corresponding adjacency matrix is: The historical fermentation batch metabolomics dataset contains complete metabolite concentration vectors obtained from multiple historical batches at multiple sampling times through full-spectrum metabolomics detection. The tail gas spectral signal matrix is ​​represented as follows: , This represents the number of mass spectrometry sampling time points. This represents the number of channels based on their mass-to-charge ratio. The concentration data of sparse metabolites detected by HPLC are represented as the set of observed nodes. Concentration observations at each node ,in For nodes The HPLC concentration observation value.

[0063] Before proceeding to subsequent steps, the complete metabolite concentration vectors from the historical fermentation batch metabolomics dataset are obtained. Observed concentrations of sparse metabolites detected by HPLC and tail gas spectral signal matrix Z-score normalization was used to normalize the data, eliminating the impact of differences in the concentration magnitudes of different metabolites and the dimensional differences between mass spectrometry signals and concentration data on subsequent model training and inference calculations.

[0064] It should be noted that the metabolomics dataset of the aforementioned historical fermentation batches consists of complete concentration data covering all or most nodes of the metabolic network, obtained through full-spectrum detection methods in historical experiments. This data is used for the offline training phase of the model, and is distinct from the situation in the online application phase where only sparse HPLC observations can be obtained.

[0065] It should be noted that the above directed graph structure of metabolic network can be obtained from public metabolic network databases or generated by metabolic network reconstruction tools based on the genome annotation information of the target microorganism. The direction of the directed edges indicates the direction of conversion from substrate to product in the metabolic reaction.

[0066] Step 2: Train a graph variational autoencoder based on a historical metabolomics dataset to obtain the trained graph variational autoencoder;

[0067] The graph variational autoencoder was trained using a historical metabolomics dataset to obtain the trained graph variational autoencoder.

[0068] A graph variational autoencoder consists of two components: an encoder and a decoder. The encoder uses the adjacency matrix of a directed graph of a metabolic network. For topological constraints, receive the complete metabolite concentration vector. As input, topological relationship features between nodes are extracted through multi-layer graph convolution operations, and the mean parameters of the latent distributions are output respectively. And log-variance parameter ,in For potential spatial dimensions.

[0069] Decoder from latent distribution Mid-sampling to obtain latent vectors ,Will After being mapped to the node dimension by a fully connected layer, the adjacency matrix is ​​processed by multi-layer graph convolution operations. Perform node-by-node concentration reconstruction under topological constraints, and output the reconstructed concentration vector. The encoder's output is transmitted to the decoder's input, forming a data path of encoding, sampling, and decoding.

[0070] Furthermore, the above sampling process is implemented using a reparameterization technique: sampling noise vectors from a standard normal distribution. ,make ,in This represents element-wise multiplication. Depend on The square root is obtained after exponential operation. This method makes the sampling operation more accurate. and It is differentiable, thus enabling gradient updates of encoder parameters via backpropagation.

[0071] The loss function during the training phase is:

[0072]

[0073] in, This represents the total number of metabolite nodes. For node indexing, and The first The actual concentration value and reconstructed concentration value of each node (both are dimensionless values ​​after Z-score normalization). The prior distribution is a standard normal distribution. Let KL divergence be the KL divergence. This is the regularization weight coefficient, used to balance reconstruction accuracy with the closeness of the latent distribution to the prior distribution. Since both the prior and posterior distributions are Gaussian distributions, There is a parsed form, which can be directly derived from... and The calculations were performed without numerical integration. The Adam optimization algorithm was used to iteratively train the samples in the historical metabolomics dataset until the loss function converged, resulting in the trained graphical variational autoencoder.

[0074] It should be noted that the graph convolution operation in the encoder described above is an operation that aggregates neighborhood information along the directed edges of the directed graph of the metabolic network. In each graph convolution layer, each node updates its own feature representation by weighting and aggregating the features of its neighboring substrate nodes and product nodes according to the edge direction. The number of graph convolution layers in the encoder can be set to two to four layers.

[0075] It should be noted that the aforementioned potential spatial dimensions Much smaller than the total number of metabolite nodes This allows the latent space to capture the low-dimensional joint distribution structure of the concentration of each node in the metabolic network under topological constraints, rather than representing the concentration of each node independently.

[0076] In this embodiment of the application, in order to enable the trained graph variational autoencoder to better adapt to the differences in metabolite concentration ranges at different stages of fermentation, the samples in the historical metabolomics dataset are segmented according to fermentation time during the training phase, and different reconstruction loss weights are applied to the samples at different fermentation stages, so that the reconstruction accuracy of the early fermentation samples can be more fully optimized.

[0077] Step 3: Process the tail gas spectral signal to generate soft constraint information at the node level of the metabolic network;

[0078] The tail mass spectrometry signal matrix undergoes multi-scale decomposition and feature extraction, followed by correlation mapping to generate the soft constraint values ​​for mass spectrometry inference and the corresponding correlation confidence scores for each node in the metabolic network. This step includes the following sub-steps:

[0079] Step 301: Perform multi-scale wavelet decomposition on the tail gas spectrum signal matrix to obtain the low-frequency trend component matrix and the mid-frequency periodic component matrix;

[0080] The tail gas spectral signal matrix is ​​processed using a multi-scale wavelet decomposition algorithm. Decompose along the time axis, with the original mass spectrum signal matrix as input. The output is a matrix of low-frequency trend components separated by frequency scale. and intermediate frequency periodic component matrix The low-frequency trend component reflects the long-term trend of metabolic processes, while the mid-frequency periodic component reflects the periodic fluctuations of metabolic activities.

[0081] Step 302: Extract low-frequency metabolic association mass spectrometry features and mid-frequency metabolic association mass spectrometry features using a recurrent generative adversarial network;

[0082] A Recurrent Generative Adversarial Network (RGAN) consists of two units: a generator and a discriminator. The generator comprises a recurrent coding layer (RCL) and a recurrent decoding layer (RDL). The RCL receives the mass spectrum component matrix as input, processes the sequence data time-by-time through recurrent units, and outputs a feature vector of fixed dimension. The RDL receives this feature vector, reconstructs the mass spectrum sequence of the same dimension as the input through recurrent units time-by-time, and outputs a probability value that the sequence is a real sample. The output of the generator's RCL is passed to the input of the RDL, and the discriminator and generator are trained alternately in an adversarial manner.

[0083] Furthermore, the specific process of the adversarial training described above is as follows: In each training step, firstly, the generator parameters are fixed, and the real mass spectrum sequence is used as a positive sample, while the mass spectrum sequence reconstructed by the generator is used as a negative sample. The discriminator loss is calculated using the binary cross-entropy loss, and the discriminator parameters are updated accordingly, enabling the discriminator to distinguish between the real and reconstructed sequences. Then, the discriminator parameters are fixed again, and the mass spectrum sequence reconstructed by the generator is input into the discriminator. The adversarial loss is calculated using the probability value output by the discriminator, and the mean squared error between the reconstructed and original mass spectrum sequences is calculated as the reconstruction loss. The two are weighted and summed to update the generator parameters, allowing the generator to output truly distributed samples that can deceive the discriminator while maintaining reconstruction accuracy. The generator and discriminator are updated alternately until training converges.

[0084] In the pre-training phase, historical mass spectrometry data is used to train the recurrent generative adversarial network at each scale. The Adam optimization algorithm is used to alternately update the parameters of the generator and discriminator. After training, the recurrent coding layer of the generator is used as the feature extraction coding layer.

[0085] Low-frequency trend component matrix Input the encoding layer of a pre-trained recurrent generative adversarial network corresponding to the low-frequency scale, and extract low-frequency metabolic correlation mass spectrometry features. ; the intermediate frequency periodic component matrix Input the encoding layer of a pre-trained recurrent generative adversarial network corresponding to the mid-frequency scale, and extract mid-frequency metabolic correlation mass spectrometry features. ,in For feature dimensions.

[0086] Step 303: Generate node-level soft constraint information via the VOC-metabolite association mapping network;

[0087] Low-frequency metabolism-related mass spectrometry features Mid-frequency metabolic correlation mass spectrometry features Fusion mass spectrometry features are obtained by splicing along the feature dimensions. This will integrate mass spectrometry features. Input a VOC-metabolite association mapping network, output the mass spectrometry inference soft constraint value of each node in the metabolic network. and the corresponding association confidence score ,in For the first The soft constraint value for mass spectrometry inference of each node, For the first The association confidence score of each node.

[0088] The VOC-metabolite association mapping network consists of three components: a feature transformation layer, a graph topology mapping layer, and a dual-head output layer. The feature transformation layer receives fused mass spectrometry features. As input, mass spectrometry features are fused through multi-layer fully connected operations. Mapped to an intermediate feature matrix aligned with the dimensions of the metabolic network nodes. ,in The intermediate feature dimension. The graph topology mapping layer uses the adjacency matrix. For topological constraints on intermediate feature matrices Graph convolution is performed to fuse the intermediate features of each node with the association information of neighboring nodes in the metabolic network, outputting a topology-enhanced feature matrix. The dual-head output layers respectively enhance the topological feature matrix. A linear transformation is performed on each row, and an output header generates the soft constraint values ​​for each node. The other output header is used to generate the association confidence scores for each node via a Sigmoid activation function. ,make The output value is constrained by Within the range. The output of the feature transformation layer is passed to the input of the graph topology mapping layer, and the output of the graph topology mapping layer is passed to the input of the dual-head output layer.

[0089] The VOC-metabolite association mapping network is pre-trained using paired samples of historically acquired mass spectrometry signals and complete metabolomics data. The mass spectrometry signals have been Z-score normalized as described in step 1, and the metabolomics data also uses the normalization results from step 1. Both types of data are dimensionless values ​​and can directly participate in joint training. The training loss function is:

[0090]

[0091] in, This represents the total number of metabolite nodes. For node indexing, For the first The actual metabolite concentration at each node (dimensionless value after Z-score normalization). For the first The soft constraint value for mass spectrometry inference of each node, For the first The association confidence score of each node. For the first The nodes are labeled with tags indicating whether there is a direct metabolic relationship between them and the volatile components that can be detected by mass spectrometry. The weighting coefficients for the confidence loss are used to balance the relative contributions between the soft constraint value regression loss and the association confidence score classification loss. The first term is the soft constraint value regression loss, and the second term is the binary classification cross-entropy loss of the association confidence score. The Adam optimization algorithm is used to iteratively train the paired samples until the loss function converges.

[0092] Furthermore, the above-mentioned labels The method of obtaining the data is as follows: based on the metabolic network structure of the target microorganism and the known metabolic pathways of volatile organic compounds (VOCs), each node in the metabolic network is analyzed. Manual annotation is performed, if nodes If the corresponding metabolite has a direct enzymatic reaction connection with volatile components detectable by mass spectrometry in the metabolic network, then it is labeled. Otherwise, mark This annotation information can be completed with the help of VOC synthesis pathway annotation information already included in the public metabolic network database.

[0093] It should be noted that the above association confidence scores This characterizes the correlation between extractable information in the mass spectrometry signal and the concentration of the corresponding metabolite node. Nodes directly related to volatile metabolic byproducts typically have higher correlation confidence scores; nodes without a direct metabolic association with detectable components have lower correlation confidence scores. (Correlation Confidence Score) The Sigmoid activation function in the dual-headed output layer ensures that its output value is within the range of... Within the range, and in the training loss function Corresponding to the binary cross-entropy loss of the supervised signal, the association confidence score is calculated after training convergence. The value can reflect the strength of the metabolic association between the node and the volatile components that can be detected by mass spectrometry.

[0094] Step 4: Perform dual-source constraint inference to generate inferred values ​​for metabolite concentrations across all nodes;

[0095] The observed node concentration values ​​detected by HPLC As a hard constraint, mass spectrometry is used to infer the soft constraint value. and associated confidence score As an elastic constraint, iterative optimization is performed in the latent space of the trained graph variational autoencoder to generate inferred metabolite concentration values ​​for all nodes under dual-source constraints.

[0096] Specifically, initialize sampling points in the latent space. In each iteration, the current sampling point is... The decoder outputs the current reconstructed concentration vector. Calculate the optimization objective function about The gradient is calculated, and the sampling points are updated along the gradient descent direction. The optimization objective function is defined as:

[0097]

[0098] in, For the current iteration round, For the first During the nth iteration, the decoder outputs the... The reconstructed concentration value of each node, For the first During the nth iteration, the decoder outputs the... The reconstructed concentration value of each node, For nodes HPLC concentration observation values, For the first The soft constraint value for mass spectrometry inference of each node, For the first The association confidence score of each node. For the first For the latent spatial sampling points in the next iteration, all the concentration terms mentioned above are dimensionless values ​​after Z-score standardization in step 1. Since all terms have consistent dimensions, they can be directly weighted and summed. The first term represents the hard consistency loss of the observed nodes, and the constraint inference results are consistent with the HPLC measured values. The second term represents the weighted consistency loss of the soft constraint nodes in mass spectrometry, with the weights of each node determined by the associated confidence scores. The first term determines that nodes with high correlation are more strongly constrained by mass spectrometry, while nodes with low correlation are less constrained by mass spectrometry; the third term is the prior regularization term of the latent space, which constrains the sampling points not to deviate too far from the prior distribution learned during the training phase. , and These are the weighting coefficients for the three losses.

[0099] Furthermore, , and The relative magnitudes of the three weighting coefficients determine the primary and secondary importance of the three constraints in the optimization process: Controlling the strength of hard confinement in HPLC Controlling the overall strength of soft confinement in mass spectrometry Control the strength of latent space regularization. Among them, It is usually set to be much larger than The value is used to ensure that the inferred values ​​of the observed nodes are based on the HPLC measured values. The soft constraint of mass spectrometry only provides auxiliary constraints for the unobserved nodes without interfering with the hard constraint effect of the observed nodes.

[0100] Furthermore, the specific method of gradient descent update is as follows: in each iteration, the encoder and decoder parameters of the graph variational autoencoder are kept constant, and only the latent space sampling points are updated. As an optimizable variable, calculate right The gradient is updated along the negative gradient direction with a fixed step size. This allows us to search for the optimal sampling point in the latent space that simultaneously satisfies both hard and soft constraints without changing the parameters of the trained model.

[0101] After multiple iterations until Convergence, obtaining the optimal sampling point in the latent space. , the optimal sampling point in the potential space The decoder output generates inferred metabolite concentration values ​​for all nodes under dual-source constraints. Dual-source constrained inferred metabolite concentrations at all nodes Each component is a dimensionless inferred concentration value within the standardized domain. It can be restored to the original concentration dimension value by inverse transformation based on the mean and standard deviation parameters recorded in step 1 for subsequent analysis.

[0102] It should be noted that the above-mentioned potential space initialization sampling points It can be obtained by encoding an initial concentration vector formed by filling in the concentration values ​​of observed nodes according to their positions and filling the unobserved nodes with the global mean, or by random sampling using a standard normal distribution.

[0103] In this embodiment of the application, in order to further improve the stability of the optimization process, the weighting coefficient of the mass spectrometry soft constraint is adjusted during the iterative optimization process. Adopting a gradual incremental strategy, that is, starting with a small increment in the early stages of iteration. The optimization is primarily guided by HPLC hard constraints and prior regularization, which gradually increase with each iteration. This allows soft constraints from mass spectrometry to gradually become part of the constraints, preventing noise in mass spectrometry inference from misleading the search direction in the potential space during the initial optimization phase.

[0104] Step 5: Based on the inferred values ​​of metabolite concentrations across all nodes under dual-source constraints, generate early fermentation product identification results;

[0105] Inferred metabolite concentrations across all nodes under dual-source constraint Input the product identification and classification network, which infers the metabolite concentration values ​​across all nodes using a dual-source constraint. As input, after multiple fully connected operations, the output dimension is... The fully connected layer combined with the Sigmoid activation function outputs the synthesis of the probability value that has been initiated. The probability value of product synthesis has been initiated. Compared with the preset judgment threshold When comparing, If the condition is met, product synthesis is considered to have started; otherwise, it is considered that product synthesis has not started, and an early fermentation product identification result is generated. The determination threshold is as follows: Based on data from historical fermentation batches that have already labeled the product synthesis start-up time, to maximize the detection of product synthesis start-up. The score is used as the criterion for determination.

[0106] The product identification and classification network is trained based on metabolomics data of the start-up time of product synthesis in historical fermentation batches. The annotation information comes from the moment when the product first reaches a detectable concentration, which is confirmed by intensive sampling in historical batches. The training loss function is binary cross-entropy loss, and the Adam optimization algorithm is used for parameter updates.

[0107] In this embodiment of the application, to make product identification more reliable, in addition to step 4, the following step is also included: after performing confidence-aware map feature extraction processing on the inferred metabolite concentration values ​​of the dual-source constraint full nodes, product identification is then performed. Specifically, the comprehensive inference confidence of each node is calculated. The inferred values ​​of metabolite concentrations across all nodes under dual-source constraints As feature vectors of each node in the directed graph of the metabolic network, the confidence level will be comprehensively inferred. The confidence-weighted message-passing graph neural network, with the node weights used as inputs, performs iterative aggregation calculations to generate confidence-aware contextual feature representations for each node. ,in For contextual feature dimensions.

[0108] Overall inference confidence of each node Calculate as follows:

[0109]

[0110] in, For indicator functions, when node Belongs to the set of observed nodes in HPLC The time value is Otherwise, the value is ; For the first The association confidence scores of the mass spectrometry soft constraints for each node, with values ​​ranging from [value range missing]. ; This is the fusion coefficient, used to control the impact of HPLC hard constraint sources and mass spectrometry soft constraint sources on the overall inference confidence level. The relative contribution ratio in. Due to Values or , The range of values ​​is Both have the same dimensions, being dimensionless values, and can be directly weighted and summed.

[0111] Furthermore, for nodes belonging to the HPLC observed set... The node, Values At this point, the confidence level is comprehensively inferred. ,because and Therefore The lower bound of the overall inference confidence of the observed nodes is... Higher than unobserved nodes; for those not belonging to Unobserved nodes Values ,at this time Confidence level inferred from comprehensive analysis Confidence score completely correlated by mass spectrometry The determination reflects the extent to which the inferred concentration value at this node is supported only by the soft constraint of mass spectrometry. Fusion coefficient. Controlling the sources of HPLC hard constraint and mass spectrometry soft constraint in the overall inference confidence level The relative contribution ratio can be set according to the reliability differences between the two types of data sources in actual applications.

[0112] The confidence-weighted message-passing graph neural network consists of three units: a message computation unit, a confidence gating unit, and a feature update unit. In each round of message passing, for a given source node in the directed graph... Point to target node The edge, the message computation unit computes the source node. To the target node Message vectors passed The calculation method is as follows:

[0113]

[0114] in, and Source nodes and target node The current feature representation, Indicates will and The vector obtained by concatenating along the feature dimensions, The weight matrix is ​​a learnable matrix. As a learnable bias vector, this linear transformation is implemented by a fully connected layer. The confidence gating unit is based on the source node. Confidence level of comprehensive inference Scaling the message vector:

[0115]

[0116] in, The message vector is gated by confidence level, ensuring that messages from nodes with high comprehensive inference confidence retain a larger amplitude, while messages from nodes with low comprehensive inference confidence are attenuated. The feature update unit will target the node. All received gated messages are aggregated, fused with the target node's own features, and then the target node's feature representation is updated.

[0117]

[0118] in, The weight matrix is ​​a learnable matrix. For learnable bias vectors, Indicates the target node Self-characteristics With the target node The vector obtained by concatenating the sum of all received gated messages along the feature dimension is a linear transformation implemented by a fully connected layer. This represents the set of directed edges in the directed graph of the metabolic network. The output of the message computation unit is passed to the confidence gating unit, and the output of the confidence gating unit is passed to the feature update unit. After multiple rounds of iterative aggregation, the feature representation of each node incorporates the contextual information of its neighborhood in the metabolic network, and the information of nodes with high comprehensive inference confidence plays a dominant role in network propagation. Finally, the confidence-aware contextual feature representation of each node is output. .

[0119] Furthermore, the initial node features of the aforementioned confidence-weighted message-passing graph neural network... Inferred values ​​of metabolite concentrations across all nodes from dual-source constraints The Middle The inferred concentration values ​​of each node are mapped to [the target value] via a linear projection layer. The parameters of the linear projection layer, along with the remaining parameters of the confidence-weighted message-passing graph neural network, are updated via backpropagation during the joint training phase.

[0120] A confidence-weighted message-passing graph neural network and a product recognition and classification network are jointly trained. The product synthesis initiation label is used as the supervision signal, the training loss function is binary cross-entropy loss, and the Adam optimization algorithm is used for end-to-end parameter updates.

[0121] At this point, the confidence-aware context features of each node are represented. The product identification and classification network is then processed through global pooling, replacing the direct inference of metabolite concentrations across all nodes based on dual-source constraints. The input method is used to generate early fermentation product identification results. The product identification and classification network receives the globally pooled feature vector as input, which, after passing through multiple fully connected layers, outputs a dimension of... The fully connected layer combined with the Sigmoid activation function outputs the synthesis of the probability value that has been initiated. .

[0122] In this embodiment of the application, in order to capture the slow metabolic trend changes associated with product synthesis by utilizing the temporal information of the fermentation process, the following steps are also included in addition to the confidence perception map feature extraction: the confidence perception context feature representations of each node at multiple consecutive detection times are arranged in time sequence, input into a causal sparse attention network for temporal feature extraction, and a temporal enhanced metabolic state feature vector is generated.

[0123] A causal sparse attention network consists of two components: a causal masked attention layer and a low-frequency long-range connection layer. Assume continuous... The feature sequence at each detection time is: ,in For the first Metabolic state characteristics after global pooling at each time point The total number of consecutive detection times participating in time-series modeling corresponds to the historical times covered by the current online inference time and several preceding HPLC sampling cycles. The causal masking attention layer receives this feature sequence as input and calculates the time... For time When applying attention weights, a causal mask is applied, restricting attention to features from the current time step and those from previous time steps at each time step. Original attention score. From time Features With time Features Learnable query matrix Bond matrix The inner product is obtained by projection, i.e. ,in Indicates transpose. For feature dimensions. Attention weights. The calculation method is as follows:

[0124]

[0125] in, Represents an exponential function. For a moment With time The original attention scores between them For the causal mask indicator function, when The time value is Otherwise, the value is , To sum the time indices of the traversal, output the causal attention feature sequence. ,in For a moment The output features after causal attention-weighted aggregation. The low-frequency long-range connection layer applies long-range connection biases to feature components related to low-frequency trend changes, based on the causal attention feature sequence. This enhances the attention weight between low-frequency components with a larger time span:

[0126]

[0127] in, To enhance attention weights, For learnable long-range connection bias parameters, For long-range enhancement coefficient, The time span threshold, The value is taken in units of the difference in the sequence number of the sampling time. When the difference in the sequence number between two times is not less than 1, the value is determined by the difference in the sequence number of the sampling time. When a time pair is deemed to have a sufficiently large time span, a long-range connection bias is applied to that time pair to enhance the ability to capture slow changing trends spanning multiple sampling periods. The output of the causal mask attention layer is passed to the low-frequency long-range connection layer, which outputs the final time. The corresponding enhanced features are used as temporal enhanced metabolic state feature vectors. ,in Temporal feature dimension, temporally enhanced metabolic state feature vector The enhanced attention output at the final moment is mapped to a learnable linear projection layer. Wei obtained.

[0128] Furthermore, the aforementioned long-range connection bias parameters To satisfy each pair Moment Combination Independently configured learnable scalar parameters are updated along with the remaining parameters of the causal sparse attention network via backpropagation during the joint training phase; long-range augmentation coefficients. This is a fixed hyperparameter used to control the overall impact of long-range connection bias on attention weights, and can be adjusted based on the product recognition performance on the validation set.

[0129] The causal sparse attention network and the product recognition and classification network are jointly trained, with the product synthesis initiation label as the supervision signal, the training loss function is the binary classification cross-entropy loss, and the Adam optimization algorithm is used for end-to-end parameter updates.

[0130] At this point, the time-series enhanced metabolic state feature vector As input features for product identification.

[0131] In this embodiment of the application, in order to comprehensively judge the product synthesis state in the early stage of fermentation from multiple perspectives, the time-enhanced metabolic state feature vector is used. The product synthesis initiation discrimination branch and the node-level anomaly accumulation detection branch are input separately. The product synthesis initiation discrimination branch is a fully connected classification network that receives temporal augmentation metabolic state feature vectors. As input, after multiple fully connected operations, the output dimension is... The fully connected layer combined with the Sigmoid activation function outputs the synthesis of the probability value that has been initiated. Node-level anomaly accumulation detection branch receive timing-enhanced metabolic state feature vector. As input, with output dimension as The fully connected layer combined with the Sigmoid activation function outputs the abnormal accumulation probability values ​​of each metabolite. ,in Indicates the first The probability that a metabolite node exhibits an accumulation trend exceeding the normal early fermentation range.

[0132] The product synthesis initiation discrimination branch and the node-level anomaly accumulation detection branch are jointly trained. The product synthesis initiation discrimination branch uses the product synthesis initiation label as the supervision signal and adopts binary cross-entropy loss. The node-level anomaly accumulation detection branch uses the node-by-node label of whether abnormal accumulation occurs in each metabolite node as the supervision signal and adopts node-by-node binary cross-entropy loss. After the weighted sum of the losses of the two branches, the Adam optimization algorithm is used for joint parameter update.

[0133] Furthermore, the method for obtaining the node-by-node labeling required for the above-mentioned node-level abnormal accumulation detection branch is as follows: In historical fermentation batches, for dense sampling data before and after the confirmed product synthesis start time, the concentration value distribution of each metabolite node within several sampling times before the product synthesis start time is statistically analyzed. The moment when the concentration value exceeds the upper limit of the preset percentile of the concentration distribution of the node in the early stage of normal fermentation (i.e., an earlier stage before the product synthesis start time) is marked as the node experiencing abnormal accumulation, and this is used as the node-by-node labeling.

[0134] Probability of synthesis of the integrated product already started and the probability values ​​of abnormal accumulation of each metabolite ,when Or the probability value of abnormal accumulation exceeds the node-level threshold. The number of nodes has reached the preset node threshold. At this point, it is determined that product synthesis has started, and early fermentation product identification results are generated. Among these, the node-level threshold... Compared with the preset node number threshold All were determined based on the abnormal accumulation annotation data of each metabolite node in historical fermentation batches, with the criterion of minimizing the false negative rate of node-level abnormal accumulation detection.

[0135] It should be noted that the information provided by the aforementioned node-level anomaly accumulation detection branch can be used as an auxiliary criterion. The product synthesis initiation discrimination branch outputs the probability value of product synthesis already initiated. Approaching the judgment threshold At the same time, the accumulation of node-level anomaly information helps reduce the risk of misjudgment in boundary cases.

[0136] This method addresses the under-constrained problem of metabolic state inference caused by sparse HPLC observations in the early stages of fermentation. It utilizes a VOC-metabolite association mapping network to convert the tail gas spectrometry signals acquired in real-time by an online mass spectrometer into soft constraint values ​​and association confidence scores for each node in the metabolic network. During the latent space condition inference process of the graph variational autoencoder, both the hard constraints provided by HPLC detection and the soft constraint values ​​obtained from the mass spectrometry signal conversion are simultaneously incorporated into the optimization objective function. Because the original condition inference relies only on HPLC hard constraints covering a limited number of nodes, the sparse constraints result in an excessively large feasible region in the latent space, leading to non-unique inference results. However, by introducing soft constraint values, the optimization objective function adds a consistency constraint term based on association confidence weighting at unobserved nodes, further restricting the search direction in the latent space. This compresses the feasible region satisfying all constraints, improving the uniqueness and accuracy of the inference results.

[0137] To address the issue of insufficient signal-to-noise ratio from a single detection source due to extremely low product concentrations in the early stages of fermentation, a confidence-weighted message-passing graph neural network infers the confidence level based on the comprehensive analysis of each node during graph feature aggregation. The amplitude of message propagation is controlled. Because the concentration inferences from nodes with high overall inference confidence are more reliable, messages from these nodes dominate network propagation, while messages from nodes with low overall inference confidence are attenuated, thus suppressing the spread of inference errors across the graph. Furthermore, the causal sparse attention network enhances its ability to capture slow metabolic trend changes across multiple sampling periods through long-range connection bias. Since product synthesis initiation is usually accompanied by synergistic concentration changes of multiple intermediate metabolites in the metabolic network, even if the concentration change of a single metabolite is weak, the cumulative characteristics of the synergistic changes of multiple nodes in the temporal dimension can still be extracted. Therefore, it is possible to comprehensively determine whether product synthesis has started in the early stages of fermentation when product concentration is extremely low, reducing missed detections and false positives.

[0138] like Figure 2-8 As shown, the method in this embodiment operates as follows:

[0139] A microbial fermentation plant uses *Saccharomyces cerevisiae* (represented by strain YS-07) as the production strain. During the ethanol fermentation of batch BATCH-0312 produced in March 20XX, it is necessary to identify whether ethanol synthesis has started in the early stages of fermentation (0 to 12 hours after inoculation). The fermenter for this batch has a volume of 5000 liters, the fermentation temperature is maintained at 30°C, and the pH is controlled at 5.0. The directed metabolic network graph covers N = 24 metabolite nodes, including glycolysis, pyruvate metabolism, and ethanol synthesis. An online mass spectrometer collects tail gas signals every 10 minutes, and HPLC performs offline detection every 2 hours. Within the detection window of the 6th hour of fermentation, HPLC only covers 6 observed nodes, with the concentrations of the remaining 18 nodes unknown.

[0140] In step 1, the computing device acquires the directed graph of the metabolic network, historical batch metabolomics datasets (47 historical batches, each covering a complete concentration vector of 24 nodes), the tail gas spectral signal matrix of the current batch BATCH-0312 at hour 6, and HPLC sparse observation data from the fermentation monitoring system. The mass spectrometer collected data at 36 time points before hour 6, each covering 120 mass-to-charge ratio channels, forming a mass spectral signal matrix (36 rows × 120 columns). HPLC detected concentration observations at 6 nodes at hour 6. All data were Z-score normalized according to the historical mean and standard deviation of their respective fields to eliminate differences in the concentration magnitudes of different metabolites.

[0141] Table 1. HPLC sparse observation data at hour 6 (comparison before and after standardization):

[0142]

[0143] Standardization example: Standardized value of node 03 The standardized value of node 12 .

[0144] In step 2, the graph variational autoencoder was trained offline using a complete metabolomics dataset of 47 historical batches. The encoder, with an adjacency matrix (24 rows × 24 columns) as topological constraint, received a complete 24-dimensional concentration vector and output the latent distribution mean and log-variance (the latent space dimension is 8, much smaller than the number of nodes 24) through three layers of graph convolution. The decoder, after obtaining the latent vector through reparameterized sampling, reconstructed the 24-dimensional concentration vector through three layers of graph convolution. Higher reconstruction loss weights were applied to samples from the early fermentation stage (0 to 12 hours) to ensure the model more fully modeled the metabolic distribution at low concentrations. After training convergence, the initial concentration vector at hour 6 of the current batch (observed nodes were filled with standardized observations, and unobserved nodes were filled with the global mean of 0) was encoded by the encoder to obtain the initial latent sampling points, whose 8-dimensional values ​​are shown in the table below.

[0145] Table 2. Values ​​of each dimension for the initial potential sampling points:

[0146]

[0147] In step 3, the tail gas spectral signal matrix (36 rows × 120 columns) is subjected to multi-scale wavelet decomposition along the time axis to separate the low-frequency trend component matrix (reflecting the cumulative trend of volatile products such as ethanol and acetaldehyde) and the mid-frequency periodic component matrix (reflecting the periodic fluctuations of metabolic activity). These are then input into the pre-trained low-frequency and mid-frequency recurrent generative adversarial network coding layers to extract low-frequency metabolic association mass spectral features (32 dimensions) and mid-frequency metabolic association mass spectral features (32 dimensions), which are then concatenated to obtain a 64-dimensional fused mass spectral feature. This feature is input into the VOC-metabolite association mapping network to generate 24 nodes of mass spectral inference soft constraint values ​​and association confidence scores.

[0148] The table below shows the output results of some representative nodes, highlighting the difference in association confidence between nodes directly related to the ethanol synthesis pathway and nodes with no direct association.

[0149] Table 3 shows the soft constraint values ​​and association confidence scores for mass spectrometry inference of some nodes:

[0150]

[0151] It is evident that the association confidence scores of nodes directly related to the ethanol synthesis pathway (node ​​15 acetaldehyde, node 16 ethanol) are significantly higher than those of nodes without direct metabolic association (node ​​04, node 20, node 22), which is consistent with the selective detection mechanism of mass spectrometry for volatile components.

[0152] In step 4, the concentration values ​​of the six observed nodes from HPLC are used as hard constraints (with a weighting coefficient of 10.0), while the soft constraints inferred from mass spectrometry and the associated confidence scores are used as elastic constraints (with the soft constraint weighting coefficient gradually increasing from the initial value of 0.5 to 2.0). A prior regularization term constrains the latent space (with a weighting coefficient of 0.1). Iterative gradient descent optimization is performed in the latent space of the graph variational autoencoder, starting from the initial latent sampling point. The parameters of the graph variational autoencoder are frozen throughout the process, and only the latent sampling point of the current iteration is updated.

[0153] Taking a certain iteration as an example, node 12 (pyruvate) is simultaneously an HPLC-observed node (observed standardized value of 0.64) and a high-confidence soft-constraint node (association confidence of 0.83, soft constraint value of 0.71). Its contribution to the optimization objective function is as follows:

[0154]

[0155] in , The soft constraint weight coefficients corresponding to the current iteration round. This is the inferred value for node 12 from the current iteration's decoding output. After 150 iterations, the optimized objective function converges, obtaining the optimal potential sampling point, and the decoded output is the inferred metabolite concentration values ​​(24 dimensions) for all nodes under dual-source constraints. The table below shows the inference results and constraint sources for some nodes.

[0156] Table 4. Results of metabolite concentration inference across all nodes under dual-source constraint (partial nodes):

[0157]

[0158] The inferred values ​​of the observed nodes (such as nodes 03 and 15) are highly consistent with the HPLC observations, verifying the enforcement effect of hard constraints; the inferred values ​​of the high-confidence soft-constraint nodes (such as node 16 ethanol) are close to the soft-constraint values; the low-confidence nodes (nodes 20 and 22) are mainly driven by graph topological prior constraints.

[0159] In step 5, the overall inference confidence of each node is first calculated (the fusion coefficient is set to 0.7). Taking node 16 (ethanol, unobserved node, correlation confidence of 0.88) and node 03 (glucose-6-phosphate, observed node by HPLC, correlation confidence of 0.14) as examples:

[0160] Confidence level of overall inference for node 16:

[0161]

[0162] Confidence level of overall inference for node 03:

[0163]

[0164] The components of the 24-dimensional inferred concentration vector are linearly projected to 16 dimensions as initial node features, which are then input into a confidence-weighted message-passing graph neural network. In message passing, the message amplitude emitted by node 03 (overall inferred confidence 0.742) is significantly greater than that of node 22 (overall inferred confidence 0.742). The range of messages transmitted ensures that information from highly reliable nodes along the glycolysis pathway dominates the network. After three rounds of message passing iterations, the confidence-aware context features (16-dimensional) of each node are output, and metabolic state features (16-dimensional) are obtained after global pooling.

[0165] The metabolic state feature sequences from three consecutive HPLC sampling times (4th, 5th, and 6th hours) were input into a causal sparse attention network. Taking the attention weight from the 6th hour to the 4th hour as an example, the time span sequence difference is 2, satisfying the long-range connection condition. Applying a long-range connection bias enhances the capture of the slow trend of ethanol accumulation.

[0166]

[0167] in For standard attention weights, This is the long-range offset scaling factor. This represents the long-range connectivity bias parameters corresponding to the time span. The output is a 32-dimensional temporal enhanced metabolic state feature vector, which is then input into the product synthesis initiation discrimination branch and the node-level anomaly accumulation detection branch. The output results of the two branches are shown in the table below.

[0168] Table 5. Comprehensive judgment results of early fermentation product identification:

[0169]

[0170] The probability of product synthesis being initiated is 0.81, which is not lower than the threshold of 0.60. At the same time, the number of abnormal accumulation nodes reaches the preset threshold of 4. Both criteria are triggered. Based on the comprehensive judgment, it is determined that the ethanol synthesis of batch BATCH-0312 has been initiated in the 6th hour of fermentation.

[0171] The data flow throughout the implementation process reflects a complete logical chain: Step 1 uses the HPLC sparse observation data (6-node standardized values, see Table 1) and the mass spectrometry signal matrix (36 rows × 120 columns) as raw inputs. The graph variational autoencoder trained in Step 2 provides the metabolic network topology prior and generates initial potential sampling points (see Table 2). Step 3 uses the VOC-metabolite association mapping network to convert the mass spectrometry signal into soft constraint values ​​and association confidence scores of 24 nodes (see Table 3). Step 4 jointly optimizes the 6 HPLC hard constraints and 24 mass spectrometry soft constraints in the potential space. After 150 iterations, it converges and outputs a complete 24-dimensional inferred concentration vector (see Table 4). Step 5 uses the comprehensive inferred confidence score to regulate the graph message passing weights, and then uses temporal attention to capture the slow trend across sampling periods. Finally, the dual-branch joint judgment outputs the early fermentation product identification results (see Table 5). The output data of each step is directly used as the input of the next step. The highly reliable inference values ​​of hard-constrained nodes play a leading role in graph propagation through the confidence gating mechanism, ensuring the coherent and consistent data flow from sparse observation to full node inference and then to product identification conclusion.

[0172] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. A method for identifying products of microbial fermentation processes based on deep learning, characterized in that, Includes the following steps: The directed graph structure of the metabolic network of the target microorganism, the metabolomics dataset of historical fermentation batches, the tail gas spectral signal matrix output in real time by the online mass spectrometer, and the sparse metabolite concentration data detected periodically by high performance liquid chromatography were obtained, and the data were normalized. The graph variational autoencoder was trained using the metabolomics dataset of the historical fermentation batches to obtain the trained graph variational autoencoder. The encoder of the graph variational autoencoder uses the adjacency matrix of the directed graph of the metabolic network as the topological constraint and encodes the complete metabolite concentration vector into the latent space through graph convolution operation. The decoder samples from the latent distribution and reconstructs the metabolite concentration vector through graph convolution operation. The tail mass spectrometry signal matrix is ​​decomposed at multiple scales and its features are extracted. After correlation mapping, the mass spectrometry inference soft constraint value and the corresponding correlation confidence score of each node in the metabolic network are generated. The observed node concentration values ​​detected by high performance liquid chromatography are used as hard constraints, and the soft constraint values ​​inferred by mass spectrometry and the associated confidence scores are used as elastic constraints. The results are iteratively optimized in the latent space of the trained graph variational autoencoder to generate dual-source constrained full-node metabolite concentration inference values. Based on the inferred metabolite concentration values ​​of the dual-source constraint full nodes, the product synthesis has started probability values ​​output by the product identification and classification network. The product synthesis has started probability values ​​are compared with preset judgment thresholds to generate early fermentation product identification results.

2. The method for identifying products of microbial fermentation processes based on deep learning according to claim 1, characterized in that, The loss function of the graph variational autoencoder during the training phase includes a reconstruction loss term and a KL divergence regularization term. The reconstruction loss term is the mean square error between the reconstructed concentration value and the true concentration value of each node. The KL divergence regularization term is the KL divergence between the posterior distribution of the encoder output and the standard normal prior distribution. The KL divergence regularization term is multiplied by the regularization weight coefficient and then summed with the reconstruction loss term. The encoder achieves differentiability of the sampling process through reparameterization techniques. After sampling the noise vector from the standard normal distribution, the latent vector is obtained by performing element-wise operations with the mean parameter and standard deviation parameter of the encoder output.

3. The method for identifying products of microbial fermentation processes based on deep learning according to claim 1, characterized in that, Multi-scale decomposition and feature extraction are performed on the tail gas spectral signal matrix, including: The tail gas spectrum signal matrix is ​​decomposed along the time axis using a multi-scale wavelet decomposition algorithm to obtain the low-frequency trend component matrix and the mid-frequency periodic component matrix. The low-frequency trend component matrix and the mid-frequency periodic component matrix are respectively input into the encoding layer of the pre-trained recurrent generative adversarial network at the corresponding scale to extract low-frequency metabolic association mass spectrometry features and mid-frequency metabolic association mass spectrometry features, respectively. The recurrent generative adversarial network includes a generator and a discriminator. The generator includes a recurrent encoding layer and a recurrent decoding layer. The discriminator and the generator are trained alternately in an adversarial manner. After training, the recurrent encoding layer of the generator is used as the feature extraction encoding layer.

4. The method for identifying products of microbial fermentation processes based on deep learning according to claim 3, characterized in that, The process of generating the mass spectrometry inference soft constraint value and corresponding association confidence score for each node in the metabolic network through association mapping includes: The low-frequency metabolism correlation mass spectrometry features and the mid-frequency metabolism correlation mass spectrometry features are concatenated along the feature dimension to obtain fused mass spectrometry features, and the fused mass spectrometry features are input into the VOC-metabolite association mapping network; The VOC-metabolite association mapping network comprises a feature transformation layer, a graph topology mapping layer, and a dual-head output layer. The feature transformation layer maps the fused mass spectrometry features into an intermediate feature matrix aligned with the dimensions of the metabolic network nodes through multi-layer fully connected operations. The graph topology mapping layer performs graph convolution operations on the intermediate feature matrix using the adjacency matrix as a topological constraint, outputting a topology-enhanced feature matrix. The dual-head output layer performs linear transformations on each row of the topology-enhanced feature matrix, with one output head generating the mass spectrometry inference soft constraint value for each node and the other output head generating the association confidence score for each node through a sigmoid activation function. The training loss function of the VOC-metabolite association mapping network includes a regression loss based on soft constraint values ​​and a binary cross-entropy loss based on association confidence scores. The binary cross-entropy loss uses the label indicating whether there is a direct metabolic association between each node and the mass spectrometer-detectable volatile components as a supervision signal.

5. The method for identifying products of microbial fermentation processes based on deep learning according to claim 1, characterized in that, The iterative optimization in the latent space of the trained graph variational autoencoder includes: Sampling points are initialized in the latent space. In each iteration, the current sampling point is decoded to output the current reconstructed concentration vector. The gradient of the optimization objective function with respect to the current sampling point is calculated, and the sampling point is updated along the gradient descent direction. The optimization objective function includes a hard consistency loss term for observed nodes, a weighted consistency loss term for mass spectrometry soft constraint nodes, and a prior regularization term for the latent space. The hard consistency loss term is a measure of the difference between the reconstructed concentration value of the observed node and the measured value by high-performance liquid chromatography. The weighted consistency loss term is the sum of the difference measure between the reconstructed concentration value and the mass spectrometry inferred soft constraint value of each node multiplied by the association confidence score of the corresponding node. The prior regularization term is a norm measure of the current sampling point. During the iteration process, the encoder and decoder parameters of the graph variational autoencoder are kept fixed, and only the latent space sampling points are used as optimizable variables; The weighting coefficient of the hard consistency loss term is greater than the weighting coefficient of the weighted consistency loss term.

6. The method for identifying products of microbial fermentation processes based on deep learning according to claim 5, characterized in that, In the iterative optimization process, the weight coefficient of the weighted consistency loss term is gradually increased. In the early stage of the iteration, a small weight coefficient is used to guide the optimization by the hard consistency loss term and the prior regularization term. As the number of iterations increases, the weight coefficient is gradually increased so that the mass spectrometry soft constraint gradually participates in the constraint.

7. The method for identifying products of microbial fermentation processes based on deep learning according to claim 1, characterized in that, After generating the inferred metabolite concentration values ​​for the dual-source constrained full-node metabolites, the method further includes: The overall inferred confidence of each node is calculated. The overall inferred confidence is obtained by weighted fusion of the indicator function term and the associated confidence score term. The indicator function term takes a value of 1 when the node belongs to the set of observed nodes in high performance liquid chromatography, and a value of 0 otherwise. The associated confidence score term is the associated confidence score of the soft constraint of the corresponding node in mass spectrometry. The two terms are multiplied by the fusion coefficient and the complementary fusion coefficient respectively and then summed. The inferred metabolite concentration values ​​of the dual-source constrained full nodes are used as feature vectors of each node in the directed graph of the metabolic network. The comprehensive inference confidence is used as the node weight and input into the confidence weighted message passing graph neural network for iterative aggregation calculation to generate the confidence-aware context feature representation of each node. The confidence-weighted message passing graph neural network includes a message calculation unit, a confidence gating unit, and a feature update unit. The message calculation unit calculates the message vector transmitted from the source node to the target node. The confidence gating unit scales the message vector based on the comprehensive inference confidence of the source node. The feature update unit aggregates all gated messages received by the target node and fuses them with the target node's own features to update the target node's feature representation. The confidence-aware contextual feature representations of each node are global pooled and then input into the product identification and classification network to generate early fermentation product identification results.

8. The method for identifying products of microbial fermentation processes based on deep learning according to claim 7, characterized in that, After generating the confidence-aware contextual feature representations for each node, the following steps are also included: The confidence-aware contextual feature representations of each node at multiple consecutive detection times are global pooled and arranged in time sequence. They are then input into a causal sparse attention network for temporal feature extraction to generate a temporal enhanced metabolic state feature vector. The causal sparse attention network comprises a causal masking attention layer and a low-frequency long-range connection layer. The causal masking attention layer applies a causal mask to the feature sequence, restricting each time step to focus only on the features of the current and previous time steps. It calculates the attention score by projecting the features of each time step onto a learnable query matrix and a key matrix, and then performs weighted aggregation. The low-frequency long-range connection layer applies a learnable long-range connection bias parameter to time steps with a time span of not less than a time span threshold, multiplies it by a long-range enhancement coefficient, and then superimposes it onto the attention weights to enhance the ability to capture slowly changing trends. The time-enhanced metabolic state feature vector is used as the input feature of the product identification and classification network to generate early fermentation product identification results.

9. The method for identifying products of microbial fermentation processes based on deep learning according to claim 8, characterized in that, The time-enhanced metabolic state feature vector is input into the product synthesis initiation discrimination branch and the node-level anomaly accumulation detection branch, respectively. The product synthesis initiation discrimination branch is a fully connected classification network that outputs a probability value indicating that product synthesis has been initiated. The node-level abnormal accumulation detection branch outputs the abnormal accumulation probability value of each metabolite through a fully connected layer and a Sigmoid activation function. The abnormal accumulation probability value represents the probability that the corresponding metabolite node will show an accumulation trend that exceeds the normal early fermentation range. Combining the product synthesis start probability value and the abnormal accumulation probability value of each metabolite, when the product synthesis start probability value is not less than the judgment threshold, or when the number of nodes whose abnormal accumulation probability value exceeds the node-level threshold reaches the preset node number threshold, it is determined that product synthesis has started and an early fermentation product identification result is generated. The product synthesis initiation discrimination branch and the node-level anomaly accumulation detection branch are jointly trained. The product synthesis initiation discrimination branch uses the product synthesis initiation label as the supervision signal and adopts binary cross-entropy loss. The node-level anomaly accumulation detection branch uses the node-by-node label of whether abnormal accumulation occurs at each metabolite node as the supervision signal and adopts node-by-node binary cross-entropy loss. The losses of the two branches are weighted and summed before joint parameter updates.

10. A deep learning-based microbial fermentation process product identification system, used to execute the deep learning-based microbial fermentation process product identification method according to any one of claims 1 to 9, characterized in that, include: The data acquisition and preprocessing module is used to acquire the directed graph structure of the metabolic network of the target microorganism, the metabolomics dataset of historical fermentation batches, the tail gas spectrometry signal matrix output in real time by the online mass spectrometer, and the sparse metabolite concentration data detected periodically by high performance liquid chromatography, and to normalize the various types of data. The graph variational autoencoder training module is used to train the graph variational autoencoder using the metabolomics dataset of the historical fermentation batches, so as to obtain the trained graph variational autoencoder. The mass spectrometry soft constraint generation module is used to perform multi-scale decomposition and feature extraction on the tail mass spectrometry signal matrix, and generate the mass spectrometry inference soft constraint value and corresponding association confidence score of each node in the metabolic network through correlation mapping processing. The dual-source constraint inference module is used to take the observed node concentration values ​​detected by high performance liquid chromatography as hard constraints, and the soft constraint values ​​and associated confidence scores inferred by mass spectrometry as elastic constraints. Iterative optimization is performed in the latent space of the trained graph variational autoencoder to generate dual-source constraint full node metabolite concentration inference values. The product identification module is used to infer the product synthesis start probability value based on the dual-source constrained full-node metabolite concentration value, output the product synthesis start probability value through the product identification classification network, compare the product synthesis start probability value with the preset judgment threshold, and generate the early fermentation product identification result.