Virus property prediction model training method and virus property prediction method

Through feature extraction and feature screening, combined with penalty index and weight coefficient to adjust model parameters, the sample imbalance problem in the prediction of viral properties is solved, and accurate prediction of high-risk variants is achieved.

CN117292756BActive Publication Date: 2025-09-09PENG CHENG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311136170.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-01
Publication Date
2025-09-09
Estimated Expiration
2043-09-01

AI Technical Summary

Technical Problem

The high mutation rate of the virus makes it difficult for deep learning models to exploit feature differences, and the imbalance of sample categories results in poor prediction of viral properties.

Method used

Through feature extraction and feature screening, the penalty index and weight coefficient of regression and classification tasks are combined to adjust the model parameters, design the difficult sample mining loss function, and solve the imbalance problem of positive and negative samples in training data.

Benefits of technology

A virus property prediction model has been implemented under conditions of imbalanced training data, which can accurately identify high-risk variants and improve prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117292756B_ABST
    Figure CN117292756B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a virus property prediction model training method and a virus property prediction method, which obtains a target prediction model by training a prediction model with features extracted from a virus protein sequence data set; in the process of training the model, the regression loss function value of the regression task is obtained according to the prediction result of the first model, the regression label and the first penalty exponent, and the classification loss function value of the classification task is obtained according to the prediction result of the second model, the classification label, the second penalty exponent and the weight coefficient, and the model parameters are adjusted according to the regression loss function value and the classification loss function value. The first penalty exponent is used to guide the degree of punishment for negative samples in the regression task, the second penalty exponent is used to guide the degree of punishment for negative samples in the classification task, and the weight coefficient is used to adjust the degree of emphasis of the classification loss function on the positive samples of the classification task, thereby solving the problem of imbalance between positive and negative samples in the training data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to, but are not limited to, the field of data processing, and in particular to a virus property prediction model training method and a virus property prediction method. Background Art

[0002] Viruses have a high mutation rate. While most mutations are harmful or ineffective, a small number are beneficial, giving a few variants greater survival and a selective advantage. The vast potential for viral mutations necessitates efficient and accurate prediction methods to identify high-risk variants within this vast pool of variants, facilitating early drug development and vaccine design. However, mutated viral protein sequences often differ by only a few residues, making it difficult for deep learning models to detect these differences. The low number of beneficial viral mutations also creates an imbalance in sample classes, making deep learning-based prediction methods ineffective. Summary of the Invention

[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0004] The purpose of this application is to solve one of the technical problems existing in the related art to at least a certain extent. The embodiments of this application provide a virus property prediction model training method and a virus property prediction method, which can solve the problem of imbalance between positive and negative samples in training data.

[0005] An embodiment of the first aspect of the present application, a method for training a virus property prediction model, comprises:

[0006] Obtain viral protein sequence datasets;

[0007] performing feature extraction on the viral protein sequence dataset to obtain target sequence features;

[0008] The target virus property prediction model is obtained by training the basic virus property prediction model through the target sequence characteristics;

[0009] In the process of training the basic viral property prediction model, the regression loss function value of the regression task is obtained according to the first model prediction result, regression label and first penalty index of the regression task of the basic viral property prediction model, and the classification loss function value of the classification task is obtained according to the second model prediction result, classification label, second penalty index and weight coefficient of the classification task of the basic viral property prediction model. The parameters of the basic viral property prediction model are adjusted according to the regression loss function value and the classification loss function value. The first penalty index represents the degree of penalty for the first negative sample of the target sequence feature in the regression task, and the second penalty index represents the degree of penalty for the second negative sample of the target sequence feature in the classification task. The weight coefficient is used to adjust the degree of emphasis of the classification loss function on the second positive sample or the second negative sample of the target sequence feature in the classification task.

[0010] In certain embodiments of the first aspect of the present application, obtaining a regression loss function value of the regression task based on the first model prediction result, regression label, and first penalty index of the regression task of the basic viral property prediction model includes:

[0011] Performing an exponential operation using the difference between the first model prediction result and the regression label as a base and the first penalty index as an exponent to obtain a first index value;

[0012] obtaining a first fractional value using the integral of the first exponential value as a denominator and the first exponential value as a numerator;

[0013] Multiplying the square of the difference between the first model prediction result and the regression label by the first score value to obtain a sub-regression loss;

[0014] An integration operation is performed on the sub-regression loss to obtain a regression loss function value.

[0015] In certain embodiments of the first aspect of the present application, obtaining a classification loss function value for the classification task based on the second model prediction result, classification label, second penalty index, and weight coefficient of the classification task of the basic viral property prediction model includes:

[0016] When the classification label is a positive label, the first classification parameter is set to be equal to the prediction result of the first model; when the classification label is a negative label, the first classification parameter is set to be equal to the difference between the first preset value and the prediction result of the first model;

[0017] When the classification label is a positive label, the second classification parameter is set to be equal to the weight coefficient; when the classification label is a negative label, the second classification parameter is set to be equal to the difference between the first preset value and the weight coefficient;

[0018] A logarithmic operation is performed on the first classification parameter as a true number to obtain a first logarithmic value, an exponential operation is performed on the difference between the first preset value and the first classification parameter and the second penalty index as an exponent to obtain a second exponential value, a logarithmic coefficient is obtained according to the inverse of the product of the second exponential value and the second classification parameter, and the classification loss function value is obtained according to the product of the logarithmic coefficient and the first logarithmic value.

[0019] In certain embodiments of the first aspect of the present application, adjusting the parameters of the basic viral property prediction model according to the regression loss function value and the classification loss function value includes:

[0020] The product of the preset adjustment coefficient and the regression loss function value is added to the classification loss function value to obtain the total loss function value;

[0021] Adjusting the parameters of the basic viral property prediction model according to the total loss function value;

[0022] The adjustment coefficient is used to adjust the emphasis of the total loss function value on the regression loss function value and the classification loss function value.

[0023] In certain embodiments of the first aspect of the present application, extracting features from the viral protein sequence dataset to obtain target sequence features comprises:

[0024] Performing preliminary feature extraction on the viral protein sequence dataset using a preliminary feature extraction model to obtain preliminary sequence features, wherein the preliminary feature extraction model is trained by jointly training a broad protein sequence training set and a viral protein sequence training set;

[0025] The preliminary sequence features are screened based on the continuous residue interaction characteristics and discrete residue interaction characteristics between viral protein sequences to obtain target sequence features.

[0026] In certain embodiments of the first aspect of the present application, performing preliminary feature extraction on the viral protein sequence dataset to obtain preliminary sequence features comprises:

[0027] Obtaining a broad protein sequence training set and a viral protein sequence training set, wherein the broad protein sequence training set includes multiple types of protein sequences, and the viral protein sequence training set includes at least one viral protein sequence;

[0028] Using the extensive protein sequence training set to train a basic feature extraction model, so that the original basic feature extraction model learns the residue distribution of multiple types of protein sequences, thereby obtaining a trained basic feature extraction model;

[0029] Using the viral protein sequence training set to train the trained basic feature extraction model, so that the trained basic feature extraction model learns the residue distribution of the viral protein sequence to obtain a preliminary feature extraction model;

[0030] The preliminary feature extraction model is used to perform preliminary feature extraction on the viral protein sequence dataset to obtain preliminary sequence features.

[0031] In certain embodiments of the first aspect of the present application, the use of the extensive protein sequence training set to train a basic feature extraction model comprises:

[0032] Masking the residues on the protein sequences in the extensive protein sequence training set to obtain a first masked sequence;

[0033] The basic feature extraction model is enabled to predict the types of masked residues according to the unmasked residues in the first mask sequence to train the basic feature extraction model.

[0034] In certain embodiments of the first aspect of the present application, the use of the extensive protein sequence training set to train a basic feature extraction model comprises:

[0035] Using protein sequences in a first length range in the extensive protein sequence training set to train the basic feature extraction model, and then using protein sequences in a second length range in the extensive protein sequence training set to train the basic feature extraction model;

[0036] The protein sequences in the second length range are longer than the protein sequences in the first length range.

[0037] In certain embodiments of the first aspect of the present application, the use of the viral protein sequence training set to train the protein feature extraction model comprises:

[0038] Masking the residues on the viral protein sequence in the viral protein sequence training set to obtain a second masked sequence;

[0039] The protein feature extraction model is enabled to predict the types of masked residues according to the unmasked residues in the second mask sequence to train the protein feature extraction model.

[0040] In certain embodiments of the first aspect of the present application, the use of the viral protein sequence training set to train the protein feature extraction model comprises:

[0041] Using protein sequences in a third length range in the viral protein sequence training set to train the protein feature extraction model, and then using protein sequences in a fourth length range in the viral protein sequence training set to train the basic feature extraction model;

[0042] Among them, the protein sequence in the fourth length range is longer than the protein sequence in the third length range.

[0043] In certain embodiments of the first aspect of the present application, the feature screening of the preliminary sequence features based on the continuous residue interaction characteristics and discrete residue interaction characteristics between viral protein sequences to obtain target sequence features comprises:

[0044] Performing feature screening on the preliminary sequence features according to the continuous residue interaction characteristics between viral protein sequences to obtain a first subsequence feature;

[0045] Performing feature screening on the preliminary sequence features according to discrete residue interaction characteristics between viral protein sequences to obtain a second subsequence feature;

[0046] The first subsequence feature and the second subsequence feature are concatenated to obtain a target sequence feature.

[0047] In certain embodiments of the first aspect of the present application, the feature screening of the preliminary sequence features according to the continuous residue interaction characteristics between viral protein sequences to obtain the first subsequence feature comprises:

[0048] The standardized sequence features are convolved to obtain features between adjacent continuous residues, and the features between adjacent continuous residues are determined as first subsequence features.

[0049] In certain embodiments of the first aspect of the present application, the feature screening of the preliminary sequence features according to the discrete residue interaction characteristics between viral protein sequences to obtain the second subsequence features comprises:

[0050] A mapping function is obtained according to a preset convolution function and a preset normalization function, and a pooling weight and a scale of the preliminary sequence features are predicted by the mapping function;

[0051] Obtain a Gaussian mask by pooling the scales;

[0052] A second subsequence feature is obtained according to the preliminary sequence feature, the pooling weight, and the Gaussian mask.

[0053] Certain embodiments of the second aspect of the present application provide a method for predicting viral properties, comprising:

[0054] Obtain virus data to be processed;

[0055] Inputting the virus data into a target virus property prediction model to perform virus property prediction to obtain a prediction result;

[0056] The target virus property prediction model is trained according to the virus property prediction model training method described above.

[0057] The above scheme has at least the following beneficial effects: a target prediction model is obtained by training a prediction model with features extracted from a viral protein sequence data set; in the process of training the model, a regression loss function value of the regression task is obtained according to the prediction result of the first model, the regression label and the first penalty exponent, and a classification loss function value of the classification task is obtained according to the prediction result of the second model, the classification label, the second penalty exponent and the weight coefficient, the model parameters are adjusted according to the regression loss function value and the classification loss function value, the degree of penalty for negative samples in the regression task is guided by the first penalty exponent, the degree of penalty for negative samples in the classification task is guided by the second penalty exponent, the degree of emphasis of the classification loss function on the positive samples of the classification task is adjusted by the weight coefficient, and the loss weight between samples is adjusted, thereby solving the imbalance problem of positive and negative samples in the training data. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The accompanying drawings are used to provide a further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0059] Figure 1 1 is a step diagram of the method for predicting viral properties provided in an embodiment of the present application;

[0060] Figure 2 1 is a step diagram of the virus property prediction model training method provided in an embodiment of the present application;

[0061] Figure 3 It is a sub-step diagram of step S300;

[0062] Figure 4 is a schematic diagram of step S300;

[0063] Figure 5 is a sub-step diagram of step S400;

[0064] Figure 6 is a schematic diagram of step S400;

[0065] Figure 7 It is a schematic diagram of feature screening;

[0066] Figure 8 It is a schematic diagram of the context pooling model;

[0067] Figure 9 is a schematic diagram of step S500;

[0068] Figure 10 This is a schematic diagram of the multi-branch viral property prediction model applied to different downstream tasks;

[0069] Figure 11 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0071] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and the like in the specification, claims, or accompanying drawings are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.

[0072] The embodiments of the present application are further described below with reference to the accompanying drawings.

[0073] The embodiments of the present application provide a method for predicting viral properties.

[0074] Reference Figure 1 , a method for predicting viral properties, including but not limited to the following steps:

[0075] Step S110, obtaining virus data to be processed;

[0076] Step S120: input the virus data into the target virus property prediction model to perform virus property prediction to obtain a prediction result.

[0077] The target virus property prediction model is trained according to the following virus property prediction model training method.

[0078] Another embodiment of the present application provides a method for training a virus property prediction model.

[0079] Reference Figure 2 The virus property prediction model training method includes but is not limited to the following steps:

[0080] Step S200, obtaining a viral protein sequence dataset;

[0081] Step S300, performing preliminary feature extraction on the viral protein sequence dataset using a preliminary feature extraction model to obtain preliminary sequence features;

[0082] Step S400 , performing feature screening on preliminary sequence features based on the continuous residue interaction characteristics and discrete residue interaction characteristics between viral protein sequences to obtain target sequence features;

[0083] Step S500: train the basic virus property prediction model through the target sequence features, obtain the regression loss function value of the regression task according to the first model prediction result, regression label and first penalty index of the regression task of the basic virus property prediction model, obtain the classification loss function value of the classification task according to the second model prediction result, classification label, second penalty index and weight coefficient of the classification task of the basic virus property prediction model, adjust the parameters of the basic virus property prediction model according to the regression loss function value and the classification loss function value, and obtain the target virus property prediction model.

[0084] Among them, the first penalty index represents the degree of penalty for the first negative sample of the target sequence feature in the regression task, the second penalty index represents the degree of penalty for the second negative sample of the target sequence feature in the classification task, and the weight coefficient is used to adjust the degree of emphasis of the classification loss function on the second positive sample of the target sequence feature in the classification task.

[0085] Among them, the first positive sample is a sample of the same category as the true value in the regression task, the first negative sample is a sample of a different category from the true value in the regression task, the second positive sample is a sample of the same category as the true value in the classification task, and the second negative sample is a sample of a different category from the true value in the classification task.

[0086] Viruses have a high mutation rate. Most mutations are harmful or ineffective, but a small number are beneficial, giving a small number of variants greater survival and a selective advantage. The mutation space for viruses is enormous. This virus property prediction model training method adjusts the loss weights for positive and negative samples in regression and classification tasks during model training to create a target model that can address the imbalance between positive and negative samples in training data. This target model trained using this virus property prediction model training method can accurately predict the properties of virus variants, thereby identifying high-risk virus variants from a vast pool of variants.

[0087] For step S200, the viral protein sequence dataset can be obtained through a large database, or through an acquisition device and an analysis device.

[0088] Reference Figure 3 and Figure 4For step S300, preliminary feature extraction is performed on the viral protein sequence dataset using a preliminary feature extraction model to obtain preliminary sequence features, including but not limited to the following steps:

[0089] Step S310, obtaining a broad protein sequence training set and a viral protein sequence training set;

[0090] Step S320 , training a basic feature extraction model using a broad protein sequence training set, so that the original basic feature extraction model learns the residue distribution of multiple types of protein sequences, thereby obtaining a protein feature extraction model;

[0091] Step S330, training a protein feature extraction model using the viral protein sequence training set, so that the protein feature extraction model learns the residue distribution of the viral protein sequence, and obtains a preliminary feature extraction model;

[0092] Step S340 , performing preliminary feature extraction on the viral protein sequence dataset using a preliminary feature extraction model to obtain preliminary sequence features.

[0093] In step S310, a broad protein sequence training set and a viral protein sequence training set are obtained from a large database. The broad protein sequence training set includes protein sequences from multiple categories, such as plant protein sequences, bird protein sequences, fish protein sequences, and mammal protein sequences. The viral protein sequence training set includes multiple viral protein sequences.

[0094] The protein sequences in the extensive protein sequence training set and the viral protein sequences in the viral protein sequence training set are both unlabeled data.

[0095] In step S320 , the basic feature extraction model is trained using a wide range of protein sequence training sets, so that the original basic feature extraction model learns the residue distribution of protein sequences in the wide range of protein sequences through a large amount of protein sequence data.

[0096] Specifically, the basic feature extraction model can be a transformer-based language representation model, namely BERT.

[0097] Although the example of BERT as the basic feature extraction model is listed in the embodiments of the present application, this does not limit the type of the basic feature extraction model. In other embodiments, other types of models can be used as the basic feature extraction model.

[0098] The pre-training task for the basic feature extraction model is the masked language modeling task in the field of natural language processing.

[0099] The residues on the protein sequences in the extensive protein sequence training set are randomly masked to obtain a first masked sequence; the basic feature extraction model is enabled to predict the types of masked residues based on the unmasked residues in the first masked sequence to train the basic feature extraction model, thereby learning the residue distribution of the protein sequences in the extensive protein sequence training set.

[0100] Moreover, during the training process, the basic feature extraction model is first trained using protein sequences in a first length range in a broad protein sequence training set, and then the basic feature extraction model is trained using protein sequences in a second length range in the broad protein sequence training set; wherein the protein sequences in the second length range are longer than the protein sequences in the first length range.

[0101] Specifically, the protein sequence of the first length range is a protein sequence with a length of 1 to 128 residues, and the protein sequence of the second length range is a protein sequence with a length of 129 to 256 residues.

[0102] By using shorter protein sequences to train the basic feature extraction model in large batches, the basic feature extraction model can quickly learn the basic features of the protein sequence. Then, by using longer protein sequences to train the basic feature extraction model, the basic feature extraction model can further learn high-quality features based on the basic features learned in the early stage, thereby further optimizing the basic feature extraction model.

[0103] For step S330, similarly, random residues on the viral protein sequences in the viral protein sequence training set are masked to obtain a second masked sequence; the protein feature extraction model is enabled to predict the types of masked residues based on the unmasked residues in the second masked sequence to train the protein feature extraction model, thereby learning the residue distribution of the viral protein sequences in the viral protein sequence training set, so that the distribution learned by the model is closer to the viral protein sequence data and more consistent with the distribution of the viral protein sequence data, thereby being more effectively applied to subsequent property predictions.

[0104] In addition, during the training process, the protein feature extraction model is first trained using protein sequences in the third length range in the viral protein sequence training set, and then the basic feature extraction model is trained using protein sequences in the fourth length range in the viral protein sequence training set; wherein, the protein sequences in the fourth length range are longer than the protein sequences in the third length range.

[0105] Specifically, the protein sequence of the third length range is a protein sequence with a length of 1 to 128 residues, and the protein sequence of the fourth length range is a protein sequence with a length of 129 to 256 residues.

[0106] By using shorter viral protein sequences to train the protein feature extraction model in large batches, the protein feature extraction model can quickly learn the basic features of the viral protein sequences. Then, by using longer viral protein sequences to train the protein feature extraction model, the protein feature extraction model can further learn high-quality features based on the basic features learned in the early stage, thereby further optimizing the protein feature extraction model.

[0107] In one embodiment, a protein feature extraction model was generated by using the BERT model to learn a broad global distribution on a wide range of protein sequence training sets, such as UniRef90. However, this model is not well targeted for specific types of proteins, such as viral protein sequences. Therefore, to make the protein feature extraction model more relevant to viral protein sequence applications, a viral protein sequence training set was obtained from the data platform GISAID. The protein feature extraction model was further trained on the viral protein sequence data to learn the residue distribution, ensuring that the data distribution learned by the model more closely resembles viral protein sequences.

[0108] By further training the basic model obtained from a wide range of protein sequences with viral protein sequences and applying it to extract viral protein sequence features, time-consuming third-party tools can be skipped, providing the possibility for high-throughput property prediction of viral variants.

[0109] For step S400, considering the high similarity between different viral protein sequences, the features extracted only by the basic model cannot distinguish different sequences well. The preliminary sequence features are screened according to the continuous residue interaction characteristics and discrete residue interaction characteristics between viral protein sequences to obtain the target sequence features, so that the differences between different viral sequence features are further expanded.

[0110] First, the preliminary sequence features are standardized;

[0111] Standardization processing includes:

[0112] The standard deviation is calculated for the preliminary sequence characteristics to obtain the standard deviation, the average value is calculated for the preliminary sequence characteristics to obtain the average value, and the difference between the preliminary sequence characteristics and the average value is divided by the average value to obtain the standardized result.

[0113] Specifically, for the preliminary sequence feature X d×l , the features are standardized by the mean and variance of each dimension of the preliminary sequence features. The standardization method for each dimension i is as follows:

[0114]

[0115] Among them, STD(·) is the standard deviation calculation formula, MEAN(·) is the mean calculation formula, is the standardized sequence feature.

[0116] In addition to sequence proximity, due to the folding of protein sequences, residues that are not adjacent in sequence may be spatially adjacent. Therefore, there are both continuous and discrete residue interactions between residues in viral protein sequences. Based on this characteristic, feature screening is performed on the standardized features using the continuous-discrete residue feature interaction method.

[0117] Reference Figure 5 and Figure 6 , based on the continuous residue interaction characteristics and discrete residue interaction characteristics between viral protein sequences, the preliminary sequence features are screened to obtain target sequence features, including but not limited to the following steps:

[0118] Step S410, performing feature screening on the preliminary sequence features based on the interaction characteristics of continuous residues between viral protein sequences to obtain a first subsequence feature;

[0119] Step S420, performing feature screening on the preliminary sequence features based on the discrete residue interaction characteristics between viral protein sequences to obtain a second subsequence feature;

[0120] Step S430: Concatenate the first subsequence feature and the second subsequence feature to obtain a target sequence feature.

[0121] In step S410, the preliminary sequence features are screened based on the interaction characteristics of continuous residues between viral protein sequences to obtain the first subsequence features, including but not limited to the following steps:

[0122] The standardized preliminary sequence features are convolved to obtain features between adjacent continuous residues, and the features between adjacent continuous residues are determined as the first subsequence features.

[0123] The model used for continuous residue feature interaction is a convolutional neural network model. By sliding the convolution kernel across the sequence, the features between adjacent continuous residues in the sequence can be updated. The convolutional neural network calculation can simulate the continuous residue interaction process.

[0124] For a convolution kernel with a step size of b, the calculation formula corresponding to the first subsequence feature is obtained by feature screening of the preliminary sequence features based on the interaction characteristics of continuous residues between viral protein sequences as follows:

[0125]

[0126] Among them, w is the convolution kernel parameter.

[0127] Reference Figure 8For step S420, the preliminary sequence features are screened based on the discrete residue interaction characteristics between viral protein sequences to obtain the second subsequence features, including but not limited to the following steps:

[0128] A mapping function is obtained according to a preset convolution function and a preset normalization function, and the pooling weights and scales of the preliminary sequence features are predicted by the mapping function; a Gaussian mask is obtained by the pooling scale; and a second subsequence feature is obtained according to the preliminary sequence features, the pooling weights and the Gaussian mask.

[0129] Pooling weights and scale sizes are input adaptive.

[0130] The model used for discrete residue interactions is the context-pooling model, which is an optimized self-attention model that learns context-aware residue features by pooling the features of the surrounding residues of each residue.

[0131] Predict the preliminary sequence features X by learning a mapping function m(·) d×l The pooling weight and scale That is

[0132] Three convolution functions plus a normalization function are used as mapping functions, which can be implemented through three convolution layers and one softmax layer.

[0133] For vector For example, the softmax function of the softmax layer is expressed as:

[0134] By pooling scale s i Calculate the Gaussian mask, Among them, σ i =rn*s i , r=0.1.

[0135] The Gaussian mask is scaled and transformed.

[0136] The second subsequence feature is obtained according to the preliminary sequence feature, pooling weight and Gaussian mask. The second subsequence feature F CP Expressed as:

[0137] Since the context pooling model does not consider the residue position during calculation, each residue will calculate the interaction with all residues, so the model can simulate long-range (discrete) interactions between residues.

[0138] The continuous residue interaction module and the discrete residue interaction module add residual connections between input and output.

[0139] For step S430, the first subsequence feature and the second subsequence feature are concatenated to obtain a target sequence feature as a result of the interaction between continuous and discrete residue features; the target sequence feature is represented as: F = [F CNN ; F CP ].

[0140] Reference Figure 7 In order to solve the problem that it is difficult to mine feature differences due to only a few sites being different between mutated viral protein sequences, the feature differences between viral protein sequences are screened through the interaction of continuous-discrete residue features to improve the feature differences between similar viral protein sequences.

[0141] Reference Figure 9 For step S500, after preliminary feature extraction through the preliminary feature extraction model and feature screening based on the continuous residue interaction characteristics and discrete residue interaction characteristics between viral protein sequences, the different target sequence features obtained are clearly distinguished and suitable for different downstream tasks.

[0142] Site-by-site deep mutation scanning data based on a certain viral protein sequence is a common training data in deep learning tasks targeting viruses. Its characteristics are high sequence similarity between different data, and only two residues differ between the mutated sequences. In addition, due to the small number of beneficial mutations in the virus, the data usually has an imbalance between positive and negative samples.

[0143] For example, a set of deep mutation scanning experimental data on the binding affinity of the receptor binding domain (RBD) of the original strain of the virus to angiotensin-converting enzyme 2 (hACE2) was used. The receptor binding domain was mutated site by site, and only two residues differed between the different variant sequences. At the same time, the binding affinity of the different variants was measured compared with the original strain. Among all the data, less than one-tenth of the data had a higher binding affinity than the original strain, and the binding affinity of the remaining data was lower than the original strain. If a model is trained on this dataset to predict whether the binding affinity of the variant is higher than that of the original strain, the model will be affected by the imbalance of positive and negative samples in the dataset.

[0144] Therefore, in the process of training the model, the basic virus property prediction model is trained by the target sequence features, and the regression loss function value of the regression task is obtained according to the first model prediction result, regression label and first penalty index of the regression task of the basic virus property prediction model. The classification loss function value of the classification task is obtained according to the second model prediction result, classification label, second penalty index and weight coefficient of the classification task of the basic virus property prediction model. The parameters of the basic virus property prediction model are adjusted according to the regression loss function value and the classification loss function value until the number of adjustments reaches the preset number threshold or the basic virus property prediction model converges to obtain the target virus property prediction model.

[0145] The problem of positive and negative sample imbalance is addressed through the design of a loss function. The core is to use a hard-sample mining loss function to increase the model's penalty for difficult-to-learn samples. For different downstream tasks, a multi-task training approach is used for model training. Specifically, two task heads are set for the classification and regression results of the downstream tasks, and the losses of both tasks are incorporated into the loss function calculation.

[0146] For the regression task, the regression loss function value of the regression task is obtained according to the first model prediction result, regression label, and first penalty index of the regression task of the basic virus property prediction model, including:

[0147] An exponential operation is performed using the difference between the prediction result of the first model and the regression label as the base and the first penalty exponent as the exponent to obtain a first exponential value; the integral of the first exponential value is used as the denominator and the first exponential value is used as the numerator to obtain a first fractional value; the square value of the difference between the prediction result of the first model and the regression label is multiplied by the first fractional value to obtain a sub-regression loss; the sub-regression loss is integrated to obtain the regression loss function value.

[0148] The regression loss function is calculated as follows:

[0149] Among them, score is the prediction result of the first model, target is the regression label, is the deviation normalization result, and γ is the first penalty exponent.

[0150] In order to prevent the calculated gradient from being too small, the first penalty exponent is used to penalize the negative samples of the target sequence features in the regression task. The larger the first penalty exponent is, the lower the tolerance of the regression loss function to negative samples is; the smaller the first penalty exponent is, the higher the tolerance of the regression loss function to negative samples is.

[0151] For the classification task, the classification loss function value of the classification task is obtained according to the second model prediction result of the classification task of the basic virus property prediction model, the classification label, the second penalty index and the weight coefficient, including:

[0152] When the classification label is a positive label, let the first classification parameter be equal to the prediction result of the first model; when the classification label is a negative label, let the first classification parameter be equal to the difference between the first preset value and the prediction result of the first model; when the classification label is a positive label, let the second classification parameter be equal to the weight coefficient; when the classification label is a negative label, let the second classification parameter be equal to the difference between the first preset value and the weight coefficient; use the first classification parameter as the true number to perform a logarithmic operation to obtain a first logarithmic value, use the difference between the first preset value and the first classification parameter as the base and use the second penalty exponent as the exponent to perform an exponential operation to obtain a second exponential value, obtain the logarithmic coefficient according to the inverse of the product of the second exponential value and the second classification parameter, and obtain the classification loss function value according to the product of the logarithmic coefficient and the first logarithmic value.

[0153] The classification loss function is calculated as follows: ClsFocalLoss=-α t (1-p t ) γ logp t .

[0154] Among them, pred is the prediction result of the second model, label is the classification label, γ is the second penalty index, and α is the weight coefficient.

[0155] In order to prevent the calculated gradient from being too small, the second penalty exponent is used to penalize the negative samples of the target sequence features in the classification task. The larger the second penalty exponent is, the lower the tolerance of the classification loss function to negative samples is; the smaller the second penalty exponent is, the higher the tolerance of the classification loss function to negative samples is.

[0156] The weight coefficient can adjust the degree of emphasis the classification loss function places on the second positive sample or the second negative sample of the target sequence feature in the classification task. When the weight coefficient is larger, the classification loss function places more emphasis on positive samples and less on negative samples; when the weight coefficient is smaller, the classification loss function places less emphasis on positive samples and more on negative samples.

[0157] For example, for the task of predicting the binding affinity between the receptor binding domain (RBD) of the original virus strain and angiotensin-converting enzyme 2 (hACE2), for regression tasks, the regression label can directly use the ratio of the binding affinity dissociation constant of the variant to the original strain in the dataset; for classification tasks, the classification label is defined as whether the binding affinity of the variant is greater than that of the original strain, as reflected in the dataset, that is, whether the ratio of the binding affinity dissociation constant of the variant to the original strain is greater than 1. For both the classification and regression task heads, a multi-layer perceptron is used as the prediction model.

[0158] Because classification tasks often involve an imbalance between positive and negative labels, we first need to determine the weight coefficient α in the classification loss function. We use five-fold cross-validation to examine the performance of the trained model with different α values ​​on the validation set, and select the α with the best performance as the target weight coefficient.

[0159] The entire viral property prediction model requires only the protein sequence data of the viral variants as input, so only one input is required. Before training, a portion of the data set can be set aside as a blind test set to verify the effectiveness of the model training. Possible model training evaluation metrics include mean squared error and correlation coefficient for regression, and prediction accuracy, precision, recall, F1 score, and area under the receiver operating characteristic curve (ROC-AUC) for classification.

[0160] Reference Figure 10 It is understandable that the embodiments of the present application do not limit the usage scenarios of downstream tasks. For different downstream tasks, customized training can be performed by adjusting the types and numbers of input and output terminals. Therefore, different virus-related downstream tasks can be trained using this method through corresponding training data sets. For example, tasks such as the protein expression level of the virus that only require the input of a single viral protein sequence can be predicted according to the binding affinity prediction method in the embodiment. For downstream tasks that require multiple input terminals, such as the prediction of the antibody escape score of the virus, it is necessary to input the viral protein sequence, the antibody heavy chain sequence, and the antibody light chain sequence. It is only necessary to add the antibody heavy chain feature extraction and feature screening branch, as well as the antibody light chain feature extraction and feature screening branch, in addition to the virus feature extraction and feature screening branch. After the feature screening of the three branches is completed, the three features can be spliced ​​and used in the training of downstream tasks. The imbalance problem of positive and negative samples in the training data is solved by the difficult sample mining loss function. By setting the type and number of the flexible input and output terminals, it can be customized for different downstream tasks.

[0161] An embodiment of the present application provides an electronic device. Figure 11 The electronic device includes: a memory 220, a processor 210, and a computer program stored in the memory 220 and executable on the processor 210. When the processor 210 executes the computer program, the above-mentioned virus property prediction model training method and virus property prediction method are implemented.

[0162] The electronic device may be any intelligent terminal including a computer.

[0163] In general, for the hardware structure of the electronic device, the processor 210 can be implemented using a general-purpose CPU (Central Processing Unit, central processing unit 210), a microprocessor 210, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0164] The memory 220 can be implemented in the form of a read-only memory 220 (ROM), a static storage device, a dynamic storage device, or a random access memory 220 (RAM). The memory 220 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 220 and is called by the processor 210 to execute the methods of the embodiments of this application.

[0165] The input / output interface is used to realize information input and output.

[0166] The communication interface is used to realize the communication interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0167] The bus 230 transmits information between the various components of the device (such as the processor 210, memory 220, input / output interface, and communication interface). The processor 210, memory 220, input / output interface, and communication interface are connected to each other within the device through the bus 230.

[0168] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for executing the above-mentioned virus property prediction model training method and virus property prediction method.

[0169] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data) and is volatile and non-volatile, removable, and non-removable. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, CD-ROM, digital versatile disks (DVD), or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage, or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium. In the above description of this specification, the reference terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" and the like are intended to mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0170] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0171] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0172] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0173] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0174] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. Although the embodiments of the present application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and purpose of the present application, and the scope of the present application is defined by the claims and their equivalents.

[0175] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present application, and these equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A virus property prediction model training method, characterized in that: include: Obtain viral protein sequence datasets; performing feature extraction on the viral protein sequence dataset to obtain target sequence features; The target virus property prediction model is obtained by training the basic virus property prediction model through the target sequence characteristics; In the process of training the basic viral property prediction model, the regression loss function value of the regression task is obtained according to the first model prediction result, regression label and first penalty index of the regression task of the basic viral property prediction model, and the classification loss function value of the classification task is obtained according to the second model prediction result, classification label, second penalty index and weight coefficient of the classification task of the basic viral property prediction model. The parameters of the basic viral property prediction model are adjusted according to the regression loss function value and the classification loss function value. The first penalty index represents the degree of penalty for the first negative sample of the target sequence feature in the regression task, and the second penalty index represents the degree of penalty for the second negative sample of the target sequence feature in the classification task. The weight coefficient is used to adjust the degree of emphasis of the classification loss function on the second positive sample of the target sequence feature in the classification task.

2. A virus property prediction model training method according to claim 1, characterized in that: Obtaining the regression loss function value of the regression task based on the first model prediction result, regression label, and first penalty index of the regression task of the basic virus property prediction model includes: Performing an exponential operation using the difference between the first model prediction result and the regression label as a base and the first penalty index as an exponent to obtain a first index value; obtaining a first fractional value using the integral of the first exponential value as a denominator and the first exponential value as a numerator; Multiplying the square of the difference between the first model prediction result and the regression label by the first score value to obtain a sub-regression loss; An integration operation is performed on the sub-regression loss to obtain a regression loss function value.

3. A virus property prediction model training method according to claim 1, characterized in that: The classification loss function value of the classification task is obtained based on the second model prediction result, classification label, second penalty index and weight coefficient of the classification task of the basic virus property prediction model, including: When the classification label is a positive label, the first classification parameter is set to be equal to the prediction result of the first model; when the classification label is a negative label, the first classification parameter is set to be equal to the difference between the first preset value and the prediction result of the first model; When the classification label is a positive label, the second classification parameter is set to be equal to the weight coefficient; when the classification label is a negative label, the second classification parameter is set to be equal to the difference between the first preset value and the weight coefficient; A logarithmic operation is performed on the first classification parameter as a true number to obtain a first logarithmic value, an exponential operation is performed on the difference between the first preset value and the first classification parameter and the second penalty index as an exponent to obtain a second exponential value, a logarithmic coefficient is obtained according to the inverse of the product of the second exponential value and the second classification parameter, and a classification loss function value is obtained according to the product of the logarithmic coefficient and the first logarithmic value.

4. A virus property prediction model training method according to claim 1, characterized in that: The adjusting the parameters of the basic virus property prediction model according to the regression loss function value and the classification loss function value includes: The product of the preset adjustment coefficient and the regression loss function value is added to the classification loss function value to obtain the total loss function value; Adjusting the parameters of the basic viral property prediction model according to the total loss function value; The adjustment coefficient is used to adjust the emphasis of the total loss function value on the regression loss function value and the classification loss function value.

5. A virus property prediction model training method according to claim 1, characterized in that: The step of extracting features from the viral protein sequence dataset to obtain target sequence features includes: Performing preliminary feature extraction on the viral protein sequence dataset using a preliminary feature extraction model to obtain preliminary sequence features, wherein the preliminary feature extraction model is trained by jointly training a broad protein sequence training set and a viral protein sequence training set; The preliminary sequence features are screened based on the continuous residue interaction characteristics and discrete residue interaction characteristics between viral protein sequences to obtain target sequence features.

6. A virus property prediction model training method according to claim 5, characterized in that: The performing preliminary feature extraction on the viral protein sequence dataset using a preliminary feature extraction model to obtain preliminary sequence features includes: Obtaining a broad protein sequence training set and a viral protein sequence training set, wherein the broad protein sequence training set includes multiple types of protein sequences, and the viral protein sequence training set includes at least one viral protein sequence; Using the extensive protein sequence training set to train a basic feature extraction model, so that the basic feature extraction model learns residue distributions of multiple types of protein sequences, thereby obtaining a protein feature extraction model; Training the protein feature extraction model using the viral protein sequence training set so that the protein feature extraction model learns the residue distribution of the viral protein sequence to obtain a preliminary feature extraction model; The preliminary feature extraction model is used to perform preliminary feature extraction on the viral protein sequence dataset to obtain preliminary sequence features.

7. A virus property prediction model training method according to claim 6, characterized in that: The method of using the extensive protein sequence training set to train a basic feature extraction model comprises: Masking the residues on the protein sequences in the extensive protein sequence training set to obtain a first masked sequence; The basic feature extraction model is enabled to predict the types of masked residues according to the unmasked residues in the first mask sequence to train the basic feature extraction model.

8. A virus property prediction model training method according to claim 6, characterized in that: The method of using the extensive protein sequence training set to train a basic feature extraction model comprises: Using protein sequences in a first length range in the extensive protein sequence training set to train the basic feature extraction model, and then using protein sequences in a second length range in the extensive protein sequence training set to train the basic feature extraction model; The protein sequences in the second length range are longer than the protein sequences in the first length range.

9. A virus property prediction model training method according to claim 6, characterized in that: The method of using the viral protein sequence training set to train the protein feature extraction model comprises: Masking the residues on the viral protein sequence in the viral protein sequence training set to obtain a second masked sequence; The protein feature extraction model is enabled to predict the types of masked residues according to the unmasked residues in the second mask sequence to train the protein feature extraction model.

10. A virus property prediction model training method according to claim 6, characterized in that: The method of using the viral protein sequence training set to train the protein feature extraction model comprises: Using protein sequences in a third length range in the viral protein sequence training set to train the protein feature extraction model, and then using protein sequences in a fourth length range in the viral protein sequence training set to train the basic feature extraction model; Among them, the protein sequence in the fourth length range is longer than the protein sequence in the third length range.

11. A virus property prediction model training method according to claim 5, characterized in that: The method of screening the preliminary sequence features based on the continuous residue interaction characteristics and discrete residue interaction characteristics between viral protein sequences to obtain target sequence features includes: Performing feature screening on the preliminary sequence features according to the continuous residue interaction characteristics between viral protein sequences to obtain a first subsequence feature; Performing feature screening on the preliminary sequence features according to discrete residue interaction characteristics between viral protein sequences to obtain a second subsequence feature; The first subsequence feature and the second subsequence feature are concatenated to obtain a target sequence feature.

12. A virus property prediction model training method according to claim 11, characterized in that: The step of screening the preliminary sequence features according to the interaction characteristics of continuous residues between viral protein sequences to obtain the first subsequence features comprises: The viral protein sequence is convolved to obtain features between adjacent continuous residues, and the features between adjacent continuous residues are determined as first subsequence features.

13. A virus property prediction model training method according to claim 11, characterized in that: The step of screening the preliminary sequence features according to the discrete residue interaction characteristics between viral protein sequences to obtain the second subsequence features comprises: A mapping function is obtained according to a preset convolution function and a preset normalization function, and a pooling weight and a scale of the preliminary sequence features are predicted by the mapping function; Obtain a Gaussian mask by pooling the scales; A second subsequence feature is obtained according to the preliminary sequence feature, the pooling weight, and the Gaussian mask.

14. A virus property prediction model training method according to claim 5, characterized in that: Before performing feature screening on the preliminary sequence features based on the continuous residue interaction characteristics and discrete residue interaction characteristics between viral protein sequences to obtain target sequence features, the viral property prediction model training method includes: performing a standardization process on the preliminary sequence features; The standardization process includes: The standard deviation of the preliminary sequence features is calculated to obtain the standard deviation, the average value of the preliminary sequence features is calculated to obtain the average value, and the difference between the preliminary sequence features and the average value is divided by the average value to obtain the normalization result.

15. A method for predicting viral properties, characterized in that: include: Obtain virus data to be processed; Inputting the virus data into a target virus property prediction model to perform virus property prediction to obtain a prediction result; The target virus property prediction model is trained according to the virus property prediction model training method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Loss function optimization method and device, computer equipment and storage medium

    CN109815332A

  • Guest refusing salvage model training method and device and electronic equipment

    CN113313582A