A TCR-epitope binding prediction method and system based on transfer learning

Through transfer learning and deep neural network technology, TCR and epitope sequence features are extracted, which solves the data complexity and feature extraction problems of traditional methods when predicting TCR and epitope binding specificity, and achieves higher prediction accuracy and stability. sex, providing a reliable tool for biomedical research.

CN118016158BActive Publication Date: 2024-08-23CHANGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410161424.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-05
Publication Date
2024-08-23
Estimated Expiration
2044-02-05

AI Technical Summary

Technical Problem

Traditional bioinformatics methods and deep learning models face data complexity, feature extraction difficulty and data quality issues when predicting TCR and epitope binding specificity, resulting in insufficient prediction accuracy and stability.

Method used

Using a method based on transfer learning, the TCR and epitope sequence features are extracted through the autoregressive encoder model and the ProtBert model, and combined with the two-dimensional histogram and multi-head attention mechanism, a deep neural network is constructed for feature fusion and prediction.

Benefits of technology

It improves the accuracy and generalization ability of predicting the binding specificity of TCR and epitope, enhances the discriminative power of the model for the interaction between different TCR and epitope, and provides a more reliable and efficient biomedical research tool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118016158B
    Figure CN118016158B
Patent Text Reader

Abstract

The invention discloses a TCR-epitope binding prediction method based on transfer learning, comprising: obtaining a TCR sequence data set, performing data processing on the TCR sequence data set, obtaining an epitope sequence by filtering the TCR sequence, and obtaining a training set and a test set by a dynamic training strategy; training an autoregressive encoder model and a ProtBert model, and extracting features of the TCR sequence and the epitope sequence to obtain TCR sequence features and epitope sequence features; performing data conversion on the TCR sequence features and the epitope sequence features through a two-dimensional histogram, and inputting them into an output vector in a two-dimensional convolutional network, inputting the output vector into a fully connected network to obtain a first output vector, and merging the output vectors in the two-dimensional convolutional network to obtain a second network; merging the first output vector and the second network through a multi-head attention strategy, flattening the merged vector, and obtaining the input of the fully connected network, thereby improving the prediction accuracy of the TCR-epitope binding task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of immunology and bioinformatics, and in particular to a TCR-epitope binding prediction method and system based on transfer learning. Background Art

[0002] T cell recognition of epitopes plays a vital role in adaptive immune responses, providing defense against a variety of pathogens and playing a vital role in the human immune system. TCR is a class of molecules present on the surface of T cells. Its main function is to recognize antigenic peptides presented by major histocompatibility complex (MHC) molecules. These antigenic peptides usually originate from pathogens in the body, such as viruses, bacteria or other microorganisms. TCR recognition of antigens is highly specific, and this specificity comes from the huge diversity of TCR. Each T cell produces a unique TCR through a gene rearrangement process, allowing the human body to recognize and respond to a wide range of antigenic epitopes. The generation of these protein receptors mainly originates from the quasi-random recombination process of V(D)J in somatic cells. This mechanism can theoretically produce extremely large TCR diversity in individuals, estimated to reach 1015 to 1020 different combinations, each of which has its own unique antigen recognition ability. Due to this diversity, it is extremely challenging to reliably predict the binding specificity of TCR from the sequence and understand the mechanism of TCR-pMHC interaction. Understanding the mechanisms that control the interaction between TCR-pMHC is considered an important step in personalized immunotherapy and the development of targeted vaccines, and the prediction of TCR-epitope binding specificity has been a key research topic. However, it is still difficult to predict the binding specificity between a specific TCR and an epitope. First, traditional bioinformatics methods often rely on a large amount of experimental data, but these methods face problems of complexity and efficiency when dealing with huge immune repertoire data. Second, the application of traditional machine learning models in this field is also limited by the quality of the data available for model training. In addition, existing deep learning methods still face challenges. On the one hand, due to the complex and diverse relationship between TCR sequences and epitope sequences, traditional feature extraction methods are difficult to capture the complexity. On the other hand, due to the small number of different epitopes bound to specific TCRs recorded in the study and the overall low quality of the binding data, existing deep learning models often face challenges in accuracy and stability when making predictions.

[0003] In recent years, transfer learning, as a machine learning technique, has begun to demonstrate its strong potential in multiple fields. By using a pre-trained model as a starting point, transfer learning can significantly reduce the time and computing resources required for model training. Therefore, the model does not need to learn from scratch, but adjusts and optimizes the features and patterns that have been learned. Pre-trained models have learned to recognize and process complex patterns, which can improve the accuracy of TCR-epitope binding predictions, which is particularly important for identifying rare or emerging epitopes. Because transfer learning models have been trained on diverse data sets, they are generally better able to generalize to new, unseen data. Therefore, developing new prediction methods using related technologies to improve the accuracy of predictions is an important research direction in this field. Summary of the invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by the present invention is: the present invention solves the problem that traditional bioinformatics methods often rely on a large amount of experimental data, but these methods face complexity when processing huge immune repertoire data, and the application of traditional machine learning models in this field is also limited by the quality of available data during model training. On the one hand, due to the complex and diverse relationship between TCR sequences and epitope sequences, traditional feature extraction methods are difficult to obtain the complexity therebetween. On the other hand, due to the small number of different epitopes bound to specific TCRs recorded in the study, and the overall quality of the binding data is low.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides a TCR-epitope binding prediction method based on transfer learning, comprising:

[0008] Acquire a TCR sequence data set, perform data processing on the TCR sequence data set, obtain epitope sequences by filtering the TCR sequences, and obtain a training set and a test set by a dynamic training strategy;

[0009] The training set is used to train the autoregressive encoder model and the ProtBert model, and features of the TCR sequence and epitope sequence are extracted to obtain TCR sequence features and epitope sequence features;

[0010] The TCR sequence features and epitope sequence features are converted into data through a two-dimensional histogram, and are input into an output vector in a two-dimensional convolutional network, and the output vector is input into a fully connected network to obtain a first output vector, and the output vectors in the two-dimensional convolutional network are merged to obtain a second network;

[0011] The first output vector and the second network are merged through a multi-head attention strategy, and the merged vector is flattened to obtain the input of the fully connected network.

[0012] As a preferred embodiment of the TCR-epitope binding prediction method based on transfer learning described in the present invention, wherein: the TCR sequence data set is processed, and the epitope sequence is obtained by filtering the TCR sequence, including:

[0013] All TCR sequences containing ambiguous amino acids were removed, and epitopes of related TCR sequences with repeated pairs and amino acids less than a threshold were removed to obtain epitope sequences.

[0014] As a preferred embodiment of the TCR-epitope binding prediction method based on transfer learning described in the present invention, the training set and the test set are obtained by a dynamic training strategy, including:

[0015] Read TCR and epitope data from the dataset, initialize an empty list to store new TCR and epitope data, traverse each TCR and epitope pair, add TCR and epitope to the dictionary, and calculate the frequency distribution of epitopes;

[0016] Traverse each TCR and epitope pair twice, add the original TCR and epitope to the list, and for each TCR sequence, select an epitope sequence from the original epitope according to the frequency distribution of each epitope in the dictionary as a negative sample pair, and add the new TCR and epitope data to the initialized empty list. The frequency distribution of epitope sequences in the newly paired negative sample set should be the same as that in the positive sample set;

[0017] Create a new data frame, add the original positive sample and generated negative sample data and labels to the data frame, and save the data frame as an output file as a training set.

[0018] As a preferred embodiment of the TCR-epitope binding prediction method based on transfer learning described in the present invention, wherein: an autoregressive encoder model is trained to extract features from the TCR sequence, including:

[0019] The autoregressive encoder model TCRpeg was used to characterize the TCR sequence using a recurrent neural network with a GRU layer to generate vector encoding. After training, the last layer of the hidden layer of TCRpeg was extracted as the numerical embedding of the epitope sequence.

[0020] As a preferred embodiment of the TCR-epitope binding prediction method based on transfer learning described in the present invention, the ProtBert model extracts features from the epitope sequence, including:

[0021] The ProtBert model is pre-trained, and the processed sequence is passed through the ProtBert model to extract the relevant features of each amino acid and obtain the epitope sequence features.

[0022] As a preferred embodiment of the TCR-epitope binding prediction method based on transfer learning described in the present invention, wherein: the TCR sequence features and epitope sequence features are converted into data through a two-dimensional histogram, including:

[0023] The vector of each site is converted into the same number of dimensions, each element in the one-dimensional vector is traversed, mapped to the corresponding position in the two-dimensional histogram, and the row index and column index in the two-dimensional matrix are determined using the value of the element.

[0024] As a preferred embodiment of the TCR-epitope binding prediction method based on transfer learning described in the present invention, wherein: an output vector is input into a two-dimensional convolutional network, the output vector is input into a fully connected network to obtain a first output vector, and the output vectors in the two-dimensional convolutional network are merged to obtain a second network, including:

[0025] The epitope sequence features and TCR sequence features are respectively input into the two-dimensional convolutional network, the output data of the two paths are merged, vectorized, and input into the three-layer fully connected network to obtain the first output vector;

[0026] Through a layer of two-dimensional convolution, two branches of convolution network data are obtained. The first branch is connected to multiple two-dimensional convolution networks to output a second output vector. The second branch passes through multiple convolution networks to output a third output vector. The second output vector and the third output vector are combined to obtain a second network.

[0027] The first output vector and the second network are merged through a multi-head attention strategy, and the merged vector is flattened to obtain the input of the fully connected network.

[0028] In a second aspect, the present invention provides a system for TCR-epitope binding prediction based on transfer learning, comprising:

[0029] A data processing module is used to obtain a TCR sequence data set, perform data processing on the TCR sequence data set, obtain epitope sequences by filtering the TCR sequences, and obtain a training set and a test set by a dynamic training strategy;

[0030] A feature extraction module is used to train the autoregressive encoder model and the ProtBert model, and to extract features from the TCR sequence and epitope sequence to obtain TCR sequence features and epitope sequence features;

[0031] A data conversion module, used to perform data conversion on the TCR sequence features and epitope sequence features through a two-dimensional histogram, and input them into an output vector in a two-dimensional convolutional network, input the output vector into a fully connected network to obtain a first output vector, and merge the output vectors in the two-dimensional convolutional network to obtain a second network;

[0032] The vector merging module is used to merge the first output vector and the second network through a multi-head attention strategy, flatten the merged vector, and obtain the input of the fully connected network.

[0033] In a third aspect, the present invention provides a computing device, comprising:

[0034] Memory and processor;

[0035] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the TCR-epitope binding prediction method based on transfer learning are implemented.

[0036] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the TCR-epitope binding prediction method based on transfer learning.

[0037] Beneficial effects of the present invention: The TCR-epitope binding prediction method and system based on transfer learning proposed in the present invention help improve the generalization ability of the model, enable the model to better handle complex situations in the real world, and help more accurately predict the binding specificity between TCR and epitopes. Pre-trained models are usually trained on a large amount of data, which can reveal patterns and associations that may not be observed on small data sets, better capture local and global features of sequences, improve the prediction ability of TCR-epitope binding specificity, and help enhance the model's discrimination of different TCR-epitope interactions, which not only improves the prediction accuracy of TCR-epitope binding tasks, but also provides a more reliable and efficient tool for research and practical applications in related biomedical fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:

[0039] Figure 1 The overall flow chart of a TCR-epitope binding prediction method based on transfer learning provided by the present invention;

[0040] Figure 2 A comparison diagram of the AUROC curves of the present invention and other methods in a TCR-epitope binding prediction method based on transfer learning provided by the present invention;

[0041] Figure 3 A comparison diagram of the PRROC curves of the present invention and other methods in a TCR-epitope binding prediction method based on transfer learning provided by the present invention;

[0042] Figure 4 A comparison diagram of the predicted value distribution of a TCR-epitope binding prediction method based on transfer learning provided by the present invention and other methods. DETAILED DESCRIPTION

[0043] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

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

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

[0046] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0047] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0048] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0049] Example 1

[0050] Reference Figure 1 , as an embodiment of the present invention, provides a TCR-epitope binding prediction method based on transfer learning, comprising:

[0051] S1: Obtain a TCR sequence data set, perform data processing on the TCR sequence data set, obtain epitope sequences by filtering the TCR sequences, and obtain training sets and test sets through a dynamic training strategy;

[0052] Furthermore, all TCR sequences containing ambiguous amino acids were removed, and the epitopes of the related TCR sequences with repeated pairs and amino acids less than a threshold were removed to obtain epitope sequences;

[0053] It should be noted that the pos_train training set was constructed using the TetTCR-seq database, VDJdb database, and McPAS-TCR database. The data set was randomly divided into 5 subsets and trained using a 5-fold cross-validation procedure. All TCR sequences containing ambiguous amino acids (B, J, O, U, X) were removed, and two additional filtering steps were performed: removing duplicate pairs and excluding epitopes of related TCR sequences with less than a threshold of 10 amino acids. TCR-epitope pairs that were different from the positive sample set were regarded as negative samples. A training set containing 7465 positive sample pairs and a test set containing 598 positive sample pairs and 1154 negative sample pairs were constructed.

[0054] Considering data quality and specific binding ability, shorter TCR sequences may contain less information and may not be sufficient to accurately represent the specific binding of T cell receptors. Therefore, in order to ensure the quality and reliability of the data, shorter TCR sequences are excluded; the specific binding of T cell receptors to antigen epitopes requires a certain length of amino acid sequence, and shorter TCR sequences may not provide enough amino acid residues to interact specifically with the epitope. Therefore, selecting longer TCR sequences can increase the accuracy and reliability of predictions.

[0055] Furthermore, we read TCR and epitope data from the dataset, initialize an empty list to store new TCR and epitope data, iterate over each TCR and epitope pair, add the TCR and epitope to the dictionary, and calculate the frequency distribution of the epitope;

[0056] Traverse each TCR and epitope pair twice, add the original TCR and epitope to the list, and for each TCR sequence, select an epitope sequence from the original epitope according to the frequency distribution of each epitope in the dictionary as a negative sample pair, and add the new TCR and epitope data to the initialized empty list. The frequency distribution of epitope sequences in the newly paired negative sample set should be the same as that in the positive sample set;

[0057] Create a new data frame, add the original positive sample and generated negative sample data and labels to the data frame, and save the data frame as an output file as a training set;

[0058] It should be noted that a dynamic training strategy is adopted. For each TCR, one is randomly selected from all epitopes for pairing as a negative sample pair. The output file contains positive and negative sample pairs. The dynamic training strategy can adjust the learning rate according to the performance of the model during the training process so that it can converge to the optimal solution faster, which helps to reduce training time and improve efficiency. The dynamic training strategy can prevent the model from overfitting by adjusting regularization parameters or stopping training in advance, thereby improving its generalization ability, so that the model can be adaptively adjusted during the training process to maximize performance. By optimizing parameters according to the training performance of the model, the prediction ability and accuracy of the present invention can be further improved.

[0059] S2: train the autoregressive encoder model and the ProtBert model, and extract features of the TCR sequence and epitope sequence to obtain TCR sequence features and epitope sequence features;

[0060] Furthermore, the autoregressive encoder model TCRpeg is used to characterize the TCR sequence using a recurrent neural network with a GRU layer to generate vector encoding, and the last layer in the hidden layer of TCRpeg is extracted after training as the numerical embedding of the epitope sequence;

[0061] It should be noted that the autoregressive encoder model TCRpeg can generate high-quality vector encoding for the TCR sequence, and the dimension of the obtained embedding vector is the set hidden layer size.

[0062] The TCRpet model was trained to extract features from TCR sequences. A public dataset containing 1,000,000 TCR sequences was used to train the word2vec model. The parameters of the word2vec model were: 128 training times, a batch size of 64, a learning rate of 0.0001, a window size of 5, and an embedding size of 1024. Word2vec achieves digital representation of amino acids by learning the amino acid composition information of the peptide sequence context. For a TCR sequence of length L, the TCPpet model can represent the sequence as, where L is the sequence length and 1024 is the dimension of each amino acid.

[0063] It should also be noted that the present invention prefers the autoregressive encoder model TCRpeg, which can capture the key features of the sequence input through unsupervised learning of the mapping between the latent space and the sequence. Only the currently abundant common amino acid sequences are required for pre-training with TCRpeg. More importantly, unlike the encoders in models such as TITAN or pMTnet, TCRpeg can process sequences of arbitrary length without padding them to a fixed length. No need to pad or truncate the sequence means that the integrity of the original sequence can be maintained. When processing long sequences, maintaining the integrity of the sequence can provide richer contextual information, which is crucial for understanding the complex patterns and relationships in the sequence. Both padding and truncation can cause loss or distortion of information. Processing the original sequence can avoid such information distortion, thereby providing more accurate data analysis. Avoiding sequence padding can save computing resources. Padding sequences to a fixed length often results in processing many unnecessary padding characters, increasing the computational burden. Processing sequences of actual length can make more efficient use of computing resources.

[0064] Furthermore, the ProtBert model is pre-trained, and the processed sequence is passed through the ProtBert model to extract the relevant features of each amino acid and obtain the epitope sequence features;

[0065] It should be noted that the ProtBert model is used to extract features from epitope sequences. ProtBert uses large-scale protein sequence and structure datasets for pre-training and learns protein representations through self-supervised learning tasks. ProtBert combines protein sequence and structural information and uses a bidirectional Transformer model to learn the semantic representation of proteins. It takes into account the interactions between amino acids in protein sequences and the spatial relationships in structures. For an epitope sequence of length L, the ProtBert model can represent the sequence as, where L is the sequence length and 1024 is the dimension of each amino acid.

[0066] It should also be noted that for epitope sequences, the ProtBert model is used, which is based on the BERT model and is a deep learning model that can capture long-range dependencies within a sequence. The function and immunogenicity of epitopes often depend on long-range amino acid interactions in the sequence. The use of this model can better understand the characteristics of epitope sequences. BERT is a model widely used in the field of natural language processing, characterized by its bidirectional Transformer encoder. ProtBert uses the bidirectional characteristics of BERT to not only identify individual amino acids in the sequence, but also understand their role in the overall sequence context. This is particularly important for identifying epitopes, because the characteristics of epitopes depend not only on specific amino acid residues, but also on the sequence environment around them. ProtBert is pre-trained on a very wide range of protein sequence datasets, giving it good generalization ability and understanding of different types of protein sequences. The processed sequence is passed through the ProtBert model to extract the context-related features of each amino acid, and the sequence of length L is encoded into a high-dimensional feature vector of L*1024 dimensions. The advanced feature vectors provided by these models can be used for sequence classification, clustering, and similarity calculation to achieve in-depth analysis and prediction.

[0067] S3: Perform data conversion on TCR sequence features and epitope sequence features through two-dimensional histograms, input them into the two-dimensional convolutional network output vector, input the output vector into the fully connected network to obtain the first output vector, and merge the output vectors in the two-dimensional convolutional network to obtain the second network;

[0068] Furthermore, the vector of each site is converted into the same number of dimensions, each element in the one-dimensional vector is traversed, mapped to the corresponding position in the two-dimensional histogram, and the row index and column index in the two-dimensional matrix are determined using the value of the element.

[0069] It should be noted that the two-dimensional convolution senses the local area of ​​the input data by means of a sliding window. This enables the convolutional neural network to extract local features in the input data, such as edges, textures, and shapes. Compared with the fully connected layer, the two-dimensional convolution only focuses on the local area of ​​the input, reduces the number of parameters, and improves the computational efficiency. At the same time, the two-dimensional convolution uses the same convolution kernel to extract features at different positions during the sliding window, reduces the number of network parameters, avoids overfitting, and makes the network more robust to translation invariance. Therefore, the present invention converts the pre-trained model features into two-dimensional convolution features. For a sequence of length L, the sequence can be represented as a vector of dimension L*1024 and L*1024 by the TCRpep and ProtBert models. For the amino acid at each site in the sequence, the representation dimension is 1024. In addition, the present invention uses a 2-dimensional histogram method to convert the 1024-dimensional vector of each site into a 32*32 dimension. The number of histogram bins is set to 32, and the number of bins determines the number of rows and columns of the final generated two-dimensional matrix. Iterate over each element in the one-dimensional vector and map them to the corresponding position in the two-dimensional histogram. You can use the value of the element to determine the row and column index in the two-dimensional matrix.

[0070] Furthermore, the epitope sequence features and TCR sequence features are respectively input into a two-dimensional convolutional network, and the output data of the two paths are merged, vectorized, and input into a three-layer fully connected network to obtain a first output vector;

[0071] Through a layer of two-dimensional convolution, two branches of convolution network data are obtained. The first branch is connected to multiple two-dimensional convolution networks to output a second output vector. The second branch passes through multiple convolution networks to output a third output vector. The second output vector and the third output vector are combined to obtain a second network.

[0072] The first output vector and the second network are merged through a multi-head attention strategy, and the merged vector is flattened to obtain the input of the fully connected network.

[0073] It should be noted that the epitope sequence features and TCR sequence features are respectively input into two two-dimensional convolutional networks Conv2D1 and Conv2D2, with the same setting parameters, the convolution kernel size is (3, 3), and the number of channels is 128. Then the output data of the two paths are merged, and the vector is expanded, and then input into a three-layer fully connected network, whose nodes are 512, 256 and 128 respectively. At the same time, the outputs of Conv2D1 and Conv2D2 are merged to construct the second network, which will first pass through a layer of two-dimensional convolution Conv2D3, whose convolution kernel size is (3, 3) and the number of channels is 128. Then the data of Conv2D3 will have two branches, branch A and branch B. Branch A will be connected to multiple two-dimensional convolutional networks, where the output of each convolutional network is 128 channels, and each channel is dot-multiplied with the 128-dimensional vector output by the three-layer fully connected network to realize the cross-layer attention mechanism model and realize that the global information of the data guides the learning of the convolutional network. Secondly, branch B will pass through multiple convolutional networks to achieve more detailed feature learning. Through the first output vector fully connected network, the second output vector layer attention mechanism network, and the third output vector convolutional neural network, three output vectors are obtained. The three vectors will be merged through a multi-head attention strategy and finally used as the input of the output network to realize the specific binding prediction of the T cell receptor sequence and the epitope sequence.

[0074] It should also be noted that a deep neural network was constructed based on these two pre-trained models and effective feature fusion was performed. For the pre-trained features, a two-dimensional convolutional neural network (CNN2D) and a fully connected network (FCN) were used for modeling. In this way, the advantages of the two pre-trained features were fully combined, thereby improving the accuracy of the prediction. In the process of deep network construction, the information obtained from pre-training was effectively fused. The performance of TCR-epitope binding specificity prediction was enhanced by using a variety of modeling techniques and fusion strategies.

[0075] S4: Merge the first output vector and the second network through a multi-head attention strategy, flatten the merged vector, and obtain the input of the fully connected network.

[0076] Furthermore, the model of the present invention was compared with multiple existing TCR-epitope binding specificity prediction models, and achieved significant performance improvements in multiple evaluation criteria. These evaluation criteria include accuracy (ACC), Matthews correlation coefficient (MCC), area under the curve (AUC), average accuracy (AP) and F1 value. Among them, the accuracy evaluates the consistency between the predicted results and the actual results; the Matthews correlation coefficient comprehensively considers the true positives and true negatives in the classification results; the area under the curve reflects the overall performance of the classification model; the average accuracy represents the mean of the accuracy of the model at different thresholds; the F1 value combines the accuracy and recall rate, and comprehensively measures the accuracy and completeness of the classification model. Compared with the existing models, the model of the present invention performs well in the above evaluation indicators, showing a predictive ability that exceeds the existing models. This model can more accurately predict TCR-epitope binding specificity and show excellent performance in classification tasks.

[0077] It should be noted that the fused feature vector is flattened to meet the input conditions of the fully connected network. The output dimension of the first fully connected layer is 128, the activation function is ReLu, the output dimension of the second fully connected layer is 2, and the sigmoid function is used to predict the results. The Adam optimizer is used, the learning rate is 0.001, and the loss function is binary cross entropy.

[0078] The loss function is defined as:

[0079]

[0080] Where N is the number of samples, y i is the label of sample i, p(y i ) is the predicted probability of sample i.

[0081] The optimizer used is Adam, and the parameter update for each iteration t is:

[0082]

[0083] m t =β 1 m t-1 +(1-β 1 ) t

[0084]

[0085]

[0086]

[0087]

[0088] Among them, θ is the parameter to be optimized, β 1 and β 2 is the decay rate parameter controlling the moment estimate, ε is a small parameter added for numerical stability, and g t The gradient of the loss function with respect to the parameters, m t is the first-order matrix of the gradient in momentum form, ν t is the second-order moment estimate of the gradient in momentum form, is the bias-corrected first-order moment estimate, is the bias-corrected second-order moment estimate, θ t+1 is the update parameter formula.

[0089] It should also be noted that the model of the invention was compared with multiple existing prediction models for specific binding of T cell receptor sequences to epitope sequences, and achieved significant performance improvements in multiple evaluation indicators, including specificity (SEP), sensitivity (SEN), accuracy (ACC), Matthews correlation coefficient (MCC), F1-score (F1), area under the curve (AUC), and average accuracy (AP).

[0090] The above is a schematic scheme of a TCR-epitope binding prediction method based on transfer learning in this embodiment. It should be noted that the technical solution of the device for TCR-epitope binding prediction based on transfer learning and the technical solution of the TCR-epitope binding prediction method based on transfer learning belong to the same concept. The details of the technical solution of the device for TCR-epitope binding prediction based on transfer learning in this embodiment that are not described in detail can all be referred to the description of the technical solution of the TCR-epitope binding prediction method based on transfer learning.

[0091] The device for TCR-epitope binding prediction based on transfer learning in this embodiment includes:

[0092] A data processing module is used to obtain a TCR sequence data set, perform data processing on the TCR sequence data set, obtain epitope sequences by filtering the TCR sequences, and obtain a training set and a test set by a dynamic training strategy;

[0093] A feature extraction module is used to train the autoregressive encoder model and the ProtBert model, and to extract features from the TCR sequence and epitope sequence to obtain TCR sequence features and epitope sequence features;

[0094] A data conversion module, used to perform data conversion on the TCR sequence features and epitope sequence features through a two-dimensional histogram, and input them into an output vector in a two-dimensional convolutional network, input the output vector into a fully connected network to obtain a first output vector, and merge the output vectors in the two-dimensional convolutional network to obtain a second network;

[0095] The vector merging module is used to merge the first output vector and the second network through a multi-head attention strategy, flatten the merged vector, and obtain the input of the fully connected network.

[0096] This embodiment also provides a computing device suitable for predicting TCR-epitope binding based on transfer learning, including:

[0097] Memory and processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the TCR-epitope binding prediction method based on transfer learning as proposed in the above embodiment.

[0098] This embodiment also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the TCR-epitope binding prediction method based on transfer learning as proposed in the above embodiment.

[0099] The storage medium proposed in this embodiment and the TCR-epitope binding prediction method based on transfer learning proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0100] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (RandomAccess Memory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.

[0101] Example 2

[0102] Referring to Table 1, Figure 2-4 As an embodiment of the present invention, a TCR-epitope binding prediction method based on transfer learning is provided to verify and illustrate the technical effects adopted in this method.

[0103] Table 1 Comparison of DeepTCRNet of the present invention with other methods on TCR-epitope dataset

[0104] SEP SEN ACC MCC F1 AUC AP TCRdist 0.737 0.653 0.701 0.390 0.653 0.755 0.698 TCRGP 0.777 0.640 0.718 0.421 0.662 0.733 0.661 SETE 0.696 0.760 0.724 0.452 0.703 0.811 0.771 NetTCR 0.727 0.773 0.747 0.495 0.725 0.834 0.790 ATM-TCR 0.767 0.680 0.729 0.448 0.684 0.789 0.785 pMTnet 0.797 0.666 0.741 0.469 0.689 0.781 0.722 DeepTCRNet 0.838 0.773 0.810 0.612 0.778 0.878 0.857

[0105] As can be seen from Table 1, the evaluation indicators include specificity (SEP), sensitivity (SEN), accuracy (ACC), Matthews correlation coefficient (MCC), F1-score (F1), area under the curve (AUC) and average accuracy (AP). The DeepTCRNet model has the highest SPE score of 0.838, which means that the model can efficiently classify true negative samples correctly. The DeepTCRNet model also performs well in SEN, with a score of 0.773, indicating that the model can accurately identify true positive samples. The ACC score of the DeepTCRNet model is 0.810, indicating that the model can correctly classify most samples as a whole; the MCC score of the DeepTCRNet model is 0.612, which is an indicator for measuring the comprehensive performance of the classification model, indicating that the model has a high comprehensive performance; the F1 Score of the DeepTCRNet model is 0.778, which is an indicator that comprehensively considers the precision and recall rate of the model. A higher score indicates that the model can strike a balance between precision and recall; the AUC score of the DeepTCRNet model is 0.878, indicating that the model has a larger area under the ROC curve and has higher classification performance; the AP score of the DeepTCRNet model is 0.857, which is an indicator of the average precision of the model at different recall rates. A higher AP score indicates that the model can maintain a higher precision at different recall rates. In summary, the DeepTCRNet of the present invention shows good performance in SPE, SEN, ACC, MCC, F1, AUC and AP indicators.

[0106] Depend on Figure 2 , Figure 3 It can be seen that from the comparison of the AUROC curve and the PRROC curve of the DeepTCRNet of the present invention with other methods, from the comparison results of the AUROC curve and the PRROC curve, the curve of the present invention is higher than and wrapped in other curves. The DeepTCRNet of the present invention has a stronger ability to predict that the T cell receptor sequence can specifically bind to the epitope sequence, which means that the present invention may have higher accuracy and reliability in T cell immunity-related research and applications, which is of great significance for predicting T cell immune responses and disease diagnosis, indicating that the present invention has a stronger ability to predict that the T cell receptor sequence can specifically bind to the epitope sequence.

[0107] Depend on Figure 4 It can be seen that the prediction probability distribution diagram of each comparison method is shown. Figure 4It can be seen that the DeepTCRNet of the present invention exhibits smaller prediction errors, once again demonstrating that the present invention can well distinguish the specific binding between the T cell receptor sequence and the epitope sequence.

[0108] By reducing prediction errors, DeepTCRNet can more accurately identify which T cell receptor sequences can specifically bind to specific epitope sequences, thereby better predicting T cell immune responses and disease-related immune responses. This ability is crucial for researchers and doctors because it can help them better understand and predict the function and response of the T cell immune system. Therefore, the ability of the present invention can well distinguish the specific binding of T cell receptor sequences to epitope sequences, bringing important breakthroughs and progress to the research and application of immunology.

[0109] In comparison with existing TCR-epitope binding specificity prediction models, the model developed in this study showed significant performance advantages. After a series of comparative experiments and comprehensive evaluation on multiple datasets, the results showed that the model achieved significant performance improvement in predicting TCR-epitope binding specificity. This improvement is mainly attributed to the model's effective use of pre-trained features and the advanced architecture that integrates deep learning models and multi-head attention mechanisms. Therefore, this model not only improves the prediction accuracy of TCR-epitope binding tasks, but also provides a more reliable and efficient tool for research and practical applications in related biomedical fields.

[0110] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A TCR-epitope binding prediction method based on transfer learning, It is characterized in that include: Acquire a TCR sequence data set, perform data processing on the TCR sequence data set, obtain epitope sequences by filtering the TCR sequences, and obtain a training set and a test set by a dynamic training strategy; Train the autoregressive encoder model and the ProtBert model, and extract features from the TCR sequence and epitope sequence to obtain TCR sequence features and epitope sequence features; The TCR sequence features and epitope sequence features are converted into data through a two-dimensional histogram, and are input into an output vector in a two-dimensional convolutional network, and the output vector is input into a fully connected network to obtain a first output vector, and the output vectors in the two-dimensional convolutional network are merged to obtain a second network; The first output vector and the second network are merged through a multi-head attention strategy, and the merged vector is flattened to obtain the input of the fully connected network; The training set and the test set are obtained by the dynamic training strategy, including: Read TCR and epitope data from the dataset, initialize an empty list to store new TCR and epitope data, traverse each TCR and epitope pair, add TCR and epitope to the dictionary, and calculate the frequency distribution of epitopes; Traverse each TCR and epitope pair twice, add the original TCR and epitope to the list, and for each TCR sequence, select an epitope sequence from the original epitope according to the frequency distribution of each epitope in the dictionary as a negative sample pair, and add the new TCR and epitope data to the initialized empty list. The frequency distribution of epitope sequences in the newly paired negative sample set should be the same as that in the positive sample set; Create a new data frame, add the original positive sample and generated negative sample data and labels to the data frame, and save the data frame as an output file as a training set; The input is input into the two-dimensional convolutional network to output the vector, the output vector is input into the fully connected network to obtain the first output vector, and the output vectors in the two-dimensional convolutional network are merged to obtain the second network, including: The epitope sequence features and TCR sequence features are respectively input into the two-dimensional convolutional network, the output data of the two paths are merged, vectorized, and input into the three-layer fully connected network to obtain the first output vector; Through a layer of two-dimensional convolution, two branches of convolutional network data are obtained. The first branch is connected to multiple two-dimensional convolutional networks to output the second output vector. The second branch passes through multiple convolutional networks to output the third output vector. The second output vector is merged with the third output vector to obtain the second network.

2. The TCR-epitope binding prediction method based on transfer learning as claimed in claim 1, It is characterized in that The TCR sequence data set is processed to obtain epitope sequences by filtering the TCR sequences, including: All TCR sequences containing ambiguous amino acids were removed, and epitopes of related TCR sequences with repeated pairs and amino acids less than a threshold were removed to obtain epitope sequences.

3. The TCR-epitope binding prediction method based on transfer learning as claimed in claim 2, It is characterized in that Train the autoregressive encoder model to extract features from the TCR sequence, including: The autoregressive encoder model TCRpeg was used to characterize the TCR sequence using a recurrent neural network with a GRU layer to generate vector encoding. After training, the last layer of the hidden layer of TCRpeg was extracted as the numerical embedding of the epitope sequence.

4. The TCR-epitope binding prediction method based on transfer learning according to claim 1 or 3, It is characterized in that The ProtBert model extracts features from epitope sequences, including: The ProtBert model is pre-trained, and the processed sequence is passed through the ProtBert model to extract the relevant features of each amino acid and obtain the epitope sequence features.

5. The TCR-epitope binding prediction method based on transfer learning as claimed in claim 4, It is characterized in that The TCR sequence characteristics and epitope sequence characteristics are converted into data by a two-dimensional histogram, including: The vector of each site is converted into the same number of dimensions, each element in the one-dimensional vector is traversed, mapped to the corresponding position in the two-dimensional histogram, and the row index and column index in the two-dimensional matrix are determined using the value of the element.

6. A system for predicting TCR-epitope binding based on transfer learning, It is characterized in that include: A data processing module is used to obtain a TCR sequence data set, perform data processing on the TCR sequence data set, obtain epitope sequences by filtering the TCR sequences, and obtain a training set and a test set by a dynamic training strategy; A feature extraction module is used to train the autoregressive encoder model and the ProtBert model, and to extract features from the TCR sequence and epitope sequence to obtain TCR sequence features and epitope sequence features; A data conversion module, used to perform data conversion on the TCR sequence features and epitope sequence features through a two-dimensional histogram, and input them into an output vector in a two-dimensional convolutional network, input the output vector into a fully connected network to obtain a first output vector, and merge the output vectors in the two-dimensional convolutional network to obtain a second network; A vector merging module is used to merge the first output vector and the second network through a multi-head attention strategy, flatten the merged vector, and obtain the input of the fully connected network; The training set and the test set are obtained by the dynamic training strategy, including: Read TCR and epitope data from the dataset, initialize an empty list to store new TCR and epitope data, traverse each TCR and epitope pair, add TCR and epitope to the dictionary, and calculate the frequency distribution of epitopes; Traverse each TCR and epitope pair twice, add the original TCR and epitope to the list, and for each TCR sequence, select an epitope sequence from the original epitope according to the frequency distribution of each epitope in the dictionary as a negative sample pair, and add the new TCR and epitope data to the initialized empty list. The frequency distribution of epitope sequences in the newly paired negative sample set should be the same as that in the positive sample set; Create a new data frame, add the original positive sample and generated negative sample data and labels to the data frame, and save the data frame as an output file as a training set; The input is input into the two-dimensional convolutional network to output the vector, the output vector is input into the fully connected network to obtain the first output vector, and the output vectors in the two-dimensional convolutional network are merged to obtain the second network, including: The epitope sequence features and TCR sequence features are respectively input into the two-dimensional convolutional network, the output data of the two paths are merged, vectorized, and input into the three-layer fully connected network to obtain the first output vector; Through a layer of two-dimensional convolution, two branches of convolutional network data are obtained. The first branch is connected to multiple two-dimensional convolutional networks to output the second output vector. The second branch passes through multiple convolutional networks to output the third output vector. The second output vector is merged with the third output vector to obtain the second network.

7. An electronic device, It is characterized in that The device comprises: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having computer program instructions stored thereon, It is characterized in that When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.