T cell receptor binding prediction method and system based on double-chain consistency

By constructing a combined prediction network and using the CTFormer encoder and ESM2 model to process TCR sequences and HLA alleles, the problems of TCR double-strand consistency and cross-strand interaction were solved, the generalization ability and prediction accuracy of unseen epitopes were improved, and the development of immune engineering was promoted.

CN121747708APending Publication Date: 2026-03-27HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing methods fail to adequately capture the bi-stranded consistency and cross-stranded interactions of the T-cell receptor (TCR), resulting in poor generalization ability to unseen epitopes and failing to meet the needs of large-scale clinical applications.

Method used

A T-cell receptor binding prediction method based on double-strand consistency is adopted. By constructing a binding prediction network, the first CTFormer encoder, the second CTFormer encoder, the ESM2 model and the multilayer perceptron are used to process TCR sequences, HLA alleles and antigen peptide sequences to achieve feature fusion and probability prediction.

Benefits of technology

It improves the generalization performance for unseen HLA epitopes, enhances the accuracy of binding performance prediction, and supports the development of cancer neoantigen vaccines and personalized T-cell therapies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121747708A_ABST
    Figure CN121747708A_ABST
Patent Text Reader

Abstract

The invention discloses a T cell receptor binding prediction method and system based on double-strand consistency, and belongs to the technical field of artificial intelligence biological medicine. According to the method, the problems that the double-chain consistency and cross-chain interaction are not fully captured and the generalization ability on unseen epitopes is poor in the existing method are solved. The invention provides a double-chain consistency mechanism fusing a pre-trained protein language model ESM2 and a CTFormer encoder, chains of a TCR sequence are processed through a multi-branch encoder, HLA allele corresponds to a pseudo protein sequence and an antigen peptide sequence, modal specific representation is learned by using the ESM2 model and the CTFormer encoder, and the TCR sequence and the HLA allele correspond to the pseudo protein sequence and the antigen peptide sequence. When TCR double-chain cooperative interaction is processed, relative position bias and efficient capture of antigen peptide context signals are achieved. And the features are integrated through the MFCNN model, cross-chain interaction is fully realized through feature integration, and the chain of the TCR sequence and the consistency of a chain pair prediction result are ensured. And meanwhile, the generalization performance of epitopes without HLA is improved. The method can be applied to the field of T cell receptor binding prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence biomedical technology, specifically relating to a method and system for predicting T-cell receptor binding based on double-strand consistency. Background Technology

[0002] Currently, T cell receptors (TCRs) play a crucial role in adaptive immunity. By recognizing the antigenic peptide (pHLA) presented on the human leukocyte antigen (HLA) molecule, T cells distinguish between self-cells and non-self-cells, and perform effector functions against abnormal cells such as cancer cells, including cytotoxic killing. However, predicting the binding specificity of the TCR-pHLA complex faces significant challenges: the human TCR library exhibits extremely high sequence diversity, estimated to be as high as [missing information]. to The possible configurations mainly originate from random recombination processes; meanwhile, the TCR's Chain and The synergistic effects of the chains and the polymorphism of HLA molecules further increase the difficulty of modeling. While existing experimental methods (such as tetramer staining and high-throughput sorting) can validate binding events, they are time-consuming, labor-intensive, and costly, failing to meet the needs of large-scale clinical applications. Existing computational methods have made progress in predicting pHLA binding and peptide-TCR (pTCR) binding. For example, tools such as HLAIImaster, MHLAPre, NetMHCpan4.0, and MHCflurry utilize deep neural networks to predict pHLA binding, while models such as ImRex, TEIM, and TCR-AI focus on peptide-CDR3 interactions, often neglecting HLA context or TCR chain synergy. Emerging methods (such as pMTnet and THLANet) attempt to model pHLA-TCR relationships, but are limited by single-chain TCR representations or specific HLA alleles, failing to fully capture double-chain consistency and cross-chain interactions. Furthermore, the scarcity of validating binding data exacerbates these problems, leading to insufficient model generalization ability, especially a decline in performance on unseen peptides or external clinical libraries.

[0003] In summary, to address the issues of existing methods failing to adequately capture bi-strand consistency and cross-strand interactions, and having poor generalization ability for unseen epitopes, it is essential to propose a novel T-cell receptor binding prediction method. Summary of the Invention

[0004] The purpose of this invention is to address the problems of existing methods failing to adequately capture bi-strand consistency and cross-strand interactions, and having poor generalization ability for unseen epitopes. Therefore, this invention proposes a T-cell receptor binding prediction method and system based on bi-strand consistency.

[0005] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0006] According to one aspect of the present invention, a method for predicting T-cell receptor binding based on double-strand consistency is provided, the method specifically comprising the following steps:

[0007] Step S1: Obtain the TCR sequence and antigen peptide sequence whose binding relationship is to be predicted, as well as the HLA allele that presents the antigen peptide sequence, wherein the TCR sequence includes Chain and chain;

[0008] Step S2, TCR sequence chain, The chain, antigen peptide sequence, and HLA allele were converted into token sequences, respectively, to obtain The token sequence corresponding to the chain The token sequence corresponding to the chain, the token sequence corresponding to the antigen peptide sequence, and the token sequence corresponding to the HLA allele;

[0009] Step S3: Construct a combined prediction network, which includes a first CTFormer encoder, a second CTFormer encoder, a first ESM2 model, a second ESM2 model, a first MFCNN model, a second MFCNN model, a third MFCNN model, a fourth MFCNN model, and a multilayer perceptron.

[0010] Step S4, The token sequence corresponding to the chain is used as the input to the first CTFormer encoder. The token sequence corresponding to the chain is used as the input of the second CTFormer encoder, the token sequence corresponding to the HLA allele is used as the input of the first ESM2 model, and the token sequence corresponding to the antigen peptide sequence is used as the input of the second ESM2 model.

[0011] The output of the first CTFormer encoder As input to the first MFCNN model, the output of the first MFCNN model is... Chain features ;

[0012] The output of the second CTFormer encoder As input to the second MFCNN model, the output of the second MFCNN model is... Chain features ;

[0013] The output of the first ESM2 model As input to the third MFCNN model, the HLA features are output through the third MFCNN model. ;

[0014] The output of the second ESM2 model As input to the fourth MFCNN model, the antigen features are output through the fourth MFCNN model. ;

[0015] Then separately and Perform a global max pooling operation, and concatenate the results of the global max pooling operation to obtain the feature vector. ;

[0016] and feature vectors The input is a multilayer perceptron, and the output of the multilayer perceptron is passed through a sigmoid function. The sigmoid function outputs the probability of the TCR sequence binding to the antigen peptide sequence.

[0017] If the probability of binding is greater than 0.7, the TCR sequence binds to the antigen peptide sequence; otherwise, the TCR sequence does not bind to the antigen peptide sequence.

[0018] Furthermore, the specific process of step S2 is as follows:

[0019] (1) TCR sequence chain

[0020] Will The amino acids in the chain are tokenized, and then the length of the resulting token sequence is compared with... Size relationship:

[0021] If the length of the token sequence is less than Then, the [PAD] flag is used to pad the length of the token sequence to... After adding the [CLS] flag to the beginning of the padded token sequence and the [SEP] flag to the end of the padded token sequence, we get... The token sequence corresponding to the chain;

[0022] If the length of the token sequence is equal to Then, by adding the [CLS] flag to the beginning of the token sequence and the [SEP] flag to the end of the token sequence, we get... The token sequence corresponding to the chain;

[0023] If the length of the token sequence is greater than Then extract the first part of the token sequence. Take a number of tokens, add the [CLS] flag to the beginning of the extracted token sequence, and add the [SEP] flag to the end of the extracted token sequence to obtain... The token sequence corresponding to the chain;

[0024] (2) TCR sequence chain

[0025] Will The amino acids in the chain are tokenized, and then the length of the resulting token sequence is compared with... Size relationship:

[0026] If the length of the token sequence is less than Then, the [PAD] flag is used to pad the length of the token sequence to... After adding the [CLS] flag to the beginning of the padded token sequence and the [SEP] flag to the end of the padded token sequence, we get... The token sequence corresponding to the chain;

[0027] If the length of the token sequence is equal to Then, by adding the [CLS] flag to the beginning of the token sequence and the [SEP] flag to the end of the token sequence, we get... The token sequence corresponding to the chain;

[0028] If the length of the token sequence is greater than Then extract the first part of the token sequence. Take a number of tokens, add the [CLS] flag to the beginning of the extracted token sequence, and add the [SEP] flag to the end of the extracted token sequence to obtain... The token sequence corresponding to the chain;

[0029] (3) Antigen peptide sequence

[0030] The antigen peptide sequence was normalized into a single-letter amino acid code sequence, and anchor residue markers were added to both ends of the single-letter amino acid code sequence. Then, the single-letter amino acid code sequence with anchor residue markers was tokenized, and the length of the resulting token sequence was compared with... Size relationship:

[0031] If the length of the token sequence is less than Then, the [PAD] flag is used to pad the length of the token sequence to... By adding the [CLS] marker at the beginning of the token sequence and the [SEP] marker at the end of the token sequence, the token sequence corresponding to the antigen peptide sequence is obtained.

[0032] If the length of the token sequence is equal to Then, by adding the [CLS] flag at the beginning of the token sequence and the [SEP] flag at the end of the token sequence, the token sequence corresponding to the antigen peptide sequence is obtained.

[0033] If the length of the token sequence is greater than Then extract the first part of the token sequence. For each token, add the [CLS] flag at the beginning of the extracted token sequence and the [SEP] flag at the end of the extracted token sequence to obtain the token sequence corresponding to the antigen peptide sequence;

[0034] (4) HLA alleles

[0035] HLA alleles were converted into pseudoprotein sequences, then the pseudoprotein sequences were tokenized, and the lengths of the resulting token sequences were compared with... Size relationship:

[0036] If the length of the token sequence is less than Then, the [PAD] flag is used to pad the length of the token sequence to... Then, by adding the [CLS] marker to the beginning of the padded token sequence and the [SEP] marker to the end of the padded token sequence, the token sequence of the HLA allele is obtained.

[0037] If the length of the token sequence is equal to Then, by adding the [CLS] marker at the beginning of the token sequence and the [SEP] marker at the end of the token sequence, the token sequence corresponding to the HLA allele is obtained.

[0038] If the length of the token sequence is greater than Then extract the first part of the token sequence. Each token is used to add a [CLS] marker to the beginning of the extracted token sequence and a [SEP] marker to the end of the extracted token sequence to obtain the token sequence corresponding to the HLA allele.

[0039] Furthermore, the working process of the first CTFormer encoder is as follows:

[0040] Will The token sequence corresponding to the chain passes through an embedding layer, and the output of the embedding layer is denoted as... Then As input to the first coding unit;

[0041] The output of the first coding unit is used as the input of the second coding unit, and so on, until the output of the second coding unit is used as the input of the third coding unit. The output of the encoding unit is used as the first Input to the encoding unit, ;

[0042] The output of the 12th coding unit is used as the chain-specific embedding generated by the first CTFormer encoder. .

[0043] Furthermore, the working process of the first encoding unit is as follows:

[0044] Will After layer normalization:

[0045]

[0046] in, Presentation layer normalization layer, express The output after the normalization layer;

[0047] Will Send to the bullish self-attention layer:

[0048]

[0049]

[0050]

[0051] in, express In the The query matrix is ​​obtained by linear projection within each attention head. express In the The key matrix is ​​obtained by linear projection within each attention head. express In the The value matrix obtained by linear projection within each attention head. , For the number of heads of attention, For parameter matrices;

[0052] Then in the In the attention head, the first The token is paired with the first... Attention weight of each token for:

[0053]

[0054] in, Indicates the first The query vector corresponding to each token. Indicates the first The key vector corresponding to each token express transpose, The dimension of the key vector corresponding to each token. This indicates dependence on relative position difference. The bias, , ;

[0055] No. The first attention point in the The output at each token is:

[0056]

[0057] in, Indicates the first The query vector corresponding to each token;

[0058] Then the multi-head self-attention layer is in the first... The output at each token is:

[0059]

[0060] in, To output the projection matrix, This indicates a feature concatenation operation. This indicates that the multi-head self-attention layer is in the 1st... Output at each token;

[0061] Stack the outputs of all position tokens to obtain the overall output of the multi-head self-attention layer. :

[0062]

[0063] The output of the multi-head self-attention layer and Adding the residuals gives :

[0064]

[0065] Again Perform layer normalization and then convert the layer normalization result to a normalized value. Feed into the feedforward network:

[0066]

[0067]

[0068] in, and This is the weight matrix. and The bias vector is ultimately used to obtain the output of the first coding unit through residual connections. :

[0069]

[0070] Furthermore, the dependence on relative position difference bias The method of obtaining it is:

[0071] calculate ,according to Values ​​from the relative position offset table The corresponding scalar value was found in the table of relative position offsets. It is a length of ;

[0072] Right now , Relative position offset table The first in One element;

[0073] Furthermore, the respective... and Perform a global max pooling operation, and concatenate the results of the global max pooling operation to obtain the feature vector. Specifically:

[0074]

[0075] in, This indicates a feature concatenation operation. This indicates global max pooling.

[0076] Furthermore, the feature vector The input is a multilayer perceptron, and the output of the multilayer perceptron is then passed through a sigmoid function. The sigmoid function outputs the probability of the TCR sequence binding to the antigen peptide sequence; specifically:

[0077]

[0078] in, This represents a multilayer perceptron. This indicates the probability that the TCR sequence binds to the antigen peptide sequence.

[0079] Furthermore, the working process of the first MFCNN model, the second MFCNN model, the third MFCNN model, and the fourth MFCNN model is as follows:

[0080] Will After passing through the first MFCNN model, the fused features output by the first MFCNN model are obtained. :

[0081]

[0082]

[0083] in, express The output after passing through 4 consecutive convolutional layers. This represents four consecutive convolutional layers. express The output after passing through three fully connected layers. This represents three consecutive fully connected layers;

[0084] Will After passing through the second MFCNN model, the fused features output by the second MFCNN model are obtained. :

[0085]

[0086]

[0087] Will After passing through the third MFCNN model, the fused features output by the third MFCNN model are obtained. :

[0088]

[0089]

[0090] Will After passing through the fourth MFCNN model, the fused features output by the fourth MFCNN model are obtained. :

[0091]

[0092]

[0093] According to another aspect of the present invention, a T-cell receptor binding prediction system based on double-strand consistency is provided, the system comprising a data acquisition module, a data processing module, and a relationship prediction module;

[0094] The data acquisition module is used to acquire the TCR sequence and antigen peptide sequence to be predicted, as well as the HLA allele presenting the antigen peptide sequence, and the TCR sequence includes... Chain and chain;

[0095] The data processing module is used to process the TCR sequence, antigen peptide sequence, and HLA alleles presenting the antigen peptide sequence to obtain... The token sequence corresponding to the chain The token sequence corresponding to the chain, the token sequence corresponding to the antigen peptide sequence, and the token sequence corresponding to the HLA allele;

[0096] The relationship prediction module is equipped with a combined prediction network, and the relationship prediction module predicts based on... The token sequence corresponding to the chain The token sequences corresponding to the chain, the antigen peptide sequences, and the HLA alleles are used to predict whether the obtained TCR sequence binds to the antigen peptide sequence.

[0097] Furthermore, the combined prediction network includes a first CTFormer encoder, a second CTFormer encoder, a first ESM2 model, a second ESM2 model, a first MFCNN model, a second MFCNN model, a third MFCNN model, a fourth MFCNN model, and a multilayer perceptron;

[0098] The specific working process of the relationship prediction module is as follows:

[0099] Step 1, The token sequence corresponding to the chain is used as the input to the first CTFormer encoder. The token sequence corresponding to the chain is used as the input of the second CTFormer encoder, the token sequence corresponding to the HLA allele is used as the input of the first ESM2 model, and the token sequence corresponding to the antigen peptide sequence is used as the input of the second ESM2 model.

[0100] Step 2: Convert the output of the first CTFormer encoder As input to the first MFCNN model, the output of the first MFCNN model is... Chain features ;

[0101] The output of the second CTFormer encoder As input to the second MFCNN model, the output of the second MFCNN model is... Chain features ;

[0102] The output of the first ESM2 model As input to the third MFCNN model, the HLA features are output through the third MFCNN model. ;

[0103] The output of the second ESM2 model As input to the fourth MFCNN model, the antigen features are output through the fourth MFCNN model. ;

[0104] Step 3, then separately and Perform a global max pooling operation, and concatenate the results of the global max pooling operation to obtain the feature vector. ;

[0105] Step 4, and then the feature vector The input is a multilayer perceptron, and the output of the multilayer perceptron is passed through a sigmoid function. The sigmoid function outputs the probability of the TCR sequence binding to the antigen peptide sequence.

[0106] If the probability of binding is greater than 0.7, the TCR sequence binds to the antigen peptide sequence; otherwise, the TCR sequence does not bind to the antigen peptide sequence.

[0107] The working process of the first CTFormer encoder is as follows:

[0108] Step 21, The token sequence corresponding to the chain passes through an embedding layer, and the output of the embedding layer is denoted as... Then As input to the first coding unit, the working process of the first coding unit is as follows:

[0109] Will After layer normalization:

[0110]

[0111] in, Presentation layer normalization layer, express The output after the normalization layer;

[0112] Will Send to the bullish self-attention layer:

[0113]

[0114]

[0115]

[0116] in, express In the The query matrix is ​​obtained by linear projection within each attention head. express In the The key matrix is ​​obtained by linear projection within each attention head. express In the The value matrix obtained by linear projection within each attention head. , For the number of heads of attention, For parameter matrices;

[0117] Then in the In the attention head, the first The token is paired with the first... Attention weight of each token for:

[0118]

[0119] in, Indicates the first The query vector corresponding to each token. Indicates the first The key vector corresponding to each token express transpose, The dimension of the key vector corresponding to each token. This indicates dependence on relative position difference. The bias, , ;

[0120] No. The first attention point in the The output at each token is:

[0121]

[0122] in, Indicates the first The query vector corresponding to each token;

[0123] Then the multi-head self-attention layer is in the first... The output at each token is:

[0124]

[0125] in, To output the projection matrix, This indicates a feature concatenation operation. This indicates that the multi-head self-attention layer is in the 1st... Output at each token;

[0126] Stack the outputs of all position tokens to obtain the overall output of the multi-head self-attention layer. :

[0127]

[0128] The output of the multi-head self-attention layer and Adding the residuals gives :

[0129]

[0130] Again Perform layer normalization and then convert the layer normalization result to a normalized value. Feed into the feedforward network:

[0131]

[0132]

[0133] in, and This is the weight matrix. and The bias vector is ultimately used to obtain the output of the first coding unit through residual connections. :

[0134]

[0135] Step 22: Use the output of the first coding unit as the input of the second coding unit, and so on, until the output of the second coding unit is used as the input of the third coding unit. The output of the encoding unit is used as the first Input to the encoding unit, ;

[0136] The output of the 12th coding unit is used as the chain-specific embedding generated by the first CTFormer encoder. .

[0137] The beneficial effects of this invention are:

[0138] This invention proposes a bi-stranded consistency mechanism that integrates the pre-trained protein language model ESM2 with the CTFormer encoder, using a multi-branch encoder to process full-length paired TCR sequences. Chain and The pseudoprotein sequences and antigenic peptide sequences corresponding to TCR strands and HLA alleles are used to learn modality-specific representations using the ESM2 model and CTFormer encoder, achieving efficient capture of relative position bias and antigenic peptide context signals when processing TCR bistranded cooperative interactions. Furthermore, by integrating features through a multi-fusion convolutional neural network, compared to traditional single-stranded or CDR3 local models, this invention fully realizes cross-stranded interactions through feature integration while ensuring the integrity of TCR sequences. Chain and The chain improves the consistency of prediction results. It also enhances generalization performance for unseen HLA epitopes and improves the accuracy of predictions based on binding performance.

[0139] The method of this invention can also be combined with low-resource adaptation strategies such as semi-synthetic data augmentation to further alleviate the problem of data scarcity. This invention provides a reliable, high-throughput computing platform for the development of cancer neoantigen vaccines and the stratification of personalized T-cell therapies, promoting the transformation of immune engineering from empirical screening to rational design. Attached Figure Description

[0140] Figure 1 This is a flowchart of a T-cell receptor binding prediction method based on double-strand consistency according to the present invention;

[0141] Figure 2 This is a schematic diagram of the module connections of a T-cell receptor binding prediction method based on double-strand consistency according to the present invention.

[0142] Figure 3 This is a schematic diagram of the CTFormer encoder. Detailed Implementation

[0143] Specific implementation method one: Combining Figure 1 and Figure 2 This embodiment describes a T-cell receptor binding prediction method based on double-strand consistency. The method specifically includes:

[0144] Step S1: Obtain the TCR sequence and antigen peptide sequence whose binding relationship is to be predicted, as well as the HLA allele that presents the antigen peptide sequence, wherein the TCR sequence includes Chain and chain;

[0145] Step S2, TCR sequence chain, The chain, antigen peptide sequence, and HLA allele were converted into token sequences, respectively, to obtain The token sequence corresponding to the chain The token sequences corresponding to the chain, the antigen peptide sequences, and the HLA alleles; that is:

[0146] (1) TCR sequence chain

[0147] Will The amino acids in the chain are tokenized, and then the length of the resulting token sequence is compared with... Size relationship:

[0148] If the length of the token sequence is less than Then, the [PAD] flag is used to pad the length of the token sequence to... After adding the [CLS] flag to the beginning of the padded token sequence and the [SEP] flag to the end of the padded token sequence, we get... The token sequence corresponding to the chain;

[0149] If the length of the token sequence is equal to Then, by adding the [CLS] flag to the beginning of the token sequence and the [SEP] flag to the end of the token sequence, we get... The token sequence corresponding to the chain;

[0150] If the length of the token sequence is greater than Then extract the first part of the token sequence. Take a number of tokens, add the [CLS] flag to the beginning of the extracted token sequence, and add the [SEP] flag to the end of the extracted token sequence to obtain... The token sequence corresponding to the chain;

[0151] (2) TCR sequence chain

[0152] Will The amino acids in the chain are tokenized, and then the length of the resulting token sequence is compared with... Size relationship:

[0153] If the length of the token sequence is less than Then, the [PAD] flag is used to pad the length of the token sequence to... After adding the [CLS] flag to the beginning of the padded token sequence and the [SEP] flag to the end of the padded token sequence, we get... The token sequence corresponding to the chain;

[0154] If the length of the token sequence is equal to Then, by adding the [CLS] flag to the beginning of the token sequence and the [SEP] flag to the end of the token sequence, we get... The token sequence corresponding to the chain;

[0155] If the length of the token sequence is greater than Then extract the first part of the token sequence. Take a number of tokens, add the [CLS] flag to the beginning of the extracted token sequence, and add the [SEP] flag to the end of the extracted token sequence to obtain... The token sequence corresponding to the chain;

[0156] (3) Antigen peptide sequence

[0157] The antigen peptide sequence was normalized into a single-letter amino acid code sequence, and anchor residue markers were added to both ends of the single-letter amino acid code sequence. Then, the single-letter amino acid code sequence with added anchor residue markers was tokenized, and the length of the resulting token sequence was compared with... Size relationship:

[0158] If the length of the token sequence is less than Then, the [PAD] flag is used to pad the length of the token sequence to... By adding the [CLS] marker at the beginning of the token sequence and the [SEP] marker at the end of the token sequence, the token sequence corresponding to the antigen peptide sequence is obtained.

[0159] If the length of the token sequence is equal to Then, by adding the [CLS] flag at the beginning of the token sequence and the [SEP] flag at the end of the token sequence, the token sequence corresponding to the antigen peptide sequence is obtained.

[0160] If the length of the token sequence is greater than Then extract the first part of the token sequence. For each token, add the [CLS] flag at the beginning of the extracted token sequence and the [SEP] flag at the end of the extracted token sequence to obtain the token sequence corresponding to the antigen peptide sequence;

[0161] (4) HLA alleles

[0162] HLA alleles were converted into pseudoprotein sequences, polymorphic site information was incorporated through the conversion, and then the pseudoprotein sequences were tokenized. The lengths of the resulting token sequences were then compared with... Size relationship:

[0163] If the length of the token sequence is less than Then, the [PAD] flag is used to pad the length of the token sequence to... Then, by adding the [CLS] marker to the beginning of the padded token sequence and the [SEP] marker to the end of the padded token sequence, the token sequence of the HLA allele is obtained.

[0164] If the length of the token sequence is equal to Then, by adding the [CLS] marker at the beginning of the token sequence and the [SEP] marker at the end of the token sequence, the token sequence corresponding to the HLA allele is obtained.

[0165] If the length of the token sequence is greater than Then extract the first part of the token sequence. Each token is used to add a [CLS] marker to the beginning of the extracted token sequence and a [SEP] marker to the end of the extracted token sequence to obtain the token sequence corresponding to the HLA allele.

[0166] It should be noted that, in order to cover the binding prediction of all TCR sequences and all antigen peptide sequences, in this invention, The value is 128 (when the length of the token sequence is greater than 128, it indicates that the input sequence has abnormally long or invalid segments. In order to reduce the interference of abnormal input on the model, only the first 128 tokens need to be truncated). The value is 15. The value is 34. Adding the [CLS] flag at the beginning and [SEP] at the end of the sequence facilitates subsequent encoding and pooling operations. Padding ensures sequence consistency and computational compatibility, thereby providing a unified data flow for subsequent encoding generation.

[0167] Step S3: Construct a combined prediction network, which includes a first CTFormer encoder, a second CTFormer encoder, a first ESM2 model (the ESM2 model used in this invention is the ESM2-650M version model), a second ESM2 model, a first MFCNN model, a second MFCNN model, a third MFCNN model, a fourth MFCNN model, and a multilayer perceptron.

[0168] Step S4, The token sequence corresponding to the chain is used as the input to the first CTFormer encoder. The token sequence corresponding to the chain is used as the input of the second CTFormer encoder, the token sequence corresponding to the HLA allele is used as the input of the first ESM2 model, and the token sequence corresponding to the antigen peptide sequence is used as the input of the second ESM2 model.

[0169] The first CTFormer encoder and the second CTFormer encoder can capture long-range dependence and intra-chain sequence features of the full-length sequence. The first ESM2 model captures the binding groove polymorphism presentation features of HLA pseudo-sequences, and the second ESM2 model captures the biological residue features of antigen peptide sequences, thereby achieving comprehensive extraction of modality-specific features.

[0170] The output of the first CTFormer encoder As input to the first MFCNN model, The output of the first MFCNN model Chain features ;

[0171] The output of the second CTFormer encoder As input to the second MFCNN model, The output is obtained through the second MFCNN model. Chain features ;

[0172] The output of the first ESM2 model As input to the third MFCNN model, HLA features are output through the third MFCNN model. ;

[0173] The output of the second ESM2 model As input to the fourth MFCNN model, The antigen features are output through the fourth MFCNN model. ;

[0174] Then separately and Perform a global max pooling operation to compress the variable-length sequence features into a fixed-dimensional feature vector. Concatenate the results of the global max pooling operation to obtain the feature vector. ;

[0175]

[0176] in, Indicates feature splicing, Indicates global max pooling;

[0177] and feature vectors The input is a multilayer perceptron, and the output of the multilayer perceptron is passed through a sigmoid function. The sigmoid function outputs the probability of the TCR sequence binding to the antigen peptide sequence.

[0178]

[0179] in, This represents a multilayer perceptron;

[0180] If the probability of binding is greater than 0.7, the TCR sequence binds to the antigen peptide sequence; otherwise, the TCR sequence does not bind to the antigen peptide sequence.

[0181] The improved parts of the combined prediction network of the present invention will be described in detail below with reference to the accompanying drawings:

[0182] 1. First CTFormer encoder

[0183] (1) such as Figure 3 As shown, the working process of the first CTFormer encoder is as follows:

[0184] Will The token sequence corresponding to the chain passes through the embedding layer, and the output of the embedding layer is denoted as... Then As input to the first coding unit;

[0185] The output of the first coding unit is used as the input of the second coding unit, and so on, until the output of the second coding unit is used as the input of the third coding unit. The output of the encoding unit is used as the first Input to the encoding unit, ;

[0186] The output of the 12th coding unit is used as the chain-specific embedding generated by the first CTFormer encoder. , Feature Dimension Set to 768, by stacking 12 layers of coding units, it can capture long-range dependency information within the chain;

[0187] Within the first coding unit, After layer normalization:

[0188]

[0189] in, Presentation layer normalization layer, express The output after the normalization layer;

[0190] Will Send to the bullish self-attention layer:

[0191]

[0192]

[0193]

[0194] in, express In the The query matrix is ​​obtained by linear projection within each attention head. express In the The key matrix is ​​obtained by linear projection within each attention head. express In the The value matrix obtained by linear projection within each attention head. , For the number of heads of attention, , The dimension of the key vector corresponding to each token. The learnable parameter matrix;

[0195] Then in the In the attention head, the first The token is paired with the first... Attention weight of each token for:

[0196]

[0197] in, Indicates the first The query vector corresponding to each token (i.e.) The first in OK), Indicates the first The key vector corresponding to each token (i.e.) The first in OK), express transpose, express function, This indicates dependence on relative position difference. Learnable biases (introducing relative positional attention biases in multi-head self-attention layers can model the distance dependencies between amino acid residues). , ;

[0198] Define a learnable relative position offset table It is a length of The vector, and can learn a relative position offset table. The values ​​in the model are updated during the training process.

[0199] The method of obtaining it is: calculation ,according to Values ​​from the learnable relative position bias table The corresponding scalar value was found in the middle, that is , Relative position offset table The first in Each element, relative position offset table The elements in the array are numbered starting from 0;

[0200] No. The first attention point in the The output at each token is:

[0201]

[0202] in, Indicates the first The query vector corresponding to each token (i.e.) The first in OK);

[0203] Then the multi-head self-attention layer is in the first... The output at each token is:

[0204]

[0205] in, The output projection matrix is ​​learnable;

[0206] Stack the outputs from all positions to obtain the overall output of the multi-head self-attention layer. :

[0207]

[0208] in, ;

[0209] The output of the multi-head self-attention layer and Adding the residuals gives :

[0210]

[0211] Again Perform layer normalization and then convert the layer normalization result to a normalized value. Feed into the feedforward network:

[0212]

[0213]

[0214] in, and The weight matrix is ​​a learnable matrix. and The bias vector is a learnable vector, and the output of the first coding unit is finally obtained through residual connections. :

[0215]

[0216] Layer normalization and residual connections ensured the stability of the training process and enhanced the model's ability to model long-range dependencies of TCR sequences, thereby improving the model's ability to capture protein sequence evolution patterns. The working process of other coding units is the same as that of the first coding unit, except that starting from the second coding unit, the input of the next coding unit is the output of the previous coding unit.

[0217] The second CTFormer encoder operates in the same way as the first CTFormer encoder, the only difference being that the input to the second CTFormer encoder is the corresponding... The token sequence corresponding to the chain.

[0218] 2. MFCNN model: MFCNN (Multi-Fuse Convolutional Neural Network) contains four one-dimensional convolutional layers. The convolutional layers are configured with a kernel size of 3, a stride of 1, and padding of 1, which are used to locally fuse and extract features from various modalities.

[0219] First MFCNN model:

[0220] Will After passing through the first MFCNN model, the fused features output by the first MFCNN model are obtained. :

[0221]

[0222]

[0223] in, express The output after passing through 4 consecutive convolutional layers. This represents four consecutive convolutional layers. express The output after passing through three fully connected layers. This represents three consecutive fully connected layers;

[0224] Second MFCNN model:

[0225] Will After passing through the second MFCNN model, the fused features output by the second MFCNN model are obtained. :

[0226]

[0227]

[0228] The third MFCNN model:

[0229] Will After passing through the third MFCNN model, the fused features output by the third MFCNN model are obtained. :

[0230]

[0231]

[0232] Fourth MFCNN model:

[0233] Will After passing through the fourth MFCNN model, the fused features output by the fourth MFCNN model are obtained. :

[0234]

[0235]

[0236] By extracting local interaction features of each modality using the first, second, third, and fourth MFCNN models and preserving gradient flow through residual structures, deep feature extraction and preliminary fusion within each modality are achieved.

[0237] The training process of the model is explained in further detail below:

[0238] Interactive data were collected from publicly available TCR databases (including but not limited to VDJdb database, IEDB database (immune epitope database), and OTS database). Priority was given to selecting α and β chains that were paired with full-length TCR sequences, and matching the corresponding antigen peptide sequences and HLA pseudo-sequences. Binding specificity was marked with binary tags (1 indicates binding, 0 indicates non-binding).

[0239] In addition, an unsupervised corpus was constructed, which contains full-length TCR sequences. Chain and Chains, HLA pseudo-sequences, and antigenic peptide sequences are used for masking modeling tasks in subsequent pre-trained encoders and ESM2 models.

[0240] During the pre-training phase:

[0241] 1. First CTFormer encoder and second CTFormer encoder

[0242] For the input TCR sequence The chain randomly samples several non-overlapping continuous amino acid fragments, and replaces each amino acid position in these fragments with a special mask marker ([MASK]) to mask the sampled amino acid fragments; the model classifies and predicts each position in the masked fragment based on the remaining context, predicts the real amino acid residue corresponding to each mask position through the classifier of the output layer, and optimizes the parameters of the first CTFormer encoder using the AdamW optimizer.

[0243] The loss function in the pre-training phase is defined as the negative log-likelihood of the predicted probability of the true amino acid at the mask position:

[0244]

[0245] in, This is the set of masked amino acid position indices in the TCR sequence. For position The real amino acids, Indicates the set The amino acid at the corresponding position in the TCR sequence is replaced with the remaining visible context sequence after the fragment masking marker. These are the parameters for the first CTFormer encoder. This represents the output of the chain-specific embedding from the first CTFormer encoder after passing through the softmax function, i.e., the probability of predicting the actual amino acid. The loss function represents the pre-training process;

[0246] Before the training process begins, the parameters of the first CTFormer encoder are initialized to the parameters of the pre-trained first CTFormer encoder.

[0247] For the input TCR sequence The chain randomly samples several non-overlapping continuous amino acid fragments, and replaces each amino acid position in these fragments with a special mask marker ([MASK]) to mask the sampled amino acid fragments; the model classifies and predicts each position in the masked fragment based on the remaining context, predicts the real amino acid residue corresponding to each mask position through the classifier of the output layer, and optimizes the parameters of the second CTFormer encoder using the AdamW optimizer.

[0248] The loss function in the pre-training phase is defined as the negative log-likelihood of the predicted probability of the true amino acid at the mask position:

[0249]

[0250] in, This is the set of masked amino acid position indices in the TCR sequence. For position The real amino acids, Indicates the set The amino acid at the corresponding position in the TCR sequence is replaced with the remaining visible context sequence after the fragment masking marker. For the second CTFormer encoder parameters, This represents the output of the chain-specific embedding from the second CTFormer encoder after passing through the softmax function. The loss function represents the pre-training process;

[0251] Before the training process begins, the parameters of the second CTFormer encoder are initialized to the parameters of the pre-trained second CTFormer encoder.

[0252] 2. First ESM2 model and second ESM2 model

[0253] Several residue positions are randomly selected from the pseudoprotein sequences corresponding to HLA alleles and masked, i.e., the selected positions are replaced with mask markers or perturbation tokens to form the visible context sequence. The AdamW optimizer was used to optimize the parameters of the first ESM2 model, which then predicted the true residues at the mask positions. The loss function was... Defined as:

[0254]

[0255] in, The set of residue position indices to be masked. For position The actual amino acid residues, To be The middle position is replaced with the visible context sequence after the mask marker. The parameters of the first ESM2 model are the probabilities. This represents the probability calculated by softmax from the output of the first ESM2 model, which is the probability of predicting the actual amino acid residue.

[0256] Before starting training, initialize the pre-trained first ESM2 model parameters to the first ESM2 model parameters;

[0257] Several residue positions are randomly selected from the single-letter amino acid code sequence corresponding to the antigen peptide sequence and masked, that is, the selected positions are replaced with mask markers or perturbation tokens to form the visible context sequence. The AdamW optimizer was used to optimize the parameters of the second ESM2 model, which then predicted the true residues at the mask positions. The loss function was... Defined as:

[0258]

[0259] in, The set of residue position indices to be masked. For position The actual amino acid residues, To be The middle position is replaced with the visible context sequence after the mask marker. For the second ESM2 model parameters, the probability This represents the probability calculated by softmax from the output of the second ESM2 model.

[0260] Before starting training, initialize the pre-trained second ESM2 model parameters to the second ESM2 model parameters;

[0261] During the training phase, the parameters of each part of the prediction network are jointly trained, and the loss function for joint training is... for:

[0262]

[0263] in, For true labels (1 for binding, 0 for non-binding). This refers to the probability of the TCR sequence binding to the antigen peptide sequence predicted by the prediction network.

[0264] An early stopping mechanism is introduced during fine-tuning training to prevent overfitting. The interaction learning of multimodal features is enhanced by optimizing the binary cross-entropy loss, ensuring generalization performance across HLA alleles.

[0265] Specific Implementation Method Two: The T-cell receptor binding prediction system based on double-strand consistency described in this implementation method includes a data acquisition module, a data processing module, and a relationship prediction module;

[0266] The data acquisition module is used to acquire the TCR sequence and antigen peptide sequence to be predicted, as well as the HLA allele presenting the antigen peptide sequence, and the TCR sequence includes... Chain and chain;

[0267] The data processing module is used to process the TCR sequence, antigen peptide sequence, and HLA alleles presenting the antigen peptide sequence to obtain... The token sequence corresponding to the chain The token sequence corresponding to the chain, the token sequence corresponding to the antigen peptide sequence, and the token sequence corresponding to the HLA allele;

[0268] The relationship prediction module is equipped with a combined prediction network, and the relationship prediction module predicts based on... The token sequence corresponding to the chain The token sequences corresponding to the chain, the antigen peptide sequences, and the HLA alleles are used to predict whether the obtained TCR sequence binds to the antigen peptide sequence.

[0269] Specific Implementation Method 3: This implementation method is a further limitation of Specific Implementation Method 2. The combined prediction network includes a first CTFormer encoder, a second CTFormer encoder, a first ESM2 model, a second ESM2 model, a first MFCNN model, a second MFCNN model, a third MFCNN model, a fourth MFCNN model, and a multilayer perceptron.

[0270] The specific working process of the relationship prediction module is as follows:

[0271] Step 1, The token sequence corresponding to the chain is used as the input to the first CTFormer encoder. The token sequence corresponding to the chain is used as the input of the second CTFormer encoder, the token sequence corresponding to the HLA allele is used as the input of the first ESM2 model, and the token sequence corresponding to the antigen peptide sequence is used as the input of the second ESM2 model.

[0272] Step 2: Convert the output of the first CTFormer encoder As input to the first MFCNN model, the output of the first MFCNN model is... Chain features ;

[0273] The output of the second CTFormer encoder As input to the second MFCNN model, the output of the second MFCNN model is... Chain features ;

[0274] The output of the first ESM2 model As input to the third MFCNN model, the HLA features are output through the third MFCNN model. ;

[0275] The output of the second ESM2 model As input to the fourth MFCNN model, the antigen features are output through the fourth MFCNN model. ;

[0276] Step 3, then separately and Perform a global max pooling operation, and concatenate the results of the global max pooling operation to obtain the feature vector. ;

[0277] Step 4, and then the feature vector The input is a multilayer perceptron, and the output of the multilayer perceptron is passed through a sigmoid function. The sigmoid function outputs the probability of the TCR sequence binding to the antigen peptide sequence.

[0278] If the probability of binding is greater than 0.7, the TCR sequence binds to the antigen peptide sequence; otherwise, the TCR sequence does not bind to the antigen peptide sequence.

[0279] The working process of the first CTFormer encoder is as follows:

[0280] Step 21, The token sequence corresponding to the chain passes through an embedding layer, and the output of the embedding layer is denoted as... Then As input to the first coding unit, the working process of the first coding unit is as follows:

[0281] Will After layer normalization:

[0282]

[0283] in, Presentation layer normalization layer, express The output after the normalization layer;

[0284] Will Send to the bullish self-attention layer:

[0285]

[0286]

[0287]

[0288] in, express In the The query matrix is ​​obtained by linear projection within each attention head. express In the The key matrix is ​​obtained by linear projection within each attention head. express In the The value matrix obtained by linear projection within each attention head. , For the number of heads of attention, For parameter matrices;

[0289] Then in the In the attention head, the first The token is paired with the first... Attention weight of each token for:

[0290]

[0291] in, Indicates the first The query vector corresponding to each token. Indicates the first The key vector corresponding to each token express transpose, The dimension of the key vector corresponding to each token. This indicates dependence on relative position difference. The bias, , ;

[0292] No. The first attention point in the The output at each token is:

[0293]

[0294] in, Indicates the first The query vector corresponding to each token;

[0295] Then the multi-head self-attention layer is in the first... The output at each token is:

[0296]

[0297] in, To output the projection matrix, This indicates a feature concatenation operation. This indicates that the multi-head self-attention layer is in the 1st... Output at each token;

[0298] Stack the outputs of all position tokens to obtain the overall output of the multi-head self-attention layer. :

[0299]

[0300] The output of the multi-head self-attention layer and Adding the residuals gives :

[0301]

[0302] Again Perform layer normalization and then convert the layer normalization result to a normalized value. Feed into the feedforward network:

[0303]

[0304]

[0305] in, and This is the weight matrix. and The bias vector is ultimately used to obtain the output of the first coding unit through residual connections. :

[0306]

[0307] Step 22: Use the output of the first coding unit as the input of the second coding unit, and so on, until the output of the second coding unit is used as the input of the third coding unit. The output of the encoding unit is used as the first Input to the encoding unit, ;

[0308] The output of the 12th coding unit is used as the chain-specific embedding generated by the first CTFormer encoder. .

[0309] The above examples of the present invention are merely illustrative of the computational model and process of the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is impossible to exhaustively list all possible implementations here. Any obvious variations or modifications derived from the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A method for predicting T-cell receptor binding based on double-strand consistency, characterized in that, The method specifically includes the following steps: Step S1: Obtain the TCR sequence and antigen peptide sequence whose binding relationship is to be predicted, as well as the HLA allele that presents the antigen peptide sequence, wherein the TCR sequence includes Chain and chain; Step S2, TCR sequence chain, The chain, antigen peptide sequence, and HLA allele were converted into token sequences, respectively, to obtain The token sequence corresponding to the chain The token sequence corresponding to the chain, the token sequence corresponding to the antigen peptide sequence, and the token sequence corresponding to the HLA allele; Step S3: Construct a combined prediction network, which includes a first CTFormer encoder, a second CTFormer encoder, a first ESM2 model, a second ESM2 model, a first MFCNN model, a second MFCNN model, a third MFCNN model, a fourth MFCNN model, and a multilayer perceptron. Step S4, The token sequence corresponding to the chain is used as the input to the first CTFormer encoder. The token sequence corresponding to the chain is used as the input of the second CTFormer encoder, the token sequence corresponding to the HLA allele is used as the input of the first ESM2 model, and the token sequence corresponding to the antigen peptide sequence is used as the input of the second ESM2 model. The output of the first CTFormer encoder As input to the first MFCNN model, the output of the first MFCNN model is... Chain features ; The output of the second CTFormer encoder As input to the second MFCNN model, the output of the second MFCNN model is... Chain features ; The output of the first ESM2 model As input to the third MFCNN model, the HLA features are output through the third MFCNN model. ; The output of the second ESM2 model As input to the fourth MFCNN model, the antigen features are output through the fourth MFCNN model. ; Then separately and Perform a global max pooling operation, and concatenate the results of the global max pooling operation to obtain the feature vector. ; and feature vectors The input is a multilayer perceptron, and the output of the multilayer perceptron is passed through a sigmoid function. The sigmoid function outputs the probability of the TCR sequence binding to the antigen peptide sequence. If the probability of binding is greater than 0.7, the TCR sequence binds to the antigen peptide sequence; otherwise, the TCR sequence does not bind to the antigen peptide sequence.

2. The method for predicting T-cell receptor binding based on double-strand consistency according to claim 1, characterized in that, The specific process of step S2 is as follows: (1) TCR sequence chain Will The amino acids in the chain are tokenized, and then the length of the resulting token sequence is compared with... Size relationship: If the length of the token sequence is less than Then, the [PAD] flag is used to pad the length of the token sequence to... After adding the [CLS] flag to the beginning of the padded token sequence and the [SEP] flag to the end of the padded token sequence, we get... The token sequence corresponding to the chain; If the length of the token sequence is equal to Then, by adding the [CLS] flag to the beginning of the token sequence and the [SEP] flag to the end of the token sequence, we get... The token sequence corresponding to the chain; If the length of the token sequence is greater than Then extract the first part of the token sequence. Take a number of tokens, add the [CLS] flag to the beginning of the extracted token sequence, and add the [SEP] flag to the end of the extracted token sequence to obtain... The token sequence corresponding to the chain; (2) TCR sequence chain Will The amino acids in the chain are tokenized, and then the length of the resulting token sequence is compared with... Size relationship: If the length of the token sequence is less than Then, the [PAD] flag is used to pad the length of the token sequence to... After adding the [CLS] flag to the beginning of the padded token sequence and the [SEP] flag to the end of the padded token sequence, we get... The token sequence corresponding to the chain; If the length of the token sequence is equal to Then, by adding the [CLS] flag to the beginning of the token sequence and the [SEP] flag to the end of the token sequence, we get... The token sequence corresponding to the chain; If the length of the token sequence is greater than Then extract the first part of the token sequence. Take a number of tokens, add the [CLS] flag to the beginning of the extracted token sequence, and add the [SEP] flag to the end of the extracted token sequence to obtain... The token sequence corresponding to the chain; (3) Antigen peptide sequence The antigen peptide sequence was normalized into a single-letter amino acid code sequence, and anchor residue markers were added to both ends of the single-letter amino acid code sequence. Then, the single-letter amino acid code sequence with anchor residue markers was tokenized, and the length of the resulting token sequence was compared with... Size relationship: If the length of the token sequence is less than Then, the [PAD] flag is used to pad the length of the token sequence to... By adding the [CLS] marker at the beginning of the token sequence and the [SEP] marker at the end of the token sequence, the token sequence corresponding to the antigen peptide sequence is obtained. If the length of the token sequence is equal to Then, by adding the [CLS] flag at the beginning of the token sequence and the [SEP] flag at the end of the token sequence, the token sequence corresponding to the antigen peptide sequence is obtained. If the length of the token sequence is greater than Then extract the first part of the token sequence. For each token, add the [CLS] flag at the beginning of the extracted token sequence and the [SEP] flag at the end of the extracted token sequence to obtain the token sequence corresponding to the antigen peptide sequence; (4) HLA alleles HLA alleles were converted into pseudoprotein sequences, then the pseudoprotein sequences were tokenized, and the lengths of the resulting token sequences were compared with... Size relationship: If the length of the token sequence is less than Then, the [PAD] flag is used to pad the length of the token sequence to... Then, by adding the [CLS] marker to the beginning of the padded token sequence and the [SEP] marker to the end of the padded token sequence, the token sequence of the HLA allele is obtained. If the length of the token sequence is equal to Then, by adding the [CLS] marker at the beginning of the token sequence and the [SEP] marker at the end of the token sequence, the token sequence corresponding to the HLA allele is obtained. If the length of the token sequence is greater than Then extract the first part of the token sequence. Each token is used to generate a token sequence. The [CLS] marker is added to the beginning of the extracted token sequence, and the [SEP] marker is added to the end of the extracted token sequence to obtain the token sequence corresponding to the HLA allele.

3. The T-cell receptor binding prediction method based on double-strand consistency according to claim 2, characterized in that, The working process of the first CTFormer encoder is as follows: Will The token sequence corresponding to the chain passes through an embedding layer, and the output of the embedding layer is denoted as... Then As input to the first coding unit; The output of the first coding unit is used as the input of the second coding unit, and so on, until the output of the second coding unit is used as the input of the third coding unit. The output of the encoding unit is used as the first Input to the encoding unit, ; The output of the 12th coding unit is used as the chain-specific embedding generated by the first CTFormer encoder. .

4. The T-cell receptor binding prediction method based on double-strand consistency according to claim 3, characterized in that, The working process of the first encoding unit is as follows: Will After layer normalization: in, Presentation layer normalization layer, express The output after the normalization layer; Will Send to the bullish self-attention layer: in, express In the The query matrix is ​​obtained by linear projection within each attention head. express In the The key matrix is ​​obtained by linear projection within each attention head. express In the The value matrix obtained by linear projection within each attention head. , For the number of heads of attention, For parameter matrices; Then in the In the attention head, the first The token is paired with the first... Attention weight of each token for: in, Indicates the first The query vector corresponding to each token. Indicates the first The key vector corresponding to each token express transpose, The dimension of the key vector corresponding to each token. This indicates dependence on relative position difference. The bias, , ; No. The first attention point in the The output at each token is: in, Indicates the first The query vector corresponding to each token; Then the multi-head self-attention layer is in the first... The output at each token is: in, To output the projection matrix, This indicates a feature concatenation operation. This indicates that the multi-head self-attention layer is in the 1st... Output at each token; Stack the outputs of all position tokens to obtain the overall output of the multi-head self-attention layer. : The output of the multi-head self-attention layer and Adding the residuals gives : Again Perform layer normalization and then convert the layer normalization result to a normalized value. Feed into the feedforward network: in, and This is the weight matrix. and The bias vector is ultimately used to obtain the output of the first coding unit through residual connections. : 。 5. The T-cell receptor binding prediction method based on double-strand consistency according to claim 4, characterized in that, The dependence on relative position difference bias The method of obtaining it is: calculate ,according to Values ​​from the relative position offset table The corresponding scalar value was found in the table of relative position offsets. It is a length of ; Right now , Relative position offset table The first in Each element.

6. The T-cell receptor binding prediction method based on double-strand consistency according to claim 5, characterized in that, The respective to and Perform a global max pooling operation, and concatenate the results of the global max pooling operation to obtain the feature vector. Specifically: in, This indicates a feature concatenation operation. This indicates global max pooling.

7. The T-cell receptor binding prediction method based on double-strand consistency according to claim 6, characterized in that, The feature vector The input is a multilayer perceptron, and the output of the multilayer perceptron is then passed through a sigmoid function. The sigmoid function outputs the probability of the TCR sequence binding to the antigen peptide sequence; specifically: in, This represents a multilayer perceptron. This indicates the probability that the TCR sequence binds to the antigen peptide sequence.

8. The T-cell receptor binding prediction method based on double-strand consistency according to claim 7, characterized in that, The working process of the first MFCNN model, the second MFCNN model, the third MFCNN model, and the fourth MFCNN model is as follows: Will After passing through the first MFCNN model, the fused features output by the first MFCNN model are obtained. : in, express The output after passing through 4 consecutive convolutional layers. This represents four consecutive convolutional layers. express The output after passing through three fully connected layers. This represents three consecutive fully connected layers; Will After passing through the second MFCNN model, the fused features output by the second MFCNN model are obtained. : Will After passing through the third MFCNN model, the fused features output by the third MFCNN model are obtained. : Will After passing through the fourth MFCNN model, the fused features output by the fourth MFCNN model are obtained. : 。 9. A T-cell receptor binding prediction system based on double-strand consistency, characterized in that, The system includes a data acquisition module, a data processing module, and a relationship prediction module; The data acquisition module is used to acquire the TCR sequence and antigen peptide sequence to be predicted, as well as the HLA allele presenting the antigen peptide sequence, and the TCR sequence includes... Chain and chain; The data processing module is used to process the TCR sequence, antigen peptide sequence, and HLA alleles presenting the antigen peptide sequence to obtain... The token sequence corresponding to the chain The token sequence corresponding to the chain, the token sequence corresponding to the antigen peptide sequence, and the token sequence corresponding to the HLA allele; The relationship prediction module is equipped with a combined prediction network, and the relationship prediction module predicts based on... The token sequence corresponding to the chain The token sequences corresponding to the chain, the antigen peptide sequences, and the HLA alleles are used to predict whether the obtained TCR sequence binds to the antigen peptide sequence.

10. A T-cell receptor binding prediction system based on double-strand consistency according to claim 9, characterized in that, The combined prediction network includes a first CTFormer encoder, a second CTFormer encoder, a first ESM2 model, a second ESM2 model, a first MFCNN model, a second MFCNN model, a third MFCNN model, a fourth MFCNN model, and a multilayer perceptron; The specific working process of the relationship prediction module is as follows: Step 1, The token sequence corresponding to the chain is used as the input to the first CTFormer encoder. The token sequence corresponding to the chain is used as the input of the second CTFormer encoder, the token sequence corresponding to the HLA allele is used as the input of the first ESM2 model, and the token sequence corresponding to the antigen peptide sequence is used as the input of the second ESM2 model. Step 2: Convert the output of the first CTFormer encoder As input to the first MFCNN model, the output of the first MFCNN model is... Chain features ; The output of the second CTFormer encoder As input to the second MFCNN model, the output of the second MFCNN model is... Chain features ; The output of the first ESM2 model As input to the third MFCNN model, the HLA features are output through the third MFCNN model. ; The output of the second ESM2 model As input to the fourth MFCNN model, the antigen features are output through the fourth MFCNN model. ; Step 3, then separately and Perform a global max pooling operation, and concatenate the results of the global max pooling operation to obtain the feature vector. ; Step 4, and then the feature vector The input is a multilayer perceptron, and the output of the multilayer perceptron is passed through a sigmoid function. The sigmoid function outputs the probability of the TCR sequence binding to the antigen peptide sequence. If the probability of binding is greater than 0.7, the TCR sequence binds to the antigen peptide sequence; otherwise, the TCR sequence does not bind to the antigen peptide sequence. The working process of the first CTFormer encoder is as follows: Step 21, The token sequence corresponding to the chain passes through an embedding layer, and the output of the embedding layer is denoted as... Then As input to the first coding unit, the working process of the first coding unit is as follows: Will After layer normalization: in, Presentation layer normalization layer, express The output after the normalization layer; Will Send to the bullish self-attention layer: in, express In the The query matrix is ​​obtained by linear projection within each attention head. express In the The key matrix is ​​obtained by linear projection within each attention head. express In the The value matrix obtained by linear projection within each attention head. , For the number of heads of attention, For parameter matrices; Then in the In the attention head, the first The token is paired with the first... Attention weight of each token for: in, Indicates the first The query vector corresponding to each token. Indicates the first The key vector corresponding to each token express transpose, The dimension of the key vector corresponding to each token. This indicates dependence on relative position difference. The bias, , ; No. The first attention point in the The output at each token is: in, Indicates the first The query vector corresponding to each token; Then the multi-head self-attention layer is in the first... The output at each token is: in, To output the projection matrix, This indicates a feature concatenation operation. This indicates that the multi-head self-attention layer is in the 1st... Output at each token; Stack the outputs of all position tokens to obtain the overall output of the multi-head self-attention layer. : The output of the multi-head self-attention layer and Adding the residuals gives : Again Perform layer normalization and then convert the layer normalization result to a normalized value. Feed into the feedforward network: in, and This is the weight matrix. and The bias vector is ultimately used to obtain the output of the first coding unit through residual connections. : Step 22: Use the output of the first coding unit as the input of the second coding unit, and so on, until the output of the second coding unit is used as the input of the third coding unit. The output of the encoding unit is used as the first Input to the encoding unit, ; The output of the 12th coding unit is used as the chain-specific embedding generated by the first CTFormer encoder. .