A multi-view enzyme optimum temperature prediction method based on meta learning
By employing a meta-learning-based multi-view enzyme optimal temperature prediction method, a multi-scale multi-view feature extraction network is constructed using enzyme amino acid sequence features, and a kernel density weighted loss function is introduced. This solves the problem of high prediction error in enzyme prediction models for newly discovered enzyme populations and rare enzymes, achieving high-precision and widely adaptable enzyme prediction.
Patent Information
- Application Number
- CN202611358308.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-11-24
AI Technical Summary
Existing enzyme optimum temperature prediction models lack labeled data when facing newly discovered enzyme populations and rare enzymes at the tail end of the distribution, making it difficult to build prediction models with rapid adaptability. Furthermore, the mismatch between features and label inputs leads to high prediction errors and limited adaptability, especially in cases of long-tailed distributions and out-of-distribution scenarios, resulting in prediction distortion.
A meta-learning-based multi-view enzyme optimal temperature prediction method is adopted. A scenario-based task is constructed by clustering, a multi-scale multi-view feature extraction network is built, a kernel density weighted loss function is introduced, and a model-independent meta-learning framework is used for inner and outer loop double-layer optimization, which relies solely on enzyme amino acid sequence features for prediction.
It significantly improves the prediction accuracy and adaptability in extreme temperature ranges and out-of-distribution scenarios, enhances the adaptability to long-tailed data, and improves the accuracy and generalization ability of enzyme thermal stability prediction. It is suitable for cold-start assessment of new enzyme populations and enzyme-directed mutation screening.
Smart Images

Figure CN123161672A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of enzyme optimal catalytic temperature prediction, and more particularly to a multi-view enzyme optimal temperature prediction method based on meta-learning. Background Technology
[0002] Temperature is a core environmental factor regulating enzyme catalytic activity and life activities. The optimal catalytic temperature of an enzyme is a key parameter for measuring its thermal stability and catalytic properties. Its determination is of great significance for studying the catalytic properties of enzymes and promoting their industrial application. In recent years, with the rapid development of high-throughput sequencing technology, traditional experimental methods have struggled to keep up with the rapid discovery of new enzymes. As a result, a low-cost scheme using intelligent models to determine the optimal catalytic temperature of enzymes has emerged.
[0003] Early optimal temperature prediction models were mostly developed for specific applications and focused on specific enzyme classes. For example, a paper titled "Computational approach for identification, characterization, three-dimensional structure modelling and machine learning-based thermostability prediction of xylanases from the genome of aspergillus fumigatus" proposed a method for predicting the thermostability of xylanases. Such methods extract features from information such as sequence and three-dimensional structure, but the sample size is small and the types are limited, thus restricting the scope of application.
[0004] To address the aforementioned limitations, general optimal temperature prediction models have been gradually proposed. In the paper titled "Improving Enzyme Optimum Temperature Prediction with Resampling Strategies and Ensemble Learning," the model uses a decision tree as the basic learner, focusing solely on sequence amino acid frequencies and the optimal growth temperature of microorganisms. It improves prediction performance by resampling extreme temperature samples. In the paper titled "Learning deep representations of enzyme thermal adaptation," the optimal growth temperature of microorganisms is used as the pre-training target. The pre-trained residual neural network is fine-tuned and transferred to the enzyme optimal temperature prediction task, demonstrating good relative ranking ability for high and low temperature samples. The model proposed in the paper titled "Seq2Topt: a sequence-based deep learning predictor of enzyme optimal temperature" uses ESM2 to extract deep sequence feature embeddings, combining an attention mechanism with residual dense blocks, achieving significant improvements in prediction accuracy.
[0005] While the aforementioned general prediction models have achieved some success, they still face significant challenges. First, most enzymes, especially newly discovered enzyme populations and rare enzymes at the tail end of their distribution, lack labeled data obtained from wet experiments, often having only a very small number of labeled samples. This makes it difficult to support independent training of specific models. Therefore, how to construct a prediction model with rapid adaptability based on limited samples has become a significant research problem. Second, there are varying degrees of mismatch between the features and labels of existing general models and the prediction tasks. For example, using the optimal growth temperature of microorganisms as feature inputs or training labels ignores the individual differences among different enzymes within the same organism due to evolution and metabolic regulation. The use of amino acid composition frequencies alone, without considering residue information and active sites, hinders the improvement of model prediction performance. Therefore, designing feature and label input methods that match the prediction task is of great significance for improving prediction accuracy. In addition, due to limitations in input features and model architecture, existing models generally have limited adaptability. Affected by limited training data, their predictions of marginal samples are still prone to distortion, making it difficult to make reasonable out-of-distribution predictions. On datasets with a wider distribution, they tend to regress towards the center. Therefore, it is of great significance to construct a general prediction model that relies solely on enzyme sequence features, generalizes well to a wide range of enzyme types, and has the advantage of adapting to marginal regions. Summary of the Invention
[0006] The purpose of this invention is to provide a multi-view enzyme optimal temperature prediction method based on meta-learning, which mainly solves the problem that current models have incomplete feature extraction and difficulty in adapting to imbalanced data, resulting in high prediction errors. This method uses the enzyme amino acid sequence as the only input, constructs a scenario-based task through clustering, builds a multi-scale multi-view feature extraction network, introduces a kernel density weighted loss function, and performs inner and outer loop double-layer optimization based on a model-independent meta-learning framework. Thus, it can accurately predict a wide range of enzyme types by relying solely on sequence features, improving the prediction accuracy and adaptability of the model in long-tailed distributions, extreme temperature ranges, and situations with few samples and out-of-distribution conditions.
[0007] To achieve the above-mentioned objectives, the present invention adopts the following technical solution: a multi-view enzyme optimal temperature prediction method based on meta-learning, comprising the following steps:
[0008] S1: Use a protein language model to extract feature embeddings of enzyme amino acid sequences, calculate the feature similarity between sequences and cluster them accordingly, and use the obtained clusters as basic training units to construct a scenario-based task.
[0009] S2: Construct a multi-scale, multi-view feature extraction network, embed the features of the enzyme sequence into local segments, extract the local dependency and global collaborative features of the sequence through multi-scale, multi-view feature interaction within and between segments, and perform regression prediction through the residual linear prediction head to output the predicted value of the enzyme's optimal temperature.
[0010] S3: Construct an adaptive kernel density loss function, and assign different continuous density weights to each sample based on the kernel density estimation of the full training labels, so as to balance the learning of the features of each interval sample.
[0011] S4: Based on the model-independent meta-learning framework, the task obtained in step S1 is divided into a support set and a query set, and the parameters of the feature extraction network are divided into an inner loop and an outer loop. The inner loop parameters are quickly adapted using the support set, and the outer loop parameters are updated using the query set to perform meta-loss, thus performing two-layer optimization and saving the network model.
[0012] S5: During the testing phase, the enzyme sequence to be predicted is input into the trained network in the form of a task. The network then performs specific adaptive prediction to obtain the predicted value of the enzyme's optimal temperature.
[0013] Further, step S1 includes the following steps:
[0014] S1.1: The enzyme sequence is encoded using the protein language model ESM2 to obtain the sequence feature embedding:
[0015]
[0016] in, This refers to the amino acid sequence composition information of the enzymes input for this batch. This is the embedding vector for the enzyme sequence of the current batch. For batch size, For sequence length, The number of feature channels;
[0017] S1.2: Flatten the feature embedding into a one-dimensional vector, and calculate the embedding vector after flattening any two enzyme sequences. , Cosine similarity between them:
[0018]
[0019] S1.3: Using the cosine similarity as the distance metric, K-Means clustering is used to divide the samples into several clusters. Clusters whose range or standard deviation within a cluster does not meet the conditions are removed to obtain effective clusters.
[0020] S1.4: Using each of the obtained effective clusters as the basic training unit, construct a scenario-based training task to enable the model to adapt to the ever-changing actual prediction situation.
[0021] Further, step S2 includes the following steps:
[0022] S2.1: The enzyme sequence features are embedded by dividing the sequence along its length into several equal-length, non-overlapping local segments, which serve as the basic unit for feature interaction: Patch.
[0023]
[0024] in, It is the original embedding The vector obtained after segmentation This is the number of patches into which each sequence is divided. The length of the amino acid sequence contained in each patch;
[0025] S2.2: Construct an Intra-Patch module and use a bidirectional Mamba (Bi-Mamba) network to capture the local dependencies of amino acid residues within each local fragment, thereby obtaining local micro-features. :
[0026]
[0027]
[0028] in, For the first in the sequence The physical location in each segment is The amino acid characteristics, and This represents the two feature vectors obtained by updating the amino acid in the forward and reverse scans. and These represent the independent discretization parameters and system transformation matrix in the forward and reverse modules, respectively;
[0029] S2.3: Constructing the Inter-Patch module; First, an improved Transformer network is used to capture the long-range spatial dependencies between any two local segments, forming a global spatial view; In addition, a bidirectional mLSTM network is used to capture the temporal evolution and chemical potential energy conduction constraints between segments, forming a temporal view:
[0030]
[0031]
[0032]
[0033]
[0034] in, These are the query matrix, key matrix, and value matrix obtained after projecting local features. This batch contains the attention matrix among all patches in the same sequence; The local features output by the Intra-Patch module are processed by an attention mechanism and layer normalization to output the global features of the view. For the first element in the input sequence... Global Patch Features The mLSTM network generates six core vectors through linear projection and activation functions: query vector... Key vector Value vector Output gate And the forget gate that controls information updates Input gate Simultaneously, the feature memory matrix is updated segment by segment in the form of outer product. and normalized state Then, the query vector of the current patch is used. Obtain historical accumulated information from the matrix to complete the block feature. Context update; finally, the features obtained along the forward and reverse directions of the sequence are... and and original block features Perform a residual join to obtain the updated [number]th [item]. Global Patch Features ;
[0035]
[0036]
[0037]
[0038] S2.4: Adaptively weightedly fuse the output features of the global spatial view and the temporal view, and then aggregate them into a high-dimensional feature vector through multi-head attention pooling:
[0039]
[0040]
[0041] in and The dual-view features obtained in the previous step are derived from adaptive parameters. Weighted fusion ;right The Middle Features of a Patch The feature value obtained by its convolution, For the common The first one in the attention. The calculated expression weights are fused to obtain a high-dimensional feature vector. ;
[0042] S2.5: Input the high-dimensional feature vector into the residual linear prediction head, and output the optimal temperature prediction value of the enzyme after multi-path dimensionality reduction and residual fusion.
[0043] Further, step S3 includes the following steps:
[0044] S3.1: Construct a parameter-free Gaussian kernel density estimator based on the distribution of all training labels to estimate the smooth continuous probability density; for the first... Each sample has density-based normalized weights. The definition is as follows:
[0045]
[0046] in, This is the true target label for the sample; The probability density at this label calculated by the kernel density estimator; To prevent extremely small constants with a denominator of zero; For the full training set Expected value of continuous density on;
[0047] S3.2: Set a lower limit for the weights. times, upper limit 10 times the truncation ( ), construct density-weighted mean squared error as the loss function:
[0048]
[0049] in, This is the current training batch size. and These are the sample labels and the model output, respectively. Predicted value.
[0050] Further, step S4 includes the following steps:
[0051] S4.1: The parameters of the feature extraction network are divided into inner loop parameters and outer loop parameters. The inner loop parameters only contain the residual linear prediction head for bottleneck dimensionality reduction and adopt a large learning rate. The outer loop parameters contain the backbone network of the Intra-Patch module and the Inter-Patch module, adopt a conservative learning rate and perform gradient accumulation.
[0052] S4.2: In the task obtained in step S1, mutually exclusive samples within each cluster are divided into support sets. With query set The samples with the largest temperature differences within a cluster are then fixedly assigned to the support set to form the meta-task. ;
[0053] S4.3: Starting with the inner loop parameters, perform forward prediction using support set samples, and use the density-weighted mean square error to perform a finite-step gradient descent on the inner loop parameters to fit the task-specific local parameters:
[0054]
[0055] in, For any meta-task support set, For the local adaptive step size of the inner loop, For all network parameters, These are temporary parameters updated after the inner loop.
[0056] S4.4: Apply the updated parameters from the inner loop to the query set, calculate the meta-loss and backpropagate its gradient to the outer loop to update the global parameters, and adjust the learning rate accordingly.
[0057]
[0058] in, For any meta-task query set, The outer loop uses an adaptive step size.
[0059] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0060] (1) Enhance the adaptability of long-tail data: This invention constructs a scenario-based task by clustering based on sequence similarity and introduces a kernel density weighted loss function to give greater learning weight to rare and extreme temperature samples in the low-density range, effectively alleviating the tendency of the regression model to shift to the mean under the long-tail distribution, and significantly improving the prediction accuracy and stability of extreme temperature range.
[0061] (2) Sufficient feature extraction: This invention constructs a multi-scale, multi-view feature extraction network. The Intra-Patch module captures the core features of amino acid residues within the fragment, and the Inter-Patch module integrates the dual-view features of spatial contact of active sites and sequence chemical potential conduction. Combined with multi-head attention pooling and residual bottleneck prediction head, it accurately extracts key sequence features that affect enzyme thermal stability and improves prediction accuracy.
[0062] (3) Rapid adaptation with few samples: Based on the model-independent meta-learning framework, this invention divides the network parameters into inner and outer loops. The support set is used to rapidly adapt the parameters of the inner loop in a limited number of steps, and the query set is used to update the outer loop to extract general rules. This enables the model to quickly adapt to new enzyme populations and out-of-distribution samples with similarity using a very small number of labeled samples, and has a strong generalization ability.
[0063] (4) Only relies on sequence input and has a wide range of applications: This invention does not require additional three-dimensional structure or host growth temperature information. It can independently complete the prediction with only the enzyme amino acid sequence as input. It is still applicable in many scenarios where relevant experimental data is lacking. It can be widely used for cold start evaluation of new enzyme groups and targeted mutation screening of enzymes. Attached Figure Description
[0064] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0065] Figure 1 A scatter plot of the KDE density of predicted and actual values for each model on the test set of dataset 1.
[0066] Figure 2 This is a schematic diagram illustrating the empirical cumulative distribution of prediction errors for each model on dataset 1.
[0067] Figure 3 Grouped bar charts showing MAE and RMSE for each model across the three high-temperature ranges;
[0068] Figure 4This is a flowchart illustrating the multi-view enzyme optimal temperature prediction method based on meta-learning of the present invention.
[0069] Figure 5 This is an overall block diagram of the multi-view enzyme optimal temperature prediction method based on meta-learning of the present invention. Detailed Implementation
[0070] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments; of course, the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention.
[0071] Example 1:
[0072] This example uses 255 valid clusters and a total of 9,265 enzyme sequences, along with their optimal catalytic temperature labels, preprocessed from the BRENDA 2021 database as an example; see [link to documentation]. Figure 4-5 This embodiment provides a technical solution: a multi-view enzyme optimal temperature prediction method based on meta-learning, comprising the following steps:
[0073] S1: Use a protein language model to extract feature embeddings of enzyme amino acid sequences, calculate the feature similarity between sequences and cluster them accordingly, and use the obtained clusters as basic training units to construct a scenario-based task.
[0074] S2: Construct a multi-scale, multi-view feature extraction network, embed the features of the enzyme sequence into local segments, extract the local dependency and global collaborative features of the sequence through multi-scale, multi-view feature interaction within and between segments, and perform regression prediction through the residual linear prediction head to output the predicted value of the enzyme's optimal temperature.
[0075] S3: Construct an adaptive kernel density loss function, and assign different continuous density weights to each sample based on the kernel density estimation of the full training labels, so as to balance the learning of the features of each interval sample.
[0076] S4: Based on the model-independent meta-learning framework, the task obtained in step S1 is divided into a support set and a query set, and the parameters of the feature extraction network are divided into an inner loop and an outer loop. The inner loop parameters are quickly adapted using the support set, and the outer loop parameters are updated using the query set to perform meta-loss, thus performing two-layer optimization and saving the network model.
[0077] S5: During the testing phase, the enzyme sequence to be predicted is input into the trained network in the form of a task. The network then performs specific adaptive prediction to obtain the predicted value of the enzyme's optimal temperature.
[0078] Further, step S1 includes the following steps:
[0079] S1.1: The enzyme sequence is encoded using the protein language model ESM2 to obtain the sequence feature embedding:
[0080]
[0081] in, This refers to the amino acid sequence composition information of the enzymes input for this batch. This is the embedding vector for the enzyme sequence of the current batch. For batch size, For sequence length, The number of feature channels, Determined by actual data;
[0082] S1.2: Flatten the feature embedding into a one-dimensional vector, and calculate the embedding vector after flattening any two enzyme sequences. , Cosine similarity between them:
[0083]
[0084] S1.3: Let the cosine similarity be... , with the above Cosine similarity is used as a distance metric. K-Means clustering is used to divide the samples into several clusters. Clusters with a range of less than 15℃ or a standard deviation of less than 3℃ within the cluster are removed to obtain effective clusters.
[0085] S1.4: Using all 255 effective clusters as basic training units, construct scenario-based training tasks to enable the model to adapt to changing actual prediction situations.
[0086] Further, step S2 includes the following steps:
[0087] S2.1: The enzyme sequence features are embedded by dividing the sequence along its length into several equal-length, non-overlapping local segments, which serve as the basic unit for feature interaction: Patch.
[0088]
[0089] in, It is the original embedding The vector obtained after segmentation This is the number of patches into which each sequence is divided. The length of the amino acid sequence contained in each patch. ;
[0090] S2.2: Construct an Intra-Patch module and use a bidirectional Mamba (Bi-Mamba) network to capture the local dependencies of amino acid residues within each local fragment, thereby obtaining local micro-features. :
[0091]
[0092]
[0093] in, For the first in the sequence The physical location in each segment is The amino acid characteristics, and This represents the two feature vectors obtained by updating the amino acid in the forward and reverse scans. and These represent the independent discretization parameters and system transformation matrix in the forward and reverse modules, respectively;
[0094] S2.3: Constructing the Inter-Patch module; First, an improved Transformer network is used to capture the long-range spatial dependencies between any two local segments, forming a global spatial view; In addition, a bidirectional mLSTM network is used to capture the temporal evolution and chemical potential energy conduction constraints between segments, forming a temporal view:
[0095]
[0096]
[0097]
[0098]
[0099] in, These are the query matrix, key matrix, and value matrix obtained after projecting local features. This batch contains the attention matrix among all patches in the same sequence; The local features output by the Intra-Patch module are processed by an attention mechanism and layer normalization to output the global features of the view. For the first element in the input sequence... Global Patch Features The mLSTM network generates six core vectors through linear projection and activation functions: query vector... Key vector Value vector Output gate And the forget gate that controls information updates Input gate Simultaneously, the feature memory matrix is updated segment by segment in the form of outer product. and normalized state Then, the query vector of the current patch is used. Obtain historical accumulated information from the matrix to complete the block feature. Context update; finally, the features obtained along the forward and reverse directions of the sequence are... and and original block features Perform a residual join to obtain the updated [number]th [item]. Global Patch Features ;
[0100]
[0101]
[0102]
[0103] S2.4: Adaptively weightedly fuse the output features of the global spatial view and the temporal view, and then aggregate them into a high-dimensional feature vector through multi-head attention pooling:
[0104]
[0105]
[0106] in and The dual-view features obtained in the previous step are derived from adaptive parameters. Weighted fusion ;right The Middle Features of a Patch The feature value obtained by its convolution, For the common The first one in the attention. The calculated expression weights are fused to obtain a high-dimensional feature vector. ;
[0107] S2.5: The high-dimensional feature vector is input into the residual linear prediction head. After passing through the GELU activation function and the linear layer, the number of feature channels is reduced to 1 / 4 of the input dimension. After Dropout (dropout rate 0.1), it is compressed to 1 / 16 by the second linear layer. The residual fusion is completed by adding element-wise the original dimension size of 1 / 16 of the feature output by the direct dimensionality reduction shortcut path. The one-dimensional temperature scalar is output through the linear regression layer.
[0108] Further, step S3 includes the following steps:
[0109] S3.1: Construct a parameter-free Gaussian kernel density estimator based on the distribution of all training labels to estimate the smooth continuous probability density; for the first... Each sample has density-based normalized weights. The definition is as follows:
[0110]
[0111] in, This is the true target label for the sample; The probability density at this label calculated by the kernel density estimator; To prevent extremely small constants with a denominator of zero; For the full training set Expected value of continuous density on;
[0112] S3.2: Set a lower limit for the weights. times, upper limit By truncating the error by a factor of 1, a density-weighted mean squared error is constructed as the loss function:
[0113]
[0114] in, This is the current training batch size. and These are the sample labels and the model output, respectively. Predicted value.
[0115] Further, step S4 includes the following steps:
[0116] S4.1: The parameters of the feature extraction network are divided into inner loop parameters and outer loop parameters. The inner loop parameters only include the residual linear prediction head for bottleneck dimensionality reduction, while the outer loop parameters include the backbone network of the Intra-Patch module and the Inter-Patch module. The AdamW optimizer is used, with a global base learning rate of 5e-5. The inner loop uses a multiple of this value as the learning rate, while the outer loop uses a conservative learning rate and performs gradient accumulation.
[0117] S4.2: In the task obtained in step S1, mutually exclusive samples within each cluster are divided into support sets. With query set The samples with the largest temperature differences within a cluster are then fixedly assigned to the support set to form the meta-task. ;
[0118] S4.3: Starting with the inner loop parameters, perform forward prediction using support set samples, and use the density-weighted mean square error to perform a finite-step gradient descent on the inner loop parameters to fit the task-specific local parameters:
[0119]
[0120] in, For any meta-task support set, For the local adaptive step size of the inner loop, For all network parameters, These are temporary parameters updated after the inner loop.
[0121] S4.4: Apply the updated parameters from the inner loop to the query set, calculate the meta-loss and backpropagate its gradient to the outer loop to update the global parameters, and adjust the learning rate accordingly.
[0122]
[0123] in, For any meta-task query set, The outer loop uses an adaptive step size.
[0124] Example 2:
[0125] 1. Comparison of algorithms and metrics
[0126] Referring to Example 1, this example will use the parameters calculated in Example 1 to compare with other enzyme optimal temperature prediction methods on dataset 1 obtained by preprocessing the BRENDA 2021 database, demonstrating the superiority of the present invention; the final results show that the present invention is preferred over other methods.
[0127] Based on relevant research, the following comparison method was selected in this embodiment:
[0128] 1) Seq2Topt: An enzyme optimal temperature prediction method that uses the protein language model ESM2 to extract deep sequence feature embeddings and combines attention mechanism and residual dense blocks to establish feature importance interpretation (paper title "Seq2Topt: asequence-based deep learning predictor of enzyme optimal temperature").
[0129] 2) PatchET: A method for predicting enzyme temperature properties by designing a multi-scale feature network based on local patch neural architecture (paper title: "PatchET: Learning Enzyme Temperature Properties Through Patch-Based Neural Architectures").
[0130] 3) DeepET: A prediction method that uses residual neural networks to pre-train microbial optimal growth temperatures and fine-tunes the migration to the enzyme optimal temperature prediction task (paper title: "Learning deep representations of enzyme thermal adaptation").
[0131] 4) Preoptem: An enzyme optimum temperature prediction method using one-hot encoded feature embedding and convolutional neural networks (paper title: "A novel thermophilic chitinase directly mined from the marine metagenome using the deep learning tool preoptem").
[0132] To verify the effectiveness of this invention, the root mean square error (RMSE), mean absolute error (MAE), coefficient of determination (R²), Pearson correlation coefficient, and Spearman rank correlation coefficient were used as evaluation indicators. The lower the RMSE and MAE, the smaller the prediction error, and the higher the R², Pearson, and Spearman, the better the correlation between the predicted value and the true label. The dataset was divided into training set, validation set, and test set in an 8:1:1 ratio.
[0133] 2. Comparison Results
[0134] The comparison results are shown in Table 1. In terms of various evaluation indicators of Dataset 1, the RMSE of this invention is 12.355, which is about 12% lower than the second-best method Seq2Topt (14.047); the MAE is 9.703, the R² is 0.249, and the Pearson correlation coefficient is 0.547, all of which are better than the comparison methods. Figure 1 The following is a scatter plot of the KDE density of each model's predicted values versus actual values on the test set, with the red dashed line representing a perfect prediction (the lower right corner represents this invention); Figure 1 As can be seen, the predicted points of this invention are most closely clustered on both sides of the perfect prediction line. The meta-learning framework based on double loop optimization can effectively correct the global mean shift, while other methods have very limited R² on this long-tailed distribution dataset. The sample points have a clustering trend on the vertical axis and tend to output the global mean to reduce the absolute error. They also show obvious systematic bias at both the low-temperature and high-temperature ends. Figure 2 Furthermore, the empirical cumulative distribution (ECDF) of prediction errors for each model is given; the further to the left the curve is, the higher the cumulative proportion of low-error samples. Figure 2It can be seen that while the Seq2Topt model has a slight advantage in accumulation speed in the low error range, its accumulation speed slows down significantly after the absolute error (AE) reaches approximately 20°C, while the curve of this invention reaches its peak at an even lower AE. Figure 2 As can be seen from the magnified window at the bottom right (80%–100% quantile), the low-error sample accumulation advantage of this invention is further expanded in the high quantile range, effectively controlling the huge errors that are easy to occur in extreme ranges, and making the global prediction stability better than existing methods.
[0135] Table 1. Comparison of prediction performance of each model on dataset 1 (BRENDA 2021, n=9,265)
[0136]
[0137] Example 3:
[0138] Referring to Example 1, this example will use the parameters calculated in Example 1 to further test the rapid adaptation capability of the present invention with a small number of samples in the high temperature range of Data Set 1, proving the superiority of the present invention; the final results show that the present invention has significant advantages in extreme temperature ranges.
[0139] 1. Comparison of algorithms and metrics
[0140] Referring to Example 2, the comparison methods used in this example are Seq2Topt, PatchET, DeepET, and Preoptem. For the test set data, 5% of the samples from each cluster are randomly selected by rounding up to the nearest integer as the support set, and the rest are used as the query set. The support set is used to quickly fine-tune the present invention. The comparison method is to remove the corresponding support set entries and then evaluate on the query set. The root mean square error (RMSE) and mean absolute error (MAE) are statistically analyzed in three high temperature ranges above 60℃ (60-75℃, 75-90℃, ≥90℃), where the lower the value, the smaller the prediction error.
[0141] 2. Comparison Results
[0142] The comparison results are shown in Table 2; Figure 3 The following bar charts are provided for MAE and RMSE of each model in the three high-temperature ranges, where blue bars represent MAE and red bars represent RMSE; combined with Table 2 and... Figure 3It can be seen that PatchET performs slightly better in the 60-75℃ range; however, as the temperature rises to the more extreme 75-90℃ and ≥90℃ ranges, the MAE and RMSE of all comparative methods increase significantly. This is because they are difficult to adapt to the bias of specific environments, and their training mode does not support local optimization, making them prone to overfitting and resulting in performance degradation. In the meta-training stage, this invention constructs initial weights that are sensitive to patterns, which, combined with rapid fine-tuning of the support set, can quickly calibrate the prediction benchmark and the direction of influence. Its prediction stability advantage is more obvious, achieving the best MAE index in both the 75-90℃ and ≥90℃ ranges. Moreover, its error shows a significantly lower advantage than other methods as the temperature increases. The above results indicate that, in the face of global bias caused by extreme environments, targeted and rapid reconstruction using a small number of samples is the key to improving global prediction accuracy and boundary prediction performance.
[0143] Table 2 Comparison of prediction performance of each model in three high-temperature ranges (MAE and RMSE, °C)
[0144]
[0145] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A multi-view enzyme optimal temperature prediction method based on meta-learning, characterized in that, Includes the following steps: S1: Use a protein language model to extract feature embeddings of enzyme amino acid sequences, calculate the feature similarity between sequences and cluster them accordingly, and use the obtained clusters as basic training units to construct a scenario-based task. S2: Construct a multi-scale, multi-view feature extraction network, embed the features of the enzyme sequence into local segments, extract the local dependency and global collaborative features of the sequence through multi-scale, multi-view feature interaction within and between segments, and perform regression prediction through the residual linear prediction head to output the predicted value of the enzyme's optimal temperature. S3: Construct an adaptive kernel density loss function, and assign different continuous density weights to each sample based on the kernel density estimation of the full training labels, so as to balance the learning of the features of each interval sample. S4: Based on the model-independent meta-learning framework, the task obtained in step S1 is divided into a support set and a query set, and the parameters of the feature extraction network are divided into an inner loop and an outer loop. The inner loop parameters are quickly adapted using the support set, and the outer loop parameters are updated using the query set to perform meta-loss, thus performing two-layer optimization and saving the network model. S5: During the testing phase, the enzyme sequence to be predicted is input into the trained network in the form of a task. The network then performs specific adaptive prediction to obtain the predicted value of the enzyme's optimal temperature.
2. The multi-view enzyme optimal temperature prediction method based on meta-learning according to claim 1, characterized in that, Step S1 includes the following steps: S1.1: The enzyme sequence is encoded using the protein language model ESM2 to obtain the sequence feature embedding: ; in, This refers to the amino acid sequence composition information of the enzymes input for this batch. This is the embedding vector for the enzyme sequence of the current batch. For batch size, For sequence length, The number of feature channels; S1.2: Flatten the feature embedding into a one-dimensional vector, and calculate the embedding vector after flattening any two enzyme sequences. , Cosine similarity between them: ; S1.3: Using the cosine similarity as the distance metric, K-Means clustering is used to divide the samples into several clusters. Clusters whose range or standard deviation within a cluster does not meet the conditions are removed to obtain effective clusters. S1.4: Using each of the obtained effective clusters as the basic training unit, construct a scenario-based training task to enable the model to adapt to the ever-changing actual prediction situation.
3. The multi-view enzyme optimal temperature prediction method based on meta-learning according to claim 1, characterized in that, Step S2 includes the following steps: S2.1: The enzyme sequence features are embedded by dividing the sequence along its length into several equal-length, non-overlapping local segments, which serve as the basic unit for feature interaction: Patch. ; in, It is the original embedding The vector obtained after segmentation This is the number of patches into which each sequence is divided. The length of the amino acid sequence contained in each patch; S2.2: Construct an Intra-Patch module and use a bidirectional Mamba network to capture the local dependencies of amino acid residues within each local fragment, thereby obtaining local micro-features. : ; ; in, For the first in the sequence The physical location in each segment is The amino acid characteristics, and This represents the two feature vectors obtained by updating the amino acid in the forward and reverse scans. and These represent the independent discretization parameters and system transformation matrix in the forward and reverse modules, respectively; S2.3: Constructing the Inter-Patch module; First, an improved Transformer network is used to capture the long-range spatial dependencies between any two local segments, forming a global spatial view; In addition, a bidirectional mLSTM network is used to capture the temporal evolution and chemical potential energy conduction constraints between segments, forming a temporal view: ; ; ; ; in, These are the query matrix, key matrix, and value matrix obtained after projecting local features. This batch contains the attention matrix among all patches in the same sequence; The local features output by the Intra-Patch module are processed by an attention mechanism and layer normalization to output the global features of the view. For the first element in the input sequence... Global Patch Features The mLSTM network generates six core vectors through linear projection and activation functions: query vector... Key vector Value vector Output gate And the forget gate that controls information updates Input gate Simultaneously, the feature memory matrix is updated segment by segment in the form of outer product. and normalized state Then, the query vector of the current patch is used. Obtain historical accumulated information from the matrix to complete the block feature. Context update; finally, the features obtained along the forward and reverse directions of the sequence are... and and original block features Perform a residual join to obtain the updated [number]th [item]. Global Patch Features ; ; ; ; S2.4: Adaptively weightedly fuse the output features of the global spatial view and the temporal view, and then aggregate them into a high-dimensional feature vector through multi-head attention pooling: ; ; in and The dual-view features obtained in the previous step are derived from adaptive parameters. Weighted fusion ;right The Middle Features of a Patch The feature value obtained by its convolution, For the common The first one in the attention. The calculated expression weights are fused to obtain a high-dimensional feature vector. ; S2.5: Input the high-dimensional feature vector into the residual linear prediction head, and output the optimal temperature prediction value of the enzyme after multi-path dimensionality reduction and residual fusion.
4. The multi-view enzyme optimal temperature prediction method based on meta-learning according to claim 1, characterized in that, Step S3 includes the following steps: S3.1: Construct a parameter-free Gaussian kernel density estimator based on the distribution of all training labels to estimate the smooth continuous probability density; for the first... Each sample has density-based normalized weights. The definition is as follows: ; in, This is the true target label for the sample; The probability density at this label calculated by the kernel density estimator; To prevent extremely small constants with a denominator of zero; For the full training set Expected value of continuous density on; S3.2: Set a lower limit for the weights. Times, upper limit 10 times the truncation ( ), construct density-weighted mean squared error as the loss function: ; in, This is the current training batch size. and These are the sample labels and the model output, respectively. Predicted value.
5. The multi-view enzyme optimal temperature prediction method based on meta-learning according to claim 1, characterized in that, Step S4 includes the following steps: S4.1: The parameters of the feature extraction network are divided into inner loop parameters and outer loop parameters. The inner loop parameters only contain the residual linear prediction head for bottleneck dimensionality reduction and adopt a large learning rate. The outer loop parameters contain the backbone network of the Intra-Patch module and the Inter-Patch module, adopt a conservative learning rate and perform gradient accumulation. S4.2: In the task obtained in step S1, mutually exclusive samples within each cluster are divided into support sets. With query set The samples with the largest temperature differences within a cluster are then fixedly assigned to the support set to form the meta-task. ; S4.3: Starting with the inner loop parameters, perform forward prediction using support set samples, and use the density-weighted mean square error to perform a finite-step gradient descent on the inner loop parameters to fit the task-specific local parameters: ; in, For any meta-task support set, For the local adaptive step size of the inner loop, For all network parameters, These are temporary parameters updated after the inner loop. S4.4: Apply the updated parameters from the inner loop to the query set, calculate the meta-loss and backpropagate its gradient to the outer loop to update the global parameters, and adjust the learning rate accordingly. ; in, For any meta-task query set, The outer loop uses an adaptive step size.
