Vector model training method, negative sample generation method, medium and device
By using a vector model training method to obtain vector representations of RNA and protein sequences, calculating interactions and similarities, and generating high-quality negative samples, this approach solves the challenge of analyzing non-coding RNA-protein interactions and improves the accuracy of prediction models and sample quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BOE TECHNOLOGY GROUP CO LTD
- Filing Date
- 2022-01-04
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies are insufficient for effectively analyzing the interactions between non-coding RNAs and proteins, which hinders research into their functions and understanding of disease mechanisms.
By using a vector model training method, vectorized representations of RNA and protein sequences are obtained, interactions and similarities are calculated, and stochastic gradient descent algorithm is used to optimize model parameters and generate high-quality negative samples to improve the accuracy of RNA-protein interaction prediction models.
It improves the accuracy of RNA-protein interaction prediction and the quality of negative samples, ensuring that the model can distinguish between positive and negative samples, and enhances the precision of biomolecular function research.
Smart Images

Figure CN116711015B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and more specifically, to a vector model training method, a negative sample generation method, a computer-readable storage medium, and an electronic device. Background Technology
[0002] In modern biological research, with the deepening of functional genomics research, the study of the biological functions of biomolecules has become very important, and the analysis of biomolecular interactions has become an indispensable and important means in the current study of biomolecular functions.
[0003] Taking RNA as an example, noncoding RNA (ncRNA) participates in many complex cellular processes, playing a crucial role in life processes such as alternative splicing, chromatin modification, and epigenetics, and is closely related to many diseases. Studies have shown that most noncoding RNAs achieve their regulatory functions through interactions with proteins. Therefore, researching the interactions between noncoding RNA and proteins is of great significance for revealing the molecular mechanisms of noncoding RNA in human diseases and life activities, and has become one of the important approaches to analyzing the functions of noncoding RNA and proteins.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] This disclosure provides a vector model training method, a negative sample generation method, a computer-readable storage medium, and an electronic device.
[0006] This disclosure provides a vector model training method, including:
[0007] Obtain multiple RNA sequences and multiple protein sequences;
[0008] Vectorize the multiple RNA sequences to obtain multiple RNA first vectors;
[0009] Vectorize the multiple protein sequences to obtain multiple protein first vectors;
[0010] The interaction between the RNA sequence and the protein sequence is determined based on the first RNA vector and the first protein vector.
[0011] Calculate the distance between any two RNA sequences to obtain the similarity of multiple RNA-RNA pairs;
[0012] Calculate the distance between any two protein sequences to obtain the similarity of multiple protein-protein pairs;
[0013] The vector model is trained based on the interactions between the RNA and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs.
[0014] In one exemplary embodiment of this disclosure, the vectorization of the plurality of RNA sequences to obtain a plurality of RNA first vectors includes:
[0015] Each RNA sequence is converted into an N-base k-mer subsequence;
[0016] The first RNA vector is obtained by vectorizing each base k-mer subsequence.
[0017] In one exemplary embodiment of this disclosure, the vectorization of each base k-mer subsequence to obtain the first RNA vector includes:
[0018] Encode each base k-mer subsequence to obtain a first vector of N base k-mer subsequences;
[0019] The first vector of the N base k-mer subsequences is input into a recurrent neural network, which outputs an N base k-mer vector.
[0020] The first RNA vector is obtained based on the N base k-mer vectors.
[0021] In one exemplary embodiment of this disclosure, the vectorization of the plurality of protein sequences to obtain a plurality of protein first vectors includes:
[0022] Each protein sequence is converted into an M amino acid k-mer subsequence;
[0023] Vectorize each amino acid k-mer subsequence to obtain the first vector of the protein.
[0024] In one exemplary embodiment of this disclosure, the vectorization of each amino acid k-mer subsequence to obtain the first protein vector includes:
[0025] Encode each amino acid k-mer subsequence to obtain a first vector of M amino acid k-mer subsequences;
[0026] The first vector of the M amino acid k-mer subsequences is input into the recurrent neural network, and the output is the M amino acid k-mer vector;
[0027] The first vector of the protein is obtained based on the k-mer vectors of the M amino acids.
[0028] In one exemplary embodiment of this disclosure, determining the interaction between the RNA sequence and the protein sequence based on the first RNA vector and the first protein vector includes:
[0029] according to:
[0030]
[0031] The probability value of an interaction between the RNA sequence and the protein sequence is calculated, and the interaction between the RNA sequence and the protein sequence is determined based on the probability value; where θ is a model parameter, v R The first RNA vector, v P This is the first vector of the protein.
[0032] In one exemplary embodiment of this disclosure, calculating the distance between any two RNA sequences to obtain the similarity of multiple RNA-RNA pairs includes:
[0033] Calculate the edit distance between any two RNA sequences, and obtain the sequence distance between the two RNA sequences based on the edit distance;
[0034] The similarity of multiple RNA-RNA pairs is obtained based on the sequence distance between any two RNA sequences.
[0035] In one exemplary embodiment of this disclosure, calculating the edit distance between any two RNA sequences and obtaining the sequence distance between the two RNA sequences based on the edit distance includes:
[0036] according to:
[0037]
[0038] Obtain any two RNA sequences r i r j The sequence distance; where lev(r) i r j ) represents the RNA sequence r i and RNA sequence r j edit distance, len(r) i ) represents the RNA sequence r i The length of len(r) j ) represents the RNA sequence r j The length.
[0039] In one exemplary embodiment of this disclosure, obtaining the similarity of multiple RNA-RNA pairs based on the sequence distance between any two RNA sequences includes:
[0040] according to:
[0041] simR(r i r j )=1-d(r i r j )
[0042] The similarity of multiple RNA-RNA pairs was obtained; among them, d(r i r j ) represents any two RNA sequences r i r j Sequence distance.
[0043] In one exemplary embodiment of this disclosure, calculating the distance between any two protein sequences to obtain the similarity of multiple protein-protein pairs includes:
[0044] Multiple protein sequences are mapped to a vector space to obtain multiple protein vectors;
[0045] The similarity of the multiple protein-protein pairs is obtained by calculating the distance between any two protein vectors.
[0046] In one exemplary embodiment of this disclosure, training the vector model based on the interactions between the RNA and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs includes:
[0047] The objective function is constructed based on the interaction between the RNA and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs.
[0048] Based on the objective function, the model parameters of the vector model are iteratively updated using the stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the vector model is completed.
[0049] In one exemplary embodiment of this disclosure, the objective function is:
[0050]
[0051] Where, r i Let r represent the i-th RNA sequence. j p represents the j-th RNA sequence. i Let p represent the i-th protein sequence. j This represents the j-th protein sequence. This represents the first vector of the i-th RNA. Let represent the first vector of the i-th protein, α, β, and γ be model parameters, and K be the number of RNA and protein sequences.
[0052] This disclosure provides a method for generating negative samples, including:
[0053] Obtain positive RNA-protein pairs;
[0054] The target RNA sequence and target protein sequence in the positive RNA-protein pair are vectorized by the trained vector model to obtain the corresponding second RNA vector and second protein vector.
[0055] Based on the second RNA vector and the second protein vector, the target negative RNA-protein pair corresponding to the positive RNA-protein pair is obtained, and the target negative RNA-protein pair is used to train the RNA-protein interaction prediction model.
[0056] In one exemplary embodiment of this disclosure, obtaining the target negative RNA-protein pair corresponding to the positive RNA-protein pair based on the second RNA vector and the second protein vector includes:
[0057] Calculate the similarity between the target RNA sequence and any RNA sequence other than the target RNA sequence;
[0058] Candidate RNA sequences are obtained by screening any RNA sequence other than the target RNA sequence based on the similarity score.
[0059] The relationship score between the candidate RNA sequence and the target protein sequence is calculated based on the second RNA vector of the candidate RNA sequence and the second protein vector of the target protein sequence.
[0060] The target negative RNA-protein pair is determined based on the relationship score between the candidate RNA sequence and the target protein sequence.
[0061] In one exemplary embodiment of this disclosure, calculating the relationship score between the candidate RNA sequence and the target protein sequence based on the second RNA vector of the candidate RNA sequence and the second protein vector of the target protein sequence includes:
[0062] Based on the model parameters of the vector model, and according to the second RNA vector of the candidate RNA sequence and the second protein vector of the target protein sequence, the relationship score between the candidate RNA sequence and the target protein sequence is calculated.
[0063] The model parameters are obtained by training the vector model.
[0064] In one exemplary embodiment of this disclosure, the step of calculating the relationship score between the candidate RNA sequence and the target protein sequence based on the model parameters of the vector model and according to the second RNA vector of the candidate RNA sequence and the second protein vector of the target protein sequence includes:
[0065] according to:
[0066] x j =θ· <dr j dp i >
[0067] The relationship score between candidate RNA sequences and target protein sequences was calculated; where dr j dp is the second RNA vector of the candidate RNA sequence. i Let θ be the second protein vector representing the target protein sequence, and θ be the model parameters in the trained vector model. <dr j dp i > indicates dr j and dp i Perform a dot product operation.
[0068] In one exemplary embodiment of this disclosure, determining the target negative RNA-protein pair based on the relationship score between the candidate RNA sequence and the target protein sequence includes:
[0069] When the relationship score between the candidate RNA sequence and the target protein sequence meets a preset condition, a first negative sample set is obtained from the candidate RNA sequence.
[0070] The target negative RNA-protein pair is determined based on the first negative sample set.
[0071] In one exemplary embodiment of this disclosure, obtaining the target negative RNA-protein pair corresponding to each positive RNA-protein pair based on the second RNA vector and the second protein vector includes:
[0072] Calculate the similarity between the target protein sequence and any protein sequence other than the target protein sequence;
[0073] Candidate protein sequences are obtained by screening any protein sequence other than the target protein sequence based on the similarity score.
[0074] The relationship score between the candidate protein sequence and the target RNA sequence is calculated based on the second protein vector of the candidate protein sequence and the second RNA vector of the target RNA sequence.
[0075] The target negative RNA-protein pair is determined based on the relationship score between the candidate protein sequence and the target RNA sequence.
[0076] In one exemplary embodiment of this disclosure, determining the target negative RNA-protein pair based on the relationship score between the candidate protein sequence and the target RNA sequence includes:
[0077] When the relationship score between the candidate protein sequence and the target RNA sequence meets a preset condition, the candidate protein sequence is moved to the second negative sample set.
[0078] The target negative RNA-protein pair is determined based on the second negative sample set.
[0079] In one exemplary embodiment of this disclosure, the method further includes:
[0080] Obtain a training dataset, which consists of multiple RNA-protein pairs;
[0081] The vector model is used to determine the interactions between RNA sequences and protein sequences in the training dataset, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs.
[0082] The objective function is constructed based on the interaction between the RNA and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs.
[0083] Based on the objective function, the model parameters of the vector model are iteratively updated using the stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the vector model is completed.
[0084] This disclosure provides a method for generating negative samples, including:
[0085] Obtain positive examples, which consist of two biomolecular sequences;
[0086] The first biomolecule sequence in the positive sample is vectorized by the trained network model to obtain the biomolecule vector of the first biomolecule sequence.
[0087] Calculate the similarity between the biomolecule vector of the first biomolecule sequence and the biomolecule vector of any other biomolecule sequence of the same type.
[0088] Based on the similarity, determine the same target biomolecule sequence that is similar to the first type of biomolecule sequence;
[0089] The negative sample corresponding to the positive sample is obtained from the same target biomolecule sequence and the second biomolecule sequence in the positive sample.
[0090] In an exemplary embodiment of this disclosure, the first biomolecule sequence is an RNA sequence, and the biomolecule vector is an RNA third vector; the step of vectorizing the first biomolecule sequence in the positive sample using a trained network model to obtain the biomolecule vector of the first biomolecule sequence includes:
[0091] Each RNA sequence is converted into an N-base k-mer subsequence;
[0092] The third vector of the RNA is obtained by vectorizing each base k-mer subsequence using a trained network model.
[0093] In one exemplary embodiment of this disclosure, the step of vectorizing each base k-mer subsequence using a trained network model to obtain the third RNA vector includes:
[0094] Encode each base k-mer subsequence to obtain a first vector of N base k-mer subsequences;
[0095] Input the first vector of the N base k-mer subsequences into the trained pre-trained model, and output the N base k-mer vectors;
[0096] The third RNA vector is obtained based on the N base k-mer vectors.
[0097] In an exemplary embodiment of this disclosure, calculating the similarity between the biomolecule vector of the first biomolecule sequence and the biomolecule vector of any other biomolecule sequence of the same type, excluding the first biomolecule sequence, includes:
[0098] according to:
[0099]
[0100] The third vector Vr of the two RNAs was calculated. i Vr j The similarity between them; where Vr i Indicates RNA sequence r i The third RNA vector, Vr j Indicates RNA sequence r j The third RNA vector.
[0101] In an exemplary embodiment of this disclosure, the first biomolecule sequence is a protein sequence, and the biomolecule vector is a protein third vector; the step of vectorizing the first biomolecule sequence in the positive sample using a trained network model to obtain the biomolecule vector of the first biomolecule sequence includes:
[0102] Each protein sequence is converted into an M amino acid k-mer subsequence;
[0103] The third vector of the protein is obtained by vectorizing each amino acid k-mer subsequence using a trained network model.
[0104] In one exemplary embodiment of this disclosure, the step of vectorizing each amino acid k-mer subsequence using a trained network model to obtain the third vector of the protein includes:
[0105] Encode each amino acid k-mer subsequence to obtain a first vector of M amino acid k-mer subsequences;
[0106] Input the first vector of the M amino acid k-mer subsequences into the trained pre-trained model, and output the M amino acid k-mer vectors;
[0107] The third vector of the protein is obtained based on the k-mer vectors of the M amino acids.
[0108] In one exemplary embodiment of this disclosure, training the network model includes:
[0109] Obtain multiple sequences of the same biomolecule;
[0110] Vectorize the multiple identical biomolecule sequences to obtain multiple biomolecule vectors;
[0111] Calculate the distance between any two sequences of the same biomolecule to obtain the similarity of multiple pairs of sequences of the same biomolecule;
[0112] The network model is trained based on the similarity between the biomolecule vectors and the sequence pairs of the same biomolecule.
[0113] In one exemplary embodiment of this disclosure, the homologous biomolecule sequence is an RNA sequence; the step of calculating the distance between any two homologous biomolecule sequences to obtain the similarity of multiple homologous biomolecule sequence pairs includes:
[0114] Calculate the edit distance between any two RNA sequences, and obtain the sequence distance between the two RNA sequences based on the edit distance;
[0115] The similarity of multiple RNA-RNA pairs is obtained based on the sequence distance between any two RNA sequences.
[0116] In one exemplary embodiment of this disclosure, the biomolecule vector is an RNA fourth vector; training the network model based on the similarity between the biomolecule vector and sequence pairs of the same biomolecule includes:
[0117] Construct an objective function based on the similarity of the RNA-RNA pairs and the fourth RNA vector;
[0118] Based on the objective function, the model parameters of the network model are iteratively updated using the stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the network model is completed.
[0119] In one exemplary embodiment of this disclosure, the objective function is:
[0120]
[0121] Where, r i Let r represent the i-th RNA sequence. j V represents the j-th RNA sequence. i R V represents the fourth vector of the i-th RNA. j R This represents the fourth vector of the j-th RNA.
[0122] In one exemplary embodiment of this disclosure, the homologous biomolecule sequence is a protein sequence; the step of calculating the distance between any two homologous biomolecule sequences to obtain the similarity of multiple homologous biomolecule sequence pairs includes:
[0123] Multiple protein sequences are mapped to a vector space to obtain multiple protein vectors;
[0124] Calculate the distance between any two protein vectors to obtain the similarity of multiple protein-protein pairs.
[0125] In one exemplary embodiment of this disclosure, the biomolecule vector is a fourth protein vector; training the network model based on the similarity between the biomolecule vector and sequences of the same biomolecule includes:
[0126] Construct an objective function based on the similarity of the protein-protein pairs and the fourth vector of the proteins;
[0127] Based on the objective function, the model parameters of the network model are iteratively updated using the stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the network model is completed.
[0128] In one exemplary embodiment of this disclosure, the objective function is:
[0129]
[0130] Where, p i Let p represent the i-th protein sequence. j V represents the j-th protein sequence. i P V represents the fourth vector of the i-th protein. j P Let represent the fourth vector of the j-th protein.
[0131] This disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any one of the above descriptions.
[0132] This disclosure provides an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method described in any of the preceding methods by executing the executable instructions.
[0133] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0134] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0135] Figure 1 A schematic diagram of an exemplary system architecture for a vector model training method, negative sample generation method, and apparatus that can be applied to embodiments of the present disclosure is shown.
[0136] Figure 2 A flowchart illustrating a vector model training method according to an embodiment of the present disclosure is shown schematically.
[0137] Figure 3 A flowchart illustrating the generation of a first RNA vector according to an embodiment of the present disclosure is shown schematically.
[0138] Figure 4 A flowchart illustrating the generation of a first protein vector according to an embodiment of the present disclosure is shown schematically.
[0139] Figure 5A flowchart illustrating a vector model training method according to a specific embodiment of the present disclosure is shown schematically.
[0140] Figure 6 A flowchart illustrating a negative sample generation method according to an embodiment of the present disclosure is shown schematically;
[0141] Figure 7 A flowchart illustrating a negative sample generation method according to a specific embodiment of the present disclosure is shown schematically;
[0142] Figure 8 A flowchart illustrating a negative sample generation method according to another specific embodiment of this disclosure is shown schematically;
[0143] Figure 9 A flowchart illustrating a negative sample generation method according to another embodiment of the present disclosure is shown schematically;
[0144] Figure 10 A flowchart illustrating the training of a network model according to an embodiment of the present disclosure is shown schematically.
[0145] Figure 11 A block diagram of a vector model training apparatus according to an embodiment of the present disclosure is shown schematically.
[0146] Figure 12 A block diagram of a negative sample generation apparatus according to an embodiment of the present disclosure is shown schematically;
[0147] Figure 13 A block diagram of a negative sample generation apparatus according to another embodiment of the present disclosure is shown schematically;
[0148] Figure 14 A schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure is shown. Detailed Implementation
[0149] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0150] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0151] Figure 1 A schematic diagram of a system architecture for an exemplary application environment in which a vector model training method, negative sample generation method and apparatus according to embodiments of the present disclosure can be applied is shown.
[0152] like Figure 1 As shown, system architecture 100 may include one or more of terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables. Terminal devices 101, 102, and 103 may be various electronic devices, including but not limited to desktop computers, laptops, smartphones, and tablets. It should be understood that... Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be used. For example, server 105 can be a single server, a server cluster consisting of multiple servers, a cloud computing platform, or a virtualization center. Specifically, server 105 can be used to perform the following: acquire multiple RNA sequences and multiple protein sequences; vectorize multiple RNA sequences to obtain multiple RNA first vectors; vectorize multiple protein sequences to obtain multiple protein first vectors; determine the interactions between RNA and protein sequences based on the RNA first vectors and protein first vectors; calculate the distance between any two RNA sequences to obtain the similarity of multiple RNA-RNA pairs; calculate the distance between any two protein sequences to obtain the similarity of multiple protein-protein pairs; train a vector model based on the interactions between RNA and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs; and use the trained vector model to generate target negative samples for training the RNA-protein interaction prediction model.
[0153] The vector model training method and negative sample generation method provided in this embodiment are generally executed by server 105. Correspondingly, the vector model training device and negative sample generation device are generally set in server 105. The server can send the RNA vector and protein vector output by the vector model, as well as the generated negative samples, to the terminal device, which then displays them to the user. However, those skilled in the art will readily understand that the vector model training method and negative sample generation method provided in this embodiment can also be executed by one or more of terminal devices 101, 102, and 103. Correspondingly, the vector model training device and negative sample generation device can also be set in terminal devices 101, 102, and 103. For example, after execution by the terminal device, the RNA vector and protein vector output by the vector model, as well as the generated negative samples, can be directly displayed on the terminal device's screen. This exemplary embodiment does not impose any special limitations on this.
[0154] The technical solutions of the embodiments of this disclosure are described in detail below:
[0155] In this exemplary embodiment, the biological molecules RNA and protein can be used as examples for illustration. Currently, predicting RNA-protein interactions can be modeled as a classification problem, and a classification model can be used to predict RNA-protein interactions. Before using the classification model to predict RNA-protein interactions, the classification model needs to be trained using a training dataset containing positive samples (RNA-protein pairs with interactions) and negative samples (RNA-protein pairs without interactions) to improve the predictive ability of the classification model. Furthermore, it is necessary to ensure that the training dataset contains a sufficient number of positive and negative samples.
[0156] If the training dataset contains only positive samples, a series of negative samples need to be generated to improve the performance of the classification model. For example, negative samples can often be generated through random sampling. For instance, for a positive sample (r1, p1), protein p1 can be fixed, and an RNA r2 can be randomly selected from the training dataset, making (r2, p1) a negative sample. However, the quality of negative samples generated by this method is not high; that is, the negative samples have low discriminative power, meaning they are easily distinguished from positive samples. High-quality negative samples should be similar to positive samples and indeed be negative samples. For example, for a positive sample (r1, p1), after fixing protein p1, an r2 can be found that is similar to r1, and there is no interaction between r2 and p1; (r2, p1) is a high-quality negative sample. Understandably, a classification model trained using low-quality negative samples will have poor performance. For example, if a negative sample that is similar to a positive sample is input into the classification model, the model is likely to predict that negative sample as a positive sample, indicating low accuracy in predicting RNA-protein interactions.
[0157] Based on one or more of the above-mentioned problems, this exemplary embodiment provides a vector model training method. This method can be applied to the server 105, or to one or more of the terminal devices 101, 102, and 103. No special limitation is made in this exemplary embodiment.
[0158] refer to Figure 2 As shown, the vector model training method may include the following steps S210 to S270:
[0159] Step S210. Obtain multiple RNA sequences and multiple protein sequences;
[0160] Step S220. Vectorize the multiple RNA sequences to obtain multiple RNA first vectors;
[0161] Step S230. Vectorize the multiple protein sequences to obtain multiple protein first vectors;
[0162] Step S240. Determine the interaction between the RNA sequence and the protein sequence based on the first RNA vector and the first protein vector;
[0163] Step S250. Calculate the distance between any two RNA sequences to obtain the similarity of multiple RNA-RNA pairs;
[0164] Step S260. Calculate the distance between any two protein sequences to obtain the similarity of multiple protein-protein pairs;
[0165] Step S270. Train the vector model based on the interaction between the RNA sequence and the protein sequence, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs.
[0166] In the vector model training method provided in the exemplary embodiments of this disclosure, multiple RNA sequences and multiple protein sequences are acquired; the multiple RNA sequences are vectorized to obtain multiple RNA first vectors; the multiple protein sequences are vectorized to obtain multiple protein first vectors; the interactions between the RNA sequences and protein sequences are determined based on the RNA first vectors and protein first vectors; the distance between any two RNA sequences is calculated to obtain the similarity of multiple RNA-RNA pairs; the distance between any two protein sequences is calculated to obtain the similarity of multiple protein-protein pairs; and the vector model is trained based on the interactions between the RNA sequences and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs. This disclosure supervises vector model learning by using three types of information: RNA-RNA similarity, protein-protein similarity, and RNA-protein interaction. This ensures that the RNA and protein vectors output by the vector model accurately reflect the interactions between RNA and proteins, the similarity between RNA and RNA, and the similarity between proteins. When generating negative samples using the vector model trained based on multi-task learning, it ensures that the negative samples are similar to known positive samples, thus improving the quality of the negative samples.
[0167] The steps described above in this example implementation will now be explained in more detail.
[0168] In step S210, multiple RNA sequences and multiple protein sequences are obtained.
[0169] In the exemplary embodiments of this disclosure, a dataset can be obtained, which may contain at least one RNA-protein pair consisting of an RNA sequence and a protein sequence, and the interaction between the RNA sequence and the protein sequence in each RNA-protein pair is known. It is understood that, in order to generate negative examples similar to positive examples, the dataset may consist only of multiple positive examples, where positive examples refer to RNA-protein pairs with interaction between the RNA sequence and the protein sequence, and negative examples refer to RNA-protein pairs without interaction between the RNA sequence and the protein sequence. In some cases, the dataset may also consist only of multiple negative examples or a combination of positive and negative examples. It is understood that the obtained dataset may contain any number of RNA sequences and protein sequences. For example, all RNA sequences and all protein sequences may be obtained, and a dataset containing several RNA-protein pairs may be formed by permuting and combining all RNA sequences and all protein sequences. Alternatively, partial RNA sequences and partial protein sequences may be obtained, and a dataset containing multiple RNA-protein pairs may be obtained by permuting and combining partial RNA sequences and partial protein sequences; this disclosure does not specifically limit this approach.
[0170] In some implementations, the acquired RNA sequences and protein sequences can constitute multiple RNA-protein pairs. RNA-protein pairs can be obtained from any dataset, and the multiple RNA sequences and protein sequences can be obtained from different datasets, as long as the existence of interactions between the acquired RNA and protein sequence pairs is known. In some implementations, interactions exist between all acquired RNA and protein sequences; for example, each acquired RNA-protein pair is a positive example. In some cases, each acquired RNA-protein pair can also be a negative example, or a combination of positive and negative examples.
[0171] The interaction between RNA and protein refers to the function of a protein manifested through its interaction with RNA. For example, the interaction between protein and RNA plays a crucial role in protein synthesis. Simultaneously, the performance of many RNA functions depends on its interaction with proteins. This interaction can be regulatory, guiding, etc., and is not limited here. For instance, in the presence of an interaction, RNA can guide protein synthesis, or RNA can regulate protein function. The interaction between RNA and protein can also refer to their ability to regulate each other's life cycle and function through physical interaction. For example, RNA-coding sequences can guide protein synthesis, and correspondingly, proteins can regulate RNA expression and function.
[0172] For example, during training, multiple RNA sequences and multiple protein sequences need to be input, i.e., multiple RNA-protein pairs need to be input. Multiple RNA-protein pairs can be input one by one, in batches, or all at once. Users can input each RNA-protein pair through their terminal device. For example, users can input each RNA-protein pair manually or by voice; for example, they can input one RNA sequence followed by one protein sequence, and the input order is not limited; for example, the RNA and protein sequences can be input into different text boxes or into the same text box; this example does not restrict either approach.
[0173] During or after training, some / all training parameters, some / all intermediate results, or final results can be output. Examples include the first RNA vector, the first protein vector, RNA-RNA pair similarity, and protein-protein pair similarity. This output can be sent to a terminal device for user viewing. For instance, it can be displayed directly on the terminal device's screen or provided to the user via voice broadcast; this example does not limit this. In some implementations, the above content can also be saved for later direct retrieval.
[0174] During the generation of negative examples, the user can input each positive RNA-protein pair through the terminal device. For example, the user can input each positive RNA-protein pair manually or by voice; for example, an RNA sequence can be input followed by a protein sequence, and the input order is not limited; for example, the RNA sequence and protein sequence can be input into different text boxes or into the same text box, and this example does not restrict either approach.
[0175] For example, multiple positive RNA-protein pairs can be obtained, and each positive RNA-protein pair can be vectorized to obtain corresponding RNA and protein vectors. These vectors can then be used to generate the corresponding negative RNA-protein pairs for each positive pair. Simultaneously, the generated negative RNA-protein pairs can be output to a terminal device for user viewing. For instance, the generated negative RNA-protein pairs can be directly displayed on the terminal device's screen, or they can be provided to the user via voice announcement; this example does not specify any limitations in this regard.
[0176] In the exemplary embodiments of this disclosure, the vector model used to obtain the RNA sequence vector representation and the protein sequence vector representation can consist of two parts. The first part of the model is used to vectorize the RNA sequence and the protein sequence, and the second part of the model is used to determine the interaction between the RNA sequence and the protein sequence. For example, the first part of the model can be a neural network such as a recurrent neural network, an embedding network, or a BERT (Bidirectional Encoding Representation from Transformer) encoder, or a One-Hot encoder, etc. The second part of the model can be a logistic regression model, an SVM (Support Vector Machine), a decision tree, etc., and this disclosure does not limit it. For example, the first part of the model can also include a model for vectorizing the RNA sequence and a model for vectorizing the protein sequence.
[0177] In step S220, the plurality of RNA sequences are vectorized to obtain a plurality of RNA first vectors.
[0178] In one exemplary implementation, the first part of the vector model can be illustrated using a neural network as an example. For instance, the RNA sequence in each RNA-protein pair can be vectorized using a first neural network to obtain a first RNA vector corresponding to each RNA sequence. The interactions between multiple RNA-protein pairs can be determined based on the first RNA vector and the first protein vector. Then, the entire vector model can be trained based on the interactions between RNA-protein pairs, combined with the similarity between RNA-RNA pairs and protein-protein pairs. The trained vector model can then be used to generate negative RNA-protein pairs corresponding to each positive RNA-protein pair. In this exemplary implementation, the first neural network can be an embedding network, a recurrent neural network, or a network structure composed of both an embedding network and a recurrent neural network. The recurrent neural network can be an LSTM (Long Short-Term Memory) network, a bidirectional recurrent neural network, a GRU (Gated Recurrent Unit) network, etc., and this disclosure does not specifically limit its application.
[0179] In the exemplary embodiments of this disclosure, RNA sequences can be represented by base sequences. For example, an RNA sequence can be represented as AGCAAGCACCU… An RNA sequence can include four bases: adenine (A), uracil (U), guanine (G), and cytosine (C). Correspondingly, RNA sequences can also be represented using base k-mer subsequences. A k-mer subsequence refers to a k-connector consisting of k bases or k amino acids as a group. Specifically, all base k-mer subsequences can be obtained by arranging and combining the four bases; for a given k value, four k-mer subsequences can be obtained. k There are 4 base k-mer subsequences. For example, when k is 3, there are 4 3 =64 base 3-mer subsequences, when k is 4, there are a total of 4 4= 256 possible 4-mer subsequences. For example, AGC, AUA, GCA, and CCU are four different 3-mer subsequences, and AGCA, UAGC, and ACCU are three different 4-mer subsequences. Therefore, the RNA sequence AGCAUAGCACCU… can also be represented as {AGC, AUA, GCA, CCU, …}, or as {AGCA, UAGC, ACCU, …}. In other examples, the corresponding 3-mer or 4-mer subsequences can also be obtained by reading the RNA sequence in an overlapping manner. Correspondingly, the 3-mer subsequences of the RNA sequence can also include AGC, GCA, CAU, AUA, etc., and the 4-mer subsequences of the RNA sequence can also include AGCA, GCAU, CAUA, etc., which are not limited in this disclosure. In the example embodiments of this disclosure, k is a positive integer, such as 1, 2, 3…, and k can take one or more values. The specific value of k can be adjusted according to the actual situation and is not limited here.
[0180] When encoding each RNA sequence using the first neural network, a portion of the RNA sequence can be encoded to obtain a first RNA vector based on the encoding results of that portion of the bases. Alternatively, all bases of the RNA sequence can be encoded to obtain a first RNA vector based on the encoding results of all bases. Furthermore, all bases of the RNA sequence can be encoded, and the encoding results of a portion of the bases can be selected to obtain a first RNA vector based on the encoding results of that portion of the bases; this disclosure does not specifically limit this approach.
[0181] In this exemplary embodiment, the example given is encoding all bases of each RNA sequence and obtaining the first RNA vector based on the encoded bases. Each RNA sequence can be converted into N base k-mer subsequences. Taking any given RNA sequence as an example, depending on the value of k, k consecutive bases can be taken sequentially from the first base of the RNA sequence to form a single base k-mer subsequence, until the last k bases of the RNA sequence are taken, resulting in all base k-mer subsequences of the RNA sequence. Then, each base k-mer subsequence can be vectorized using a first neural network to obtain N base k-mer vectors, and the first RNA vector can be obtained based on these N base k-mer vectors. For example, the RNA sequence can be divided into N non-overlapping base k-mer subsequences. For instance, if the RNA sequence is AUCUGAAAU, it can be divided into three base k-mer subsequences: AUC, UGA, and AAU. In other examples, overlapping RNA sequences can be divided into P k-mer subsequences. Each k-mer subsequence can be vectorized using a first neural network to obtain P k-mer vectors, and the first RNA vector can be obtained from these P k-mer vectors. Alternatively, the RNA sequence can be vectorized directly using a first neural network without converting it into k-mer subsequences, resulting in multiple base vectors. The first RNA vector can then be obtained from these multiple base vectors. This disclosure does not impose specific limitations on this approach.
[0182] In one example implementation, after converting the RNA sequence into N base k-mer subsequences, each base k-mer subsequence in the RNA sequence can be encoded to obtain a first vector of N base k-mer subsequences. The first vector of N base k-mer subsequences can be operated on using a first mapping matrix (e.g., performing a product operation) to obtain a second vector of N base k-mer subsequences, and the first RNA vector is obtained based on the second vector of N base k-mer subsequences.
[0183] For example, each k-mer subsequence can be one-hot encoded. One-hot encoding, also known as one-bit valid encoding, uses an N-bit state register to encode N states, each with its own independent register bit, and at any given time, only one bit is valid. For instance, when k=3, there are 64 possible 3-mer subsequences, and each 3-mer subsequence can be one-hot encoded to obtain the first vector of the k-mer subsequences.
[0184] For example, for the i-th 3-mer subsequence (i.e., the 3-mer subsequence with index i), a 64-dimensional One-Hot vector can be obtained through encoding. The i-th element of this vector is set to 1, and all other elements are set to 0, in the form [0, 1, 0, 0, ..., 0]. Similarly, each type of 3-mer subsequence can correspond to a 3-mer One-Hot vector. For another example, when k = 1, each base is a 1-mer subsequence, meaning each base in the RNA sequence can be encoded to obtain a corresponding representation vector. For instance, if the RNA sequence contains L bases, for the j-th base (i.e., the base with index j), an L-dimensional One-Hot vector can be obtained through encoding. The j-th element of this vector is set to 1, and all other elements are set to 0, thus obtaining the One-Hot vector for the j-th base. In other examples, each base in the RNA sequence can also be encoded into a 4-dimensional One-Hot vector based on the base type. For example, base A can be represented by a One-Hot vector [1, 0, 0, 0], U by [0, 0, 0, 1], G by [0, 1, 0, 0], and C by [0, 0, 1, 0]. Correspondingly, a One-Hot vector for each base in the RNA sequence can also be obtained.
[0185] In this example, by performing One-Hot encoding on the k-mer subsequences, each k-mer subsequence can be transformed into a binary feature, thereby compensating for the shortcomings of classification models in processing attribute data. This allows classification models to more accurately predict the interactions between RNA and protein sequences.
[0186] After obtaining the first vector of the k-mer subsequence, each k-mer subsequence can be further represented using dense vectors. This involves embedding the first vector of each k-mer subsequence to obtain multiple corresponding k-mer embedding vectors, and then using these multiple k-mer embedding vectors to obtain the first RNA vector. In other examples, the Word2vec algorithm can be used to map each k-mer subsequence into a vector space, where each k-mer subsequence can be represented by a vector. Algorithms such as Doc2vec and Glove can also be used to convert the k-mer subsequence into embedding vectors. Alternatively, a BERT pre-trained model can be used to encode each k-mer subsequence to obtain the corresponding k-mer embedding vector; this disclosure does not impose specific limitations on these methods.
[0187] In the exemplary embodiments of this disclosure, by embedding encoding the base k-mer subsequences, discrete base k-mer subsequences can be converted into a low-dimensional continuous vector. This continuous vector can better represent each base k-mer subsequence. Moreover, the embedding encoding process is learnable; through continuous training, similar base k-mer subsequences can become closer in the vector space, achieving class distinction while encoding the base k-mer subsequences. This facilitates more accurate prediction of interactions between RNA and protein sequences. Furthermore, it also improves the efficiency of interaction prediction to some extent.
[0188] For example, the first vector can be a One-Hot vector, and the second vector can be an Embedding vector. For the RNA sequence AUCUGAAAU, it can include three 3-mer subsequences: AUC, UGA, and AAU. Each 3-mer subsequence can be One-Hot encoded to obtain a 3-mer One-Hot vector, which is respectively... and Since the 3-mer One-Hot vector is a 64-dimensional sparse vector, it can be mapped to a dense embedding vector using the first mapping matrix A1, i.e., according to:
[0189]
[0190] Obtain the 3-mer embedding vector of the i-th base in the RNA sequence. Among them, V i R This represents the one-hot vector of the 3-mer at the i-th base in the RNA sequence. The first mapping matrix W1 is an A*64 parameter matrix; for example, A can be 128 or 256, and this disclosure does not specifically limit the value of A. Based on this, the 3-mer embedding vectors corresponding to the three 3-mer subsequences can be obtained, respectively. and Furthermore, the first RNA vector can be obtained from the three-base 3-mer embedding vector, that is, according to:
[0191]
[0192] The first RNA vector, calculated, can be denoted as v. R .in, Let be the 3-mer embedding vector for the i-th base, and N represent the number of 3-mers in the RNA sequence; in this example, N = 3. The vector v is obtained using the mean operation. R When representing a complete RNA sequence, it is not necessary to consider whether the RNA and protein sequences are the same length; interaction calculations can still be performed. Understandably, this also applies to... The summation result is used as the first RNA vector, and this disclosure does not limit this.
[0193] In one example implementation, after converting the RNA sequence into N base k-mer subsequences, each base k-mer subsequence in the RNA sequence can be encoded to obtain a first vector of N base k-mer subsequences. Then, the first vector of N base k-mer subsequences can be input into a recurrent neural network to output N base k-mer vectors, and the first RNA vector can be obtained based on the N base k-mer vectors.
[0194] For example, the first vector can be a One-Hot vector. It's understandable that there are relationships between the bases in an RNA sequence. In this example, all k-mer One-Hot vectors in the RNA sequence can be viewed as a temporal sequence, and a recurrent neural network can be used to operate on each k-mer One-Hot vector. For example, to obtain the 3-mer One-Hot vectors of all bases in the RNA sequence AUCUGAAAU (…), and After that, the three 3-mer One-Hot vectors can be input into the LSTM network, which outputs the corresponding 3-mer vectors for each base, respectively. and Among them, the LSTM network is a time recurrent neural network, suitable for processing and predicting important events with relatively long intervals and delays in time series. Then, the first RNA vector can be obtained from the three-base 3-mer vector, that is, according to:
[0195]
[0196] The first RNA vector v was calculated. R .in, Let N be the 3-mer vector of the i-th base, and N represent the number of 3-mers in the RNA sequence, where N = 3 in this example. It is understandable that... The summation result can be used as the first RNA vector. Alternatively, the first or last output of the LSTM network can be used as the first RNA vector. For example, it can be... or As the first vector of RNA, this disclosure does not limit it.
[0197] In this example, when using an LSTM network to process multiple 3-mer One-Hot vectors in an RNA sequence, the dependencies between these vectors can be learned and memorized to obtain the final RNA vector sequence. The first RNA vector generated from this sequence accurately reflects the relationships between multiple 3-mers in the RNA sequence. Using this first RNA vector, the similarity of RNA-RNA pairs and the interaction between RNA-protein pairs can be determined more accurately, facilitating the generation of high-quality negative samples.
[0198] In one example implementation, after converting the RNA sequence into an N-base k-mer subsequence, reference... Figure 3 As shown, each k-mer subsequence of the RNA sequence can be encoded according to steps S310 to S340, and the first RNA vector can be obtained based on the encoding results.
[0199] Step S310. Encode each base k-mer subsequence to obtain the first vector of N base k-mer subsequences.
[0200] The first vector can be a One-Hot vector. For example, the RNA sequence AUCUGAAAU can include three 3-mer subsequences: AUC, UGA, and AAU. Each 3-mer subsequence can be One-Hot encoded to obtain three 3-mer One-Hot vectors, which are respectively... and
[0201] Step S320. Calculate the first vector of the N base k-mer subsequences using the first mapping matrix to obtain the second vector of the N base k-mer subsequences.
[0202] The second vector can be an embedding vector. Since the 3-mer One-Hot vector is a 64-dimensional sparse vector, it can be mapped to a dense embedding vector using the first mapping matrix W1, resulting in three 3-mer embedding vectors, namely... and
[0203] Step S330. Input the second vector of the N base k-mer subsequences into the recurrent neural network, and output the N base k-mer vectors.
[0204] It is understandable that there are relationships between the bases in an RNA sequence. In this example, the 3-mer embedding vectors of all bases in the RNA sequence can be viewed as a temporal sequence, and then a recurrent neural network can be used to operate on each base's 3-mer embedding vector. For example, the 3-mer embedding vectors of all bases in the RNA sequence AUCUGAAAU can be obtained (…). Know After that, the three-base 3-mer embedding vectors can be input into the LSTM network, which outputs the corresponding three-base 3-mer vectors, which are respectively and
[0205] Specifically, we can first embed the vector corresponding to "AUC". Input into an LSTM network allows for the processing of data through the LSTM network. Extract the latent features and output the latent vector at time t. Then, the hidden vector at time t can be... The Embedding vector corresponding to "UGA" at time t+1 The concatenated vectors are then fed into an LSTM network to extract their latent features, outputting the latent vector at time t+1. Similarly, the current embedding vector can be concatenated with the hidden vector passed down from the previous time step, and features can be extracted from the concatenated vector using an LSTM network. Finally, the embedding vector corresponding to "AAU" can be... Input the hidden vector at time t+1 into the LSTM network. With Embedding vector The concatenated vectors are then processed, and their latent features are extracted using an LSTM network to output the latent vector at the final time step. In other examples, a GRU network can be used to operate on the 3-mer embedding vector for each base. The GRU network has a relatively simple structure and achieves the same effect as an LSTM network. Alternatively, each 3-mer one-hot vector in the RNA sequence can be directly input into the GRU network to obtain the corresponding 3-mer vector. This disclosure does not impose specific limitations on this approach.
[0206] Step S340. Obtain the first RNA vector based on the N base k-mer vectors.
[0207] Obtain N base k-mer vectors Then, the first RNA vector v can be calculated according to equation (3). R Alternatively, in equation (3) The summation result can be used as the first RNA vector. Alternatively, the first or last output of the LSTM network can be used as the first RNA vector; for example, it can be... or As the first vector of RNA, this disclosure does not limit it.
[0208] In this example, when using an LSTM network to process multiple 3-mer One-Hot vectors in an RNA sequence, the dependencies between these vectors can be learned and memorized to obtain the final RNA vector sequence. The first RNA vector generated from this sequence accurately reflects the relationships between multiple 3-mers in the RNA sequence. Using this first RNA vector, the similarity of RNA-RNA pairs and the interaction between RNA-protein pairs can be determined more accurately, facilitating the generation of high-quality negative samples.
[0209] In step S230, the plurality of protein sequences are vectorized to obtain a plurality of protein first vectors.
[0210] Similarly, the first part of the vector model can be illustrated using a neural network as an example. For instance, the protein sequence in each RNA-protein pair can be vectorized using a second neural network to obtain a first protein vector corresponding to each protein sequence. The interactions between multiple RNA-protein pairs can be determined based on the first protein vector and the first RNA vector. Then, the entire vector model can be trained based on the interactions between RNA-protein pairs, the similarity between protein-protein pairs, and the similarity between RNA-RNA pairs. The trained vector model can then be used to generate negative RNA-protein pairs corresponding to each positive RNA-protein pair. In the exemplary embodiments of this disclosure, the second neural network can be an embedding network, a recurrent neural network, or a network structure composed of both an embedding network and a recurrent neural network. The recurrent neural network can be an LSTM network, a bidirectional recurrent neural network, a GRU network, etc., and this disclosure does not specifically limit its application. It should be noted that the first neural network can be the same as the second neural network, such as both being network structures composed of both an embedding network and a recurrent neural network. The first neural network can also be different from the second neural network, such as the first neural network being a network structure composed of both an embedding network and a recurrent neural network, while the second neural network can be a recurrent neural network; this disclosure does not limit its application.
[0211] In the exemplary embodiments of this disclosure, protein sequences can be represented by amino acid sequences. These may include 20 amino acids, which are sequentially encoded as A, G, V, I, L, F, P, Y, M, T, S, H, N, Q, W, R, K, D, E, C. For example, a protein sequence can be represented as MTAQDDSYS… Correspondingly, protein sequences can also be represented using amino acid k-mer subsequences. Specifically, all amino acid k-mer subsequences can be obtained by permuting and combining the 20 amino acids; for a given k value, 20… k A set of 20 amino acid k-mer subsequences. For example, when k is 3, there are 20 k-mer subsequences. 3 =8000 amino acid 3-mer subsequences. For example, MTA, QDD, and SYS are three different amino acid 3-mer subsequences. Therefore, the protein sequence MTAQDDSYS… can also be represented as {MTA, QDD, SYS, …}. In other examples, the corresponding amino acid 3-mer subsequences can also be obtained by reading the protein sequence in an overlapping manner. Correspondingly, the amino acid 3-mer subsequences of this protein sequence can also include MTA, TAQ, AQD, etc. Furthermore, according to the physicochemical properties of amino acids, the 20 amino acids can be divided into 7 categories: {A, G, V}, {I, L, F, P}, {Y, M, T, S}, {H, N, Q, W}, {R, K}, {D, E}, and {C}, and each category of amino acids can be re-encoded, such as sequentially encoding them as 1, 2, 3, 4, 5, 6, and 7. For example, the protein sequence MTAQDDSYS… can be converted to 331466333…. Then, the seven classes of amino acids can be arranged and combined to obtain all the amino acid k-mer subsequences. For a certain k value, seven... k The K-mer subsequence of 20 amino acids. It's understandable that dividing 20 amino acids into 7 categories is merely illustrative; they can also be classified according to their composition. Similarly, the four bases in an RNA sequence can be classified according to specific needs.
[0212] When encoding each protein sequence using a second neural network, a portion of the amino acids in the protein sequence can be encoded to obtain a first protein vector. Alternatively, all amino acids in the protein sequence can be encoded to obtain a first protein vector. Another approach is to encode all amino acids in the protein sequence and select a portion of the encoded amino acids to obtain a first protein vector. This disclosure does not specifically limit the approach in this way.
[0213] In this exemplary embodiment, the example given is encoding all amino acids of each protein sequence and obtaining a first protein vector based on the encoded amino acids. Each protein sequence can be converted into M amino acid k-mer subsequences. Taking any given protein sequence as an example, based on the value of k, k consecutive amino acids can be taken sequentially from the first amino acid to form an amino acid k-mer subsequence, until the last k amino acids are taken, resulting in all amino acid k-mer subsequences of the protein sequence. Then, each amino acid k-mer subsequence can be vectorized using a second neural network to obtain M amino acid k-mer vectors, and the first protein vector can be obtained based on these M amino acid k-mer vectors. For example, the protein sequence can be divided into M non-overlapping amino acid k-mer subsequences. For instance, the protein sequence MTAQDDSYS can be divided into three amino acid k-mer subsequences: MTA, QDD, and SYS. In other examples, overlapping protein sequences can be divided into Q amino acid k-mer subsequences. Each amino acid k-mer subsequence can be vectorized using a second neural network to obtain Q amino acid k-mer vectors, and the first protein vector can be obtained from these Q amino acid k-mer vectors. Alternatively, the protein sequence can be vectorized directly using a second neural network without converting it into amino acid k-mer subsequences, resulting in multiple amino acid vectors, from which the first protein vector can be obtained. This disclosure does not impose specific limitations on this approach.
[0214] In one example implementation, after converting the protein sequence into M amino acid k-mer subsequences, each amino acid k-mer subsequence in the protein sequence can be encoded to obtain a first vector of M amino acid k-mer subsequences. A second mapping matrix can be used to perform operations (e.g., multiplication) on the first vector of M amino acid k-mer subsequences to obtain a second vector of M amino acid k-mer subsequences, and the first vector of the protein can be obtained based on the second vector of M amino acid k-mer subsequences.
[0215] For example, each amino acid k-mer subsequence can be one-hot encoded. For instance, when k=3, there can be 8000 amino acid 3-mer subsequences, and each amino acid 3-mer subsequence can be one-hot encoded to obtain the first vector of amino acid k-mer subsequences.
[0216] For example, for the j-th amino acid 3-mer subsequence, i.e., the amino acid 3-mer subsequence with an integer index j, an 8000-dimensional One-Hot vector can be obtained through encoding. The j-th element of this vector is set to 1, and all other elements are set to 0, in the form [1, 0, 0, ..., 0]. Similarly, each amino acid 3-mer subsequence can correspond to an amino acid 3-mer One-Hot vector. For another example, when k = 1, each amino acid is a 1-mer subsequence, meaning that each amino acid in the protein sequence can be encoded to obtain a corresponding representation vector. For instance, if the protein sequence contains S amino acids, for the j-th amino acid, i.e., the amino acid with an integer index j, an S-dimensional One-Hot vector can be obtained through encoding. The j-th element of this vector is set to 1, and all other elements are set to 0, thus obtaining the One-Hot vector for the j-th amino acid. In other examples, each amino acid in the protein sequence can also be encoded into a 20-dimensional One-Hot vector according to the amino acid type, thus obtaining the One-Hot vector for each amino acid in the protein sequence. Alternatively, the 20 amino acids can be classified, with each amino acid in the protein sequence encoded as a One-Hot vector with a vector dimension matching the number of classification categories. For example, when the 20 amino acids are divided into 7 categories, each amino acid in the protein sequence can be encoded as a 7-dimensional One-Hot vector, and this disclosure does not limit this approach.
[0217] In this example, by performing One-Hot encoding on the amino acid k-mer subsequences, each amino acid k-mer subsequence can be transformed into a binary feature, thereby compensating for the deficiencies of classification models in processing attribute data, so that classification models can be used to more accurately predict the interaction between RNA sequences and protein sequences.
[0218] After obtaining the first vector of the amino acid k-mer subsequence, dense vectors can be used to represent each amino acid k-mer subsequence. This involves sequentially embedding the first vector of each amino acid k-mer subsequence to obtain multiple corresponding amino acid k-mer embedding vectors, and then using these multiple embedding vectors to obtain the protein's first vector. In other examples, the Word2vec algorithm can be used to map each amino acid k-mer subsequence into a vector space, where each subsequence can be represented by a vector. Algorithms such as Doc2vec and GloVe can also be used to convert the amino acid k-mer subsequence into embedding vectors. Alternatively, a BERT pre-trained model can be used to encode each amino acid k-mer subsequence to obtain the corresponding embedding vector. This disclosure does not specifically limit the specific methods used in this regard.
[0219] In the exemplary embodiments of this disclosure, by embedding encoding the amino acid k-mer subsequences, discrete amino acid k-mer subsequences can be converted into a low-dimensional continuous vector. This continuous vector can better represent each amino acid k-mer subsequence. Moreover, the embedding encoding process is learnable; through continuous training, similar amino acid k-mer subsequences can become closer in the vector space, achieving class distinction while encoding the amino acid k-mer subsequences. This facilitates more accurate prediction of interactions between RNA and protein sequences. Furthermore, it also improves the efficiency of interaction prediction to some extent.
[0220] For example, the first vector can be a One-Hot vector, and the second vector can be an Embedding vector. For the protein sequence MTAQDDSYS, it can include three amino acid 3-mer subsequences: MTA, QDD, and SYS. Each amino acid 3-mer subsequence can be One-Hot encoded to obtain an amino acid 3-mer One-Hot vector, which is respectively... and Since the amino acid 3-mer One-Hot vector is an 8000-dimensional sparse vector, it can be mapped to a dense embedding vector using the second mapping matrix W2, i.e., according to:
[0221]
[0222] Obtain the 3-mer Embedding vector of the j-th amino acid in the protein sequence. in, The vector represents the one-hot 3-mer of the j-th amino acid in the protein sequence. The second mapping matrix W2 is a B*8000 parameter matrix; for example, B can be 256 or 128, and this disclosure does not specifically limit the value of B. Based on this, the 3-mer embedding vectors corresponding to the three amino acid 3-mer subsequences can be obtained, respectively. and Furthermore, the first vector of the protein can be obtained from the three amino acid 3-mer Embedding vectors, that is, according to:
[0223]
[0224] The first vector of the protein, calculated, can be denoted as v. P .in, Let be the 3-mer embedding vector for the j-th amino acid, and M represent the number of amino acid 3-mers in the protein sequence; in this example, M = 3. The vector v is obtained using the mean operation. P When representing complete protein sequences, it is not necessary to consider whether the RNA and protein sequences are the same length; interaction calculations can still be performed. Understandably, this also applies to... The summation result is used as the first vector of the protein, and this disclosure does not limit this.
[0225] In one example implementation, after converting the protein sequence into M amino acid k-mer subsequences, each amino acid k-mer subsequence in the protein sequence can be encoded to obtain a first vector of M amino acid k-mer subsequences. Then, the first vector of M amino acid k-mer subsequences can be input into a recurrent neural network to output M amino acid k-mer vectors, and the first protein vector can be obtained based on the M amino acid k-mer vectors.
[0226] For example, the first vector can be a One-Hot vector. It's understandable that there are relationships between the amino acids in a protein sequence. In this example, all the 3-mer One-Hot vectors of amino acids in the protein sequence can be viewed as a temporal sequence, and then a recurrent neural network can be used to operate on each amino acid's 3-mer One-Hot vector. For example, to obtain all the 3-mer One-Hot vectors of amino acids in the protein sequence MTAQDDSYS (… Know After that, the three amino acid 3-mer One-Hot vectors can be input into the LSTM network, and the corresponding 3-mer vectors of each amino acid will be output as follows: and Then, the first vector of the protein can be obtained from the three amino acid 3-mer vectors, that is, from:
[0227]
[0228] The first vector v of the protein is calculated. P .in, Let M be the 3-mer vector of the j-th amino acid, and M represent the number of amino acid 3-mers in the protein sequence. In this example, M = 3. It is understandable that... The summation result can be used as the first protein vector. Alternatively, the first or last output of the LSTM network can be used as the first protein vector. or As the first vector of proteins, this disclosure does not specifically limit it.
[0229] In this implementation, when using an LSTM network to process multiple amino acid 3-mer One-Hot vectors in a protein sequence, the dependencies between these vectors can be learned and memorized to obtain the final protein vector sequence. The first protein vector generated from this sequence accurately reflects the relationships between multiple amino acid 3-mers in the protein sequence. Using this first protein vector allows for more accurate determination of protein-protein pair similarities and RNA-protein pair interactions, facilitating the generation of high-quality negative samples.
[0230] In one example implementation, after converting the protein sequence into an M-amino acid k-mer subsequence, refer to Figure 4 As shown, each amino acid k-mer subsequence in the protein sequence can be encoded according to steps S410 to S440, and the first protein vector can be obtained based on the encoding results.
[0231] Step S410. Encode each amino acid k-mer subsequence to obtain the first vector of M amino acid k-mer subsequences.
[0232] The first vector can be a One-Hot vector. For example, the protein sequence MTAQDDSYS can include three amino acid 3-mer subsequences: MTA, QDD, and SYS. Each amino acid 3-mer subsequence can be One-Hot encoded to obtain three amino acid 3-mer One-Hot vectors, which are respectively... and
[0233] Step S420. Calculate the first vector of the M amino acid k-mer subsequences using the second mapping matrix to obtain the second vector of the M amino acid k-mer subsequences.
[0234] The second vector can be an embedding vector. Since the amino acid 3-mer One-Hot vector is an 8000-dimensional sparse vector, it can be mapped to a dense embedding vector using the second mapping matrix W2, resulting in three amino acid 3-mer embedding vectors, respectively. and
[0235] Step S430. Input the second vector of the M amino acid k-mer subsequences into the recurrent neural network and output the M amino acid k-mer vectors.
[0236] It is understandable that there are relationships between the amino acids in a protein sequence. In this example, the 3-mer embedding vectors of all amino acids in the protein sequence can be regarded as a temporal sequence, and then a recurrent neural network can be used to operate on the 3-mer embedding vector of each amino acid. For example, the 3-mer embedding vectors of all amino acids in the protein sequence MTAQDDSYS can be obtained ( and After that, the three amino acid 3-mer embedding vectors can be input into the LSTM network, which outputs the corresponding three amino acid 3-mer vectors, respectively. and
[0237] Specifically, you can first embed the vector corresponding to "MTA". Input into an LSTM network allows for the processing of data through the LSTM network. Extract the latent features and output the latent vector at time t. Then, the hidden vector at time t can be... The Embedding vector corresponding to "QDD" at time t+1 The concatenated vectors are then fed into an LSTM network, where their latent features are extracted, and the latent vector at time t+1 is output. Finally, the embedding vector corresponding to "SYS" can be... Input the hidden vector at time t+1 into the LSTM network. With Embedding vector The concatenated vectors are then processed, and their latent features are extracted using an LSTM network to output the latent vector at the final time step. In other examples, the GRU network can also be used to calculate the 3-mer embedding vector for each amino acid. Alternatively, the 3-mer one-hot vector of each amino acid in the protein sequence can be directly input into the GRU network to obtain the corresponding amino acid 3-mer vector; this disclosure does not impose specific limitations on this method.
[0238] Step S440. Obtain the first vector of the protein based on the M amino acid k-mer vectors.
[0239] Obtain the k-mer vector of M amino acids Then, the first RNA vector v can be calculated according to equation (6). P Alternatively, in equation (6) The summation result can be used as the first protein vector. Alternatively, the first or last output of the LSTM network can be used as the first protein vector. or As the first vector of proteins, this disclosure does not specifically limit it.
[0240] In this example, when using an LSTM network to process multiple amino acid 3-mer One-Hot vectors in a protein sequence, the dependencies between these vectors can be learned and memorized to obtain the final protein vector sequence. The first protein vector generated from this sequence accurately reflects the relationships between multiple amino acid 3-mers. Using this first protein vector, the similarity between protein-protein pairs and the interaction between RNA-protein pairs can be determined more accurately, facilitating the generation of high-quality negative samples. Furthermore, it is understandable that the LSTM network outputs base 3-mer vectors to facilitate the calculation of RNA-protein interactions. and amino acid 3-mer vector The dimensions can be consistent, such as all being 64 dimensions or all being 128 dimensions. This disclosure does not make any specific limitation on this.
[0241] After obtaining the first RNA and protein vectors through the vector model, supervised learning of the entire vector model can be performed using three types of information: RNA-RNA similarity, protein-protein similarity, and RNA-protein interactions. This ensures that the RNA and protein vectors output by the vector model accurately reflect RNA-protein interactions, RNA-RNA similarities, and protein-protein similarities. Subsequently, when generating negative samples using the vector model trained based on multi-task learning, it can be ensured that the negative samples are similar to known positive samples, thus improving the quality of the negative samples.
[0242] In step S240, the interaction between the RNA sequence and the protein sequence is determined based on the first RNA vector and the first protein vector.
[0243] In the exemplary embodiments of this disclosure, after obtaining the first RNA vector and the first protein vector, the interaction between the RNA sequence and the protein sequence can be determined using the second part of the vector model. When calculating the interaction between the RNA sequence and the protein sequence, the result may indicate that there is an interaction between them, or it may indicate that there is no interaction, i.e., binary classification prediction is performed. For example, the first RNA vector and the first protein vector can be input into a logistic regression model to classify the interaction between the RNA sequence and the protein sequence based on these vectors. For instance, the sigmoid activation function or the softmax activation function can be used to output the class probability, i.e., outputting the probability that there is an interaction between the RNA sequence and the protein sequence and / or the probability that there is no interaction.
[0244] In one example implementation, it can be based on the following formula:
[0245]
[0246]
[0247] The probability values p(1|(v)) of the interaction between the RNA sequence and the protein sequence were calculated separately. R v P The probability value p(0|(v)) that there is no interaction between RNA and protein sequences. R v P )); where θ is the model parameter, v R The first RNA vector, v P The first vector of the protein. <v R v P > indicates vR and v P Perform the dot product operation, θ· <v R v P The calculated result represents the relationship score between the RNA sequence and the protein sequence. In other examples, models such as SVM and decision trees can also be used to obtain the probability value of the interaction between the RNA sequence and the protein sequence, and this disclosure does not limit this.
[0248] In step S250, the distance between any two RNA sequences is calculated to obtain the similarity of multiple RNA-RNA pairs.
[0249] In the exemplary embodiments of this disclosure, when obtaining RNA-RNA similarity information, the similarity of multiple RNA-RNA pairs can be obtained by calculating the sequence distance between any two RNA sequences in the dataset obtained in step S210, and the similarity between the two RNA sequences can be determined based on the similarity. For example, the edit distance between any two RNA sequences can be calculated, and the sequence distance between any two RNA sequences can be obtained based on the edit distance. Finally, the similarity of multiple RNA-RNA pairs can be obtained based on the sequence distance between any two RNA sequences.
[0250] Specifically, for two RNA sequences r i and r j It can be based on:
[0251]
[0252] Calculate r i and r j Sequence distance d(r) between i r j ); where lev(r) i r j ) represents r i and r j Edit distance, max(len(r) i ), len(r j )) means taking len(r) i ) and len(r j The maximum value in ) lev(r) i r j ) and max(len(r i ), len(r j The ratio of )) yields the normalized edit distance, which can more intuitively represent r. i and r j The sequence distance between them, len(r) i ) represents r i The length, ri It can contain a bases, len(r) j ) represents r j The length, r j It can contain b bases.
[0253] According to:
[0254]
[0255] Calculate r i The a bases in the r j The edit distance between b bases in the text, i.e., r i and r j Sequence distance lev(r) i r j In equation (10), This means deleting r i The bases in r make r i Change to r j The minimum number of operations required. This means by sending to r i Insertion of a base into r i Change to r j The minimum number of operations required. This means replacing r i The bases in r make r i Change to r j The minimum number of operations required, of which, It is an indicator function, when hour, otherwise It's understandable that the minimum calculated result among these three is the minimum edit distance. When min(a, b) = 0, that is, when r... i and r j When one RNA sequence has a length of 0, taking max(a, b) allows us to use the number of bases in the other RNA sequence (which has a non-zero length) as the two RNA sequences r. i and r j Edit distance between them.
[0256] It should be noted that a larger edit distance between two RNA sequences indicates that the two RNA sequences are less similar. Correspondingly, the sequence distance d(r) i r j The larger the value, the less similar the two RNA sequences are. Therefore, the similarity between two RNA sequences can be measured by equation (11), which can be based on:
[0257] simR(r i rj )=1-d(r i r j (11)
[0258] The similarity simR(r) of multiple RNA-RNA pairs was obtained. i r j ); where d(r i r j ) represents r i and r j The sequence distance between them. Alternatively, it can be based on:
[0259]
[0260] The similarity simR(r) of multiple RNA-RNA pairs was obtained. i r j In other examples, a Vector Space Model (VSM) can be used to calculate the distance between any two RNA sequences, obtaining the similarity of multiple RNA-RNA pairs. The Vector Space Model simplifies text processing into vector operations in a vector space, expressing semantic similarity through spatial similarity. For example, a text can be viewed as a series of words, each corresponding to a weight, and the weights of all words can be combined into a vector. Similarly, after obtaining the vectors corresponding to all texts, a text space can be formed from all vectors. Then, the similarity between texts can be measured by calculating the similarity between vectors. For example, each RNA sequence can be converted into an RNA vector, and the distance between any two RNA vectors can be calculated to obtain the similarity of multiple RNA-RNA pairs. For example, the cosine distance, Euclidean distance, Mahalanobis distance, etc., can be calculated between any two RNA vectors; this disclosure does not specifically limit this. The closer the distance between two RNA vectors, the more similar the two RNA vectors are.
[0261] In step S260, the distance between any two protein sequences is calculated to obtain the similarity of multiple protein-protein pairs.
[0262] For proteins, the diversity of amino acid side chain R groups endows proteins with a rich variety of structures and functions. The physicochemical properties of proteins are also determined by the properties of amino acid side chain R groups. If amino acids are classified according to the properties of side chain R groups, it is easier to analyze the physicochemical properties of proteins, thereby more accurately determining whether two protein sequences are similar.
[0263] In the exemplary embodiments of this disclosure, when obtaining protein-protein similarity information, a vector space model can be used to calculate the distance between any two protein sequences to obtain the similarity of multiple protein-protein pairs. Specifically, multiple protein sequences can be mapped into a vector space to obtain multiple protein vectors, that is, multiple protein sequences are transformed into vectors of the same dimension to represent each protein sequence in a vector space of the same dimension. After obtaining multiple protein vectors, the similarity of multiple protein-protein pairs can be obtained by calculating the distance between any two protein vectors. Similarly, the cosine distance, Euclidean distance, Mahalanobis distance, etc., of any two protein vectors can be calculated, and this disclosure does not specifically limit the calculation. The closer the distance between two protein vectors, the more similar the two protein vectors are.
[0264] For example, when converting a protein sequence into a vector, the 20 amino acids can first be classified into nonpolar and polar amino acids based on the polarity (chemical structure) of the R groups in the side chains. Polar amino acids can then be further divided into polar neutral amino acids, acidic amino acids, and basic amino acids. For any two protein sequences p... i and p j The amino acids in each protein sequence can be categorized into four classes: nonpolar amino acids, polar neutral amino acids, acidic amino acids, and basic amino acids. For ease of representation, nonpolar amino acids, polar neutral amino acids, acidic amino acids, and basic amino acids can be denoted as a, b, c, and d, respectively. For example, in the protein sequence MTAQDDSY..., M is methionine, which is a polar neutral amino acid, T is threonine, which is also a polar neutral amino acid, and so on, the protein sequence can also be represented as bbabccbb...
[0265] In one example, the protein sequence can also be represented using the amino acid k-mer subsequence. Similarly, the specific value of k can be adjusted according to the actual situation and is not limited here. Since there are four types of amino acids classified according to the polarity of the R group in the side chain, this example uses k=4. Correspondingly, there are a total of 4... 4 = 256 amino acid 4-mer subsequences. Therefore, this protein sequence can be represented as a 256-dimensional vector, with each dimension corresponding to an amino acid 4-mer subsequence. The value of each dimension represents the number of times the corresponding amino acid 4-mer subsequence appears in the protein sequence, i.e., the weight of the corresponding amino acid 4-mer subsequence. For example, the protein sequence bbabccbb… can be represented as a vector [3, 1, …], where 3 indicates that the amino acid 4-mer subsequence bbab appears 3 times in the protein sequence.
[0266] Correspondingly, protein-protein similarity can be calculated in a 256-dimensional vector space. For example, cosine similarity in the vector space can be calculated, i.e., based on:
[0267]
[0268] p was calculated i and p j The similarity; where v i p i In vector space, v j p j Vector representation in vector space <v i v j > represents vector v i sum vector v j Perform dot product operation. Represents vector v i The length of the mold, Represents vector v j The modulus length, simP(p) i p j ) represents vector v i sum vector v j The cosine of the angle between the vectors is the closest to 1, indicating that the angle is closer to 0 degrees. i sum vector v j The higher the similarity.
[0269] In this example, all amino acids in a protein sequence are classified according to the polarity of their side chain R groups. The classified amino acids are then used to represent the protein sequence, which is mapped to a vector space to obtain its vector representation. Based on this, it is possible to more accurately determine whether two proteins have similar physicochemical properties. When two proteins have similar physicochemical properties, their sequences can be considered similar. This means that the protein vectors learned by the vector model can more accurately reflect the similarity between protein sequences, thus facilitating the generation of higher-quality negative samples.
[0270] In other examples, the similarity of multiple protein-protein pairs can also be obtained by calculating the sequence distance between any two protein sequences. For example, the edit distance between any two protein sequences can be calculated, and the sequence distance between the two protein sequences can be obtained based on the edit distance. Finally, the similarity of multiple protein-protein pairs can be obtained based on the sequence distance between any two protein sequences. This calculation process is similar to step S250 and will not be repeated here.
[0271] In step S270, the vector model is trained based on the interaction between the RNA sequence and the protein sequence, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs.
[0272] In this exemplary embodiment of the present disclosure, in order to generate high-quality negative samples, the RNA and protein vectors learned by the vector model need to accurately reflect the interactions between RNA and protein sequences, RNA-RNA similarities, and protein-protein similarities. Therefore, after obtaining the first RNA and first protein vectors using the first part of the vector model, RNA-RNA similarity, protein-protein similarity, and RNA-protein interactions using the second part of the vector model can be obtained, and these three pieces of information are used to train the entire vector model. For example, an objective function can be constructed based on the interactions between RNA and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs. Based on this objective function, the model parameters of the vector model can be iteratively updated using a stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the vector model is completed. For example, the dataset consisting of RNA-protein pairs obtained in step S210 can be used as the training dataset. Each time, only one RNA-protein pair in the training dataset is randomly selected to update the gradient of the objective function, and then the model parameters of the vector model are updated in the opposite direction of the gradient.
[0273] It should be noted that the objective function constructed in this disclosure can contain three terms. The first and second terms can be used to reflect the similarity between RNA and RNA and the similarity between proteins, respectively. The third term can be used to reflect the interaction between RNA and proteins. By calculating the loss value of each term in the objective function, and combining the loss value of each term to estimate the degree of inconsistency between the output of the vector model and the label value, the objective function can be minimized.
[0274] For example, for the first term of the objective function, the similarity of the RNA-RNA pairs calculated in step S250 can be used as the label value. After obtaining multiple RNA first vectors through the vector model, the similarity between any two RNA first vectors can be calculated, and the loss value of the first term can be calculated based on this similarity and the corresponding label value. That is, it can be calculated according to:
[0275]
[0276] in, This represents the first vector of the i-th RNA. Let r represent the first vector of the j-th RNA. i Let r represent the i-th RNA sequence. jThis represents the j-th RNA sequence. simR(r) represents the similarity of the first vectors of two RNAs. i r j The similarity (label value) between two RNA sequences represents the similarity between them. When calculating L1, the closer the similarity of the first vectors of two RNA sequences is to the similarity of their corresponding sequences, the smaller the calculated loss value. This indicates that when two RNA sequences are similar, the generated RNA vectors are also similar, or when two RNA sequences are dissimilar, the generated RNA vectors are also dissimilar. Conversely, the larger the similarity of the first vectors of two RNA sequences is compared to the similarity of their corresponding sequences, the larger the calculated loss value. For example, if two RNA sequences are similar but the generated RNA vectors are dissimilar, the calculated loss value will be relatively large. Continuously training the vector model based on L1 allows the learned RNA vectors to more accurately reflect the similarity between RNA sequences.
[0277] Similarly, for the second term of the objective function, the protein-protein pair similarity calculated in step S260 can be used as the label value. After obtaining multiple protein first vectors through the vector model, the similarity between any two protein first vectors can be calculated, and the loss value of the second term can be calculated based on this similarity and the corresponding label value. That is, it can be calculated according to:
[0278]
[0279] in, Let i represent the first vector of the i-th protein. Let p represent the first vector of the j-th protein. i Let p represent the i-th protein sequence. j This represents the j-th protein sequence. simP(p) represents the similarity of the first vectors of two proteins. i p j The similarity (label value) between two protein sequences represents the similarity between them. When calculating L2, the closer the similarity of the first vectors of two proteins is to the similarity of their corresponding protein sequences, the smaller the calculated loss value. This indicates that when two protein sequences are similar, the generated protein vectors are also similar, or when two protein sequences are dissimilar, the generated protein vectors are also dissimilar. Conversely, the larger the similarity of the first vectors of two proteins is compared to the similarity of their corresponding protein sequences, the larger the calculated loss value. Continuously training the vector model based on L2 allows the learned protein vectors to more accurately reflect the similarity between protein sequences.
[0280] For the third term of the objective function, the loss value of the first term can be calculated based on the probability value of the interaction between the RNA sequence and the protein sequence and the tag value. For example, the cross-entropy loss function can be chosen as the third term of the objective function. Specifically, the cross-entropy loss function can be:
[0281]
[0282] in, This represents the first vector of the i-th RNA. Let y represent the first vector of the i-th protein. i This represents the label value of the i-th RNA-protein pair in the training dataset. This represents the probability that the i-th RNA-protein pair in the training dataset interacts. This represents the probability that the i-th RNA-protein pair in the training dataset does not interact, where K is the number of RNA and protein sequences.
[0283] In this example implementation, the training dataset consists entirely of positive RNA-protein pairs, i.e., label values y. i =1. Therefore, equation (16) can be transformed into:
[0284]
[0285] When calculating L3, The closer the value is to 1, the smaller the calculated loss value. The closer the value is to 0, the greater the calculated loss value. Continuously training the vector model based on L3 allows the learned RNA and protein vectors to more accurately reflect the interactions between RNA and protein sequences.
[0286] In this exemplary embodiment of the disclosure, in order for the RNA vectors and protein vectors learned by the vector model to simultaneously reflect the interaction relationships between RNA sequences and protein sequences, the similarity between RNA sequences, and the similarity between protein sequences, the constructed objective function can be:
[0287] L=-αL3-βL1-γL2 (18)
[0288] Right now:
[0289]
[0290] Where, r i Let r represent the i-th RNA sequence. j p represents the j-th RNA sequence. i Let p represent the i-th protein sequence. jThis represents the j-th protein sequence. This represents the first vector of the i-th RNA. Let represent the first vector of the i-th protein, and K be the number of RNA and protein sequences. α, β, and γ are model hyperparameters, where 0 < α, β, and γ < 1, and α + β + γ = 1, such as α = 0.6, β = 0.2, and γ = 0.2.
[0291] The model parameters of a vector model can be continuously trained based on an objective function L. These model parameters can be network parameters (e.g., weights and biases) of the first part of the vector model, parameter matrices (e.g., mapping matrices W1, W2), or model parameters (e.g., θ) of the second part. For example, stochastic gradient descent can be used to update the model parameters. Based on backpropagation, the objective function L is continuously calculated, and all model parameters of the vector model are updated simultaneously based on the calculated loss value. Training of all model parameters is complete when the objective function L converges to its minimum value. The RNA and protein vectors learned from the trained vector model can more accurately reflect the interactions between RNA and protein sequences, the similarity between RNA sequences, and the similarity between protein sequences. In other examples, model parameters can be updated iteratively in reverse order, completing training of all model parameters when a preset number of iterations is met. After iteration, optimized model parameters are obtained. Alternating methods such as least squares and Adam optimization can also be used to minimize the objective function, updating parameters sequentially from back to front to optimize the model parameters; this disclosure does not limit this approach.
[0292] In one example implementation, when the first part of the vector model consists of an embedding network and a recurrent neural network, the parameters of the vector model can be trained simultaneously. For example, with L as the objective function, the model parameters θ of the second part of the vector model can be adjusted first. Then, the network parameters in the recurrent neural network, such as weight parameters and bias parameters, can be adjusted, and further backpropagation is performed to the embedding network to adjust the mapping matrices W1 and W2. Through multiple backpropagation layers, the parameters of each model can eventually converge, or training can terminate after a certain number of iterations. This training method allows for the simultaneous training of both parts of the vector model, ensuring higher accuracy and precision for each model while improving training efficiency. After training, the output of the final vector model can be used to generate RNA and protein vectors for negative samples.
[0293] In one specific example implementation, reference is made to Figure 5As shown, the vector model can be trained according to steps S510 to S530. The first part of the vector model is an LSTM model. After obtaining a dataset containing multiple RNA and protein sequences:
[0294] Step S510. Input the RNA sequences in the dataset into the LSTM model to obtain the vector representation of the RNA sequences. At the same time, input the protein sequences in the dataset into the LSTM model to obtain the vector representation of the protein sequences.
[0295] Step S520. Determine the similarity of RNA-RNA pairs, the similarity of protein-protein pairs, and the interactions between RNA and proteins. Specifically, the sequence distance between any two RNA sequences in the acquired dataset can be calculated to obtain the similarity of multiple RNA-RNA pairs. The sequence distance between any two protein sequences in the acquired dataset can be calculated to obtain the similarity of multiple protein-protein pairs. The probability of interaction between RNA and protein sequences and / or the probability of no interaction between RNA and protein sequences can be calculated based on the vector representations of RNA and protein sequences, thereby determining the interactions between RNA and proteins.
[0296] Step S530. Train the vector model. An objective function can be constructed based on the interactions between RNA and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs. Based on this objective function, the model parameters of the vector model can be iteratively updated using the stochastic gradient descent algorithm. Training of the vector model is complete when the iteration termination condition is met.
[0297] This disclosure also provides a negative sample generation method, which can be applied to the server 105 described above, or to one or more of the terminal devices 101, 102, and 103 described above. This exemplary embodiment does not impose any special limitations on this method. (See reference...) Figure 6 As shown, the negative sample generation method may include the following steps S610 to S630:
[0298] Step S610. Obtain positive RNA-protein pairs;
[0299] Step S620. Vectorize the target RNA sequence and target protein sequence in the positive RNA-protein pair using the trained vector model to obtain the corresponding second RNA vector and second protein vector;
[0300] Step S630. Based on the second RNA vector and the second protein vector, obtain the target negative RNA-protein pair corresponding to the positive RNA-protein pair. The target negative RNA-protein pair is used to train the RNA-protein interaction prediction model.
[0301] In the negative sample generation method provided in the exemplary embodiments of this disclosure, positive RNA-protein pairs are obtained; the target RNA sequence and target protein sequence in the positive RNA-protein pairs are vectorized using a trained vector model to obtain corresponding second RNA vectors and second protein vectors; and target negative RNA-protein pairs corresponding to the positive RNA-protein pairs are obtained based on the second RNA vectors and second protein vectors. These target negative RNA-protein pairs are used to train an RNA-protein interaction prediction model. On the one hand, using a vector model trained based on multi-task learning to generate negative samples ensures that the negative samples are similar to known positive samples, improving the quality of the negative samples. On the other hand, using high-quality negative samples to train the RNA-protein interaction prediction model enables the model to learn more useful classification information, thereby improving the accuracy of RNA-protein interaction prediction.
[0302] The steps described above in the exemplary embodiments of this disclosure will now be explained in more detail.
[0303] In step S610, a positive RNA-protein pair is obtained.
[0304] In the exemplary embodiments of this disclosure, negative samples, i.e., negative RNA-protein pairs, can be used to train an RNA-protein interaction prediction model. During training, the prediction model can improve its performance by continuously learning classification information, thereby increasing the accuracy of RNA-protein interaction predictions. To enable the prediction model to learn more useful classification information, it is necessary to train the model using high-quality positive and negative samples. This disclosure mainly describes the generation of high-quality negative samples. When generating negative samples, a set of positive samples {(RNA... i pro i The set of positive samples contains K positive RNA-protein pairs. It can also obtain any number of positive RNA-protein pairs and generate negative RNA-protein pairs that are similar to each positive RNA-protein pair based on each positive RNA-protein pair.
[0305] In step S620, the target RNA sequence and target protein sequence in the positive RNA-protein pair are vectorized using the trained vector model to obtain the corresponding second RNA vector and second protein vector.
[0306] The RNA and protein vectors learned through the vector models trained in some embodiments of this application can more accurately reflect the interaction relationships between RNA and protein sequences, the similarity between RNA sequences, and the similarity between protein sequences. For example, the first part of the trained vector model, such as a neural network, can be used to map the RNA and protein sequences in each positive RNA-protein pair into vectors, obtaining the corresponding second RNA vector and second protein vector. For example, for the i-th positive RNA-protein pair (RNA... i pro i ), through a trained first neural network, the RNA sequence RNA i Vectorization yields the second RNA vector dr. i The protein sequence pro is processed through a trained second neural network. i Vectorization yields the protein's second vector dp. i The first and second neural networks can be the same or different. Understandably, to facilitate subsequent calculations of the interactions between RNA and protein sequences, arbitrary RNA and protein sequences can be vectorized using the first part of the trained vector model to obtain the corresponding second RNA and second protein vectors.
[0307] In step S630, a target negative RNA-protein pair corresponding to the positive RNA-protein pair is obtained based on the second RNA vector and the second protein vector. The target negative RNA-protein pair is used to train the RNA-protein interaction prediction model.
[0308] The target negative sample needs to be similar to the positive sample and indeed be a negative sample. Taking the i-th positive RNA-protein pair (RNA...) as an example... i pro i For example, when generating the target negative RNA-protein pair corresponding to the positive RNA-protein pair, the pro protein in the i-th positive RNA-protein pair can be fixed. i When an RNA interacts with an RNA i Similar, and this RNA is similar to pro i When there is no interaction between them, the RNA and pro i The resulting RNA-protein pair can serve as a target negative sample. Similarly, the RNA in the i-th positive RNA-protein pair can be fixed. i When a protein interacts with pro i Similar to RNA, and this protein is similar to RNA. i When there is no interaction between them, the protein and RNA...i The resulting RNA-protein pair can also serve as a target negative sample.
[0309] In one example implementation, reference Figure 7 As shown, each positive RNA-protein pair can be generated according to steps S710 to S740, corresponding to the target negative sample.
[0310] Step S710. Calculate the similarity between the target RNA sequence and any RNA sequence other than the target RNA sequence.
[0311] Obtain the positive sample set {(RNA)} i pro i The i-th positive RNA-protein pair (RNA) in the sequence {i = 1, ..., K} i pro i When the corresponding negative sample is RNA, the target RNA sequence is RNA. i The target protein sequence is pro i In the positive sample set, excluding RNA i Any RNA sequence other than RNA is considered RNA. j (j = 1, ..., K, j ≠ i). When pro is fixed i At that time, RNA can be calculated. i Except for RNA in the positive sample set i The similarity between any RNA sequences other than those in the wild. For example, RNA can be calculated. i RNA second vector and RNA j The similarity between the second RNA vectors can be determined based on:
[0312]
[0313] RNA was calculated i and RNA j Similarity; where dr i RNA i RNA second vector, dr j RNA j The second RNA vector, <dr j dr i > indicates dr i and dr j Perform dot product operation. Indicates dr j The length of the mold, Indicates dr i The modulus length, S(dr) j dr i ) indicates dr j and dr iThe cosine of the angle between them is the value of the angle between them. The closer the cosine value is to 1, the closer the angle is to 0 degrees, i.e., dr j and dr i The higher the similarity, the better. In addition to calculating the cosine distance between the two RNA second vectors according to equation (20), the Euclidean distance, Mahalanobis distance, etc., between the two RNA second vectors can also be calculated to obtain the similarity between the two RNA sequences. In other examples, step S250 in the vector model training method of this disclosure can also be referred to to determine the similarity between the two RNA sequences by calculating the distance between the two RNA sequences. This disclosure does not make specific limitations on this.
[0314] Step S720. Screen any RNA sequence other than the target RNA sequence according to the similarity to obtain candidate RNA sequences.
[0315] RNA was calculated i and RNA j After determining the similarity between them, RNA sequences other than the target RNA sequence in the positive sample set can be classified according to the similarity score. j The RNA sequences (j = 1, ..., K, j ≠ i) are screened to obtain multiple candidate RNA sequences. For example, the RNA sequences in the positive sample set other than the target RNA sequence can be sorted in descending order according to their similarity, and the top 20 sequences can be selected as candidate RNA sequences. Alternatively, the RNA sequences in the positive sample set other than the target RNA sequence can be sorted in ascending order according to their similarity, and the bottom 20 sequences can be selected as candidate RNA sequences. A similarity threshold can also be preset, and RNA sequences that meet the threshold can be selected as candidate RNA sequences. For example, the similarity threshold can be set to 0.2 or 0.5, and this disclosure does not specifically limit this. For example, RNA sequences with a similarity greater than the similarity threshold can be selected as candidate RNA sequences.
[0316] Step S730. Calculate the relationship score between the candidate RNA sequence and the target protein sequence based on the second RNA vector of the candidate RNA sequence and the second protein vector of the target protein sequence.
[0317] For example, the relationship score between the candidate RNA sequence and the target protein sequence can be calculated based on the model parameters of the vector model in some embodiments of this application, according to the second RNA vector of the candidate RNA sequence and the second protein vector of the target protein sequence. The model parameters are obtained by training the vector model.
[0318] After obtaining multiple candidate RNA sequences, the p-value of each candidate RNA sequence relative to the target protein sequence can be calculated sequentially. iThe interaction relationships between them. For example, it can be based on:
[0319] x j =θ· <dr j dp i > (21)
[0320] The relationship score x between the candidate RNA sequence and the target protein sequence was calculated. j Among them, dr j dp is the second RNA vector of the candidate RNA sequence. i Let x be the second protein vector of the target protein sequence. From equation (7), it can be seen that when the relation score x... j When p > 0, we have p(1|(dr) j dp i A value of 0.5 indicates that there is a greater than 50% probability that there is no interaction between the candidate RNA sequence and the target protein sequence. In other words, the RNA-protein pair composed of the candidate RNA sequence and the target protein sequence can be used as a candidate negative sample.
[0321] Step S740. Determine the target negative RNA-protein pair based on the relationship score between the candidate RNA sequence and the target protein sequence.
[0322] For example, when the relationship score between a candidate RNA sequence and a target protein sequence meets a preset condition, a first negative sample set can be obtained from one or more candidate RNA sequences that meet the preset condition. A target negative RNA-protein pair can be determined based on the first negative sample set. For instance, a first sampling probability can be determined based on the relationship score between the candidate RNA sequence and the target protein sequence, and a candidate RNA sequence that can replace the target RNA sequence can be selected from the first negative sample set according to the first sampling probability. The target negative RNA-protein pair is then formed by combining this candidate RNA sequence and the target protein sequence.
[0323] Specifically, an empty set T = {} can be given in advance. After obtaining the relationship score between all candidate RNA sequences and the i-th target protein sequence, the relationship score x can be... j >0 (RNA) j x j Add the 1 to set T. If T is an empty set, it indicates that the 1-th positive RNA-protein pair (RNA) is used to determine the protein content. i pro i Negative RNA-protein pairs cannot be generated. If T is not an empty set, the first sampling probability {p} can be determined based on the relationship score between the candidate RNA sequence and the target protein sequence. k , k=1,…,|T|}, that is, according to:
[0324]
[0325] Obtain the first sampling probability p k Where |T| represents the number of elements in set T, and the k-th element is (RNA) j x j ), x k A score representing the relationship between a candidate RNA sequence and a target protein sequence. This represents the sum of the relationship scores between all candidate RNA sequences and the target protein sequence. Then, it can be calculated according to the first sampling probability p. k L candidate RNA sequences are sampled from set T. This disclosure does not limit the specific value of L, that is, any number of candidate RNA sequences can be sampled according to actual needs, and the corresponding target negative RNA-protein pairs are formed by any number of candidate RNA sequences and target protein sequences.
[0326] For example, the obtained positive sample set may include 10 positive RNA-protein pairs. For the first positive RNA-protein pair (RNA1, pro1), when pro1 is fixed, RNA1 can be calculated separately with RNA2, RNA3... 10 The similarity between them. For example, the top four similarity sequences, RNA3, RNA5, RNA7, and RNA9, can be used as candidate RNA sequences. Then, the relationship scores between pro1 and RNA3, RNA5, RNA7, and RNA9 can be calculated sequentially, denoted as x3, x5, x7, and x9. For example, RNA5, RNA7, and RNA9 with relationship scores greater than 0 can be placed into set T. In this case, set T contains three elements: (RNA5, x5), (RNA7, x7), and (RNA9, x9). We can illustrate this by taking calculated x5, x7, and x9 as 1, 2, and 3 respectively, corresponding to the first sampling probability of RNA5. The first sampling probability corresponding to RNA7 The corresponding first sampling probability For example, when sampling one candidate RNA sequence from set T, the probability of obtaining RNA5 is... The probability of obtaining RNA7 is The probability of obtaining RNA9 is It can be seen that the higher the relationship score between the target protein and the candidate RNA sequence, the lower the probability of an interaction between them, i.e., the higher the probability of no interaction. Correspondingly, the higher the relationship score between the target protein and the candidate RNA sequence, the higher the sampling probability, indicating that candidate RNA sequences with a higher probability of no interaction with the target protein are more likely to be selected during the sampling process. This further ensures that the generated negative samples are similar to the known positive samples and are indeed negative samples. It should be noted that step S720 can also be omitted in this example implementation. That is, after calculating the similarity between the target RNA sequence and any RNA sequence in the positive sample set other than the target RNA sequence, it is not necessary to screen all RNA sequences in the positive sample set except the target RNA sequence based on the similarity score. Instead, all RNA sequences in the positive sample set except the target RNA sequence are treated as candidate RNA sequences, and the final target negative RNA-protein pair is determined based on the relationship score between each candidate RNA sequence and the target protein sequence. In this example implementation, steps S710 and S720 can also be omitted. That is, it is not necessary to calculate the similarity between the target RNA sequence and any RNA sequence in the positive sample set other than the target RNA sequence; instead, all RNA sequences in the positive sample set other than the target RNA sequence are considered as candidate RNA sequences. In step S740 of this example implementation, the similarity can also be determined by the relationship score x. j All candidate RNA sequences with a relation score greater than 0, forming RNA-protein pairs with the target protein sequence, are considered target negative samples and do not require further sampling. Alternatively, in the case of a relation score x... j Randomly sample from all candidate RNA sequences with a similarity greater than 0, and use the sampled candidate RNA sequence and the target protein sequence to form an RNA-protein pair as the target negative sample. One or more candidate RNA sequences in the first negative sample set that meet preset conditions can be used to form a target negative sample with the target protein sequence. Alternatively, steps S730 and S740 can be omitted in this example embodiment; that is, the RNA-protein pair formed by the candidate RNA sequence selected based on similarity and the target protein sequence can be used as the target negative sample. For example, candidate RNA sequences with low similarity can be selected to form the target negative sample with the target protein sequence.
[0327] In another example implementation, refer to Figure 8 As shown, each positive RNA-protein pair can be generated according to steps S810 to S840, corresponding to the target negative sample.
[0328] Step S810. Calculate the similarity between the target protein sequence and any protein sequence other than the target protein sequence.
[0329] Obtain the positive sample set {(RNA)}i pro i The i-th positive RNA-protein pair (RNA) in the sequence {i = 1, ..., K} i pro i When the corresponding negative sample is pro, the target protein sequence is i The target RNA sequence is RNA. i In the positive sample set, except for pro i Any protein sequence outside of the protein is pro j (j = 1, ..., K, j ≠ i). When fixed RNA i When, pro can be calculated i Except for pro in the positive sample set i The similarity between any protein sequences outside of the range. For example, the similarity between pro proteins can be calculated. i The second vector of protein and pro j The similarity between the second vectors of proteins can be determined based on:
[0330]
[0331] Calculate pro i and pro j The similarity; where dp i Indicates pro i The second vector of the protein, dp j Indicates pro j Between the second vector of proteins, <dp j dp i > indicates dp i and dp j Perform dot product operation. dp j The length of the mold, dp i The modulus length, S(dp) j dp i ) represents dp i and dp j The cosine of the angle between them is the value of dp. The closer the cosine is to 1, the closer the angle is to 0 degrees. i and dp j The higher the similarity, the better. In addition to calculating the cosine distance between the second vectors of two proteins according to equation (23), the Euclidean distance, Mahalanobis distance, etc., between the second vectors of two proteins can also be calculated to obtain the similarity between the two protein sequences. In other examples, step S260 in the vector model training method of this disclosure can also be referred to to determine the similarity between two protein sequences by calculating the distance between the two protein sequences. This disclosure does not make specific limitations on this.
[0332] Step S820. Screen any protein sequence other than the target protein sequence according to the similarity to obtain candidate protein sequences.
[0333] Calculate pro i and pro j After determining the similarity between the sequences, other protein sequences in the positive sample set, excluding the target protein sequence, can be further analyzed based on the similarity score. j The sequence (j = 1, ..., K, j ≠ i) is used for screening to obtain multiple candidate protein sequences. For example, protein sequences other than the target protein sequence in the positive sample set can be sorted in descending order based on similarity, and the top 20 sequences can be selected as candidate protein sequences. Alternatively, protein sequences other than the target protein sequence in the positive sample set can be sorted in ascending order based on similarity, and the bottom 20 sequences can be selected as candidate protein sequences. A similarity threshold can also be preset, and protein sequences that meet the threshold can be selected as candidate protein sequences. For example, the similarity threshold can be set to 0.2 or 0.5; this disclosure does not specifically limit this. For example, protein sequences with similarity greater than the similarity threshold can be selected as candidate protein sequences.
[0334] Step S830. Calculate the relationship score between the candidate protein sequence and the target RNA sequence based on the second protein vector of the candidate protein sequence and the second RNA vector of the target RNA sequence.
[0335] For example, the relationship score between the candidate protein sequence and the target RNA sequence can be calculated based on the model parameters of the vector model in some embodiments of this application, according to the second protein vector of the candidate protein sequence and the second RNA vector of the target RNA sequence. The model parameters are obtained by training the vector model.
[0336] After obtaining multiple candidate protein sequences, the RNA sequence of each candidate protein sequence can be compared with the target RNA sequence sequentially. i The interaction relationships between them. For example, it can be based on:
[0337] y j =θ· <dp j dr i > (24)
[0338] The relationship score y between the candidate protein sequence and the target RNA sequence was calculated. j ; where dp j dr is the second protein vector of the candidate protein sequence. iThis is the second RNA vector of the target RNA sequence. From equation (7), it can be seen that when the relational score y... j When p > 0, we have p(1|(dp) j dr i A value of 0.5 indicates that there is a greater than 50% probability that there is no interaction between the candidate protein sequence and the target RNA sequence. In other words, the RNA-protein pair composed of the candidate protein sequence and the target RNA sequence can be used as a candidate negative sample.
[0339] Step S840. Determine the target negative RNA-protein pair based on the relationship score between the candidate protein sequence and the target RNA sequence.
[0340] For example, when the relationship score between a candidate protein sequence and a target RNA sequence meets a preset condition, a second negative sample set can be obtained from one or more candidate protein sequences that meet the preset condition. A target negative RNA-protein pair can be determined based on the second negative sample set. For instance, a second sampling probability can be determined based on the relationship score between the candidate protein sequence and the target RNA sequence, and a candidate protein sequence that can replace the target protein sequence can be selected from the second negative sample set according to the second sampling probability. This candidate protein sequence and the target RNA sequence then form the target negative RNA-protein pair.
[0341] Specifically, an empty set T = {} can be given in advance. After obtaining the relationship scores between all candidate protein sequences and the target RNA sequence, the relationship scores y can be... j >0 (pro) j y j Add the 1 to set T. If T is an empty set, it indicates that the 1-th positive RNA-protein pair (RNA) is used to determine the protein content. i pro i Negative RNA-protein pairs cannot be generated. If T is not an empty set, the second sampling probability {p} can be determined based on the relationship score between the candidate protein sequence and the target RNA sequence. f f = 1, ..., |T|, which means that we can use the following formula:
[0342]
[0343] The second sampling probability p is obtained f Where |T| represents the number of elements in set T, and the f-th element is (pro j y j ), y f A score representing the relationship between a candidate protein sequence and a target RNA sequence. This represents the sum of the relationship scores between all candidate protein sequences and the target RNA sequence. Then, it can be calculated according to the second sampling probability p. f L candidate protein sequences are sampled from set T. This disclosure does not limit the specific value of L; that is, any number of candidate protein sequences can be sampled according to actual needs, and the corresponding target negative RNA-protein pairs are formed by combining any number of candidate protein sequences with the target RNA sequence. The specific sampling process is similar to selecting the target candidate RNA sequence in step S740, and will not be repeated here.
[0344] Similarly, in this example embodiment, step S820 can be omitted. That is, after calculating the similarity between the target protein sequence and any protein sequence in the positive sample set other than the target protein sequence, it is not necessary to screen all protein sequences in the positive sample set except the target protein sequence based on the similarity score. Instead, all protein sequences in the positive sample set except the target protein sequence are considered as candidate protein sequences, and the final target negative RNA-protein pair is determined based on the relationship score between each candidate protein sequence and the target RNA sequence. In this example embodiment, steps S810 and S820 can also be omitted. That is, it is not necessary to calculate the similarity between the target RNA sequence and any protein sequence in the positive sample set except the target protein sequence. Instead, all protein sequences in the positive sample set except the target protein sequence are considered as candidate RNA sequences. In step S840 of this example embodiment, the relationship score y can also be used as the basis for the comparison. j All candidate protein sequences with a correlation score greater than 0, forming RNA-protein pairs with the target RNA sequence, are considered as negative samples and do not require further sampling. Alternatively, in relation score y... j Randomly sample from all candidate protein sequences with a similarity greater than 0, and use the sampled candidate protein sequence and the target RNA sequence to form an RNA-protein pair as the target negative sample. One or more candidate protein sequences in the first negative sample set that meet preset conditions can be used to form a target negative sample with the target RNA sequence. Alternatively, steps S830 and S840 can be omitted in this example embodiment; that is, the RNA-protein pair formed by the candidate protein sequence selected based on similarity and the target RNA sequence can be used as the target negative sample. For example, candidate protein sequences with low similarity can be selected to form the target negative sample with the target RNA sequence.
[0345] In one example implementation, the vector model used to generate the second RNA vector and the second protein vector can be pre-trained. For example, a training dataset can be obtained, which may consist of multiple RNA-protein pairs, such as multiple positive RNA-protein pairs. The interaction between RNA sequences and protein sequences in the training dataset, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs can be determined using the vector model, and an objective function can be constructed based on the interaction between RNA sequences and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs. Finally, based on the constructed objective function, the model parameters of the vector model can be iteratively updated using a stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the vector model is completed. The specific training process of the vector model can be the vector model training method provided in some embodiments of this disclosure. For example, the specific training process of the vector model is similar to steps S210 to S270 in the vector model training method of this disclosure, and will not be described in detail here.
[0346] In one example implementation, the negative samples generated in steps S610 to S630 of the negative sample generation method of this disclosure can be used to train the RNA-protein interaction prediction model. After training, RNA-protein pairs to be predicted can be obtained, and the RNA-protein interaction prediction model can be used to predict the interaction of the RNA-protein pairs to be predicted. Based on the prediction results, it can be determined whether the RNA-protein pairs to be predicted interact. Simultaneously, the prediction results of the RNA-protein pair interactions to be predicted can be output to a terminal device for user viewing. For example, the prediction results can be directly displayed on the terminal device's screen, or they can be provided to the user via voice broadcast; this example does not specifically limit this approach.
[0347] In the exemplary embodiments of this disclosure, on the one hand, when generating negative samples using a vector model trained based on multi-task learning, it can be ensured that the negative samples are similar to known positive samples, thereby improving the quality of the negative samples; on the other hand, when training the RNA-protein interaction prediction model using high-quality negative samples, the RNA-protein interaction prediction model can learn more useful classification information, thereby improving the accuracy of RNA-protein interaction prediction.
[0348] This disclosure also provides a negative sample generation method, which can be applied to the server 105 described above, or to one or more of the terminal devices 101, 102, and 103 described above. This exemplary embodiment does not impose any special limitations on this method. (See reference...) Figure 9 As shown, the negative sample generation method may include the following steps S910 to S950:
[0349] In step S910, a positive sample is obtained, which consists of two biomolecule sequences.
[0350] Let's continue with the example of two biomolecules, RNA and protein. Any number of positive RNA-protein pairs can be obtained, each consisting of an RNA sequence and a protein sequence. In each RNA-protein pair, the first biomolecule sequence can be an RNA sequence, and the second biomolecule sequence can be a protein sequence. It's understood that the first biomolecule sequence can also be a protein sequence, and the second biomolecule sequence can be an RNA sequence. For example, a set of positive samples {(RNA...}} can also be obtained. i pro i ), i = 1, ..., K}, the positive sample set contains K positive RNA-protein pairs.
[0351] In step S920, the first biomolecule sequence in the positive sample is vectorized using the trained network model to obtain the biomolecule vector of the first biomolecule sequence.
[0352] In one example implementation, a trained network model can be used to vectorize the first biomolecule sequence in the positive sample. The network model can be a BERT encoder or a neural network; for example, the neural network can be an embedding network, a recurrent neural network, or a network structure composed of both an embedding network and a recurrent neural network. In other examples, the first biomolecule sequence in the positive sample can also be encoded using methods such as One-Hot encoding.
[0353] For example, when the first biomolecule sequence in a positive RNA-protein pair is an RNA sequence, the biomolecule vector corresponding to the RNA sequence obtained by the trained network model is the RNA third vector. For example, when vectorizing multiple RNA sequences, each RNA sequence can be converted into N base k-mer subsequences. Each base k-mer subsequence can then be vectorized using a trained network model to obtain the RNA third vector. For instance, each base k-mer subsequence can be encoded to obtain a first vector of N base k-mer subsequences. This first vector is then input into a pre-trained model, which outputs N base k-mer vectors. Finally, the RNA third vector is obtained from these N base k-mer vectors. The pre-trained model can be a BERT encoder. As another example, each base k-mer subsequence in the RNA sequence can be encoded to obtain a first vector of N base k-mer subsequences. The first mapping matrix can be used to operate on the first vector of N base k-mer subsequences to obtain the second vector of N base k-mer subsequences, and then the third RNA vector can be obtained from the second vector of N base k-mer subsequences. Alternatively, each base k-mer subsequence can be encoded to obtain the first vector of N base k-mer subsequences. The first mapping matrix can then be used to operate on the first vector of N base k-mer subsequences to obtain the second vector of N base k-mer subsequences. This second vector of N base k-mer subsequences can be input into a trained BERT encoder to output N base k-mer vectors. Finally, the third RNA vector can be obtained from the N base k-mer vectors.
[0354] When the first biomolecule sequence in a positive RNA-protein pair is a protein sequence, the biomolecule vector corresponding to the protein sequence obtained through a trained network model is the protein's third vector. Similarly, when vectorizing multiple protein sequences, each protein sequence can be converted into M amino acid k-mer subsequences, and each amino acid k-mer subsequence can be vectorized to obtain the protein's third vector. For example, each amino acid k-mer subsequence in the protein sequence can be encoded to obtain a first vector of M amino acid k-mer subsequences. Then, the first vector of M amino acid k-mer subsequences can be input into a pre-trained model, which outputs M amino acid k-mer vectors, and the protein's third vector can be obtained from these M amino acid k-mer vectors. The pre-trained model can be a BERT encoder. As another example, each amino acid k-mer subsequence in the protein sequence can be encoded to obtain a first vector of M amino acid k-mer subsequences. A second mapping matrix can be used to operate on the first vector of M amino acid k-mer subsequences to obtain a second vector of M amino acid k-mer subsequences, and the protein's third vector can be obtained from this second vector. For example, each amino acid k-mer subsequence can be encoded to obtain a first vector of M amino acid k-mer subsequences. The first vector of M amino acid k-mer subsequences can be processed using a second mapping matrix to obtain a second vector of M amino acid k-mer subsequences. The second vector of M amino acid k-mer subsequences can then be input into a trained BERT encoder to output M amino acid k-mer vectors. Finally, the third vector of the protein can be obtained based on the M amino acid k-mer vectors.
[0355] In step S930, the similarity between the biomolecule vector of the first biomolecule sequence and the biomolecule vector of any other biomolecule sequence of the same type is calculated.
[0356] For example, for the positive sample set {(RNA)} i pro i The i-th positive RNA-protein pair (RNA) in the sequence {i = 1, ..., K} i pro i The first biomolecule sequence is RNA. i The second biomolecule sequence is pro i In the positive sample set, excluding RNA i Any sequence of the same biomolecule outside the same species is RNA j (j = 1, ..., K, j ≠ i). RNA can be calculated. iSimilarity to any RNA sequence in the positive sample set, excluding RNAi. For example, RNA can be calculated. i RNA third vector and RNA j The similarity between the third RNA vectors can be determined based on:
[0357]
[0358] The third vector Vr of the two RNAs was calculated. i Vr j The similarity between them; where Vr i Indicates RNA sequence r i The third RNA vector, Vr j Indicates RNA sequence r j The third RNA vector. Vr j The length of the mold, Vr i The modulus length, S(Vr) j Vr i ) indicates Vr i and Vr j The cosine of the angle between them is the value of Vr. The closer the cosine is to 1, the closer the angle is to 0 degrees. i and Vr j The higher the similarity, the better. Besides calculating the cosine distance between the third vectors of two RNAs according to equation (26), the Euclidean distance, Mahalanobis distance, etc., can also be calculated to obtain the similarity between the two RNA sequences. In other examples, the similarity between two RNA sequences can also be determined by calculating the distance between them; this disclosure does not specifically limit this. Alternatively, pro can be... i As the first biomolecular sequence, RNA i As a second type of biomolecule sequence, in the positive sample set, besides pro i Any sequence of the same biomolecule outside is pro j (j = 1, ..., K, j ≠ i). Pro can be calculated. i Except for pro in the positive sample set i Similarity between any two protein sequences. For example, pro can be calculated. i The third vector of the protein and pro j The similarity between the third vectors of proteins can be determined based on:
[0359]
[0360] The third vector Vp of the two proteins was calculated. i Vp j The similarity between them; where Vpi Indicates protein sequence p i The third vector of proteins, Vp j Indicates protein sequence p j The third vector of proteins. Vp j The length of the mold, Vp i The modulus length, S(Vp) j Vp i ) indicates Vp i and Vp j The cosine of the angle between them is the value of Vp. The closer the cosine is to 1, the closer the angle is to 0 degrees. i and Vp j The higher the similarity, the better. In addition to calculating the cosine distance between the third vectors of two proteins according to equation (27), the Euclidean distance, Mahalanobis distance, etc., between the third vectors of two proteins can also be calculated to obtain the similarity between the two protein sequences. In other examples, the similarity between two protein sequences can also be determined by calculating the distance between the two protein sequences, and this disclosure does not specifically limit this.
[0361] In step S940, a target biomolecule sequence similar to the first biomolecule sequence is determined based on the similarity.
[0362] Corresponding to step S930, the RNA is calculated. i and RNA j After determining the similarity between them, the relationship with RNA can be determined based on the magnitude of the similarity. i Similar target RNA sequences. For example, positive samples, excluding RNA, can be grouped based on similarity. i Other RNA sequences, excluding RNA, are sorted in descending order, and a certain number (e.g., 20) of the last RNA sequences are selected as the target RNA sequences. Alternatively, the positive sample set can be sorted by similarity, excluding RNA sequences. i Other RNA sequences are sorted in ascending order, and a certain number (e.g., 20) of positive RNA sequences are selected as target RNA sequences. A similarity threshold can also be preset, and RNA sequences with similarity values below the threshold are selected as target RNA sequences. This disclosure does not limit the specific value of the similarity threshold. It should be noted that the selected RNA sequences... i RNA sequences with low similarity are used as target RNA sequences because they can be considered similar to RNA. i RNA sequences with low similarity and pro in positive RNA-protein pairs i The lower the probability of an interaction between them, i.e., with RNA... i RNA sequences with low similarity and pro i The resulting RNA-protein pairs constitute the target negative samples.
[0363] In other examples, RNA sequences in the positive sample set that meet preset similarity criteria can be used as candidate RNA sequences. For instance, a third negative sample set can be obtained from one or more candidate RNA sequences that meet preset criteria, and then the target negative sample can be determined based on the third negative sample set. For example, the candidate RNA sequences and RNA... i The similarity between them determines the third sampling probability, and replacement RNA is selected from the third negative sample set according to the third sampling probability. i The candidate RNA sequence, and the combination of the candidate RNA sequence and pro i Form the target negative RNA-protein pair.
[0364] Specifically, an empty set T = {} can be given in advance. All candidate RNA sequences (RNAs) can be... j s j Add the 1 to set T. If T is an empty set, it indicates that the 1-th positive RNA-protein pair (RNA) is used to determine the protein content. i pro i Negative RNA-protein pairs cannot be generated. If T is not an empty set, then candidate RNA sequences and RNA can be used to generate such pairs. i The similarity between them determines the third sampling probability {p} a , a = 1, ..., |T|}, that is, according to:
[0365]
[0366] Obtain the third sampling probability p a Where |T| represents the number of elements in set T, and the a-th element is (RNA) j s j ), s a This represents a candidate RNA sequence and RNA i Similarity between them Represents all candidate RNA sequences and RNA i The sum of similarities between them. Then, it can be calculated according to the third sampling probability p. a This disclosure allows sampling L candidate RNA sequences from set T. The specific value of L is not limited in this disclosure; that is, any number of candidate RNA sequences can be sampled according to actual needs. The sequence is then combined with the pro... i This forms the corresponding target negative RNA-protein pair. Similarly, the pro is calculated. i and pro j After determining the similarity between them, the similarity can be used to determine the relationship with pro. iSimilar target protein sequences. For example, positive samples excluding pro proteins can be grouped based on similarity. i Other protein sequences besides those listed are sorted in descending order, and a certain number (e.g., 20) of the last few protein sequences are selected as the target protein sequence. Alternatively, the positive sample set, excluding the pro protein, can be sorted based on similarity. i Other protein sequences are sorted in ascending order, and a certain number (e.g., 20) of positive protein sequences are selected as target protein sequences. Similarly, a similarity threshold can be preset, and protein sequences with a similarity value less than the threshold can be selected as target protein sequences. This disclosure does not limit the specific value of the similarity threshold.
[0367] In other examples, protein sequences in the positive sample set that meet preset similarity criteria can be used as candidate protein sequences. For instance, a fourth negative sample set can be obtained from one or more candidate protein sequences that meet preset criteria, and then the target negative sample can be determined based on the fourth negative sample set. For example, the target negative sample can be determined based on the candidate protein sequences and pro... i The similarity between samples determines the fourth sampling probability, and samples that can replace the original sample are selected from the fourth negative sample set according to the fourth sampling probability. i The candidate protein sequence, and the candidate protein sequence and RNA i Form the target negative RNA-protein pair.
[0368] Specifically, an empty set T = {} can be given in advance. All candidate protein sequences (pro... j S j Add the 1 to set T. If T is an empty set, it indicates that the 1-th positive RNA-protein pair (RNA) is used to determine the protein content. i pro i Negative RNA-protein pairs cannot be generated. If T is not an empty set, then candidate protein sequences and pro proteins can be used. i The similarity between them determines the fourth sampling probability {p} b b = 1, ..., |T|}, which means that according to:
[0369]
[0370] The fourth sampling probability p is obtained b Where |T| represents the number of elements in set T, and the b-th element is (RNA) j s j ), s b This represents a candidate protein sequence and pro i Similarity between them Represents all candidate protein sequences and pro iThe sum of similarities between them. Then, it can be calculated according to the fourth sampling probability p. b This disclosure allows sampling L candidate protein sequences from set T. The specific value of L is not limited in this disclosure; that is, any number of candidate protein sequences can be sampled according to actual needs, and then combined with RNA... i Form the corresponding target negative RNA-protein pair.
[0371] In step S950, the negative sample corresponding to the positive sample is obtained from the same target biomolecule sequence and the second biomolecule sequence in the positive sample.
[0372] When the target biomolecule sequence is the target RNA sequence, the first biomolecule sequence in the positive sample is an RNA sequence, and the second biomolecule sequence in the positive sample is a protein sequence. The target RNA sequence can be used to replace the RNA sequence in the positive sample. The RNA-protein pair composed of the target RNA sequence and the protein sequence in the positive sample can be used as the negative sample corresponding to the positive sample.
[0373] Similarly, when the target biomolecule sequence is the target protein sequence, the first biomolecule sequence in the positive sample is a protein sequence, and the second biomolecule sequence in the positive sample is an RNA sequence. The target protein sequence can be used to replace the protein sequence in the positive sample. The RNA-protein pair composed of the target protein sequence and the RNA sequence in the positive sample can also be used as the negative sample corresponding to the positive sample.
[0374] In the negative sample generation method provided in the exemplary embodiments of this disclosure, positive samples are obtained, which consist of two biomolecule sequences; the first biomolecule sequence in the positive samples is vectorized using a trained network model to obtain a biomolecule vector of the first biomolecule sequence; the similarity between the biomolecule vector of the first biomolecule sequence and the biomolecule vector of any other biomolecule sequence of the same type is calculated; a target biomolecule sequence of the same type similar to the first biomolecule sequence is determined based on the similarity; and the negative sample corresponding to the positive sample is obtained from the target biomolecule sequence of the same type and the second biomolecule sequence in the positive samples. On the one hand, the biomolecule vectors learned by the trained network model can accurately reflect the similarity between biomolecule sequences of the same type. When generating negative samples based on biomolecule vectors, it can ensure that the negative samples are similar to known positive samples, thus improving the quality of the negative samples. On the other hand, when using high-quality negative samples to train the RNA-protein interaction prediction model, the RNA-protein interaction prediction model can learn more useful classification information, thereby improving the accuracy of RNA-protein interaction prediction.
[0375] In one example implementation, reference Figure 10 As shown, the network model can be trained according to steps S1010 to S1040.
[0376] Step S1010. Obtain multiple sequences of the same biomolecule.
[0377] Taking RNA and proteins as examples, RNA and proteins belong to different types of biomolecules. Therefore, the same biomolecule can be either RNA or protein. Correspondingly, multiple RNA sequences can be obtained and used to train the network model, allowing the model to continuously learn RNA-RNA similarity information during training. Similarly, multiple protein sequences can be obtained and used to train the network model, allowing it to continuously learn protein-protein similarity information during training.
[0378] Step S1020. Vectorize the multiple identical biomolecule sequences to obtain multiple biomolecule vectors.
[0379] The same biomolecule sequence can be an RNA sequence, and correspondingly, the biomolecule vector can be the RNA fourth vector. For example, when vectorizing multiple RNA sequences, each RNA sequence can be converted into N base k-mer subsequences. Vectorizing each base k-mer subsequence yields the RNA fourth vector. For instance, each base k-mer subsequence can be encoded to obtain a first vector of N base k-mer subsequences. This first vector is then input into a pre-trained model, outputting N base k-mer vectors. Finally, the RNA fourth vector is obtained from these N base k-mer vectors. As another example, each base k-mer subsequence in the RNA sequence can be encoded to obtain a first vector of N base k-mer subsequences. A first mapping matrix can be used to operate on the first vector of N base k-mer subsequences to obtain a second vector of N base k-mer subsequences, and the RNA fourth vector is obtained from this second vector. For example, each k-mer subsequence can be encoded to obtain a first vector of N k-mer subsequences. The first mapping matrix is then used to operate on this first vector to obtain a second vector of N k-mer subsequences. This second vector is then input into a pre-trained model to output a fourth vector of N k-mer subsequences. The fourth vector of RNA is then obtained from these N k-mer vectors. Alternatively, the RNA sequence can be vectorized according to step S220 of the vector model training method disclosed herein, which will not be elaborated upon here.
[0380] The same biomolecule sequence can also be a protein sequence, and correspondingly, the biomolecule vector is the protein's fourth vector. Similarly, when vectorizing multiple protein sequences, each protein sequence can be converted into M amino acid k-mer subsequences. Vectorizing each amino acid k-mer subsequence yields the protein's fourth vector. For example, each amino acid k-mer subsequence in the protein sequence can be encoded to obtain a first vector of M amino acid k-mer subsequences. Then, these first vectors can be input into a pre-trained model, outputting M amino acid k-mer vectors, from which the protein's fourth vector is obtained. As another example, each amino acid k-mer subsequence in the protein sequence can be encoded to obtain a first vector of M amino acid k-mer subsequences. A second mapping matrix can be used to operate on these first vectors to obtain a second vector of M amino acid k-mer subsequences, from which the protein's first vector is obtained. For example, each amino acid k-mer subsequence can be encoded to obtain a first vector of M amino acid k-mer subsequences. A second mapping matrix is then used to operate on the first vector of the M amino acid k-mer subsequences to obtain a second vector of the M amino acid k-mer subsequences. This second vector is then input into a pre-trained model to output M amino acid k-mer vectors. Finally, the fourth vector of the protein is obtained based on these M amino acid k-mer vectors. Alternatively, the protein sequence can be vectorized according to step S230 of the vector model training method disclosed herein, which will not be elaborated here.
[0381] Step S1030. Calculate the distance between any two identical biomolecule sequences to obtain the similarity of multiple identical biomolecule sequence pairs.
[0382] When the biomolecule sequences are RNA sequences, the edit distance between any two RNA sequences can be calculated, and the sequence distance between the two RNA sequences can be obtained based on the edit distance. Finally, the similarity of multiple RNA-RNA pairs can be obtained based on the sequence distance between any two RNA sequences. Alternatively, a vector space model can be used to calculate the distance between any two RNA sequences to obtain the similarity of multiple RNA-RNA pairs. For example, each RNA sequence can be converted into an RNA vector, and the distance between any two RNA vectors can be calculated to obtain the similarity of multiple RNA-RNA pairs. The specific details of determining the similarity of RNA-RNA pairs are similar to step S250 in the vector model training method of this disclosure, and will not be repeated here.
[0383] When the sequences of the same biomolecule are protein sequences, a vector space model can be used to calculate the distance between any two protein sequences, obtaining the similarity of multiple protein-protein pairs. Specifically, multiple protein sequences can be mapped into a vector space to obtain multiple protein vectors, and the similarity of multiple protein-protein pairs can be obtained by calculating the distance between any two protein vectors. Alternatively, the similarity of multiple protein-protein pairs can be obtained by calculating the sequence distance between any two protein sequences. For example, the edit distance between any two protein sequences can be calculated, and the sequence distance between any two protein sequences can be obtained based on the edit distance. Finally, the similarity of multiple protein-protein pairs can be obtained based on the sequence distance between any two protein sequences. The specific details of determining the similarity of protein-protein pairs are similar to step S260 in the vector model training method of this disclosure, and will not be repeated here.
[0384] Step S1040. Train the network model based on the similarity between the biomolecule vector and the sequence pairs of the same biomolecule.
[0385] In one example implementation, the network model can be trained based on the similarity between the RNA fourth vector and RNA-RNA pairs. For instance, an objective function can be constructed based on the similarity between the RNA fourth vector and RNA-RNA pairs. Based on this objective function, the model parameters of the network model can be iteratively updated using a stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the network model is complete.
[0386] Specifically, the calculated similarity of RNA-RNA pairs can be used as the label value. After obtaining multiple RNA fourth vectors through the network model, the similarity between any two RNA fourth vectors can be calculated, and the loss value can be calculated based on this similarity and the corresponding label value. That is, the constructed objective function can be:
[0387]
[0388] Where, r i Let r represent the i-th RNA sequence. j This represents the j-th RNA sequence. This represents the fourth vector of the i-th RNA. Let represent the fourth vector of the j-th RNA. The model parameters can be updated using the stochastic gradient descent algorithm. Based on the backpropagation principle, the objective function L1 is continuously calculated, and all model parameters are updated simultaneously based on the calculated loss value. Training of all model parameters is complete when the objective function L1 converges to its minimum. Continuously training the network model based on L1 allows the learned RNA vectors to more accurately reflect the similarity between RNA sequences.
[0389] In one example implementation, the network model can be trained based on the similarity between the protein fourth vector and protein-protein pairs. For instance, an objective function can be constructed based on the similarity between the protein fourth vector and protein-protein pairs. Based on this objective function, the model parameters of the network model can be iteratively updated using a stochastic gradient descent algorithm. Training of the network model is complete when the iteration termination condition is met.
[0390] Specifically, the calculated protein-protein similarity can be used as the label value. After obtaining multiple fourth vectors of proteins through the network model, the similarity between any two first vectors of proteins can be calculated. The loss value can then be calculated based on this similarity and the corresponding label value. Therefore, the constructed objective function can be:
[0391]
[0392] Where, p i Let p represent the i-th protein sequence. j V represents the j-th protein sequence. i P V represents the fourth vector of the i-th protein. j P Let this represent the fourth vector of the j-th protein. Similarly, the stochastic gradient descent algorithm can be used to update the model parameters. Based on the backpropagation principle, the objective function L2 is continuously calculated, and all model parameters of the network model are updated simultaneously based on the calculated loss value. When the objective function L2 converges to its minimum value, training of all model parameters is complete. Continuously training the network model based on L2 allows the protein vectors learned by the network model to more accurately reflect the similarity between protein sequences.
[0393] It should be noted that the vector model training method and negative sample generation method disclosed herein can be applied to analyze the interaction between the first biomolecule and the second biomolecule. The biomolecule can be a protein, nucleic acid (RNA and DNA), lipid, carbohydrate, etc. For example, it can be the interaction between proteins, the interaction between proteins and nucleic acids / lipids / carbohydrates, the interaction between nucleic acids, etc. This disclosure does not limit this; this disclosure only uses RNA and proteins as examples for illustration.
[0394] It should be noted that although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0395] Furthermore, this example embodiment also provides a vector model training apparatus. This apparatus can be applied to a server or terminal device. (See reference...) Figure 11 As shown, the vector model training device 1100 may include a data acquisition module 1110, a first encoding module 1120, a second encoding module 1130, an interaction determination module 1140, a first similarity determination module 1150, a second similarity determination module 1160, and a vector model training module 1170, wherein:
[0396] Data acquisition module 1110 is used to acquire multiple RNA sequences and multiple protein sequences;
[0397] The first encoding module 1120 is used to vectorize the plurality of RNA sequences to obtain a plurality of RNA first vectors;
[0398] The second encoding module 1130 is used to vectorize the plurality of protein sequences to obtain a plurality of protein first vectors;
[0399] The interaction determination module 1140 is used to determine the interaction between the RNA sequence and the protein sequence based on the first RNA vector and the first protein vector.
[0400] The first similarity determination module 1150 is used to calculate the distance between any two RNA sequences and obtain the similarity of multiple RNA-RNA pairs;
[0401] The second similarity determination module 1160 is used to calculate the distance between any two protein sequences and obtain the similarity of multiple protein-protein pairs.
[0402] The vector model training module 1170 is used to train the vector model based on the interaction between the RNA sequence and the protein sequence, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs.
[0403] In one optional implementation, the first encoding module 1120 includes:
[0404] The first sequence conversion module is used to convert each RNA sequence into an N-base k-mer subsequence;
[0405] The first sequence encoding module is used to vectorize each base k-mer subsequence to obtain the first RNA vector.
[0406] In one optional implementation, the first sequence encoding module includes:
[0407] The first sequence encoding unit is used to encode each base k-mer subsequence to obtain a first vector of N base k-mer subsequences;
[0408] The first vector determination unit is used to input the first vector of the N base k-mer subsequences into the recurrent neural network and output the N base k-mer vectors; and obtain the first RNA vector based on the N base k-mer vectors.
[0409] In one optional implementation, the second encoding module 1130 includes:
[0410] The second sequence conversion module is used to convert each protein sequence into an M amino acid k-mer subsequence;
[0411] The second sequence encoding module is used to vectorize each amino acid k-mer subsequence to obtain the first vector of the protein.
[0412] In one optional implementation, the second sequence encoding module includes:
[0413] The second sequence coding unit is used to encode each amino acid k-mer subsequence to obtain a first vector of M amino acid k-mer subsequences;
[0414] The second vector determination unit is used to input the first vector of the M amino acid k-mer subsequences into the recurrent neural network and output the M amino acid k-mer vectors; and obtain the first vector of the protein based on the M amino acid k-mer vectors.
[0415] In one alternative implementation, the interaction determination module 1140 includes:
[0416] according to:
[0417]
[0418] The probability value of an interaction between the RNA sequence and the protein sequence is calculated, and the interaction between the RNA sequence and the protein sequence is determined based on the probability value; where θ is a model parameter, v R The first RNA vector, v P This is the first vector of the protein.
[0419] In one optional implementation, the first similarity determination module 1150 includes:
[0420] The sequence distance calculation unit is used to calculate the edit distance between any two RNA sequences and obtain the sequence distance between the two RNA sequences based on the edit distance.
[0421] The first similarity determination unit is used to obtain the similarity of multiple RNA-RNA pairs based on the sequence distance between any two RNA sequences.
[0422] In one optional implementation, the sequence distance calculation unit is used for:
[0423] according to:
[0424]
[0425] Obtain any two RNA sequences r i r j The sequence distance; where lev(r) i r j ) represents the RNA sequence r i and RNA sequence r j edit distance, len(r) i ) represents the RNA sequence r i The length of len(r) j ) represents the RNA sequence r j The length.
[0426] In one optional implementation, the first similarity determination unit is used to:
[0427] according to:
[0428] simR(r i r j )=1-d(r i r j )
[0429] The similarity of multiple RNA-RNA pairs was obtained; among them, d(r i r j ) represents any two RNA sequences r i r j Sequence distance.
[0430] In one optional implementation, the second similarity determination module 1160 includes:
[0431] The protein generation unit is used to map multiple protein sequences to a vector space to obtain multiple protein vectors;
[0432] The second similarity determination unit is used to calculate the distance between any two protein vectors to obtain the similarity of the plurality of protein-protein pairs.
[0433] In one alternative implementation, the vector model training module 1170 includes:
[0434] The objective function construction unit is used to construct an objective function based on the interaction between the RNA sequence and the protein sequence, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs.
[0435] The vector model training unit is used to iteratively update the model parameters of the vector model based on the objective function using the stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the vector model is completed.
[0436] In one optional implementation, the objective function is:
[0437]
[0438] Where, r i Let r represent the i-th RNA sequence. j p represents the j-th RNA sequence. i Let p represent the i-th protein sequence. j This represents the j-th protein sequence. This represents the first vector of the i-th RNA. Let represent the first vector of the i-th protein, α, β, and γ be the model hyperparameters, and K be the number of RNA and protein sequences.
[0439] The specific details of each module in the above-mentioned vector model training device have been described in detail in the corresponding vector model training methods, so they will not be repeated here.
[0440] Furthermore, this example embodiment also provides a negative sample generation apparatus. This apparatus can be applied to a server or terminal device. (See reference...) Figure 12 As shown, the negative sample generation device 1200 may include a data acquisition module 1210, a data encoding module 1220, and a negative sample generation module 1230, wherein:
[0441] Data acquisition module 1210 is used to acquire positive RNA-protein pairs;
[0442] The data encoding module 1220 is used to vectorize the target RNA sequence and target protein sequence in the positive RNA-protein pair through a trained vector model to obtain the corresponding second RNA vector and second protein vector.
[0443] The negative sample generation module 1230 is used to obtain the target negative RNA-protein pair corresponding to the positive RNA-protein pair based on the second RNA vector and the second protein vector. The target negative RNA-protein pair is used to train the RNA-protein interaction prediction model.
[0444] In one optional implementation, the negative sample generation module 1230 includes:
[0445] The first similarity calculation module is used to calculate the similarity between the target RNA sequence and any RNA sequence other than the target RNA sequence;
[0446] The first candidate sequence generation module is used to screen any RNA sequence other than the target RNA sequence according to the similarity size to obtain candidate RNA sequences;
[0447] The first relationship score determination module is used to calculate the relationship score between the candidate RNA sequence and the target protein sequence based on the second RNA vector of the candidate RNA sequence and the second protein vector of the target protein sequence.
[0448] The first negative example generation module is used to determine the target negative example RNA-protein pair based on the relationship score between the candidate RNA sequence and the target protein sequence.
[0449] In one optional implementation, the first relation score determination module includes:
[0450] The first relation score determination unit is used to calculate the relation score between the candidate RNA sequence and the target protein sequence based on the model parameters of the vector model and according to the second RNA vector of the candidate RNA sequence and the second protein vector of the target protein sequence.
[0451] The model parameters are obtained by training the vector model.
[0452] In one optional implementation, the first relational score determination unit is used to:
[0453] according to:
[0454] x j =θ· <dr j dp i >
[0455] The relationship score between candidate RNA sequences and target protein sequences was calculated; where dr j dp is the second RNA vector of the candidate RNA sequence. i Let θ be the second protein vector representing the target protein sequence, and θ be the model parameters in the trained vector model. <dr j dp i > indicates dr j and dp i Perform a dot product operation.
[0456] In one optional implementation, the first negative example generation module includes:
[0457] The first negative sample set determination unit is used to obtain the first negative sample set from the candidate RNA sequence when the relationship score between the candidate RNA sequence and the target protein sequence meets a preset condition.
[0458] The first negative example generation unit is used to determine the target negative example RNA-protein pair based on the first negative sample set.
[0459] In one optional implementation, the negative sample generation module 1230 includes:
[0460] The second similarity calculation module is used to calculate the similarity between the target protein sequence and any protein sequence other than the target protein sequence;
[0461] The second candidate sequence generation module is used to screen any protein sequence other than the target protein sequence according to the similarity size to obtain candidate protein sequences;
[0462] The second relationship score determination module is used to calculate the relationship score between the candidate protein sequence and the target RNA sequence based on the second protein vector of the candidate protein sequence and the second RNA vector of the target RNA sequence.
[0463] The second negative example generation module is used to determine the target negative example RNA-protein pair based on the relationship score between the candidate protein sequence and the target RNA sequence.
[0464] In one optional implementation, the second negative example generation module includes:
[0465] The second negative sample set determination unit is used to determine the second negative sample set from the candidate protein sequence when the relationship score between the candidate protein sequence and the target RNA sequence meets a preset condition.
[0466] The second negative example generation unit is used to determine the target negative example RNA-protein pair based on the second negative sample set.
[0467] In an optional embodiment, the negative sample generation device 1200 further includes:
[0468] The training data acquisition module is used to acquire a training dataset, which consists of multiple RNA-protein pairs;
[0469] The prediction output module is used to determine the interactions between RNA sequences and protein sequences in the training dataset, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs through the vector model.
[0470] The objective function construction module is used to construct an objective function based on the interaction between the RNA sequence and the protein sequence, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs.
[0471] The model parameter adjustment module is used to iteratively update the model parameters of the vector model based on the objective function using the stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the vector model is completed.
[0472] The specific details of each module in the aforementioned negative sample generation device have been described in detail in the corresponding negative sample generation method, so they will not be repeated here.
[0473] Furthermore, this example embodiment also provides a negative sample generation apparatus. This apparatus can be applied to a server or terminal device. (See reference...) Figure 13 As shown, the negative sample generation device 1300 may include a data acquisition module 1310, a vector generation module 1320, a similarity calculation module 1330, a similarity molecule determination module 1340, and a negative sample generation module 1350, wherein:
[0474] Data acquisition module 1310 is used to acquire positive sample, which is composed of two biomolecule sequences;
[0475] The vector generation module 1320 is used to vectorize the first biomolecule sequence in the positive sample through the trained network model to obtain the biomolecule vector of the first biomolecule sequence.
[0476] The similarity calculation module 1330 is used to calculate the similarity between the biomolecule vector of the first biomolecule sequence and the biomolecule vector of any other biomolecule sequence of the same type.
[0477] The similarity molecule determination module 1340 is used to determine the same target biomolecule sequence that is similar to the first biomolecule sequence based on the similarity.
[0478] The negative sample generation module 1350 is used to obtain the negative sample corresponding to the positive sample from the same target biomolecule sequence and the second biomolecule sequence in the positive sample.
[0479] In one optional implementation, the first biomolecule sequence is an RNA sequence, and the biomolecule vector is an RNA third vector; the vector generation module 1320 includes:
[0480] The first sequence conversion module is used to convert each RNA sequence into an N-base k-mer subsequence;
[0481] The first sequence encoding module is used to vectorize each base k-mer subsequence using a trained network model to obtain the third vector of the RNA.
[0482] In one optional implementation, the first sequence encoding module includes:
[0483] The first sequence encoding unit is used to encode each base k-mer subsequence to obtain a first vector of N base k-mer subsequences;
[0484] The first vector determination unit is used to input the first vector of the N base k-mer subsequences into the trained pre-trained model and output N base k-mer vectors; and obtain the third RNA vector based on the N base k-mer vectors.
[0485] In one optional implementation, the similarity calculation module 1330 includes:
[0486] according to:
[0487]
[0488] The third vector Vr of the two RNAs was calculated. i Vr j The similarity between them; where Vr i Indicates RNA sequence r i The third RNA vector, Vr j Indicates RNA sequence r j The third RNA vector.
[0489] In one optional embodiment, the first biomolecule sequence is a protein sequence, and the biomolecule vector is a protein third vector; the vector generation module 1320 includes:
[0490] The second sequence conversion module is used to convert each protein sequence into an M amino acid k-mer subsequence;
[0491] The second sequence encoding module is used to vectorize each amino acid k-mer subsequence using a trained network model to obtain the third vector of the protein.
[0492] In one optional implementation, the second sequence encoding module includes:
[0493] The second sequence encoding unit encodes each amino acid k-mer subsequence to obtain a first vector of N amino acid k-mer subsequences;
[0494] The second vector determination unit is used to input the first vector of the M amino acid k-mer subsequences into the trained pre-trained model and output the M amino acid k-mer vectors; and to obtain the third vector of the protein based on the M amino acid k-mer vectors.
[0495] In an optional implementation, the negative sample generation device 1300 further includes a training module, the training module comprising:
[0496] The biomolecule sequence acquisition module is used to acquire multiple sequences of the same biomolecule.
[0497] A biomolecule vector generation module is used to vectorize the multiple identical biomolecule sequences to obtain multiple biomolecule vectors;
[0498] The sequence pair similarity determination module is used to calculate the distance between any two sequences of the same biomolecule and obtain the similarity of multiple sequences of the same biomolecule.
[0499] The network model training module is used to train the network model based on the similarity between the biomolecule vector and the sequence pairs of the same biomolecule.
[0500] In one optional implementation, the homologous biomolecule sequence is an RNA sequence; the sequence pair similarity determination module includes:
[0501] The sequence distance calculation unit is used to calculate the edit distance between any two RNA sequences and obtain the sequence distance between the two RNA sequences based on the edit distance.
[0502] The first similarity determination unit is used to obtain the similarity of multiple RNA-RNA pairs based on the sequence distance between any two RNA sequences.
[0503] In one optional implementation, the biomolecule vector is the fourth RNA vector; the network model training module includes:
[0504] The objective function construction unit is used to construct an objective function based on the similarity of the RNA-RNA pairs and the fourth RNA vector;
[0505] The network model training unit is used to iteratively update the model parameters of the network model based on the objective function using the stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the network model is completed.
[0506] In one optional implementation, the objective function is:
[0507]
[0508] Where, ri Let r represent the i-th RNA sequence. j V represents the j-th RNA sequence. i R V represents the fourth vector of the i-th RNA. j R This represents the fourth vector of the j-th RNA.
[0509] In one optional implementation, the homologous biomolecule sequence is a protein sequence; the sequence pair similarity determination module includes:
[0510] The protein generation unit is used to map multiple protein sequences to a vector space to obtain multiple protein vectors;
[0511] The second similarity determination unit is used to calculate the distance between any two protein vectors to obtain the similarity of the plurality of protein-protein pairs.
[0512] In one optional implementation, the biomolecule vector is a fourth protein vector; the network model training module includes:
[0513] The objective function construction unit is used to construct an objective function based on the similarity of the protein-protein pairs and the fourth vector of the proteins;
[0514] The network model training unit is used to iteratively update the model parameters of the network model based on the objective function using the stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the network model is completed.
[0515] In one optional implementation, the objective function is:
[0516]
[0517] Where, p i Let p represent the i-th protein sequence. j V represents the j-th protein sequence. i P V represents the fourth vector of the i-th protein. j P Let represent the fourth vector of the j-th protein.
[0518] The specific details of each module in the aforementioned negative sample generation device have been described in detail in the corresponding negative sample generation method, so they will not be repeated here.
[0519] The modules in the above-described device can be general-purpose processors, including central processing units (CPUs), network processors, etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Each module can also be implemented using software, firmware, etc. The processors in the above-described device can be independent processors or integrated together.
[0520] Exemplary embodiments of this disclosure also provide a computer-readable storage medium having a program product stored thereon capable of implementing the methods described above in this specification. In some possible embodiments, various aspects of this disclosure may also be implemented as a program product including program code that, when run on an electronic device, causes the electronic device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. This program product may be a portable compact disc read-only memory (CD-ROM) including program code and may run on an electronic device, such as a personal computer. However, the program product of this disclosure is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0521] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0522] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0523] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0524] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0525] Exemplary embodiments of this disclosure also provide an electronic device capable of implementing the above-described method. Referring below... Figure 14 To describe an electronic device 1400 according to such an exemplary embodiment of the present disclosure. Figure 14 The electronic device 1400 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0526] like Figure 14 As shown, the electronic device 1400 can be represented as a general-purpose computing device. The components of the electronic device 1400 may include, but are not limited to: at least one processing unit 1410, at least one storage unit 1420, a bus 1430 connecting different system components (including storage unit 1420 and processing unit 1410), and a display unit 1440.
[0527] Storage unit 1420 stores program code that can be executed by processing unit 1410, causing processing unit 1410 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, processing unit 1410 can perform... Figures 2 to 9 Any one or more of the method steps.
[0528] Storage unit 1420 may include readable media in the form of volatile storage units, such as random access memory (RAM) 1421 and / or cache memory 1422, and may further include read-only memory (ROM) 1423.
[0529] Storage unit 1420 may also include a program / utility 1424 having a set (at least one) of program modules 1425, such program modules 1425 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0530] Bus 1430 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0531] Electronic device 1400 can also communicate with one or more external devices 1500 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 1400, and / or with any device that enables electronic device 1400 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1450. Furthermore, electronic device 1400 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1460. As shown, network adapter 1460 communicates with other modules of electronic device 1400 via bus 1430. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0532] In some embodiments, the vector model training method and negative sample generation method described herein can be executed by the processing unit 1410 of the electronic device. In some embodiments, multiple RNA sequences and protein sequences, as well as training datasets for training various models, can be input through the input interface 1450. For example, multiple RNA sequences and protein sequences, as well as training datasets for training various models, can be input through the user interface of the electronic device. In some embodiments, some / all training parameters, some / all intermediate results, or final results can be output through the output interface 1450. For example, the first RNA vector, the first protein vector, the similarity of RNA-RNA pairs, the similarity of protein-protein pairs, etc., can be output to the external device 1500 for user viewing.
[0533] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the exemplary embodiments of this disclosure.
[0534] Furthermore, the above figures are merely illustrative representations of the processes included in the methods according to exemplary embodiments of this disclosure, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0535] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0536] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A vector model training method, characterized in that, include: Obtain multiple RNA sequences and multiple protein sequences; Vectorize the multiple RNA sequences to obtain multiple RNA first vectors; Vectorize the multiple protein sequences to obtain multiple protein first vectors; The interaction between the RNA sequence and the protein sequence is determined based on the first RNA vector and the first protein vector. Calculate the distance between any two RNA sequences to obtain the similarity of multiple RNA-RNA pairs; Calculate the distance between any two protein sequences to obtain the similarity of multiple protein-protein pairs; The vector model is trained based on the interactions between the RNA and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs. The step of determining the interaction between the RNA sequence and the protein sequence based on the first RNA vector and the first protein vector includes: according to: The probability value of an interaction between the RNA sequence and the protein sequence is calculated, and the interaction between the RNA sequence and the protein sequence is determined based on the probability value; wherein, For model parameters, The first RNA vector, This is the first vector of the protein; The calculation of the distance between any two RNA sequences to obtain the similarity of multiple RNA-RNA pairs includes: Calculate the edit distance between any two RNA sequences, and obtain the sequence distance between the two RNA sequences based on the edit distance; The similarity of multiple RNA-RNA pairs is obtained based on the sequence distance between any two RNA sequences; The calculation of the distance between any two protein sequences to obtain the similarity of multiple protein-protein pairs includes: Multiple protein sequences are mapped to a vector space to obtain multiple protein vectors; The similarity of the multiple protein-protein pairs is obtained by calculating the distance between any two protein vectors. The step of training the vector model based on the interactions between the RNA and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs includes: The objective function is constructed based on the interaction between the RNA and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs. Based on the objective function, the model parameters of the vector model are iteratively updated using the stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the vector model is completed. The objective function is: in, Indicates the first i RNA sequences, Indicates the first j RNA sequences, Indicates the first i A protein sequence, Indicates the first j A protein sequence, Indicates the first i The first vector of RNA, Indicates the first i The first vector of a protein. α , β , γ For model hyperparameters, K This represents the number of RNA and protein sequences.
2. The vector model training method according to claim 1, characterized in that, The vectorization of the multiple RNA sequences yields multiple RNA first vectors, including: Each RNA sequence is converted into an N-base k-mer subsequence; The first RNA vector is obtained by vectorizing each base k-mer subsequence.
3. The vector model training method according to claim 2, characterized in that, The vectorization of each base k-mer subsequence to obtain the first RNA vector includes: Encode each base k-mer subsequence to obtain a first vector of N base k-mer subsequences; The first vector of the N base k-mer subsequences is input into a recurrent neural network, which outputs an N base k-mer vector. The first RNA vector is obtained based on the N base k-mer vectors.
4. The vector model training method according to claim 1, characterized in that, The vectorization of the multiple protein sequences yields multiple protein first vectors, including: Each protein sequence is converted into an M amino acid k-mer subsequence; Vectorize each amino acid k-mer subsequence to obtain the first vector of the protein.
5. The vector model training method according to claim 4, characterized in that, The vectorization of each amino acid k-mer subsequence to obtain the first vector of the protein includes: Encode each amino acid k-mer subsequence to obtain a first vector of M amino acid k-mer subsequences; The first vector of the M amino acid k-mer subsequences is input into a recurrent neural network, which outputs M amino acid k-mer vectors. The first vector of the protein is obtained based on the k-mer vectors of the M amino acids.
6. The vector model training method according to claim 1, characterized in that, The calculation of the edit distance between any two RNA sequences, and the determination of the sequence distance between the two RNA sequences based on the edit distance, includes: according to: Obtain any two RNA sequences , The sequence distance; where, Represents RNA sequence and RNA sequence Edit distance, Represents RNA sequence Length, Represents RNA sequence The length.
7. The vector model training method according to claim 6, characterized in that, The method of obtaining the similarity of multiple RNA-RNA pairs based on the sequence distance between any two RNA sequences includes: according to: The similarity of multiple RNA-RNA pairs was obtained; among them, Represents any two RNA sequences , Sequence distance.
8. A method for generating negative samples, characterized in that, include: Obtain positive RNA-protein pairs; The target RNA sequence and target protein sequence in the positive RNA-protein pair are vectorized by the trained vector model to obtain the corresponding second RNA vector and second protein vector; wherein the trained vector model is trained by the vector model training method according to any one of claims 1 to 7; Based on the second RNA vector and the second protein vector, the target negative RNA-protein pair corresponding to the positive RNA-protein pair is obtained, and the target negative RNA-protein pair is used to train the RNA-protein interaction prediction model.
9. The negative sample generation method according to claim 8, characterized in that, The process of obtaining the target negative RNA-protein pair corresponding to the positive RNA-protein pair based on the second RNA vector and the second protein vector includes: Calculate the similarity between the target RNA sequence and any RNA sequence other than the target RNA sequence; Candidate RNA sequences are obtained by screening any RNA sequence other than the target RNA sequence based on the similarity score. The relationship score between the candidate RNA sequence and the target protein sequence is calculated based on the second RNA vector of the candidate RNA sequence and the second protein vector of the target protein sequence. The target negative RNA-protein pair is determined based on the relationship score between the candidate RNA sequence and the target protein sequence.
10. The negative sample generation method according to claim 9, characterized in that, The step of calculating the relationship score between the candidate RNA sequence and the target protein sequence based on the second RNA vector of the candidate RNA sequence and the second protein vector of the target protein sequence includes: Based on the model parameters of the vector model, and according to the second RNA vector of the candidate RNA sequence and the second protein vector of the target protein sequence, the relationship score between the candidate RNA sequence and the target protein sequence is calculated. The model parameters are obtained by training the vector model.
11. The negative sample generation method according to claim 10, characterized in that, The model parameters based on the vector model, and the relationship score between the candidate RNA sequence and the target protein sequence calculated according to the second RNA vector of the candidate RNA sequence and the second protein vector of the target protein sequence, include: according to: The relationship score between candidate RNA sequences and target protein sequences was calculated; where, The second RNA vector of the candidate RNA sequence. This is the second protein vector representing the target protein sequence. To complete the model parameters in the trained vector model, express and Perform a dot product operation.
12. The negative sample generation method according to claim 9, characterized in that, The step of determining the target negative RNA-protein pair based on the relationship score between the candidate RNA sequence and the target protein sequence includes: When the relationship score between the candidate RNA sequence and the target protein sequence meets a preset condition, a first negative sample set is obtained from the candidate RNA sequence. The target negative RNA-protein pair is determined based on the first negative sample set.
13. The negative sample generation method according to claim 8, characterized in that, The process of obtaining the target negative RNA-protein pair corresponding to each positive RNA-protein pair based on the second RNA vector and the second protein vector includes: Calculate the similarity between the target protein sequence and any protein sequence other than the target protein sequence; Candidate protein sequences are obtained by screening any protein sequence other than the target protein sequence based on the similarity score. The relationship score between the candidate protein sequence and the target RNA sequence is calculated based on the second protein vector of the candidate protein sequence and the second RNA vector of the target RNA sequence. The target negative RNA-protein pair is determined based on the relationship score between the candidate protein sequence and the target RNA sequence.
14. The negative sample generation method according to claim 13, characterized in that, The step of determining the target negative RNA-protein pair based on the relationship score between the candidate protein sequence and the target RNA sequence includes: When the relationship score between the candidate protein sequence and the target RNA sequence meets a preset condition, the candidate protein sequence is moved to the second negative sample set. The target negative RNA-protein pair is determined based on the second negative sample set.
15. The negative sample generation method according to claim 8, characterized in that, The method further includes: Obtain a training dataset, which consists of multiple RNA-protein pairs; The vector model is used to determine the interactions between RNA sequences and protein sequences in the training dataset, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs. The objective function is constructed based on the interaction between the RNA and protein sequences, the similarity of RNA-RNA pairs, and the similarity of protein-protein pairs. Based on the objective function, the model parameters of the vector model are iteratively updated using the stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the vector model is completed.
16. A method for generating negative samples, characterized in that, include: Obtain positive examples, which consist of two biomolecular sequences; The first biomolecule sequence in the positive sample is vectorized by the trained network model to obtain the biomolecule vector of the first biomolecule sequence. Calculate the similarity between the biomolecule vector of the first biomolecule sequence and the biomolecule vector of any other biomolecule sequence of the same type. Based on the similarity, determine the same target biomolecule sequence that is similar to the first type of biomolecule sequence; The negative sample corresponding to the positive sample is obtained from the same target biomolecule sequence and the second biomolecule sequence in the positive sample; The trained network model is trained using the following method: Obtain multiple sequences of the same biomolecule; Vectorize the multiple identical biomolecule sequences to obtain multiple biomolecule vectors; Calculate the distance between any two sequences of the same biomolecule to obtain the similarity of multiple pairs of sequences of the same biomolecule; The network model is trained based on the similarity between the biomolecule vectors and the sequence pairs of the same biomolecule. Wherein, when the homologous biomolecule sequence is an RNA sequence, the calculation of the distance between any two homologous biomolecule sequences to obtain the similarity of multiple homologous biomolecule sequence pairs includes: Calculate the edit distance between any two RNA sequences, and obtain the sequence distance between the two RNA sequences based on the edit distance; The similarity of multiple RNA-RNA pairs is obtained based on the sequence distance between any two RNA sequences; Wherein, when the homologous biomolecule sequence is a protein sequence, the calculation of the distance between any two homologous biomolecule sequences to obtain the similarity of multiple homologous biomolecule sequence pairs includes: Multiple protein sequences are mapped to a vector space to obtain multiple protein vectors; Calculate the distance between any two protein vectors to obtain the similarity of multiple protein-protein pairs.
17. The negative sample generation method according to claim 16, characterized in that, The first biomolecule sequence is an RNA sequence, and the biomolecule vector is an RNA third vector; the step of vectorizing the first biomolecule sequence in the positive sample using a trained network model to obtain the biomolecule vector of the first biomolecule sequence includes: Each RNA sequence is converted into an N-base k-mer subsequence; The third vector of the RNA is obtained by vectorizing each base k-mer subsequence using a trained network model.
18. The negative sample generation method according to claim 17, characterized in that, The process of vectorizing each base k-mer subsequence using a trained network model to obtain the third RNA vector includes: Encode each base k-mer subsequence to obtain a first vector of N base k-mer subsequences; Input the first vector of the N base k-mer subsequences into the trained pre-trained model, and output the N base k-mer vectors; The third RNA vector is obtained based on the N base k-mer vectors.
19. The negative sample generation method according to claim 17, characterized in that, The calculation of the similarity between the biomolecule vector of the first biomolecule sequence and the biomolecule vector of any other biomolecule sequence of the same type, excluding the first biomolecule sequence, includes: according to: The third vectors of the two RNAs were calculated. , The similarity between them; among which, Represents RNA sequence The third RNA vector, Represents RNA sequence The third RNA vector.
20. The negative sample generation method according to claim 16, characterized in that, The first biomolecule sequence is a protein sequence, and the biomolecule vector is the protein's third vector; the step of vectorizing the first biomolecule sequence in the positive sample using a trained network model to obtain the biomolecule vector of the first biomolecule sequence includes: Each protein sequence is converted into an M amino acid k-mer subsequence; The third vector of the protein is obtained by vectorizing each amino acid k-mer subsequence using a trained network model.
21. The negative sample generation method according to claim 20, characterized in that, The process of vectorizing each amino acid k-mer subsequence using a trained network model to obtain the third vector of the protein includes: Encode each amino acid k-mer subsequence to obtain a first vector of M amino acid k-mer subsequences; Input the first vector of the M amino acid k-mer subsequences into the trained pre-trained model, and output the M amino acid k-mer vectors; The third vector of the protein is obtained based on the k-mer vectors of the M amino acids.
22. The negative sample generation method according to claim 16, characterized in that, The biomolecule vector is the fourth RNA vector; the training of the network model based on the similarity between the biomolecule vector and sequence pairs of the same biomolecule includes: Construct an objective function based on the similarity of the RNA-RNA pairs and the fourth RNA vector; Based on the objective function, the model parameters of the network model are iteratively updated using the stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the network model is completed.
23. The negative sample generation method according to claim 22, characterized in that, The objective function is: in, Indicates the first i RNA sequences, Indicates the first j RNA sequences, Indicates the first i The fourth vector of RNA, Indicates the first j The fourth RNA vector.
24. The negative sample generation method according to claim 16, characterized in that, The biomolecule vector is the fourth protein vector; the training of the network model based on the similarity between the biomolecule vector and sequence pairs of the same biomolecule includes: Construct an objective function based on the similarity of the protein-protein pairs and the fourth vector of the proteins; Based on the objective function, the model parameters of the network model are iteratively updated using the stochastic gradient descent algorithm. When the iteration termination condition is met, the training of the network model is completed.
25. The negative sample generation method according to claim 24, characterized in that, The objective function is: in, Indicates the first i A protein sequence, Indicates the first j A protein sequence, Indicates the first i The fourth vector of a protein. Indicates the first j The fourth vector of a protein.
26. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1-25.
27. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1-25 by executing the executable instructions.