Virus evolution prediction method and system based on BERT language model

Through the transfer learning method based on the BERT language model, popular virus data is pre-trained and adapted to the small sample virus data set, which solves the problem of poor model training in the existing technology and achieves efficient prediction of the evolution direction of the virus.

CN118553440APending Publication Date: 2024-08-27ACADEMY OF MILITARY MEDICAL SCIENCES
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410792511.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

When training deep learning models, the existing technology mainly uses large amounts of data on popular viruses and does not take into account small sample virus data. As a result, when the virus data is scarce in the early stages of the outbreak, the model training effect is poor and the direction of virus evolution cannot be effectively predicted.

Method used

Using the transfer learning method based on the BERT language model, pre-training on popular virus data is used to obtain the transfer learning model, and the model is used to adjust the weight of the target virus, perform escape prediction, adapt to the small sample virus data set, and combine the protein language Model, domain knowledge transfer and biological knowledge limitation are used to establish a scalable training framework for small amounts of virus data.

Benefits of technology

Under the same training conditions, the prediction effect of the direction of virus evolution is improved, the problem of poor model training results caused by too little virus data is solved, and a feasible solution is provided for prediction of virus evolution in the early stages of a virus outbreak.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118553440A
    Figure CN118553440A
Patent Text Reader

Abstract

The invention provides a virus evolution prediction method and system based on a BERT language model, and the method comprises the steps: obtaining the data of a target virus; performing weight adjustment on the trained BERT model by using the data of the target virus to obtain a transfer learning model; and performing escape prediction on the target virus by using the transfer learning model to obtain an evolution prediction result of the target virus. According to the method, a virus small sample training extension framework integrated with multiple schemes is provided, an extensible small-virus-data training framework is provided through multiple strategy combinations such as a protein language model BERT, domain knowledge migration and biological knowledge limitation, and the problem that in the virus evolution process, a small number of virus data can not be trained is solved. The key biological problem of poor model training effect caused by too little virus data is solved, and a possible solution is provided for the problem of virus evolution prediction in the initial stage of virus outbreak.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of virus evolution prediction, and in particular to a virus evolution prediction method and system based on a BERT language model. Background Art

[0002] The epidemic caused by the virus poses a major threat to public health. In the face of an epidemic outbreak, vaccine research and development is one of the important means to achieve epidemic prevention and control.

[0003] However, the rapid evolution of the virus may cause the virus strain to mutate, thus affecting the effectiveness of the vaccine. Some virus variants may achieve immune escape, causing previously developed vaccines to lose some or all of their effectiveness in the face of new variants, requiring the vaccine formula to be readjusted or a new vaccine to be developed to resist new variants. Therefore, scientists and medical experts need to closely monitor the mutation of the virus and adjust the vaccine in a timely manner to ensure its effectiveness against the virus.

[0004] The study of virus evolution can improve the efficiency of vaccine development and immune effect. Therefore, accurate prediction of the direction of virus evolution is of great significance for epidemic prevention and control. The prediction of virus evolution is the prediction of amino acid mutation sites and mutation contents in the virus protein sequence. Based on historical data and deep learning models, the biological information contained in the virus protein sequence can be learned to understand and predict the virus immune escape.

[0005] In the prior art, for example, the article “Learning the language of viral evolution and escape, Science, 15 Jan 2021, Vol 371, Issue 6526, pp. 284-288” provides a method for predicting viral evolution using a deep learning language model. This prior art method uses the BiLSTM language model as the network framework and adopts a self-supervised training method to train on the sequence data of cov, flu, and hiv viruses. The article defines the semantic and grammatical information corresponding to the viral sequence, and judges the possibility of the viral sequence achieving immune escape by calculating the semantic and grammatical changes of different viral sequences. If the viral sequence is more grammatical than the original sequence and the semantic changes are obvious, it is considered that the virus has a higher probability of achieving immune escape and is more likely to appear in the future evolutionary path of the original sequence.

[0006] However, when the existing technical method is used to train the deep learning model, the virus types in the training data selected are all epidemic viruses, and the data volume is large. However, in the early stage of the epidemic, virus data is scarce, and the technical method does not consider the actual application scenarios, nor does it conduct research on small sample virus data. Summary of the invention

[0007] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.

[0008] In view of the fact that in the above or existing technologies, when training deep learning models, the virus types in the selected training data are all epidemic viruses, and the data volume is large. However, in the early stage of the outbreak, virus data was scarce, and the technical method did not consider the actual application scenarios, nor did it conduct research on small sample virus data. Therefore, the technical solution of this application is proposed.

[0009] To achieve the above object, the present invention provides the following technical solutions: In the first aspect, a virus evolution prediction method based on the BERT language model includes: Get data of target virus; Use the target virus data to adjust the weights of the trained BERT model to obtain a transfer learning model; The transfer learning model is used to predict the escape of the target virus and obtain the evolution prediction results of the target virus.

[0010] Optionally, the training methods for the BERT model include: Obtain prevalent virus data from public virus databases; Building a BERT model, and training the BERT model using popular virus data to obtain a trained BERT model; The steps of training the BERT model using popular virus data include: Read and preprocess the raw amino acid sequence of epidemic virus data to obtain the RBD region of the virus sequence; In the RBD region, the amino acid sequence is randomly masked with probability p, followed by an embedding operation. Input the vector of the Embedding operation into the BERT language model to predict the amino acid prediction results of the masked position; Compare the model prediction results with the original amino acid sequence, set the learning rate, calculate the loss and perform gradient descent to update the model pre-trained weights; Repeat the above steps to complete the training of the BERT model.

[0011] Optionally, compare the model predictions with the original amino acid sequence, set the learning rate, calculate the loss and perform gradient descent to update the model pre-trained weights including: There are k types of amino acids {1,2,3,…,k}, and the actual type of amino acid at position l is , the model predicts the probability of k kinds of amino acids at position l as { , corresponding to the above k kinds of amino acids. Then the loss function corresponding to position l is:

[0012] where ln is the operation of taking the natural logarithm.

[0013] Traverse all masked positions, add up all losses, and get the final loss function:

[0014] Back propagation and gradient descent of Loss are performed to update the model weights.

[0015] Optionally, the step of building a BERT model and training the BERT model using popular virus data to obtain a trained BERT model includes: Set model parameters, including optimizer, learning rate, batch size of data reading, and loss function. The epidemic virus data is input into the model, and the weights of the BERT model are updated according to the back propagation and gradient descent method to obtain the trained BERT model.

[0016] Optionally, the step is to input the embedding vector into the BERT language model to predict the amino acid prediction results of the masked position. The calculation formula is: SSL_loss =

[0017] Where m is a part of the area randomly selected in the training area Mask with a certain probability, and ssl_m is the loss obtained by performing self-supervised training based on context completion in the m area.

[0018] Optionally, the step uses the data of the target virus to adjust the weights of the trained BERT model, and the trained BERT model includes: mainly including weights and bias items of the embedding layer, the encoder layer, and the fully connected layer.

[0019] Optionally, during the weight adjustment process of the BERT model, add L2 regularization loss to the loss function, the formula is: The set of all parameters of the model involved in back propagation and gradient descent training is All_Paras = {para inmodel}, where model is the model and para is the parameter involved in the training. Then the L2 regularization loss is defined as:

[0020] L2_loss is multiplied by the L2 regularization weight ω and added to the SSL loss to get the final total loss Loss.

[0021] Optionally, the step uses a transfer learning model to predict the escape of the target virus, and the evolution prediction results of the target virus include: Determine the viral sequence based on the target virus data, and obtain all single mutation regions in the RBD region from the viral sequence; Input a single mutation sequence into the trained BERT model, and the BERT model outputs the semantic and grammatical scores of the mutation; Combining semantic and grammatical scores, we can get the probability ranking of the single mutation achieving immune escape; Repeat the above steps to continuously update the possibility ranking table until all single mutation regions are input into the model, and then summarize to obtain the evolution prediction result.

[0022] Optionally, the step of obtaining all single mutation regions in the RBD region from the viral sequence includes: Let all the amino acid types be k {1,2,3,…,k}, and the length of the amino acid sequence of the viral protein be l. Then the method to obtain all possible single mutations in the RBD region is: For an amino acid at a certain position, changing the amino acid to the remaining k-1 possible amino acids can obtain k-1 single mutation results; Repeat the above operation for all l positions; l*(k-1) single mutation results can be obtained, which are all possible single mutations of the virus sequence.

[0023] In the second aspect, the present application provides a virus evolution prediction system based on the BERT language model, including: An acquisition module, used to acquire data of the target virus; The adjustment module is used to adjust the weights of the trained BERT model using the data of the target virus to obtain a transfer learning model; The prediction model is used to predict the escape of the target virus using the transfer learning model to obtain the evolution prediction results of the target virus.

[0024] Compared with the prior art, the present invention has the following beneficial effects: The present application provides a method and system for predicting virus evolution based on the BERT language model, wherein the method includes: obtaining data of the target virus; adjusting the weights of the trained BERT model using the data of the target virus to obtain a transfer learning model; using the transfer learning model to predict the escape of the target virus to obtain the evolution prediction result of the target virus. The present application proposes an extended framework for virus small sample training that integrates multiple schemes: through a combination of multiple strategies such as protein language model BERT, domain knowledge transfer, and biological knowledge limitation, an extensible framework for training a small amount of virus data is proposed, which solves the key biological problem of poor model training effect caused by too little virus data during virus evolution, and also provides a possible solution to the problem of virus evolution prediction in the early stage of virus outbreak. Compared with the prior art, the technical solution proposed in the present invention establishes a BERT language model adapted to a small sample data set to predict the evolutionary direction of the virus. Our method only requires the use of a small amount of virus data, and the prediction results are better than the prior art under the same training conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 This is a flow chart of a virus evolution prediction method based on the BERT language model; Figure 2 Schematic diagram of the training method of the BERT model; Figure 3 Schematic diagram of the virus mutation prediction method of the BERT model; Figure 4 A schematic diagram schematically shows the composition of an electronic device in an exemplary embodiment of the present disclosure; Figure 5 The following is a schematic diagram schematically showing the composition of a storage medium in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.

[0027] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0028] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.

[0029] See also Figure 1-5 In the first aspect, a virus evolution prediction method based on a BERT language model comprises: Step S110-Step S130: Step S110: Obtain data of the target virus.

[0030] In this embodiment, the target virus may be a virus that is currently breaking out, and its type is not limited in this application; of course, in order to verify the model, a virus that has already broken out may also be used as the target virus in this application. For example, a small amount of Ebola virus data collected and sorted from 2014 to 2016 that broke out in a concentrated manner may be used as a post-migration fine-tuning data set, and the Ebola virus data may be used as the target virus data in this application.

[0031] Step S120. Use the data of the target virus to adjust the weight of the trained BERT model to obtain a transfer learning model.

[0032] In this embodiment, step S1202. Building a BERT model includes: Set model parameters, including optimizer, learning rate, batch size of data reading, and loss function. The epidemic virus data is input into the model, and the weights of the BERT model are updated according to the back propagation and gradient descent method to obtain the trained BERT model.

[0033] Optionally, the step is to input the embedding vector into the BERT language model to predict the amino acid prediction result of the masked position. The calculation formula is: SSL_loss =

[0034] Where m is a part of the area randomly selected in the training area Mask with a certain probability, and ssl_m is the loss obtained by performing self-supervised training based on context completion in area m.

[0035] In this embodiment, during the self-supervised training process, a mask of the self-supervised training area with biological information is added, so that the model can read the complete protein sequence while limiting the training area to some key areas of the protein sequence. The mode of combining global reading and local training methods improves the efficiency of model training.

[0036] In this embodiment, the training process of the BERT model includes: Step S1201-Step S1202: Step S1201. Obtain popular virus data from a public virus database; Step S1202: Build a BERT model, and train the BERT model using popular virus data to obtain a trained BERT model; In step S1202, training the BERT model using popular virus data includes: steps S12021-S12024: Step S12021. Read and pre-process the original amino acid sequence of the epidemic virus data to obtain the RBD region of the virus sequence; Step S12022. In the RBD region, a random mask operation is performed on the amino acid sequence with probability p, followed by an embedding operation; Step S12023. Input the vector of the Embedding operation into the BERT language model to predict the amino acid prediction result of the masked position; Step S12024. Compare the model prediction results with the original amino acid sequence, set the learning rate, calculate the loss and perform gradient descent to update the model pre-training weights; Repeat the aforementioned steps S12021 to S12024 to complete the training of the BERT model.

[0037] Furthermore, in the actual operation of step S12024, the loss function type we selected is cross entropy loss. The specific formula is: There are k types of amino acids {1,2,3,…,k}, and the actual type of amino acid at position l is , the model predicts the probability of k kinds of amino acids at position l as { , corresponding to the above k kinds of amino acids. Then the loss function corresponding to position l is:

[0038] where ln is the operation of taking the natural logarithm.

[0039] Traverse all masked positions, add up all losses, and get the final loss function:

[0040] Back propagation and gradient descent of Loss are performed to update the model weights.

[0041] Furthermore, the trained BERT model is weighted using the target virus data. The trained BERT model includes: mainly the weights and bias items of the embedding layer, encoder layer, and fully connected layer.

[0042] In the process of weight adjustment of the BERT model, L2 regularization loss is added to the loss function, and the formula is: The set of all parameters of the model involved in back propagation and gradient descent training is All_Paras = {para inmodel}, where model is the model and para is the parameter involved in the training. Then the L2 regularization loss is defined as:

[0043] L2_loss is multiplied by the L2 regularization weight ω and added to the SSL loss to get the final total loss Loss.

[0044] In this embodiment, gradient descent is an optimization algorithm for minimizing the loss function. When training a neural network, our goal is to find the parameter value that minimizes the loss function. The basic idea of ​​gradient descent is to update the parameters along the negative gradient direction of the loss function so that the loss function is gradually reduced. Specifically, for each parameter, the gradient descent algorithm calculates the gradient of the loss function to the parameter, and then updates the value of the parameter in the direction of the negative gradient until the local minimum of the loss function is reached or converges to a certain threshold. Back propagation is a method for calculating gradients, which uses the chain rule to reversely propagate the gradient from the output layer to the input layer. In a neural network, the output of the model is calculated by forward propagation, and then the difference (loss) between the output and the true label is calculated using the loss function, and then the gradient of the loss to each parameter in the network is calculated using the back propagation algorithm. These gradients are then used to update the parameters in order to minimize the loss function. During the training process, gradient descent and back propagation are usually performed alternately. First, the gradient of the loss function to the parameter is calculated using back propagation, and then the parameter is updated using gradient descent. This process is repeated until the stopping condition is reached (such as reaching the maximum number of iterations, the loss function change is less than the threshold, etc.). In summary, back propagation is used to calculate gradients, and gradient descent is used to update parameters based on these gradients, making the prediction results of the neural network closer to the true value. Applied to this application, the BERT model makes the prediction results of the evolution of the target virus more accurate.

[0045] In this embodiment, a virus small sample training expansion framework integrating multiple schemes is proposed: through a combination of multiple strategies such as protein language model BERT, domain knowledge transfer and biological knowledge limitation, and combined with protein language model training schemes such as batch and L2 regularization, an extensible small amount of virus data training framework is proposed, which solves the key biological problem of poor model training effect caused by too little virus data in the process of virus evolution, and also provides a possible solution to the difficult problem of virus evolution prediction in the early stage of virus outbreak.

[0046] Step S130: Use the transfer learning model to predict the escape of the target virus and obtain the evolution prediction result of the target virus.

[0047] In this embodiment, step S130 includes: step S1301-step S1303: Step S1301. Determine the virus sequence based on the target virus data, and obtain all single mutation regions in the RBD region from the virus sequence; Step S1302: Input a single mutation sequence into the trained BERT model, and the BERT model outputs the semantic and grammatical scores of the mutation; Step S1303. Comprehensively analyze the semantic and grammatical scores to obtain the probability ranking of the single mutation achieving immune escape; Repeat the above steps S1301 to S1303 to continuously update the possibility ranking table until all single mutation regions are input into the model, and the evolution prediction result is obtained after aggregation.

[0048] Further, the step of obtaining all single mutation regions in the RBD region from the viral sequence includes: Let all the amino acid types be k {1,2,3,…,k}, and the length of the amino acid sequence of the viral protein be l. Then the method to obtain all possible single mutations in the RBD region is: For an amino acid at a certain position, changing the amino acid to the remaining k-1 possible amino acids can obtain k-1 single mutation results; Repeat the above operation for all l positions; l*(k-1) single mutation results can be obtained, which are all possible single mutations of the virus sequence.

[0049] It can be seen that the present invention predicts the direction of virus evolution by building a BERT language model. In order to be more in line with the actual scenario at the early stage of the epidemic outbreak, the method of the present invention is adapted to a small sample data set, thereby improving the prediction effect on a small amount of virus data.

[0050] Due to the small amount of original training data, overfitting is easy to occur during the training process. Therefore, multiple positions are covered and predicted at the same time during self-supervised training. This method effectively increases the actual amount of training data compared to the method of covering only one position at a time.

[0051] Taking into account the similarities between different viruses, the idea of ​​transfer learning is adopted to realize the transfer of domain knowledge. The domain knowledge contained in a large amount of virus data of other types in the virus library is transferred to a small amount of virus data of the target type to improve model performance.

[0052] The RBD region of the virus can be accurately located through biological experiments. The RBD region of the virus is used as prior information, and self-supervised training is only performed in the RBD region, thereby reducing the difficulty of model training and enabling the model to fully explore the biological information contained in the RBD region and further improve the prediction accuracy.

[0053] This application proposes a multi-strategy expansion step. Each solution promotes and is independent of each other. It can be added, deleted, and adjusted at any time according to data and virus types, and has excellent scalability and flexibility. During the model construction process: model knowledge (comparison of BiLSTM vs BERT models) and domain prior knowledge (framing of key areas such as similar virus type migration and RBD) solutions echo each other, giving full play to the huge potential of the model and strong human-computer interactivity.

[0054] In the second aspect, the present application provides a virus evolution prediction system based on the BERT language model, including: An acquisition module, used to acquire data of the target virus; The adjustment module is used to adjust the weights of the trained BERT model using the data of the target virus to obtain a transfer learning model; The prediction model is used to predict the escape of the target virus using the transfer learning model to obtain the evolution prediction results of the target virus.

[0055] In a third aspect, the present application provides an electronic device, as shown below: Figure 4 An electronic device 400 according to this embodiment of the present invention will be described. Figure 4 The electronic device 400 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0056] like Figure 4 As shown, the electronic device 400 is in the form of a general computing device. The components of the electronic device 400 may include but are not limited to: at least one processing unit 410, at least one storage unit 420, and a bus 430 connecting different system components (including the storage unit 420 and the processing unit 410).

[0057] The storage unit stores program codes, which can be executed by the processing unit 410, so that the processing unit 410 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 410 can perform the following steps: Figure 2 Steps S110 shown in the figure are: obtaining data of the target virus; S120. using the data of the target virus to adjust the weights of the trained BERT model to obtain a transfer learning model; S130. using the transfer learning model to predict the escape of the target virus to obtain the evolution prediction result of the target virus.

[0058] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 4201 and / or a cache storage unit 4202 , and may further include a read-only storage unit (ROM) 4203 .

[0059] The storage unit 420 may also include a program / utility 4204 having a set (at least one) of program modules 4205, such program modules 4205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0060] Bus 430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0061] The electronic device 400 may also communicate with one or more external devices 300 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 400, and / or may communicate with any device that enables the electronic device 400 to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication may be performed via an input / output (I / O) interface 450. In addition, the electronic device 400 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 460. As shown, the network adapter 460 communicates with other modules of the electronic device 400 via a bus 430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0062] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0063] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0064] refer to Figure 5 As shown, a program product 500 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0065] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0066] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0067] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0068] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0069] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0070] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0071] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A virus evolution prediction method based on the BERT language model, characterized in that: include: Get data of target virus; Use the target virus data to adjust the weights of the trained BERT model to obtain a transfer learning model; The transfer learning model is used to predict the escape of the target virus and obtain the evolution prediction results of the target virus.

2. The virus evolution prediction method based on the BERT language model according to claim 1, characterized in that: The training method of the BERT model includes: Obtain prevalent virus data from public virus databases; Building a BERT model, and training the BERT model using popular virus data to obtain a trained BERT model; The steps of training the BERT model using popular virus data include: Read and preprocess the raw amino acid sequence of epidemic virus data to obtain the RBD region of the virus sequence; In the RBD region, the amino acid sequence is randomly masked with probability p, followed by an embedding operation. Input the vector of the Embedding operation into the BERT language model to predict the amino acid prediction results of the masked position; Compare the model prediction results with the original amino acid sequence, set the learning rate, calculate the loss and perform gradient descent to update the model pre-trained weights; Repeat the above steps to complete the training of the BERT model.

3. The virus evolution prediction method based on the BERT language model according to claim 2, characterized in that: Compare the model prediction results with the original amino acid sequence, set the learning rate, calculate the loss and perform gradient descent to update the model pre-trained weights including: There are k types of amino acids {1,2,3,…,k}, and the actual type of amino acid at position l is , the model predicts the probability of k kinds of amino acids at position l as { , corresponding to the above k kinds of amino acids. Then the loss function corresponding to position l is: ; Where ln is the operation of taking the natural logarithm; Traverse all masked positions, add up all losses, and get the final loss function: ; Back propagation and gradient descent of Loss are performed to update the model weights.

4. The virus evolution prediction method based on the BERT language model according to claim 2, characterized in that: Step 1: Build a BERT model, and train the BERT model using popular virus data. The trained BERT model includes: Set model parameters, including optimizer, learning rate, batch size of data reading, and loss function. The epidemic virus data is input into the model, and the weights of the BERT model are updated according to the back propagation and gradient descent method to obtain the trained BERT model.

5. The virus evolution prediction method based on the BERT language model according to claim 3, characterized in that: Step 1: Input the embedding vector into the BERT language model and predict the amino acid prediction results of the masked position. The calculation formula is: SSL_loss = ; Where m is a part of the area randomly selected in the training area Mask with a certain probability, and ssl_m is the loss obtained by performing self-supervised training based on context completion in area m.

6. The virus evolution prediction method based on the BERT language model according to claim 1, characterized in that: The step uses the data of the target virus to adjust the weights of the trained BERT model. The trained BERT model includes: mainly including the weights and bias items of the embedding layer, the encoder layer, and the fully connected layer.

7. The virus evolution prediction method based on the BERT language model according to claim 6, characterized in that: In the process of weight adjustment of the BERT model, L2 regularization loss is added to the loss function, and the formula is: The set of all parameters of the model involved in back propagation and gradient descent training is All_Paras = {para inmodel}, where model is the model and para is the parameter involved in the training. Then the L2 regularization loss is defined as: ; L2_loss is multiplied by the L2 regularization weight ω and added to the SSL loss to get the final total loss Loss.

8. The virus evolution prediction method based on the BERT language model according to claim 1, characterized in that: Step 1: Use the transfer learning model to predict the escape of the target virus, and obtain the evolution prediction results of the target virus, including: Determine the viral sequence based on the target virus data, and obtain all single mutation regions in the RBD region from the viral sequence; Input a single mutation sequence into the trained BERT model, and the BERT model outputs the semantic and grammatical scores of the mutation; Combining semantic and grammatical scores, we can get the probability ranking of the single mutation achieving immune escape; Repeat the above steps to continuously update the possibility ranking table until all single mutation regions are input into the model, and then summarize to obtain the evolution prediction result.

9. The virus evolution prediction method based on the BERT language model according to claim 1, characterized in that: The steps to obtain all single mutation regions in the RBD region from the viral sequence include: Let all the amino acid types be k {1,2,3,…,k}, and the length of the amino acid sequence of the viral protein be l. Then the method to obtain all possible single mutations in the RBD region is: For an amino acid at a certain position, changing the amino acid to the remaining k-1 possible amino acids can obtain k-1 single mutation results; Repeat the above operation for all l positions; l*(k-1) single mutation results can be obtained, which are all possible single mutations of the virus sequence.

10. A virus evolution prediction system based on the BERT language model, characterized in that: include: An acquisition module, used to acquire data of the target virus; The adjustment module is used to adjust the weights of the trained BERT model using the data of the target virus to obtain a transfer learning model; The prediction model is used to predict the escape of the target virus using the transfer learning model to obtain the evolution prediction results of the target virus.

Citation Information

Patent Citations

  • Medical field entity and relation extraction method based on training model

    CN116383392A

  • Virus evolution trend prediction method and system

    CN117174163A

  • Virus property prediction model training method and virus property prediction method

    CN117292756A

  • High-risk variant strain prediction method, electronic equipment and storage medium

    CN117577188A