Protein function prediction method, model training method, device, equipment and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
- Filing Date
- 2026-01-27
- Publication Date
- 2026-06-16
Smart Images

Figure CN122224282A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of bioinformatics, deep learning and computer application technology, and in particular to protein function prediction methods, model training methods, devices, equipment and media. Background Technology
[0002] Proteins, as the main executors of life activities, play a central role in regulating complex cellular processes and molecular mechanisms, and elucidating their functions is the cornerstone of biology, medicine, and pharmacology. With the rapid development of high-throughput sequencing technology, protein sequence data is growing exponentially; however, characterizing protein function through biochemical experiments remains a labor-intensive, time-consuming, and expensive task. This massive gap between data growth and experimental annotation capabilities has led to a widening "sequence-function gap," necessitating the development of efficient automated function prediction (AFP) methods that utilize the gene ontology (GO) framework—including biological processes, molecular functions, and cellular components—to achieve large-scale functional annotation of proteins.
[0003] Existing technologies are mainly divided into homology-based methods and deep learning-based methods. Traditional homology-based methods follow the principle of "association inference." For example, alignment tools like DIAMOND transfer functional annotations from evolutionarily related sequences to target sequences through sequence alignment. To overcome the limitations of homology transfer, deep learning techniques are used to directly extract feature patterns from sequences or structures. For instance, DeepGOCNN uses convolutional neural networks to capture local sequence motifs, DeepGOZero combines GO hierarchical axioms for prediction, and Struct2GO utilizes AlphaFold's 3D structural features to enhance performance. Recent research has further shifted towards integrating semantic knowledge and multimodal data. For example, ProtNote pioneered the use of Large Language Models (LLMs) to align amino acid sequences with free text functional descriptions, reconstructing the multi-label prediction task into a one-to-one binary classification problem.
[0004] Despite the significant progress made in the aforementioned research, existing technologies still suffer from several key shortcomings. First, homology-based methods experience a significant drop in prediction accuracy when dealing with sequences lacking significant homologs in the training data. Second, existing multimodal deep learning methods have deficiencies in the effective fusion and feature representation of heterogeneous modalities. For example, while ProtNote incorporates a large language model, it still relies on simple one-hot encoding to represent protein sequence information, ignoring the deep evolutionary information contained in the protein language model and neglecting key modalities such as protein domains. This results in poor performance under supervised learning settings and insufficient generalization ability in zero-shot scenarios. Furthermore, ProtNote employs a unified training strategy across all ontologies, limiting the model's ability to capture specific ontology features. Finally, existing methods often employ simple feature concatenation strategies, failing to dynamically adjust weights based on modality quality, easily introducing noise, and lacking effective mechanisms to filter redundant information and enhance the model's robustness to incomplete data.
[0005] Therefore, existing technologies still need to be improved and developed. Summary of the Invention
[0006] Based on the shortcomings of the prior art, the purpose of this invention is to provide a protein function prediction method, model training method, device, equipment and medium, which aims to solve the problems that existing protein function prediction methods ignore key modalities such as protein structural domains, have insufficient generalization ability, cannot dynamically adjust weights according to modal quality, and are prone to introducing noise.
[0007] The technical solution of the present invention is as follows: In a first aspect, the present invention provides a method for training a protein function prediction model, wherein the protein function prediction model comprises three structurally identical projection networks and a function prediction network with an adaptive gating fusion mechanism, and the training method for the protein function prediction model comprises the following steps: Obtain a training dataset, which includes protein sequences of known proteins, protein domain text, and GO function label description text; After converting the protein sequence, protein domain text, and GO functional tag description text into embedded representations, sequence modality feature vectors, domain modality feature vectors, and GO functional tag modality feature vectors are obtained, respectively. The sequence modality feature vector, the structural domain modality feature vector, and the GO functional label modality feature vector are respectively input into three projection networks with the same structure to obtain the sequence modality unified space feature vector, the structural domain modality unified space feature vector, and the GO functional label unified space feature vector, respectively. The sequence modality unified spatial feature vector, the structural domain modality unified spatial feature vector, and the GO functional label unified spatial feature vector are input into a functional prediction network with an adaptive gating fusion mechanism. After training the projection network and the functional prediction network, the protein function prediction model is obtained.
[0008] Optionally, the protein sequence is encoded using a protein language model and converted into an embedded representation, and then mean pooling is performed to obtain the sequence modality feature vector. The text embedding model is used to encode the protein domain text and convert it into an embedded representation. Then, mean pooling is performed to obtain the domain modal feature vector. The text embedding model is used to encode the GO function label description text and convert it into an embedded representation. Then, mean pooling is performed to obtain the GO function label modal feature vector.
[0009] Optionally, during the training of the projection network and the function prediction network, an asymmetric feature random deactivation mechanism is adopted. The sequence modality unified space feature vector and the structural domain modality unified space feature vector are randomly zeroed with a preset probability, and at least one of the sequence modality unified space feature vector and the structural domain modality unified space feature vector is forcibly retained as input, so as to obtain the sequence modality unified space feature vector and the structural domain modality unified space feature vector after random zeroing, while the GO function label modality unified space feature vector is always retained as input.
[0010] Optionally, the function prediction network includes a shared multilayer perceptron network, a gated network, and a fully connected network; The input of the sequence modality unified spatial feature vector, the structural domain modality unified spatial feature vector, and the GO function label unified spatial feature vector into a function prediction network with an adaptive gating fusion mechanism specifically includes: The sequence modality unified space feature vector after random zeroing, the structural domain modality unified space feature vector after random zeroing, and the GO function label unified space feature vector are simultaneously input into the shared multilayer perceptron network and the gated network. In a shared multilayer perceptron network, the sequence modality unified space feature vector after random zeroing, the structural domain modality unified space feature vector after random zeroing, and the GO function label unified space feature vector are subjected to nonlinear feature transformation to obtain the transformed vector. In the gated network, the sequence modality unified space feature vector after random zeroing, the structural domain modality unified space feature vector after random zeroing, and the GO function label unified space feature vector are concatenated to form a global context vector. Then, the global context vector generates adaptive fusion weights. After fusing the transformed vector with adaptive fusion weights, it is input into a fully connected network to obtain the predicted probability of whether a protein has a certain GO functional label.
[0011] Optionally, the cross-entropy loss function is obtained based on the predicted probability of whether a protein possesses a certain GO functional tag and the actual situation of whether a protein possesses that GO functional tag. The projection network, shared multilayer perceptron network, gated network, and fully connected network are trained according to the cross-entropy loss function until the cross-entropy loss function converges, thus obtaining the protein function prediction model.
[0012] A second aspect of the present invention provides a method for predicting protein function, comprising the following steps: The data of the protein whose function is to be tested are input into the protein function prediction model trained by the training method described above in this invention to obtain the protein function.
[0013] The data for the protein whose function is to be tested is the protein sequence, or the data for the protein whose function is to be tested is the protein sequence and protein domain text.
[0014] A third aspect of the present invention provides a training apparatus for a protein function prediction model, wherein the training apparatus for the protein function prediction model comprises: The data acquisition unit is used to acquire a training dataset, which includes protein sequences of known proteins, protein domain text, and GO function label description text. The data processing unit is used to convert the protein sequence, protein domain text, and GO functional tag description text into embedded representations, respectively, and then obtain sequence modality feature vectors, domain modality feature vectors, and GO functional tag modality feature vectors. The model training unit is used to input the sequence modality feature vector, the structural domain modality feature vector, and the GO functional label modality feature vector into three structurally identical projection networks, respectively, to obtain the sequence modality unified space feature vector, the structural domain modality unified space feature vector, and the GO functional label unified space feature vector. The sequence modality unified space feature vector, the structural domain modality unified space feature vector, and the GO functional label unified space feature vector are then input into a function prediction network with an adaptive gating fusion mechanism. After training the projection network and the function prediction network, the protein function prediction model is obtained.
[0015] A fourth aspect of the present invention provides a protein function prediction device, comprising: A data acquisition unit is used to acquire data of a protein with a function to be tested, wherein the data of the protein with the function to be tested is a protein sequence, or the data of the protein with the function to be tested is a protein sequence and protein domain text. The function prediction unit is used to input the acquired data of the protein with the function to be tested into the protein function prediction model trained by the training device described in claim 7, so as to obtain the protein function.
[0016] A fifth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the training method or the prediction method of the present invention as described above.
[0017] A sixth aspect of the present invention provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the computer program is executed by the processor, implements the training method of the present invention as described above or the prediction method of the present invention as described above.
[0018] Beneficial Effects: This invention fully considers protein domains and constructs a protein function prediction model by capturing the potential relationships between protein sequences, protein domain text, and GO function label text. Specifically, this invention introduces three modalities of data into the training dataset: protein sequences of known proteins, protein domain text, and GO function label description text. By obtaining the embedded representations of these three modalities, replacing the traditional discrete label IDs, the model can perform zero-shot inference for GO function labels not present in the training dataset based on semantic similarity. Then, this invention reconstructs the traditional classification task into a multimodal semantic alignment task. By inputting the feature vectors corresponding to the three heterogeneous modalities into a projection network to map them to a unified semantic space (i.e., a unified latent space), a high-dimensional cross-modal mapping between biological entities and natural language is established, constructing a unified multimodal representation framework. This framework treats the sequence modality feature vector, domain modality feature vector, and GO function label modality feature vector as complementary model representations of the same biological entity, improving the model's performance and generalization ability in zero-shot scenarios.
[0019] Furthermore, the present invention employs a functional prediction network with an adaptive gating fusion mechanism, which can dynamically calibrate and allocate the weights of each modality according to the specificity of the input data, thereby achieving adaptive complementarity of multi-source information. This allows for automatic adjustment of the contribution of each modality feature in the feature space, thus achieving accurate alignment of heterogeneous modal features, reducing noise, and enhancing the robustness of the model when faced with incomplete data.
[0020] The protein function prediction model obtained using the training method provided in this invention has good robustness and zero-shot generalization ability. It can effectively predict unknown GO function labels of proteins. It does not rely on fixed discrete label IDs and can infer new GO terms that have not appeared in the training stage based on semantic similarity. This significantly improves the generalization ability for new function labels in long-tail categories and zero-shot scenarios. It also maintains stable prediction performance when multimodal incompleteness or noise exists. It solves the problems of traditional methods in heterogeneous modality fusion and the limitations of zero-shot generalization (insufficient prediction ability for unknown GO function labels), easy introduction of noise, lack of effective mechanisms to filter redundant information and enhance the robustness of the model when facing incomplete data. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating the training method of a protein function prediction model in one embodiment of the present invention.
[0022] Figure 2 This is a schematic diagram of the protein function prediction process in an embodiment of the present invention.
[0023] Figure 3 This is a flowchart illustrating the training method of a protein function prediction model in another embodiment of the present invention.
[0024] Figure 4 This is a structural diagram of the training device for the protein function prediction model in an embodiment of the present invention.
[0025] Figure 5 This is a structural diagram of the protein function prediction device in an embodiment of the present invention.
[0026] Figure 6 This is a structural diagram of the electronic device in an embodiment of the present invention. Detailed Implementation
[0027] This invention provides a protein function prediction method, model training method, apparatus, equipment, and medium. To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention is further described in detail below. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0029] As used herein, the term "including" and its variations are to be interpreted as open-ended terms meaning "including but not limited to". The term "based on" is to be interpreted as "at least partially based on". The terms "first", "second", etc., may refer to different or the same objects. As used herein, "network or neural network" is capable of processing input and providing corresponding output.
[0030] This invention provides a training method for a protein function prediction model, wherein the protein function prediction model includes three structurally identical projection networks and a function prediction network with an adaptive gating fusion mechanism, such as... Figure 1 and Figure 2 As shown, the training method for the protein function prediction model includes the following steps: S1. Obtain the training dataset, which includes the protein sequences, protein domain texts, and GO function label description texts of known proteins; S2. After converting the protein sequence, protein domain text, and GO functional tag description text into embedded representations, sequence modality feature vectors, domain modality feature vectors, and GO functional tag modality feature vectors are obtained respectively. S3. Input the sequence modality feature vector, the structural domain modality feature vector, and the GO functional label modality feature vector into three projection networks with the same structure, respectively, to obtain the sequence modality unified space feature vector, the structural domain modality unified space feature vector, and the GO functional label unified space feature vector. S4. Input the sequence modality unified spatial feature vector, the structural domain modality unified spatial feature vector, and the GO functional label unified spatial feature vector into a functional prediction network with an adaptive gating fusion mechanism. After training the projection network and the functional prediction network, the protein function prediction model is obtained.
[0031] This invention fully considers protein domains and constructs a protein function prediction model by capturing the potential relationships between protein sequences, protein domain text, and GO function label text. Specifically, this invention introduces three modalities of data into the training dataset: protein sequences of known proteins, protein domain text, and GO function label description text. By obtaining the embedded representations of these three modalities, replacing the traditional discrete label IDs, the model can perform zero-shot inference for GO function labels not present in the training dataset based on semantic similarity. Then, this invention reconstructs the traditional classification task into a multimodal semantic alignment task. By inputting the feature vectors corresponding to the three heterogeneous modalities into a projection network to map them to a unified semantic space (i.e., a unified latent space), a high-dimensional cross-modal mapping between biological entities and natural language is established, constructing a unified multimodal representation framework. This framework treats the sequence modality feature vector, domain modality feature vector, and GO function label modality feature vector as complementary model representations of the same biological entity, improving the model's performance and generalization ability in zero-shot scenarios.
[0032] Furthermore, the present invention employs a functional prediction network with an adaptive gating fusion mechanism, which can dynamically calibrate and allocate the weights of each modality according to the specificity of the input data, thereby achieving adaptive complementarity of multi-source information. This allows for automatic adjustment of the contribution of each modality feature in the feature space, thus achieving accurate alignment of heterogeneous modal features, reducing noise, and enhancing the robustness of the model when faced with incomplete data.
[0033] The protein function prediction model obtained using the training method provided in this invention has good robustness and zero-shot generalization ability. It can effectively predict unknown GO function labels of proteins. It does not rely on fixed discrete label IDs and can infer new GO terms that have not appeared in the training stage based on semantic similarity. This significantly improves the generalization ability for new function labels in long-tail categories and zero-shot scenarios. It also maintains stable prediction performance when multimodal incompleteness or noise exists. It solves the problems of traditional methods in heterogeneous modality fusion and the limitations of zero-shot generalization (insufficient prediction ability for unknown GO function labels), easy introduction of noise, lack of effective mechanisms to filter redundant information and enhance the robustness of the model when facing incomplete data.
[0034] In step S1, the acquired training dataset includes protein sequences, protein domain texts, and GO functional label description texts of known proteins. This invention fully considers protein domain texts and constructs a protein function prediction model by capturing the potential correlations between protein sequences, protein domain texts, and GO functional label description texts.
[0035] In step S2, in some implementations, a protein language model (such as the ESM-2 model) is used to encode the protein sequence and convert it into an embedded representation, and then mean pooling is performed to obtain the sequence modality feature vector.
[0036] In this embodiment, a protein language model (specifically, the ESM-2 model) can be used to extract deep evolutionary sequence features of proteins. Specifically, the ESM-2 model is a large protein language model that uses a transformer-based architecture and attention mechanism to learn the interaction patterns between pairs of amino acids in the input sequence. This allows the ESM-2 model to capture amino acid sequence evolutionary information about proteins and their properties. Each protein sequence is represented as a feature vector after passing through the ESM-2 model.
[0037] The following explanation uses the ESM2-650M model as an example to illustrate the protein language model.
[0038] like Figure 2 As shown, the ESM2-650M model is used to obtain the evolutionary sequence features of proteins. Specifically, context encoding is performed on each residue in the protein sequence to obtain the embedding representation, and then mean pooling is performed to obtain the sequence modality feature vector. Specifically, if the length of the protein sequence P is L, i.e., it consists of L amino acid residues, then P = Where P represents the protein sequence and L represents the number of amino acid residues, Indicates the first amino acid residues ,For example, Indicates the first amino acid residue. Representing the Lth amino acid residue, the embedding representation of each residue obtained from the model extraction is then... ,in Let R be the sequence embedding dimension, and R be a real number vector. It is A real vector of dimension 1.
[0039] Furthermore, the embedding representation is subjected to homogeneous pooling to obtain the sequence modality feature vector, which is represented as follows: ,in, This represents a sequence modality feature vector (reflecting the evolutionary sequence characteristics of a protein).
[0040] In some implementations, a text embedding model (such as the Qwen3-Embedding-4B model) is used to encode the protein domain text and convert it into an embedded representation, which is then subjected to mean pooling to obtain the domain modal feature vector.
[0041] In some specific implementations, a text embedding model (e.g., the Qwen3-Embedding-4B model) is used to encode the protein domain text and convert it into an embedded representation. Then, a two-step mean pooling process is performed to obtain the domain modality feature vector, as follows: The protein domain text contains K domains. The protein domain text is encoded and converted into an embedding representation using a text embedding model (e.g., Qwen3-Embedding-4B model). First, the embedding representation of each domain is subjected to mean pooling, and then the embedding representations of all domains are subjected to mean pooling again.
[0042] In this embodiment, the embedded representation of protein domain text can be obtained through a text embedding model (e.g., the Qwen3-Embedding-4B model).
[0043] The following explanation uses the Qwen3-Embedding-4B model as an example of a text embedding model.
[0044] If the text of a protein domain is available from the InterPro database, then the set of protein domain descriptions associated with a particular protein is represented as follows: Where D represents the set of protein domain descriptions, This indicates the number of domains contained in the protein. Indicates the first Each structural domain ,For example This represents the first structural field. This represents the Kth structural domain.
[0045] The Qwen3-Embedding-4B model was used as the semantic encoder to encode the protein domain text, employing a hierarchical two-step mean pooling strategy. First, regarding the first Each structural domain Let its word segmentation be Each token is a semantic encoder that outputs a token-level vector. ,in m= , R is the text embedding dimension, and R is a real number vector, i.e. It is A real-valued vector of dimension 1. Perform token-level mean pooling on it to obtain the 1st... Vector representations (i.e., embedding representations) of each structural domain: ; Subsequently, the embedding representations of all K domains of the protein are again subjected to mean pooling to obtain unified domain features, i.e., domain modality feature vectors: ; in, For the first Vector representation of each structural domain, These are the modal eigenvectors of the structural domain.
[0046] In addition, for some proteins, if the protein domain text is missing, the domain modality feature vector uses an all-zero vector as a placeholder vector to ensure that the subsequent network input dimensions are consistent.
[0047] In some implementations, the text describing the GO function tag is encoded and converted into an embedded representation using a text embedding model (e.g., Qwen3-Embedding-4B model), and then mean pooling is performed to obtain the GO function tag modal feature vector.
[0048] The following explanation uses the Qwen3-Embedding-4B model as an example of a text embedding model.
[0049] The Qwen3-Embedding-4B model is used as a unified semantic encoder to encode the GO function tag description text, followed by mean pooling to obtain the global semantic vector of GO terms, i.e., the GO function tag modal feature vector. Specifically, the official definition text is used as the semantic anchor. Assuming the definition text is segmented into N tokens, the semantic encoder outputs the corresponding token vector. ,in n= , R is the text embedding dimension, and R is a real number vector, i.e. It is A real-valued vector of dimension; then, the token vector is subjected to mean pooling to obtain the global semantic vector of GO terms, i.e., the GO function tag modal feature vector: , in, This represents the GO function label modal feature vector.
[0050] In step S3, the sequence modality feature vector, the structural domain modality feature vector, and the GO functional label modality feature vector are respectively input into three structurally identical projection networks to map to a unified latent space, thereby obtaining the sequence modality unified space feature vector, the structural domain modality unified space feature vector, and the GO functional label unified space feature vector, respectively.
[0051] The projection network consists of linear layers, layer normalization, GELU activation function, and dropout layers, specifically represented as follows: ;in, Representing different modes; Represents the input vector of the corresponding mode (e.g.) Represents the sequence modal eigenvector. Represents the modal eigenvectors of the structural domain. (GO functional label modal feature vector). and These are the weight matrix and bias vector of the modal projection network, respectively. Numerical scales used to stabilize different modal characteristics; Use non-linear activation functions to enhance expressive power; Random inactivation at the neuron level is used to reduce overfitting; This represents the projected unified space feature vector. Therefore, we can obtain... , , The three identical modal unified space feature vectors are respectively the sequence modal unified space feature vectors ( ), structural domain modal unified space eigenvectors ( ) and GO functional label modal unified space feature vector ( ).
[0052] In step S4, in some implementations, during the training of the projection network and the functional prediction network, an asymmetric feature random deactivation mechanism is used (this mechanism is only used during model training; after the model is trained, it is not used during application and prediction to fully utilize all available modal information). The sequence modal unified space feature vector and the structural domain modal unified space feature vector are randomly zeroed with a preset probability, and at least one of the sequence modal unified space feature vector and the structural domain modal unified space feature vector is forcibly retained as input, resulting in the sequence modal unified space feature vector and the structural domain modal unified space feature vector after random zeroing, while the GO functional label modal unified space feature vector is always retained as input.
[0053] In this embodiment, after projection, an asymmetric feature random deactivation mechanism is introduced to enhance the robustness of missing modes and prevent overfitting. During training, a binary mask vector is defined. ,in These represent whether to retain the sequence modal unified space eigenvectors and the structural domain modal unified space eigenvectors, respectively. (Based on probability) By randomly setting the sequence modal unified space feature vector and the structural domain modal unified space feature vector to zero, this invention discovers... Choosing 0.15 yields the best results, while the GO function tag modality unified space feature vector is always retained as a stable semantic anchor. This process can be represented as: ;in," " indicates scalar-vector multiplication; This represents the sequence modality unified space feature vector after random zeroing. This represents the eigenvector of the modal uniformity space of the structural domain after random zeroing. When the value is 0, the entire feature segment is set to the zero vector. The feature remains unchanged when the value is 1. For example, when... When =0, then =0, when When =1, = .
[0054] If obtained by random sampling If all values are 0, then one of them is randomly set to 1 (i.e., forcing the retention of at least one of the sequence modality unified space feature vector and the domain modality unified space feature vector as input). This mechanism forces the model to learn during training to complete protein-GO functional label matching even with "only sequence", "only domain", or even "one of them is weak", thereby improving robustness when real data is incomplete.
[0055] In this embodiment, to improve robustness under conditions of missing or noisy modalities, an asymmetric feature discarding strategy is adopted. By randomly masking specific modal features during training, the model is forced to learn robust feature representations, thereby effectively dealing with noise interference or missing modalities. Specifically, protein sequence modalities and domain modalities are randomly masked with a preset probability, while maintaining the availability of GO functional label embeddings. A "forced retention" rule is set to ensure that at least one protein-side (sequence and domain) modal input exists. This strategy forces the model to learn a discrimination rule during optimization that "partial protein evidence can match functional semantics," thereby reducing overfitting to a single modality and enhancing robustness against incomplete annotations or missing domains.
[0056] In step S4, in some implementations, an adaptive gating fusion mechanism is employed. This mechanism dynamically calibrates and allocates weights for sequence and text modalities based on the specificity of the input samples, achieving adaptive complementarity of multi-source information. Simultaneously, a shared feature consistency transformation network (i.e., a shared multilayer perceptron network) is introduced before fusion to align modal distributions and improve representation stability. This mechanism first concatenates the mapped sequence, domain, and GO functional label features to construct a global context vector. Then, a learnable gating network calculates the weights of each modality, ultimately generating a fused representation dynamically through a weighted summation. This process allows the model to automatically adjust the contribution of each modality in the feature space based on the specific circumstances of the samples (such as the level of sequence homology or the richness of domain information), thereby achieving accurate alignment of heterogeneous features. Finally, this invention reconstructs protein function prediction into a "protein-GO functional label matching" problem, outputting the compatibility probability between the protein and any candidate GO functional label. Since GO function tags participate in inference through their textual definition embeddings, this method does not rely on fixed discrete tag IDs. It can infer new GO function tags that have not appeared in the training phase based on semantic similarity, thereby significantly improving the generalization ability of new function tags in long-tail categories and zero-shot scenarios, and maintaining stable prediction performance when multimodal incompleteness or noise exists.
[0057] Specifically, such as Figure 2 As shown, the function prediction network includes a shared multilayer perceptron network, a gating network (specifically, a feature fusion gating network based on Softmax normalization), and a fully connected network; the sequence modality unified space feature vector, the structural domain modality unified space feature vector, and the GO function label unified space feature vector are input into the function prediction network with an adaptive gating fusion mechanism, as follows. Figure 3 As shown, it specifically includes: S41. The sequence modality unified space feature vector after random zeroing, the structural domain modality unified space feature vector after random zeroing, and the GO function label unified space feature vector are simultaneously input into the shared multilayer perceptron network and the gated network. In the gated network, the sequence modality unified space feature vector after random zeroing, the structural domain modality unified space feature vector after random zeroing, and the GO function label unified space feature vector are concatenated to form a global context vector. Then, the global context vector generates adaptive fusion weights. The splicing process is specifically represented as follows: ,in" " indicates vector concatenation, and S represents the global context vector obtained after concatenation.
[0058] The gating network calculation method is as follows: ; in, The context transformation matrix, Numerical scales used to stabilize different modal characteristics For activation function, The matrix (W) for outputting the gating score. All of these are learnable parameters. The weights are interpreted as the relative contribution of each modality to the current sample-label matching judgment. (R represents a real vector, then) α (This is a three-dimensional real vector) serving as the weight vector for the three modes. ,Right now This is a three-dimensional weight vector, where each dimension represents a modality. The first dimension... Corresponding to the structural domain mode, the second dimension Corresponding sequence modes, for three dimensions Corresponding to the GO function tag modal.
[0059] In a shared multilayer perceptron network, the sequence modality unified space feature vectors after random zeroing, the structural domain modality unified space feature vectors after random zeroing, and the GO function label unified space feature vectors undergo a nonlinear feature transformation operation to obtain the transformed vector. = ,in, This represents a nonlinear characteristic transformation operation. These correspond to the domain mode, sequence mode, and GO function tag mode, respectively. Specifically, when k=1, it corresponds to the domain mode, i.e. = When k=2, the corresponding sequence mode is, i.e. = When k=3, it corresponds to the GO function tag modality, i.e. = . The context transformation matrix, Numerical scales used to stabilize different modal characteristics This is the activation function. This step can align the modal distribution and improve the stability of the representation.
[0060] S42. After fusing the transformed vector with the adaptive fusion weights, input it into the fully connected network (i.e., the classification head, specifically a fully connected layer, i.e., a stacked fully connected network) to obtain the predicted probability of whether the protein has a certain GO functional label.
[0061] Specifically, the fusion operation involves a weighted summation of the three modal features after transformation, as expressed as follows: ; These correspond to the structural domain mode, sequence mode, and GO function tag mode, respectively. This represents a nonlinear characteristic transformation operation. For the final fusion representation, , , The specific meanings of H1, H2, and H3 are explained above.
[0062] Will The input is fed into a fully connected network (i.e., the classification head), and the output is a binary classification result, i.e., the predicted probability. ,but ;in, and These represent the output layer weights and biases, respectively. The sigmoid function outputs values between 0 and 1, which can be interpreted as the probability that "the protein is matched / associated with the GO functional label".
[0063] S43. Based on the predicted probability of whether a protein possesses a certain GO functional tag and the actual situation of whether a protein possesses that GO functional tag, the cross-entropy loss function is obtained.
[0064] Specifically, the cross-entropy loss function is: ; in, The loss function; The total number of samples; For the first Whether a sample has a certain GO function tag (0 indicates that it does not have the GO function tag, and 1 indicates that it has the GO tag). For the model to the first The predicted probability of each sample output (i.e., the predicted probability of whether a protein possesses a certain GO functional tag).
[0065] S44. Train the projection network, shared multilayer perceptron network, gated network and fully connected network according to the cross-entropy loss function (the dataset can be divided into training set and test set during training) until the cross-entropy loss function converges to obtain the protein function prediction model.
[0066] In this step, during training, the parameters of the projection network, the shared multilayer perceptron network, the gated network, and the fully connected network are adjusted until the cross-entropy loss function converges.
[0067] The protein function prediction model trained using the above method can accurately predict protein functions. For GO function tags that have not appeared in the training set data, the protein function prediction model obtained in this invention can directly obtain semantic expressions based on their textual descriptions. By matching the protein feature input classification head with the data, the probability that the protein possesses the new function can be directly calculated, thus achieving true zero-shot GO function prediction. To verify the effectiveness of this invention, comparative experiments were conducted on the publicly available benchmark dataset CAFA5, and the dataset partitioning method of ProtGO was used for training and testing. Experimental results show that the comprehensive evaluation index F obtained by this invention on the conventional test set is [missing information]. max =0.5045 / 0.7611 / 0.7470 (BP / MF / CC), all higher than the baseline model; and achieved a significantly higher AUPR on the unseen tag set, AUPR=0.2393 / 0.4806 / 0.5862 (BP / MF / CC), while the baseline method performed poorly under this setting, demonstrating the generalization ability of this invention for long-tail unseen tags. Wherein, AUPR represents the area under the precision-recall curve, BP represents biological process, MF represents molecular function, and CC represents cellular component.
[0068] This invention also provides a method for predicting protein function (i.e., a multimodal protein function prediction method with zero-sample generalization ability), comprising the following steps: The protein function to be tested is obtained by inputting the data of the protein to be tested into the protein function prediction model trained by the training method described above.
[0069] The data for the protein whose function is to be tested is the protein sequence, or the data for the protein whose function is to be tested is the protein sequence and protein domain text.
[0070] This invention also provides a training device for a protein function prediction model, wherein, as shown in the embodiments of the present invention, a training device for a protein function prediction model is provided. Figure 4 As shown, the training device for the protein function prediction model includes: Data acquisition unit 1 is used to acquire a training dataset, which includes protein sequences of known proteins, protein domain text, and GO function description text. Data processing unit 2 is used to convert the protein sequence, protein domain text and GO functional description text into embedded representations, respectively, and then obtain sequence modality feature vectors, domain modality feature vectors and GO functional modality feature vectors. Model training unit 3 is used to input the sequence modality feature vector, structural domain modality feature vector, and GO functional label modality feature vector into three structurally identical projection networks to obtain the sequence modality unified space feature vector, structural domain modality unified space feature vector, and GO functional label unified space feature vector, respectively. The sequence modality unified space feature vector, structural domain modality unified space feature vector, and GO functional label unified space feature vector are then input into a function prediction network with an adaptive gating fusion mechanism. After training the projection network and the function prediction network, the protein function prediction model is obtained.
[0071] This invention also provides a protein function prediction device, wherein, as shown in the embodiments of the present invention, a protein function prediction device is provided. Figure 5 As shown, it includes: Data acquisition unit 4 is used to acquire data of the protein with the function to be tested, wherein the data of the protein with the function to be tested is a protein sequence, or the data of the protein with the function to be tested is a protein sequence and protein domain text. Functional prediction unit 5 is used to input the acquired data of the protein with the function to be tested into the protein function prediction model trained by the training device described in claim 7, so as to obtain the protein function (obtain the GO function tag of the protein sequence to be tested).
[0072] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the training method for the protein function prediction model described above or the protein function prediction method described above.
[0073] The computer-readable medium described in this embodiment can be a computer-readable storage medium, a computer-readable signal medium, or any combination thereof. A computer-readable storage medium can 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 of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, 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 device, magnetic storage device, or any suitable combination thereof. In some embodiments, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0074] This invention also provides an electronic device, wherein, as Figure 6 As shown, the electronic device includes a memory 10, a processor 20, and a display 30. The memory 10 stores a computer program 40 that can run on the processor. When the computer program is executed by the processor, it implements the training method of the protein function prediction model as described above in the embodiments of the present invention or the prediction method of protein function as described above in the embodiments of the present invention.
[0075] In this embodiment, the memory can be volatile memory, such as random access memory; the memory can also be non-volatile memory, such as read-only memory, flash memory, hard disk, etc. The processor can be a central processing unit, controller, microcontroller, microprocessor, or other data processing chip.
[0076] In summary, this invention provides a protein function prediction method, model training method, apparatus, device, and medium. This invention fully considers protein domains and constructs a protein function prediction model by capturing the potential relationships between protein sequences, protein domain text, and GO function label text. Specifically, this invention introduces three modalities of data into the training dataset: protein sequences of known proteins, protein domain text, and GO function label description text. By obtaining the embedded representations of these three modalities, replacing traditional discrete label IDs, the model can perform zero-shot inference for GO function labels not present in the training dataset based on semantic similarity. Then, this invention reconstructs the traditional classification and discrimination task into a multimodal semantic alignment task. By inputting the feature vectors corresponding to the three heterogeneous modalities into the projection network to map to a unified semantic space (i.e., a unified latent space), a high-dimensional cross-modal mapping between biological entities and natural language is established, and a unified multimodal representation framework is constructed (breaking the limitation of traditional methods that only rely on discrete identifiers or simple sequence encoding). That is, the sequence modal feature vector, the structural domain modal feature vector, and the GO function label modal feature vector are regarded as complementary model representations of the same biological entity, thereby improving the performance of the model and its generalization ability in zero-shot scenarios.
[0077] Furthermore, the present invention employs a functional prediction network with an adaptive gating fusion mechanism, which can dynamically calibrate and allocate the weights of each modality according to the specificity of the input data, thereby achieving adaptive complementarity of multi-source information. This allows for automatic adjustment of the contribution of each modality feature in the feature space, thus achieving accurate alignment of heterogeneous modal features, reducing noise, and enhancing the robustness of the model when faced with incomplete data.
[0078] The protein function prediction model obtained using the training method provided in this invention has good robustness and zero-shot generalization ability. It can effectively predict unknown GO function labels of proteins. It does not rely on fixed discrete label IDs and can infer new GO terms that have not appeared in the training stage based on semantic similarity. This significantly improves the generalization ability for new function labels in long-tail categories and zero-shot scenarios. It also maintains stable prediction performance when multimodal incompleteness or noise exists. It solves the problems of traditional methods in heterogeneous modality fusion and the limitations of zero-shot generalization (insufficient prediction ability for unknown GO function labels), easy introduction of noise, lack of effective mechanisms to filter redundant information and enhance the robustness of the model when facing incomplete data.
[0079] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A training method for a protein function prediction model, characterized in that, The protein function prediction model comprises three structurally identical projection networks and a function prediction network with an adaptive gating fusion mechanism. The training method of the protein function prediction model includes the following steps: Obtain a training dataset, which includes protein sequences of known proteins, protein domain text, and GO function label description text; After converting the protein sequence, protein domain text, and GO functional tag description text into embedded representations, sequence modality feature vectors, domain modality feature vectors, and GO functional tag modality feature vectors are obtained, respectively. The sequence modality feature vector, the structural domain modality feature vector, and the GO functional label modality feature vector are respectively input into three projection networks with the same structure to obtain the sequence modality unified space feature vector, the structural domain modality unified space feature vector, and the GO functional label unified space feature vector, respectively. The sequence modality unified spatial feature vector, the structural domain modality unified spatial feature vector, and the GO functional label unified spatial feature vector are input into a functional prediction network with an adaptive gating fusion mechanism. After training the projection network and the functional prediction network, the protein function prediction model is obtained.
2. The training method according to claim 1, characterized in that, The protein sequence is encoded using a protein language model and converted into an embedded representation, and then mean pooling is performed to obtain the sequence modality feature vector. The text embedding model is used to encode the protein domain text and convert it into an embedded representation. Then, mean pooling is performed to obtain the domain modal feature vector. The text embedding model is used to encode the GO function label description text and convert it into an embedded representation. Then, mean pooling is performed to obtain the GO function label modal feature vector.
3. The training method according to claim 1, characterized in that, During the training of the projection network and the function prediction network, an asymmetric feature random deactivation mechanism is adopted. The sequence mode unified space feature vector and the structural domain mode unified space feature vector are randomly zeroed with a preset probability, and at least one of the sequence mode unified space feature vector and the structural domain mode unified space feature vector is forcibly retained as input. The result is the sequence mode unified space feature vector and the structural domain mode unified space feature vector after random zeroing, while the GO function label mode unified space feature vector is always retained as input.
4. The training method according to claim 3, characterized in that, The functional prediction network includes a shared multilayer perceptron network, a gated network, and a fully connected network. The input of the sequence modality unified spatial feature vector, the structural domain modality unified spatial feature vector, and the GO function label unified spatial feature vector into a function prediction network with an adaptive gating fusion mechanism specifically includes: The sequence modality unified space feature vector after random zeroing, the structural domain modality unified space feature vector after random zeroing, and the GO function label unified space feature vector are simultaneously input into the shared multilayer perceptron network and the gated network. In a shared multilayer perceptron network, the sequence modality unified space feature vector after random zeroing, the structural domain modality unified space feature vector after random zeroing, and the GO function label unified space feature vector are subjected to nonlinear feature transformation to obtain the transformed vector. In the gated network, the sequence modality unified space feature vector after random zeroing, the structural domain modality unified space feature vector after random zeroing, and the GO function label unified space feature vector are concatenated to form a global context vector. Then, the global context vector generates adaptive fusion weights. After fusing the transformed vector with adaptive fusion weights, it is input into a fully connected network to obtain the predicted probability of whether a protein has a certain GO functional label.
5. The training method according to claim 4, characterized in that, The cross-entropy loss function is obtained based on the predicted probability of whether a protein possesses a certain GO functional tag and the actual situation of whether a protein possesses that GO functional tag. The projection network, shared multilayer perceptron network, gated network, and fully connected network are trained according to the cross-entropy loss function until the cross-entropy loss function converges, thus obtaining the protein function prediction model.
6. A method for predicting protein function, characterized in that, Includes the following steps: The data of the protein whose function is to be tested are input into the protein function prediction model trained by the training method described in any one of claims 1-5 to obtain the protein function; The data for the protein whose function is to be tested is the protein sequence, or the data for the protein whose function is to be tested is the protein sequence and protein domain text.
7. A training device for a protein function prediction model, characterized in that, The training device for the protein function prediction model includes: The data acquisition unit is used to acquire a training dataset, which includes protein sequences of known proteins, protein domain text, and GO function label description text. The data processing unit is used to convert the protein sequence, protein domain text, and GO functional tag description text into embedded representations, respectively, and then obtain sequence modality feature vectors, domain modality feature vectors, and GO functional tag modality feature vectors. The model training unit is used to input the sequence modality feature vector, the structural domain modality feature vector, and the GO functional label modality feature vector into three structurally identical projection networks, respectively, to obtain the sequence modality unified space feature vector, the structural domain modality unified space feature vector, and the GO functional label unified space feature vector. The sequence modality unified space feature vector, the structural domain modality unified space feature vector, and the GO functional label unified space feature vector are then input into a function prediction network with an adaptive gating fusion mechanism. After training the projection network and the function prediction network, the protein function prediction model is obtained.
8. A device for predicting protein function, characterized in that, include: A data acquisition unit is used to acquire data of a protein with a function to be tested, wherein the data of the protein with the function to be tested is a protein sequence, or the data of the protein with the function to be tested is a protein sequence and protein domain text. The function prediction unit is used to input the acquired data of the protein with the function to be tested into the protein function prediction model trained by the training device described in claim 7, so as to obtain the protein function.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the training method according to any one of claims 1-5 or the prediction method according to claim 6.
10. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and when the computer program is executed by the processor, it implements the training method of any one of claims 1-5 or the prediction method of claim 6.