A Prediction Method for HLA and Antigen Peptide Binding Based on Interactive Attention
Through the prediction model of interactive attention-binding sequence and structural information, the problems of insufficient accuracy and generalization ability of HLA and antigen peptide binding prediction in the prior art are solved, and more comprehensive antigen immunogenicity analysis and higher prediction accuracy are achieved.
Patent Information
- Application Number
- CN202510760195.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-06-09
AI Technical Summary
In the prior art, when predicting HLA binding to antigenic peptides, there is a neglect of structural information, resulting in insufficient prediction accuracy in some cases, especially at new HLA sites, and the model is sensitive to subtle changes in the input and lacks generalization ability.
Using an interactive attention-based method, combining sequence embedding, self-attention, interactive attention and structural prediction models, through reverse adversarial training, sequence and structural information are integrated, predictive models are constructed, and features are fused using the cross attention mechanism to reduce sensitivity to subtle changes in the input and improve model generalization ability.
A more comprehensive antigen immunogenicity analysis is achieved, providing higher prediction accuracy and robustness, significantly improving the predictive performance of HLA and antigen peptide binding, especially at the new HLA site, which is better than existing methods.
Smart Images

Figure CN120280001B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computational biology, and in particular relates to a method for predicting HLA and antigen peptide binding based on interactive attention. Background Art
[0002] The binding of peptide antigens to human leukocyte antigens (HLA) is a crucial step in antigen presentation. HLA polymorphism is a functional trait acquired during evolution that enables the human immune system to respond to diverse pathogens at the individual level. With the deepening of understanding of immune system mechanisms, experimental techniques such as mass spectrometry-eluted HLA ligands and single-cell T sequencing have been developed to detect peptide-human leukocyte antigen (pHLA) binding. However, these techniques are often time-consuming, technically complex, and costly. Based on decades of laboratory research and the accumulation of HLA binding sequence data, numerous computational models targeting HLA-I alleles have been significantly improved. Existing models such as TransPHLA (Chu Y, Zhang Y, Wang Q, et al. A transformer-based model to predict peptide-HLA class I binding and optimize mutatedpeptides for vaccine design[J]. Nature Machine Intelligence, 2022, 4(3):300–311.), ACME (Yan H, Ziqiang W, Hailin H, et al. ACME: pan-specific peptide-MHCclass I binding prediction through attention-based deep neural networks[J].Bioinformatics, 2019, 35(23):4946–4954.), BigMHC (Alexander BA, Yunxiao Y, MX S, et al. Deep neural networks predict class I major histocompatibilitycomplex epitope presentation and transfer learn neoepitope immunogenicity[J].Nature Machine Intelligence, 2023, 5(8):861–872.), NetMHCpan (Vanessa J, SinuP, Massimo A, et al. NetMHCpan-4.0: Improved Peptide-MHC Class I Interaction Predictions Integrating Eluted Ligand and Peptide Binding Affinity Data[J]. Journal of immunology, 2017, 199(9):3360–3368.) and MHCflurry (O'Donnell JT, Rubinsteyn A, Laserson U. MHCflurry 2.0: Improved pan-allele prediction of MHC I-presented peptides by incorporating antigen processing[J]. CellSystems, 2020, 11(1):42-48.e7.) are widely used to predict the binding affinity between HLA and peptides. However, even these widely used algorithms may produce incorrect predictions in some cases (for example, when validated with new eluted ligand datasets). Many tools only focus on the binding between peptides and HLA, but ignore the structural information between HLA and peptides, and still need to be verified experimentally. For the structure-based deep learning methods proposed in recent years, such as TransflGN (Hong N, JiangD, Wang Z, et al. TransfIGN: A Structure-Based Deep Learning Method forModeling the Interaction between HLA-A*02:01 and Antigen Peptides[J]. Journalof Chemical Information and Modeling, 2024, 64(13):5016-5027.) and NeoaPred (Jiang D, Xi B, Tan W, et al. NeoaPred: a deep-learning framework forpredicting immunogenic neoantigen based on surface and structural features ofpeptide-human leukocyte antigen complexes[J]. Bioinformatics, 2024, 40(9):btae547.) models, all have their own limitations. TransflGN focuses solely on modeling HLA-A*02:01 and antigenic peptides, which is not universally applicable. NeoaPred focuses on structural modeling of WT / Mut wild-type and mutant peptides, while ignoring the structural features between peptides and HLA, potentially lacking accuracy at some novel HLA sites. Summary of the Invention
[0003] Purpose of the invention: The technical problem to be solved by the present invention is to provide a method for predicting HLA and antigen peptide binding based on interactive attention in response to the shortcomings of the existing technology.
[0004] In order to solve the above technical problems, the present invention discloses a method for predicting HLA and antigen peptide binding based on interactive attention, comprising:
[0005] Step 1: Collect HLA allele and unique peptide data to construct an HLA and antigen peptide binding dataset;
[0006] Step 2: constructing a prediction model for HLA and antigen peptide binding, and training the prediction model using the HLA and antigen peptide binding dataset to obtain a trained prediction model;
[0007] Step 3: Input the HLA sequence and antigen peptide sequence into the prediction model to obtain the prediction results of HLA and antigen peptide binding.
[0008] Furthermore, the HLA and antigen peptide binding prediction model in step 2 includes a sequence embedding module, an encoder, a sequence feature fusion module, a structure prediction model, a structure feature extraction module, a structure sequence feature fusion module, and a normalization layer. The sequence embedding module is used to perform amino acid embedding and position encoding on the HLA sequence and the antigen peptide sequence, respectively, to obtain an HLA sequence embedding matrix and an antigen peptide sequence embedding matrix;
[0009] The encoder is used to extract HLA sequence features and antigen peptide sequence features from the HLA sequence embedding matrix and the antigen peptide sequence embedding matrix respectively;
[0010] The sequence feature fusion module is used to fuse the HLA sequence features and the antigen peptide sequence features to obtain sequence fusion features;
[0011] The structure prediction model is used to predict the HLA structure, antigen peptide structure and the spatial structure of the pHLA complex based on the HLA sequence and the antigen peptide sequence;
[0012] The structural feature extraction module is used to extract structural features including interface area, number of hydrogen bonds, number of salt bridges, distance between centers of mass and interaction energy from the spatial structure of HLA structure, antigen peptide structure and pHLA complex;
[0013] The structure sequence feature fusion module is used to fuse the sequence fusion feature and the structure feature to obtain the structure sequence fusion feature;
[0014] The normalization layer is used to obtain the predicted probability of HLA and antigen peptide binding based on the structural sequence fusion feature.
[0015] Furthermore, in step 2, training the prediction model using the HLA and antigen peptide combination dataset includes reverse adversarial training, introducing perturbations in the neighborhood of the HLA sequence embedding and antigen peptide sequence embedding spaces, respectively, wherein the perturbations are generated along the direction of loss gradient ascent and are constrained by the L2 norm; the perturbations require the prediction model to minimize the adversarial loss while minimizing the empirical risk, thereby reducing sensitivity to slight changes in the input.
[0016] Furthermore, constructing the HLA and antigen peptide binding dataset in step 1 includes: in order to enhance the diversity of the dataset and the robustness of the model, the collected HLA allele and unique peptide data are enhanced by using a random mismatch method and an unbound sequence pool method.
[0017] Furthermore, the sequence embedding module performs amino acid embedding and position encoding on the HLA sequence and the antigen peptide sequence respectively, and obtains the HLA sequence embedding matrix and the antigen peptide sequence embedding matrix, including:
[0018] The HLA sequence consists of M1 amino acids. Each amino acid in the HLA sequence is mapped into an M-dimensional vector through the character embedding layer. ; Given that amino acid sequence is crucial to protein structure and function, sine-cosine position coding is applied to each amino acid position; the amino acid embedding and position coding are added to obtain the HLA sequence embedding matrix, and finally each HLA sequence is represented as matrix;
[0019] The antigen peptide sequence includes at most M2 amino acids. The antigen peptide sequence is padded to a maximum length of M2 to unify the variable length input. Each amino acid is also mapped to an M-dimensional embedding and position coding is added. After this processing, each antigen peptide sequence is represented as Embedding matrix.
[0020] Furthermore, the encoder extracts HLA sequence features and antigen peptide sequence features from the HLA sequence embedding matrix and the antigen peptide sequence embedding matrix respectively, including:
[0021] The encoder includes a self-attention layer, which is based on a self-attention mechanism that learns the attention of all amino acid pairs in the input sequence. The HLA sequence embedding matrix is used as the query vector Q1, the key vector K1, and the value vector V1 to extract HLA sequence features, and the antigen peptide sequence embedding matrix is used as the query vector Q1, the key vector K1, and the value vector V1 to extract antigen peptide sequence features. The self-attention layer outputs a weighted sum of the value vector V1, and the weighted value is the attention score. The attention score is calculated by the normalized dot product of the query vector Q1 and the key vector K1, and then a softmax operation is performed.
[0022] Furthermore, the sequence feature fusion module performs sequence feature fusion on the HLA sequence feature and the antigen peptide sequence feature to obtain the sequence fusion feature, which includes:
[0023] The interactive attention mechanism is used to fuse the sequence features of the interaction between antigen peptides and HLA molecules, where the HLA sequence feature matrix serves as the key vector K2 and the value vector V2, and the antigen peptide sequence feature matrix serves as the query vector Q2. In the interactive attention, the interaction vector I serves as the proxy of the query vector Q2, aggregating information from the key vector K2 and the value vector V2, and then broadcasting the aggregation result back to the query vector Q2. After being processed by the interactive attention mechanism, the sequence fusion features are obtained.
[0024] Furthermore, the structure prediction model predicts the HLA structure, antigen peptide structure and spatial structure of the pHLA complex based on the HLA sequence and antigen peptide sequence, including: using the PepConf framework to calculate the pHLA spatial distance matrix to describe the interaction between the antigen peptide and the HLA-I molecule; and using intermolecular loss to forcibly constrain the spatial distance between the antigen peptide and the HLA-I molecule.
[0025] Furthermore, the structure-sequence feature fusion module adopts a cross-attention mechanism to fuse sequence features and structure features, including:
[0026] The input features of the structure-sequence feature fusion module are constructed. The sequence fusion features are compressed into a global sequence representation S through average pooling. The structural features including interface area, number of hydrogen bonds, number of salt bridges, distance between centers of mass, and interaction energy are mapped into a structural embedding C through a multi-layer perceptron. The sequence features are used as the query Q3 and the structural features are used as the key-value pairs K3-V3. A cross-modal cross-attention mechanism is established to achieve adaptive sequence-to-structure alignment:
[0027] ,
[0028] in, Attention 3 represents the attention feature of the sequence structure, W Q is the sequence fusion feature, W K and WV For structural characteristics;
[0029] After gated residual connection, the conservative binding pattern of the original sequence features is retained, and structural constraints are injected to obtain the structural sequence fusion feature z:
[0030] ,
[0031] Among them, LayerNorm() represents the layer normalization function, is a learnable gating parameter.
[0032] Furthermore, the normalization layer obtains the predicted probability of HLA and antigen peptide binding based on the structural sequence fusion feature, and the formula is as follows:
[0033] ,
[0034] Where p represents the predicted probability, represents the activation function, w represents the learnable weight vector, and b represents the bias term.
[0035] Beneficial effects: The prediction model of this application shows advantages over previous methods in the pHLA (peptide-human leukocyte antigen) binding prediction task:
[0036] First, by integrating sequence-based and structure-based prediction tasks into a unified model, the method provided by this application can simultaneously analyze and predict the potential of pHLA based on sequence and structure. This dual-dimensional assessment provides a more comprehensive perspective on antigen immunogenicity than existing methods, providing new insights into the quality of neoantigens that trigger immune responses.
[0037] Secondly, a new attention paradigm based on interactive attention is proposed. By improving the traditional query-key-value (QKV) attention structure, element representation generation and interaction between elements are introduced, so that the sequence feature fusion module can fuse more expressive features and promote each other.
[0038] Finally, back-propagation adversarial training is used to effectively improve the generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more apparent.
[0040] Figure 1 A schematic diagram of the prediction model structure in a method for predicting HLA and antigen peptide binding based on interactive attention provided in an embodiment of the present application.
[0041] Figure 2A performance evaluation result diagram of an HLA and antigen peptide binding prediction method based on interactive attention provided in an embodiment of the present application and a prior art method. DETAILED DESCRIPTION
[0042] The embodiments of the present invention will be described below with reference to the accompanying drawings.
[0043] This example discloses a method for predicting HLA and antigen binding based on interactive attention, which can be applied to tumor antigen vaccine design. Tumor antigen vaccine design is one of the important approaches in cellular immunotherapy. Tumor antigen vaccine design refers to a therapeutic strategy that uses the screening, synthesis, or modification of specific tumor antigen peptides to activate the patient's immune system to fight tumors. Tumor antigen vaccine design is primarily based on the antigen presentation process of the tumor immune cycle. The core of this process corresponds to a binding process: antigen peptide-human leukocyte antigen receptor binding. The binding of antigen peptides to HLA is a key step in antigen presentation and a prerequisite for T cells to recognize foreign substances. When antigen peptides bind to HLA molecules to form peptide-HLA (pHLA) complexes and are presented on the cell surface, T cells can recognize the complexes, triggering a strong immune response. HLA is divided into two major classes: HLA class I (HLA-I) and HLA class II (HLA-II). HLA-I is encoded by three loci and is widely distributed on the surface of all nucleated cells, while HLA-II is expressed only on specific antigen-presenting cells. This example focuses on HLA-I molecules (hereinafter referred to as HLA).
[0044] The first embodiment of the present application discloses a method for predicting HLA and antigen peptide binding based on interactive attention, comprising:
[0045] Step 1: Collect HLA allele and unique peptide data to construct an HLA and antigen peptide binding dataset;
[0046] This example focuses on HLA class I molecules and constructs a large-scale pHLA binding dataset to facilitate neoantigen vaccine design and immunotherapy research. This example extracts 610,654 pHLA binding pairs from four public HLA binder databases: the Immune Epitope Database (IEDB), EPIMHC (a database of relationships between MHC-bound peptides and T-cell epitopes observed in real proteins), MHCBN (a curated database containing detailed information on major histocompatibility complex (MHC)-bound and non-bound peptides and T-cell epitopes), and SYFPEITHI (a database of peptide sequences bound to class I and class II MHC molecules). By removing duplicate sequences and outliers (e.g., missing values or asterisks), this dataset covers 142 HLA alleles and 279,924 unique peptides.
[0047] To efficiently evaluate the performance of the prediction model proposed in this example, the pHLA binding dataset was divided into a training set and an independent test set at a ratio of 9:1. The training set ultimately contained 565,529 sample pairs, covering 139 HLA alleles and 219,744 antigens; the independent test set contained 45,125 sample pairs, covering 118 HLA alleles and 33,606 antigens. To enhance the diversity of the dataset and the robustness of the model, this example employed two methods, random mismatches and an unbound sequence pool, to generate approximately twice the number of negative pHLA samples:
[0048] Random mismatch method: This method randomly pairs negative samples by scrambling the HLA and peptide sequences. Although this method may cause some negative samples to have identical peptides and HLA sequences as positive samples, thereby introducing false negative sample bias, the probability of such samples occurring is low and their impact on the model is minimal, so it can be ignored.
[0049] Unbound sequence pool method: Long protein sequences are extracted from the Immune Epitope Database (IEDB) and randomly truncated into short sequences to construct an unbound sequence pool. Subsequently, peptides are randomly extracted from the unbound sequence pool and paired with specific HLA alleles to generate negative samples.
[0050] Negative samples generated by these two methods each account for approximately 50% of the total negative samples. For each HLA allele, some negative peptides are derived from fragments of the IEDB HLA immunopeptidome-derived protein, while the remaining negative samples are generated through random mismatches. Although false negative samples may exist, their proportion is extremely low and their impact on the results is negligible.
[0051] Step 2: constructing a prediction model for HLA and antigen peptide binding, and training the prediction model using the HLA and antigen peptide binding dataset to obtain a trained prediction model;
[0052] like Figure 1 As shown, the HLA and antigen peptide binding prediction model includes a sequence embedding module, an encoder, a sequence feature fusion module, a structure prediction model, a structure feature extraction module, a structure sequence feature fusion module and a normalization layer.
[0053] The sequence embedding module is used to perform amino acid embedding and position coding on the HLA sequence and the antigen peptide sequence, respectively, to obtain the HLA sequence embedding matrix and the antigen peptide sequence embedding matrix;
[0054] The HLA sequence consists of M1 amino acids. Each amino acid in the HLA sequence is mapped into an M-dimensional vector through the character embedding layer. ;
[0055] The HLA sequence is fixed at 34 amino acids in length, i.e. , each amino acid is mapped into a 64-dimensional vector through the character embedding layer, that is Given that amino acid sequence is crucial to protein structure and function, sine-cosine positional encoding is applied to each position. The amino acid embedding and positional encoding are combined to form a sequence embedding, ultimately representing each HLA sequence as a 34×64 matrix.
[0056] The antigen peptide sequence includes at most M2 amino acids. ; In this embodiment The antigen peptide sequence is padded to a maximum length of 15 to unify the variable-length input. Each amino acid is also mapped to a 64-dimensional embedding and position encoding is added. After this processing, each antigen peptide sequence is represented as a 15×64 embedding matrix.
[0057] The encoder is used to extract HLA sequence features and antigen peptide sequence features from the HLA sequence embedding matrix and the antigen peptide sequence embedding matrix respectively;
[0058] The encoder is based on the self-attention mechanism, which has shown excellent ability in extracting global correlations and dependencies from amino acid sequences. The self-attention mechanism learns to pay attention to all possible amino acid pairs in the input sequence. Among them, the HLA sequence embedding matrix is used as the query vector Q1, key vector K1 and value vector V1 to extract HLA sequence features, and the antigen peptide sequence embedding matrix is used as the query vector Q1, key vector K1 and value vector V1 to extract antigen peptide sequence features. The attention score is calculated by the normalized dot product of the query vector Q1 and the key vector K1, and then a softmax operation is performed. The output of the self-attention layer Attention 1 is the weighted sum of the value vector V1 weighted by the attention score. The operation of the self-attention layer is represented in matrix form as follows:
[0059] ,
[0060] in is the dimension of the vector (chosen as 64). The output of the self-attention block is passed through multiple fully connected layers, and the dimension of the top is first increased and then decreased. For antigen peptide sequences and HLA sequences, the above encoder architecture is used for feature extraction.
[0061] In this example, a masking mechanism is introduced when calculating the self-attention score. Specifically, for peptides shorter than their maximum length, non-amino acid characters are not considered during model training. To this end, these characters are assigned a zero attention score so that they do not affect the calculation of the attention score. In this example implementation, the encoder includes a single-layer, single-head self-attention block.
[0062] The sequence feature fusion module is used to fuse the HLA sequence features and the antigen peptide sequence features to obtain sequence fusion features;
[0063] This example proposes a new attention paradigm, interaction attention, which effectively captures the complex correlations and global dependencies between different sequences. This mechanism is used to fuse features of peptide-HLA interactions. Unlike traditional attention mechanisms, when fusion HLA-peptide features is performed, the HLA sequence feature matrix serves as the key vector K2 and the value vector V2, while the antigen peptide sequence feature matrix serves as the query vector Q2. In interaction attention, interaction tokens (I) act as "proxy" for the query vector Q2, aggregating information from the key vector K2 and the value vector V2 and then broadcasting the aggregated result back to the query vector Q2. This process effectively reduces computational complexity while preserving the ability to model global context.
[0064] When calculating the attention score, a masking mechanism is used to significantly reduce computational overhead and accelerate model convergence. In the specific implementation, a single-layer, single-head interactive attention structure is adopted, which reduces the direct similarity calculation between Q and K through proxy tokens, thereby improving computational efficiency.
[0065] The antigen peptide sequence feature matrix and the HLA sequence feature matrix are input, and the sequence feature fusion module performs feature fusion between the antigen peptide segments and the HLA molecules through the interactive attention mechanism.
[0066] In interactive attention, we introduce the interaction vector I as a proxy for the query vector Q2 and reduce the computational complexity by aggregating information from the key vector K2 and the value vector V2. Specifically, the interaction vector I extracts global information from the key-value pair (K2, V2) Aggregate information.
[0067] The formula is as follows:
[0068] ,
[0069] ,
[0070] Among them, pooling represents the pooling operation, Indicates mapping the interaction vector I to the same feature space as K2, such as linear transformation operation; softmax() indicates normalization operation;
[0071] The interaction vector I converts the global information The aggregation result is passed to the query vector Q2 and broadcasted back to the query vector Q2.
[0072] The formula is as follows:
[0073] ,
[0074] in, Indicates mapping the query vector Q2 to the same feature space as the interaction vector I, W Q Represents sequence fusion features.
[0075] The structure prediction model is used to predict the HLA structure, antigen peptide structure and the spatial structure of the pHLA complex based on the HLA sequence and the antigen peptide sequence;
[0076] This example uses the PepConf framework, which draws on the structure prediction method of AlphaFold2. Based on the HLA sequence embedding matrix and the antigen peptide sequence embedding matrix, the pHLA spatial distance matrix (a two-dimensional matrix) is calculated to describe the interaction between the antigen peptide and the HLA-I molecule, thereby supporting the construction of the peptide conformation. At the same time, the intermolecular loss is used to enforce the spatial distance between the antigen peptide and the HLA-I molecule. The loss function is as follows:
[0077] ,
[0078] L represents the total loss for each example, L pep Indicates the loss of the peptide itself, L pHLA Indicates loss of peptide from HLA-I molecules.
[0079] L pep It consists of four auxiliary losses as follows:
[0080]
[0081] L FAPE is the framework alignment point error (FAPE) loss, which is used to evaluate the coordinates of peptide atoms relative to the peptide rigid groups; L dist is the cross entropy loss of the distance distribution of residues within the peptide; L angle represents the side chain and backbone torsion angle loss; L viol is the structural violation loss. These auxiliary losses are defined in AlphaFold2 and OpenFold.
[0082] L pHLA It consists of two auxiliary losses as follows:
[0083]
[0084] L pHLA-FAPE is the FAPE loss that evaluates the peptide atomic coordinates relative to the HLA rigid groups; L pHLA-distis the cross entropy loss of the residue distance distribution between peptide and HLA.
[0085] This method has superior performance and can successfully predict the spatial structure of the pHLA complex.
[0086] The structural feature extraction module is used to extract structural features including interface area, number of hydrogen bonds, number of salt bridges, distance between centers of mass and interaction energy from the spatial structure of HLA structure, antigen peptide structure and pHLA complex;
[0087] To systematically evaluate the binding properties between antigenic peptides and HLA molecules, this example extracts five key interaction features from the predicted complex structures: interface area, number of hydrogen bonds, number of salt bridges, center-of-mass distance, and interaction energy. The following is a detailed description of each feature:
[0088] Specifically, the FreeSASA (SASA stands for Solvent Accessible Surface Area) tool was used to quantify the reduction in solvent-accessible surface area before and after binding, using the interface area (Interface Area) to characterize the degree of peptide burial in the HLA groove. Second, the number of cross-chain hydrogen bonds (HBond) was calculated using geometric thresholds (3.5Å distance and 120° angle) to reflect the robustness of polar interactions. Furthermore, the number of salt bridges (SaltBridge) between positively and negatively charged residues was identified using a 4.0Å distance criterion to assess electrostatic stabilization. Finally, the distance between the centers of mass of the two chains (CoMDist) was calculated to characterize the depth of peptide insertion and exposure. Finally, the interaction energy (Contact) was calculated by multiplying the number of cross-chain atomic contacts within 5.0Å by –0.1 kcalmol⁻¹, providing a rapid estimate of binding strength. This five-dimensional vector fully captures structure-driven physical cues without relying on expensive molecular mechanics solutions, infusing downstream multimodal models with detailed spatial and energetic information.
[0089] In order to effectively combine the interaction information between antigen peptide sequences and HLA molecules as well as their structural characteristics, a cross-modal feature fusion method based on the cross-attention mechanism is adopted.
[0090] The mechanistic sequence features encode global binding patterns (e.g., motif conservation), while the structural features capture local physical interactions (e.g., interfacial energy gradients).
[0091] First, construct the input features of the structure sequence feature fusion module. Sequence feature: the sequence fusion feature W Q , compressed into a global sequence representation by average pooling Structural features: Five physical indicators extracted from the pHLA complex (interface area, number of hydrogen bonds HBond, number of salt bridges SaltBridge, center-of-mass distance CoMDist, and interaction energy Contact) are mapped into structural embeddings using a multilayer perceptron (MLP). :
[0092] .
[0093] Doing so allows the nonlinear transformation of MLP to simulate the complex mapping relationship between physical indicators and binding free energy, such as the trade-off between the number of hydrogen bonds and entropy compensation.
[0094] Using sequence features as query Q3 and structural features as key-value pairs K3-V3, we establish a cross-modal cross-attention mechanism to achieve adaptive alignment from sequence to structure:
[0095] ,
[0096] in, Attention 3 represents the attention feature of the sequence structure, W Q is the sequence fusion feature, W K and W V For structural characteristics;
[0097] After gated residual connection, the conservative binding pattern of the original sequence features is retained, and structural constraints are injected to obtain the structural sequence fusion feature z:
[0098] ,
[0099] Among them, LayerNorm() represents the layer normalization function, is a learnable gating parameter, initialized to 0.5 to balance the bimodal contribution.
[0100] The normalization layer is used to obtain the predicted probability of HLA and antigen peptide binding based on the structural sequence fusion feature, and the formula is as follows:
[0101] ,
[0102] Where p represents the predicted probability, Denotes the Sigmoid activation function, w denotes the learnable weight vector, and b denotes the bias term. In practice, w and b can be initialized to small random values and automatically updated by the Adam optimization algorithm during training.
[0103] In step 2, the prediction model is trained using the HLA and antigen peptide binding dataset, including reverse adversarial training. Specifically, by introducing small perturbations in the neighborhood of the sequence embedding space (rather than directly perturbing the original sequence), these perturbations are generated along the direction of loss gradient ascent, usually subject to the L2 norm constraint. The perturbation requires the prediction model to minimize the adversarial loss while minimizing the empirical risk, thereby reducing sensitivity to slight changes in the input. Adversarial loss The formula is defined as:
[0104]
[0105] Where D represents a function that measures the difference between two distributions. Represents the probability that the model predicts label y for input x. Represents the trainable parameters of the prediction model provided by this implementation, with random initial values, which will participate in the gradient update when adversarial perturbation calculation is performed. represents a copy of the model parameters that is “frozen” (stop-gradient) when the adversarial perturbation is generated, which is used to calculate the output distribution of the original input and does not participate in the optimization of r. Indicates that the input is x and the parameter is The model's predicted probability distribution for category y when r vadv is the reverse adversarial perturbation for sample x, , the perturbation is maximized along the gradient ascent direction and The difference between. Represents an unlabeled sample, r represents a small perturbation vector to the input x, and finds the direction that maximizes the output distribution deviation. represents the upper limit of the L2 norm of the perturbation vector r.
[0106] Adversarial perturbations are applied to the neighborhoods of both the HLA sequence embedding and the antigen peptide sequence embedding space, enabling the encoder to extract discriminative features. Ablation experiments confirm that reverse adversarial learning improves the performance of the prediction model.
[0107] Step 3: Input the HLA sequence and antigen peptide sequence into the prediction model to obtain the prediction results of HLA and antigen peptide binding.
[0108] To evaluate the predictive performance of the proposed model in HLA-antigen binding, the prediction model proposed in this example (abbreviated as TransPed) was compared with the existing models TransPHLA, NetMHC-pan_BA and NetMHCpan_EL (Birkir R, Bruno A, Sinu P, et al. NetMHCpan-4.1 and NetMHCIIpan-4.0: improved predictions of MHC antigen presentation by concurrent motifdeconvolution and integration of MS MHC eluted ligand data[J]. Nucleic acidsresearch, 2020, 48(W1):W449-W454.), MHLAPre (Xu L, Yang Q, Dong W, et al. Metalearning for mutant HLA class I epitope immunogenicity prediction to accelerate cancer clinical immunotherapy[J]. Briefings in Bioinformatics, 2024, 26(1):bbae625.) and NetMHCcons (Edita K, Claus L, Ole L, et al. al.NetMHCcons: a consensus method for the major histocompatibility complex classI predictions[J]. Immunogenetics, 2012, 64(3):177-86.) and compared their performance. The performance indicators included precision, recall, area under the PR curve, and true negative rate.
[0109] Figure 2The performance evaluation results shown in the figure show that, on an independent test set, the TransPed model provided in this example significantly outperformed current mainstream methods across all key performance metrics. Specifically, TransPed achieved a precision of 0.92, a 10 percentage point improvement over TransPHLA's 0.82; a recall of 0.90, approximately 5 percentage points higher than the runner-up; a high PR-AUC of 0.95, surpassing the 0.85-0.88 range of NetMHCpanBA / EL; and a true negative rate of 0.89, nearly 8 percentage points higher than the average of other models. These results demonstrate that TransPed not only improves positive example coverage while maintaining high accuracy, but also demonstrates greater robustness in distinguishing difficult negative examples, providing a more effective and reliable solution for pHLA affinity prediction.
[0110] TransPed significantly enhances the predictive power of neoantigen peptides through several innovative design features. It organically integrates sequence and structural information to comprehensively analyze peptide-MHC binding characteristics from a dual perspective. This is achieved through the introduction of a cross-attention mechanism and positional encoding: the former highlights interactions between peptides and key receptor sites within the attention framework, while the latter incorporates spatial positional information to encode amino acid sequences, enabling the model to better capture the structural context of residues. By cross-attentionally integrating structural and sequence features, TransPed is able to link sequence patterns with three-dimensional conformations, accurately identifying key sequence-structure factors influencing peptide-MHC affinity. This is a feature not found in other models, such as TransPHLA, ACME, and BigMHC, which focus solely on sequence features while ignoring the structural information between HLA and peptides. This requires experimental verification. Structure-based deep learning methods proposed in recent years, such as TransflGN and NeoaPred, all have their own limitations. TransflGN only focuses on the modeling of HLA-A*02:01 and antigen peptides and is not universal. NeoaPred focuses on the structural modeling of WT / Mut wild peptides and mutant peptides, but ignores the structural features between peptides and HLA, and may lack accuracy at some new HLA sites.
[0111] In a specific implementation, this application provides a computer storage medium and a corresponding data processing unit. The computer storage medium is capable of storing a computer program that, when executed by the data processing unit, executes the invention disclosure of a method for predicting HLA and antigen peptide binding based on interactive attention, as well as some or all of the steps described in various embodiments. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0112] Those skilled in the art will clearly understand that the technical solutions in the embodiments of the present invention can be implemented using computer programs and their corresponding general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a computer program, i.e., a software product. This computer program software product can be stored in a storage medium and includes a number of instructions for enabling a device including a data processing unit (such as a personal computer, server, single-chip microcomputer, MUU, or network device) to execute the methods described in various embodiments of the present invention or certain portions of these embodiments.
[0113] The present invention provides a method for predicting HLA and antigen peptide binding based on interactive attention. There are numerous methods and approaches for implementing this technical solution. The above is merely a preferred embodiment of the present invention. It should be noted that those skilled in the art may make various improvements and modifications without departing from the principles of the present invention, and such improvements and modifications are also within the scope of protection of the present invention. Any components not specified in this embodiment may be implemented using existing technologies.
Claims
1. A method for predicting HLA and antigen peptide binding based on interactive attention, characterized in that: include: Step 1: Collect HLA allele and unique peptide data to construct an HLA and antigen peptide binding dataset; Step 2: constructing a prediction model for HLA and antigen peptide binding, and training the prediction model using the HLA and antigen peptide binding dataset to obtain a trained prediction model; Step 3: Input the HLA sequence and antigen peptide sequence into the prediction model to obtain the prediction results of HLA and antigen peptide binding; The HLA and antigen peptide binding prediction model in step 2 includes a sequence embedding module, an encoder, a sequence feature fusion module, a structure prediction model, a structure feature extraction module, a structure sequence feature fusion module, and a normalization layer. The sequence embedding module is used to perform amino acid embedding and position encoding on the HLA sequence and the antigen peptide sequence, respectively, to obtain the HLA sequence embedding matrix and the antigen peptide sequence embedding matrix; The encoder is used to extract HLA sequence features and antigen peptide sequence features from the HLA sequence embedding matrix and the antigen peptide sequence embedding matrix respectively; The sequence feature fusion module is used to fuse the HLA sequence features and the antigen peptide sequence features to obtain sequence fusion features; The structure prediction model is used to predict the HLA structure, antigen peptide structure and the spatial structure of the pHLA complex based on the HLA sequence and the antigen peptide sequence; The structural feature extraction module is used to extract structural features including interface area, number of hydrogen bonds, number of salt bridges, distance between centers of mass and interaction energy from the spatial structure of HLA structure, antigen peptide structure and pHLA complex; The structure sequence feature fusion module is used to fuse the sequence fusion feature and the structure feature to obtain the structure sequence fusion feature; The normalization layer is used to obtain the predicted probability of HLA and antigen peptide binding based on the structural sequence fusion feature; The sequence embedding module performs amino acid embedding and position encoding on the HLA sequence and the antigen peptide sequence respectively to obtain the HLA sequence embedding matrix and the antigen peptide sequence embedding matrix, which includes: Note that the HLA sequence consists of M1 amino acids, and each amino acid in the HLA sequence is mapped into an M-dimensional vector through the character embedding layer. ; Sine-cosine position coding is applied to each amino acid position; the amino acid embedding is added to the position coding to obtain the HLA sequence embedding matrix, and finally each HLA sequence is represented as matrix; The antigen peptide sequence includes at most M2 amino acids. The antigen peptide sequence is padded to a maximum length of M2 to unify the variable length input. Each amino acid is also mapped to an M-dimensional embedding and position coding is added. After this processing, each antigen peptide sequence is represented as Embedding matrix.
2. The method for predicting HLA and antigen peptide binding based on interactive attention according to claim 1, characterized in that: In step 2, training the prediction model using the HLA and antigen peptide combination dataset includes reverse adversarial training, introducing perturbations in the HLA sequence embedding and antigen peptide sequence embedding space neighborhoods, respectively. The perturbations are generated along the direction of loss gradient ascent and are constrained by the L2 norm. The perturbations require the prediction model to minimize the adversarial loss while minimizing the empirical risk.
3. The method for predicting HLA and antigen peptide binding based on interactive attention according to claim 2, characterized in that: The construction of the HLA and antigen peptide binding data set in step 1 includes: using random mismatching and unbound sequence pooling to enhance the collected HLA allele and unique peptide data.
4. The method for predicting HLA and antigen peptide binding based on interactive attention according to claim 3, characterized in that: The encoder extracts HLA sequence features and antigen peptide sequence features from the HLA sequence embedding matrix and the antigen peptide sequence embedding matrix respectively, including: The encoder includes a self-attention layer, which is based on a self-attention mechanism that learns the attention of all amino acid pairs in the input sequence. The HLA sequence embedding matrix is used as the query vector Q1, the key vector K1, and the value vector V1 to extract HLA sequence features, and the antigen peptide sequence embedding matrix is used as the query vector Q1, the key vector K1, and the value vector V1 to extract antigen peptide sequence features. The self-attention layer outputs a weighted sum of the value vector V1, and the weighted value is the attention score. The attention score is calculated by the normalized dot product of the query vector Q1 and the key vector K1, and then a softmax operation is performed.
5. The method for predicting HLA and antigen peptide binding based on interactive attention according to claim 4, characterized in that: The sequence feature fusion module performs sequence feature fusion on the HLA sequence feature and the antigen peptide sequence feature to obtain the sequence fusion feature, which includes: The interactive attention mechanism is used to fuse the sequence features of the interaction between antigen peptides and HLA molecules, where the HLA sequence feature matrix serves as the key vector K2 and the value vector V2, and the antigen peptide sequence feature matrix serves as the query vector Q2. In the interactive attention, the interaction vector I serves as the proxy of the query vector Q2, aggregating information from the key vector K2 and the value vector V2, and then broadcasting the aggregation result back to the query vector Q2. After being processed by the interactive attention mechanism, the sequence fusion features are obtained.
6. The method for predicting HLA and antigen peptide binding based on interactive attention according to claim 5, characterized in that: The structure prediction model predicts the HLA structure, antigen peptide structure and the spatial structure of the pHLA complex based on the HLA sequence and the antigen peptide sequence, including: using the PepConf framework to calculate the pHLA spatial distance matrix to describe the interaction between the antigen peptide and the HLA-I molecule; and using intermolecular loss to constrain the spatial distance between the antigen peptide and the HLA-I molecule.
7. The method for predicting HLA and antigen peptide binding based on interactive attention according to claim 6, characterized in that: The structure sequence feature fusion module adopts the cross attention mechanism to fuse sequence features and structure features, including: The input features of the structure-sequence feature fusion module are constructed. The sequence fusion features are compressed into a global sequence representation S through average pooling. The structural features including interface area, number of hydrogen bonds, number of salt bridges, distance between centers of mass, and interaction energy are mapped into a structural embedding C through a multi-layer perceptron. The sequence features are used as the query Q3 and the structural features are used as the key-value pairs K3-V3. A cross-modal cross-attention mechanism is established to achieve adaptive sequence-to-structure alignment: , Among them, Attention3 represents the attention feature of the sequence structure, W Q is the sequence fusion feature, W K and W V For structural characteristics; After gated residual connection, the conservative binding pattern of the original sequence features is retained, and structural constraints are injected to obtain the structural sequence fusion feature z: , Among them, LayerNorm() represents the layer normalization function, is a learnable gating parameter.
8. The method for predicting HLA and antigen peptide binding based on interactive attention according to claim 7, characterized in that: The normalization layer obtains the predicted probability of HLA and antigen peptide binding based on the structural sequence fusion features, and the formula is as follows: , Where p represents the predicted probability, represents the activation function, w represents the learnable weight vector, and b represents the bias term.
Citation Information
Patent Citations
Human TCR / HLA-I / Peptide ternary complex interaction identification prediction method and system
CN116597903A
Compound structure prediction method and device, computer equipment and storage medium
CN116959577A