A method for dynamic prediction of fermentation product concentration based on incremental learning

CN117953994BActive Publication Date: 2026-08-14HEBEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-13
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

其中,基于特征降维的相似度计算模块对历史样本与新增样本进行特征降维,从历史样本中选取与新增样本相似的样本填充新增样本集,解决发酵过程新增标签样本少的问题;基于增量学习的自适应更新模块通过计算新增样本与模型训练样本的损失梯度以更新模型参数,使模型在新增标签样本少的情况下具备快速自适应更新的能力,实时准确预测产物浓度

Benefits of technology

[0046]本发明的目的在于提供一种基于增量学习的发酵过程产物浓度动态预测方法,该方法包括基于特征降维的相似度计算模块与基于增量学习的自适应更新模块。其中,基于特征降维的相似度计算模块对历史样本与新增样本进行特征降维,从历史样本中选取与新增样本相似的样本填充新增样本集,解决发酵过程新增标签样本少的问题;基于增量学习的自适应更新模块通过计算新增样本与模型训练样本的损失梯度以更新模型参数,使模型在新增标签样本少的情况下具备快速自适应更新的能力,实时准确预测产物浓度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117953994B_ABST
    Figure CN117953994B_ABST
Patent Text Reader

Abstract

This invention discloses a method for dynamic prediction of product concentration in fermentation processes based on incremental learning, comprising the following steps: S1. Constructing a method framework including a similarity calculation module based on feature dimensionality reduction and an adaptive update module based on incremental learning; S2. Training a historical model using historical fermentation samples; S3. Performing feature dimensionality reduction on newly added samples and historical samples in the fermentation process, and then querying samples similar to the newly added samples from the historical samples according to the similarity calculation algorithm to form a similar sample set; S4. Calculating the loss gradient of a random training batch of training samples from the similar sample set and the historical model training samples respectively, and determining the angle between the gradient vectors to calculate the new gradient; S5. Updating the historical model with the new gradient, and the updated model continues to be used for subsequent product concentration prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fermentation process product concentration prediction and incremental learning technology, and in particular to a method for dynamic prediction of fermentation process product concentration based on incremental learning. Background Technology

[0002] Biomanufacturing is a production method that utilizes the functions of organisms to process and synthesize materials. The biomanufacturing industry chain is roughly divided into three parts: upstream, midstream, and downstream. Upstream, gene editing is used to produce high-performance industrial strains; midstream, repeated experiments to control the fermentation process determine the optimal fermentation conditions for the strains; and downstream, fermentation products are separated and purified to form commercial products. In recent years, the article [Xia Jianye et al. Opportunities and challenges of fermentation optimization and scale-up technology in the era of artificial intelligence [J]. Chinese Journal of Biotechnology, 2022, 38(11):4180-99.] mentioned that due to the development of upstream synthetic biology and high-throughput screening technology, the availability of high-performance strains has been greatly improved, and the separation and purification rate of downstream products has been stabilized and accelerated. However, the fermentation process optimization technology in the midstream still mostly relies on fermentation engineering experience and adopts traditional trial-and-error methods for process development, which slows down the industrialization process of innovative achievements and causes problems such as low fermentation optimization efficiency. Therefore, how to use intelligent technology to improve the efficiency of midstream fermentation optimization has become a core issue of concern in the industry.

[0003] Fermentation process optimization refers to the process by which fermenters monitor process variables and, based on experience, adjust them to ensure the stable operation of a bioreactor. The measurement of fermentation process variables includes both online and offline measurements. Online measurements are those that can be measured in real time by sensors, such as temperature, pH, and dissolved oxygen. Offline measurements are those that cannot be measured in real time by sensors, such as cell concentration, substrate concentration, and product concentration. Because offline measurements cannot be obtained in real time, fermenters can only rely on experience for coarse-grained control. Soft measurement refers to using models to replace sensors, predicting the state of variables in real time, assisting fermenters in precise control of the fermentation process, and improving the efficiency of fermentation optimization.

[0004] Soft sensor models in the fermentation field are mainly divided into kinetic models and data-driven models. Kinetic models are mathematical models based on fermentation mechanisms, capable of quantitatively describing dynamic processes such as microbial growth, product synthesis, and substrate consumption, and possess strong interpretability. However, with the accelerating iteration speed of industrial strains, it is difficult to elucidate complex internal mechanisms in a short time, making model construction challenging. Moreover, due to numerous assumptions and constraints in these models, they tend to reflect an idealized fermentation process, resulting in poor performance in practical applications. With the development of IoT technology, a large amount of real-world data can be collected during fermentation, reflecting the true state of the fermentation process. Therefore, data-driven methods are widely used in soft sensor models. The article [HOSSEINZADEH A et al. Machine learning modeling and analysis of biohydrogen production from wastewater by dark fermentation process[J]. Bioresource Technology,2021,343:126111.] applies machine learning to the dark fermentation hydrogen production process, where Gradient Boosting Machine (GBM), Support Vector Machine (SVM), Random Forest (RF), and AdaBoost all showed better performance than the kinetic model. The article [WANG B et al. Soft-sensor modeling for L-lysine fermentation process based on hybrid ICS-MLSSVM[J]. Scientific Reports, 2020.] proposes a modeling method based on ICS-MLSSVM, which uses an improved Cuckoo Search (ICS) optimization algorithm to optimize the important parameters of the MLSSVM model, thereby realizing the online detection of key biochemical indicators of lysine in the fermentation process. The article [Yu Wanli et al. Research on modeling and process parameter optimization of glucosamine fermentation process[J]. Journal of System Simulation, 2020, 32(10):1895-1902.] establishes a least squares support vector machine model to predict cell concentration, product concentration and substrate concentration, and uses an improved multiverse algorithm to optimize the model parameters, thereby improving the prediction accuracy. The above data-driven models are established by training a large amount of process data, which improves the prediction accuracy of the models. However, the actual batch fermentation process divides the fermentation process into several batches. The starting conditions and control operations of each batch fermentation process are not exactly the same. Therefore, new batches may differ significantly from historical batches. This difference can easily cause the phenomenon of "model aging", resulting in unstable model prediction accuracy.

[0005] To enable the model to continuously learn new batch features and maintain stable prediction accuracy, an adaptive mechanism is needed. Traditional adaptive mechanisms include instant learning and sliding window. Instant learning algorithms collect similar data blocks from the database for each new sample to train a local model, enabling prediction of new samples. It shows good prediction accuracy for both gradual and abrupt changes, but this process is very time-consuming. The sliding window algorithm uses a window of a certain length to slide along the sampling time series. Data included within the window is used for local modeling, while data outside the window is removed, allowing the prediction model to adaptively update in the new window. This method has a faster average computation speed, but it ignores the spatial relationships between query samples, limiting the model's prediction accuracy. Therefore, how to establish an adaptive model that balances prediction accuracy and computational speed has become a research hotspot. Summary of the Invention

[0006] The purpose of this invention is to provide a method for dynamically predicting the concentration of fermentation products based on incremental learning. This method includes a similarity calculation module based on feature dimensionality reduction and an adaptive update module based on incremental learning. The similarity calculation module performs feature dimensionality reduction on historical and new samples, selecting samples similar to the new samples from the historical samples to populate the new sample set, thus addressing the problem of insufficient new labeled samples in the fermentation process. The adaptive update module based on incremental learning updates the model parameters by calculating the loss gradient between the new samples and the model training samples, enabling the model to quickly and adaptively update even with a limited number of new labeled samples, thus accurately predicting product concentration in real time.

[0007] The technical solution adopted in this invention is:

[0008] A method for dynamically predicting the concentration of fermentation products based on incremental learning includes the following steps:

[0009] S1: Construct a method framework that includes a similarity calculation module based on feature dimensionality reduction and an adaptive update module based on incremental learning;

[0010] S2: Randomly select n batches of fermentation data from the dataset as historical samples to train a historical model;

[0011] S3: The t-distributed random neighborhood embedding (t-SNE) algorithm is used to reduce the feature dimension of the new samples and historical samples in the new batch of fermentation process. Then, based on the weighted similarity calculation algorithm based on mutual information and Euclidean distance, samples similar to the new samples are queried from the historical samples to form a similar sample set.

[0012] S4: Calculate the loss gradient of a random training batch of similar sample sets and historical model training samples respectively, determine the angle between the two gradients, and calculate the new gradient.

[0013] S5: Update the historical model with the new gradient, and the updated model will continue to be used for subsequent product concentration prediction.

[0014] Furthermore, in step S3, the t-distributed random neighborhood embedding (t-SNE) algorithm is first used to reduce the dimensionality of the samples, and then a weighted similarity calculation algorithm based on mutual information and Euclidean distance is used to find similar samples and form a similar sample set, including the following steps:

[0015] 1-1) Let the update step size of the model be U, that is, when the number of newly added samples reaches U, the model is updated once. Among the U newly added samples, there are u labeled samples. Let the set of newly added labeled samples be S. N ={s Ni Let i = 1, 2, ..., u. During model training, a buffer pool is set up to store l samples randomly selected from the training samples. Each time the model is updated, the samples stored in the buffer pool are also updated. Let S be the sample set currently stored in the buffer pool. P ={s Pj},j=1,2,…,l.

[0016] 1-2) For the newly added sample S N Compared with historical sample S P Perform feature reduction. Let [ξ1,ξ2,…,ξ] n ]∈Z D Given the original high-dimensional data, let [ψ1,ψ2,…,ψ] n ]∈Z d Let ξ be the lower-dimensional mapping after dimensionality reduction, where n is the number of samples, and D and d represent different dimensions of the data space (D>d). First, ξ i ξ will be randomly selected j As adjacent points, the selection probability can be derived as follows:

[0017]

[0018] p j|j =0,δ i Indicated by ξ i The Gaussian variance centered at the similarity probability is then simulated. Then, a low-dimensional projection ψ is simulated based on the similarity probability. i and ψ j The relationship between them:

[0019]

[0020] q ii =0. Based on the above results, the objective function of t-SNE is defined as follows:

[0021]

[0022] KL represents the Kullback-Leibler divergence, and P and Q represent the joint probabilities in different dimensional spaces. Specifically, the probability p in the higher-dimensional space... ij for:

[0023]

[0024] Where, p ii =0. The objective function C attempts to preserve the local structure of the original sample set and effectively describes the nonlinear relationships between different variables in high dimensions. Finally, the gradient descent algorithm is used to optimize the objective function to minimize the KL divergence of all sample points. C is relative to ψ i The gradient is as follows:

[0025]

[0026] 1-3)S N With S P After the samples in S are processed by the above method for dimensionality reduction, the dimensionality of the samples is reduced from S. P Querying and S N Similar sample sets. First, calculate the mutual information between variables in each dimension of the sample to measure the correlation between variables. Let MI(M,N) represent the mutual information between variables M and N:

[0027]

[0028] The solution for mutual information is based on the estimation of probability densities p(M,N), p(M), and p(N). Since there is no prior knowledge of the data distribution, the probability density distribution needs to be fitted solely from the data itself. The training sample set is known to be S={(X i ,y i )}, i=1,2,…,n, X=[x 1, x 2, ,…,x n ,] T Y = [y1, y2, ..., y n ] T Then the mutual information between the variables of X is expressed as:

[0029]

[0030] Where X(d) = [x1(d), x2(d), x i (d),...,x n (d)] T This represents the nth sampled value of the d-th dimension input variable.

[0031] 1-4) Given the mutual information MI{X(d),Y} between variables, the similarity between new samples and historical samples is calculated using the weighted Euclidean distance formula. Let the similarity between samples be Sim(s). i ,s j ):

[0032]

[0033]

[0034]

[0035] ω d This represents the weight assigned to the d-th dimension of the input variable. A larger weight indicates a stronger correlation between the input and output variables, and a greater contribution to the similarity between samples. i With s j Representing different samples. The k-th largest similarity is denoted as Sim. k (s i ,s j ).

[0036] 1-5) Select with s j The top k most similar samples are used as the similarity sample set to fill the newly added sample set. The filled sample set is denoted as S. current :

[0037] S current ={s i |Sim(s i ,s j )≥Sim k (s i ,s j )}

[0038] Furthermore, in step S4, S is calculated respectively. current The loss gradient of a random training batch is compared with the historical model training samples. The angle between the two gradients is determined to calculate the new gradient, including the following steps:

[0039] 2-1) In the actual batch fermentation process, differences and similarities coexist between different batches. To prevent the model from forgetting similar knowledge during the update process, based on the idea of ​​experience replay in incremental learning, two independent loss terms are set for the model, including the current loss l representing the newly added samples. current and historical loss representing historical samples l replay .

[0040] 2-2) The A-GEM (Averaged Gradient Episodic Memory) algorithm is adopted, and the model uses the cross-entropy loss function, from Scurrent Calculate the loss lc of a randomly sampled batch. urrent The loss l is calculated by randomly sampling a batch from the historical model training samples. replay The core of the algorithm is based on historical loss l replay Minimize the current loss l without increasing it. current To achieve this, the gradient vector used to update the parameters needs to be correlated with l. replay The gradient of has a positive angle; therefore, whenever the angle between the two is negative, l current The gradient will be projected onto l history Let S lie on the orthogonal complement space of the gradient. replay For mini-batch replay of data, the gradient g of the current loss is... current Gradient g of the replay data replay and the gradient g used to update model parameters * for:

[0041]

[0042]

[0043]

[0044] Where γ is a constant used to stabilize the algorithm performance, γ = 1 × 10 -7 Gradient g * This will be used to update historical model parameters, enabling adaptive updates.

[0045] The beneficial effects of adopting the above technical solution are as follows:

[0046] The purpose of this invention is to provide a method for dynamically predicting the concentration of fermentation products based on incremental learning. This method includes a similarity calculation module based on feature dimensionality reduction and an adaptive update module based on incremental learning. The similarity calculation module performs feature dimensionality reduction on historical and new samples, selecting samples similar to the new samples from the historical samples to populate the new sample set, thus addressing the problem of insufficient new labeled samples in the fermentation process. The adaptive update module based on incremental learning updates the model parameters by calculating the loss gradient between the new samples and the model training samples, enabling the model to quickly and adaptively update even with a limited number of new labeled samples, thus accurately predicting product concentration in real time.

[0047] The proposed dynamic prediction method for product concentration during fermentation was applied to the publicly available penicillin dataset IndPenSim. Experimental analysis showed that, on three different batches of fermentation data, the dynamic model with this adaptive update method improved the prediction accuracy of product concentration by an average of 8.8% compared to the static model without this method. This demonstrates that the proposed method can effectively adapt to the differences between different batches of fermentation. Comparative experiments with traditional adaptive methods such as sliding window and real-time learning show that the proposed method balances computational speed and prediction accuracy, enabling real-time and accurate prediction of product concentration during fermentation and playing a role in assisting decision-making. Attached Figure Description

[0048] Figure 1 Schematic diagram of the biomanufacturing industry chain;

[0049] Figure 2 Framework diagram of a method for dynamic prediction of fermentation product concentration based on incremental learning;

[0050] Figure 3 Similarity calculation module diagram based on feature dimensionality reduction;

[0051] Figure 4 Adaptive update of module graph based on incremental learning;

[0052] Figure 5 Product concentration prediction experiment results diagram

[0053] Figure 6 Comparison of experimental results (images). Detailed Implementation

[0054] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0055] This invention, taking the prediction of fermentation process product concentration as its background, utilizes incremental learning technology as its carrier and deep learning as its aid, and proposes a dynamic prediction method for fermentation process product concentration based on incremental learning. Its framework is as follows: Figure 1 As shown, it includes the following steps:

[0056] S1: Construct a method framework that includes a similarity calculation module based on feature dimensionality reduction and an adaptive update module based on incremental learning;

[0057] S2: Randomly select n batches of fermentation data from the dataset as historical samples to train a historical model;

[0058] S3: The t-distributed random neighborhood embedding (t-SNE) algorithm is used to reduce the feature dimension of the new samples and historical samples in the new batch of fermentation process. Then, based on the weighted similarity calculation algorithm based on mutual information and Euclidean distance, samples similar to the new samples are queried from the historical samples to form a similar sample set.

[0059] 1-1) Let the update step size of the model be U, that is, when the number of newly added samples reaches U, the model is updated once. Among the U newly added samples, there are u labeled samples. Let the set of newly added labeled samples be S. N ={s Ni Let i = 1, 2, ..., u. During model training, a buffer pool is set up to store l samples randomly selected from the training samples. Each time the model is updated, the samples stored in the buffer pool are also updated. Let S be the sample set currently stored in the buffer pool. P ={s Pj},j=1,2,…,l.

[0060] 1-2) For the newly added sample S N Compared with historical sample S P Perform feature reduction. Let [ξ1,ξ2,…,ξ] n ]∈Z D Given the original high-dimensional data, let [ψ1,ψ2,…,ψ] n ]∈Z d Let ξ be the lower-dimensional mapping after dimensionality reduction, where n is the number of samples, and D and d represent different dimensions of the data space (D>d). First, ξ i ξ will be randomly selected j As adjacent points, the selection probability can be derived as follows:

[0061]

[0062] p j|j =0,δ i Indicated by ξ i The Gaussian variance centered at the similarity probability is then simulated. Then, a low-dimensional projection ψ is simulated based on the similarity probability. i and ψ j The relationship between them:

[0063]

[0064] q ii =0. Based on the above results, the objective function of t-SNE is defined as follows:

[0065]

[0066] KL represents the Kullback-Leibler divergence, and P and Q represent the joint probabilities in different dimensional spaces. Specifically, the probability p in the higher-dimensional space... ij for:

[0067]

[0068] Where, p ii=0. The objective function C attempts to preserve the local structure of the original sample set and effectively describes the nonlinear relationships between different variables in high dimensions. Finally, the gradient descent algorithm is used to optimize the objective function to minimize the KL divergence of all sample points. C is relative to ψ i The gradient is as follows:

[0069]

[0070] 1-3)S N With S P After the samples in S are processed by the above method for dimensionality reduction, the dimensionality of the samples is reduced from S. P Querying and S N Similar sample sets. First, calculate the mutual information between variables in each dimension of the sample to measure the correlation between variables. Let MI(M,N) represent the mutual information between variables M and N:

[0071]

[0072] The solution for mutual information is based on the estimation of probability densities p(M,N), p(M), and p(N). Since there is no prior knowledge of the data distribution, the probability density distribution needs to be fitted solely from the data itself. The training sample set is known to be S={(X i ,y i )}, i=1,2,…,n, X=[x 1, x2,,…,x n ,] T Y = [y1, y2, ..., y n ] T Then the mutual information between the variables of X is expressed as:

[0073]

[0074] Where X(d) = [x1(d), x2(d), x i (d),...,x n (d)] T This represents the nth sampled value of the d-th dimension input variable.

[0075] 1-4) Given the mutual information MI{X(d),Y} between variables, the similarity between new samples and historical samples is calculated using the weighted Euclidean distance formula. Let the similarity between samples be Sim(s). i ,s j ):

[0076]

[0077]

[0078]

[0079] ω d This represents the weight assigned to the d-th dimension of the input variable. A larger weight indicates a stronger correlation between the input and output variables, and a greater contribution to the similarity between samples. i With s j Representing different samples. The k-th largest similarity is denoted as Sim. k (s i ,s j ).

[0080] 1-5) Select with s j The top k most similar samples are used as the similarity sample set to fill the newly added sample set. The filled sample set is denoted as S. current :

[0081] S current ={s i |Sim(s i ,s j )≥Sim k (s i ,s j )}

[0082] S4: Calculate the loss gradient of a random training batch of similar sample sets and historical model training samples respectively, determine the angle between the two gradients, and calculate the new gradient.

[0083] 2-1) In the actual batch fermentation process, differences and similarities coexist between different batches. To prevent the model from forgetting similar knowledge during the update process, based on the idea of ​​experience replay in incremental learning, two independent loss terms are set for the model, including the current loss l representing the newly added samples. current and historical loss representing historical samples l replay .

[0084] 2-2) The A-GEM (Averaged Gradient Episodic Memory) algorithm is adopted, and the model uses the cross-entropy loss function, from S current Calculate the loss l of a randomly sampled batch. current The loss l is calculated by randomly sampling a baptism from the historical model training samples. replay The core of the algorithm is based on historical loss l replay Minimize the current loss l without increasing it. current To achieve this, the gradient vector used to update the parameters needs to be correlated with l. replay The gradient of has a positive angle; therefore, whenever the angle between the two is negative, l current The gradient will be projected onto l history Let S lie on the orthogonal complement space of the gradient.replay For mini-batch replay of data, the gradient g of the current loss is... current Gradient g of the replay data replay and the gradient g used to update model parameters * for:

[0085]

[0086]

[0087]

[0088] Where γ is a constant used to stabilize the algorithm performance, γ = 1 × 10 -7 Gradient g * This will be used to update historical model parameters, enabling adaptive updates.

[0089] S5: Update the historical model with the new gradient, and the updated model will continue to be used for subsequent product concentration prediction.

[0090] Based on the above steps, this invention effectively solves the problem of unstable prediction accuracy of product concentration caused by the differences in fermentation data from different batches, and proposes a dynamic prediction method for product concentration in the fermentation process based on incremental learning. The method includes a similarity calculation module based on feature dimensionality reduction and an adaptive update module based on incremental learning. Specifically, the similarity calculation module performs feature dimensionality reduction on historical samples and new samples, selecting samples similar to the new samples from the historical samples to fill the new sample set, thus addressing the problem of insufficient new labeled samples in the fermentation process. The adaptive update module based on incremental learning updates the model parameters by calculating the loss gradient between the new samples and the model training samples, enabling the model to quickly and adaptively update even with a limited number of new labeled samples, thus accurately predicting product concentration in real time.

[0091] Experimental verification of the dynamic prediction method for fermentation process product concentration based on incremental learning in this invention:

[0092] 1. Test Environment

[0093] The system uses Windows 11, an Intel Core i5-13400F CPU (2.5GHz x 12 CPUs) and an NVIDIA GeForce RTX 3060 GPU. The development environment is Python 3.6, the deep learning framework is PyTorch 1.13.0, and the machine learning methods are based on the APIs provided by Scikit-learn 0.21.3.

[0094] 2. Experimental verification

[0095] Experimental Results and Analysis on the Penicillin Public Dataset IndPenSim

[0096] (1) Dataset Description

[0097] IndPenSim is an industrial-grade penicillin fermentation process simulator with a fermentation scale of 1000L, validated using real industrial penicillin fermentation data. IndPenSim provides 100 batches of fermentation data, with the fermentation process variables shown in Table 1. These 100 batches include 60 batches of formulation-driven data, 30 batches of operator-intervention-controlled data, and 10 batches of fault data. The difference between formulation-driven and operator-intervention-controlled data lies in whether some controllable variables were manually adjusted during fermentation. Data was sampled at 0.2-hour intervals, with fermentation cycles ranging from 167 to 290 hours. This paper uses operator-intervention-controlled data, randomly selecting 5 batches as the training set and 3 batches as the test set. Taking the prediction of penicillin product concentration as an example, this paper selects the first 21 process variables in Table 1 as input variables, and penicillin concentration as the output variable to be measured.

[0098] Table 1. Variables in the fermentation process

[0099]

[0100]

[0101] (2) Implementation details and evaluation indicators

[0102] The Transformer model was chosen as the base model and constructed using Python libraries. In the feature dimensionality reduction part, the t-SNE algorithm was used to reduce the 21 feature variables to 4 dimensions. In the model update part, an initial model was first trained by randomly selecting 5 batches of fermentation data. The buffer pool size was set to 1000, and 1000 samples were randomly sampled from the training data and stored in the buffer pool. The model update step size was set to 120, where a labeled sample was generated every 60 new samples. That is, whenever two new labeled samples were added, 500 similar samples were sampled from the buffer pool to form a new data block using a similarity calculation algorithm. Finally, the gradient information between the new data block and the historical data blocks was calculated to update the model parameters.

[0103] To evaluate the model's predictive performance, R0 was used. 2 As an evaluation indicator, it is defined as follows:

[0104]

[0105] Where i = 1, 2, ..., N, N represents the total length of the test set, y i , and R represents the true value, the mean of the true values, and the predicted value of the output quality variable, respectively. 2 The value ranges from 0 to 1. The closer it is to 1, the better the curve fits the predicted value to the true value, and the higher the prediction accuracy of the model.

[0106] (3) Analysis of the experimental results for predicting product concentration

[0107] To verify the role of the adaptive update module in different batches of fermentation, an ablation experiment was conducted on the module. The Transformer (TF) model containing the adaptive update module is denoted as Inc-TF. An Inc-TF method (Inc-TF of Non-Incremental Module, TF) with the module removed was set as a control group. This control group lacked adaptive update capability. To verify the effectiveness of the adaptive update module in different batches of fermentation, tests were performed on fermentation data from Fermentation 1, 2, and 3. The experimental results are shown in Table 2.

[0108] Table 2 Comparison of TF and Inc-TF Prediction Results

[0109]

[0110] As shown in Table 2, Inc-TF performed stably on three different batches of fermentation data, demonstrating good predictive ability. The model performance did not degrade due to the differences in fermentation processes. Compared with TF, Inc-TF showed improved prediction accuracy, with improvements of 7.6%, 9.9%, and 8.9% on the three batches of fermentation data, respectively. This is because Inc-TF introduced incremental learning, effectively utilizing the features of newly added data to update the model, enabling the model to adapt to the differences in fermentation processes and thus improve prediction accuracy.

[0111] To further illustrate the effectiveness of Inc-TF, two TF models with different adaptive mechanisms were selected for comparison with the Inc-TF model. The Just-In-Time (JITL) method was chosen for spatial adaptation, and the sliding window (MW) method was chosen for temporal adaptation. The JITL algorithm collects data blocks similar to newly added sample points from the database to build a local model for predicting new samples. The sliding window algorithm uses a window of a certain length to slide along the sampling time series. Data contained within the window is used for local modeling, while data outside the window is removed, allowing the prediction model to adaptively update within the new window. For ease of comparison, the model update step size for all three methods was set to 120. The JITL method selected a similar sample set of size 500 from the buffer pool for local modeling, and the sliding window had a window size of 500 and a window movement step size of 120. The experimental results are shown in Table 3.

[0112] Table 3 Comparison of prediction results for Inc-TF, MWTF and JITTF

[0113]

[0114]

[0115] As shown in Table 3, Inc-TF and JITTF have higher prediction accuracy, while MWTF has lower prediction accuracy. This is because MW-TF only uses a segment of data in the sliding window to model and predict the next segment of data, discarding past data information and not considering the spatial relationship between query samples, thus limiting the model's prediction accuracy. The running time of Inc-TF and MWTF is much lower than that of JITTF. This is because JITTF needs to build a local model for each new sample, which is very time-consuming, while Inc-TF is a global model that does not require local modeling. It considers the temporal and spatial relationship between samples, thus having higher prediction accuracy and less running time, demonstrating the superiority of the proposed method in dealing with the differences between different fermentation batches.

[0116] In summary, the adaptive update method proposed in this paper has significant advantages over traditional adaptive methods such as sliding window and real-time learning in terms of model update speed and prediction accuracy. By reducing the dimensionality of samples to improve the accuracy and speed of similarity calculation, and then updating the model by calculating the loss gradient between the old and new sample sets, it eliminates the need to build a local model and considers the temporal and spatial relationships between samples, resulting in higher prediction accuracy and shorter runtime. Therefore, the incremental learning-based dynamic prediction method for fermentation product concentration effectively solves the problem of unstable model prediction accuracy caused by the differences between different batches of fermentation.

[0117] 3. Conclusion

[0118] To address the issue of unstable product concentration prediction accuracy due to batch-to-batch variability in fermentation, this paper proposes a dynamic prediction method for fermentation product concentration based on incremental learning. This method comprises two modules: dimensionality reduction of new and historical samples, and selection of a sample set similar to the new samples from historical samples using a weighted similarity sampling criterion of mutual information and Euclidean distance; and calculation of the loss gradient between the similar sample set and the model training samples, comparing the gradient angle to derive a new gradient for updating model parameters, thus achieving adaptive model update. Experimental results on the penicillin public dataset demonstrate that Inc-TF, with its model update method, can effectively adapt to batch-to-batch variability in fermentation. Comparative experiments with traditional adaptive methods such as sliding window (MWTF) and just-in-time (JITTF) show that the Inc-TF method balances computational speed and prediction accuracy, enabling real-time and accurate prediction of product concentration during fermentation, thus playing a role in decision support.

[0119] The foregoing detailed examples of the present invention are merely preferred embodiments and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the patent coverage of the present invention.

Claims

1. A method for dynamic prediction of fermentation process product concentration based on incremental learning, characterized in that... To dynamically update the model using incremental learning to accurately predict product concentrations in real time, the following steps are included: S1: Construct a method framework that includes a similarity calculation module based on feature dimensionality reduction and an adaptive update module based on incremental learning; S2: Randomly select n batches of fermentation data from the dataset as historical samples to train a historical model; S3: The t-distributed random neighborhood embedding (t-SNE) algorithm is used to reduce the dimensionality of the new samples and historical samples in the new batch of fermentation process. Then, based on the weighted similarity calculation algorithm based on mutual information and Euclidean distance, samples similar to the new samples are queried from the historical samples to form a similar sample set. S4: Calculate the loss gradient of the similar sample set and a random training batch (referring to the training batch of the model) of the historical model training samples respectively, and calculate the new gradient by determining the angle between the two gradients. S5: Update the historical model with the new gradient, and the updated model will continue to be used for subsequent product concentration prediction; In step S3, the t-distributed random neighborhood embedding (t-SNE) algorithm is first used to reduce the dimensionality of the samples, and then a weighted similarity calculation algorithm based on mutual information and Euclidean distance is used to find similar samples and form a similar sample set, including the following steps: 1-1) Let the update step size of the model be... That is, when the number of new samples accumulates to When a condition is met, the model is updated once in each iteration. The newly added samples include Each set of labeled samples is denoted as a newly added set of labeled samples. During model training, a buffer pool is set up to store randomly selected samples from the training samples. For each sample, the sample set stored in the buffer pool is updated every time the model is updated. Let the sample set stored in the buffer pool at this time be denoted as . ; 1-2) For newly added samples Compared with historical samples Perform feature dimensionality reduction, and assume Given the original high-dimensional data, let... This is the low-dimensional mapping after dimensionality reduction, where For the number of samples, and Representing different dimensions of the data space ,first, Random selection As adjacent points, the selection probability can be derived as follows: , Indicates The Gaussian variance centered at the center is then used to simulate a low-dimensional projection based on the similarity probability. and The relationship between them: Based on the above results, the objective function of t-SNE is defined as follows: Indicates the Kullback-Leibler divergence. and This represents the joint probability in different dimensional spaces, specifically, the probability in high-dimensional space. for: in, objective function This approach attempts to preserve the local structure of the original sample set and effectively describe the nonlinear relationships between different variables in high dimensions. Finally, the gradient descent algorithm is used to optimize the objective function to minimize the values ​​of all sample points. divergence, Compared to The gradient is as follows: 1-3) and After the samples in the above method are dimensionality reduced, from Chinese query and For similar sample sets, firstly, calculate the mutual information between variables in each dimension of the sample to measure the correlation between variables, let Representing variables Mutual information between them: The solution of mutual information is based on probability density. , and The estimation, due to the lack of prior knowledge about the data distribution, requires fitting the probability density distribution solely from the data itself, given that the training sample set is... ,but The mutual information between the variables in each dimension is represented as follows: in Indicates the first Dimensional input variables Each sample value; 1-4) Mutual information between known variables The similarity between new samples and historical samples is calculated using the weighted Euclidean distance formula, and the similarity between samples is denoted as . : Indicates to the first The weights of the input variables are defined; the larger the weight, the stronger the correlation between the corresponding input and output variables, and the greater their contribution to the similarity between samples. and Representing different samples, the first Large similarity is denoted as ; 1-5) Selection and The most similar A set of sample points is used as a similar sample set to fill the newly added sample set. The filled sample set is denoted as . , .

2. The method for dynamic prediction of fermentation process product concentration based on incremental learning according to claim 1, characterized in that: In step S4, the loss gradients of a random training batch of similar sample sets and historical model training samples are calculated respectively, and the angle between the two gradients is determined to calculate a new gradient, including the following steps: 2-1) In the actual batch fermentation process, differences and similarities coexist between different batches. In order to prevent the model from forgetting similar knowledge during the update process, based on the idea of ​​experience replay method in incremental learning, two independent loss terms are set for the model, including the current loss representing the new sample. and historical losses representing historical samples ; 2-2) The A-GEM (Averaged Gradient Episodic Memory) algorithm is adopted, and the model uses the cross-entropy loss function. Calculate the loss by randomly sampling a batch. The loss is calculated by randomly sampling a batch from the historical model training samples. The core of the algorithm is based on historical losses. Minimize the current loss without increasing it. To achieve this, the gradient vector used to update the parameters needs to be... The gradient has a positive angle, therefore, whenever the angle between the two is negative, The gradient will be projected onto On the orthogonal complement space of the gradient, let For mini-batch replay of data, the gradient of the current loss... Gradients of replay data and the gradient used to update model parameters for: in, It is a constant used to stabilize algorithm performance. ;gradient It will be used to update historical model parameters to achieve adaptive updates.

Citation Information

Patent Citations

  • Intelligent rail unmanned vehicle fault gene identification method and system

    CN112650204A

  • Sulfur recovery process adaptive soft measurement method based on instant learning and twinborn support vector regression machine

    CN116796195A