Related Experiment Video
Updated: Jul 13, 2025

Peptide:MHC Tetramer-based Enrichment of Epitope-specific T cells
Published on: October 22, 2012
Determining epitope specificity of T-cell receptors with transformers
Abdul Rehman Khan1, Marcel J T Reinders1,2, Indu Khatri2,3
1Department of Intelligent Systems, Delft University of Technology, Delft 2600 GA, The Netherlands.
Summary:
T-cell receptors (TCRs) on T cells recognize and bind to epitopes presented by the major histocompatibility complex in case of an infection or cancer. However, the high diversity of TCRs, as well as their unique and complex binding mechanisms underlying epitope recognition, make it difficult to predict the binding between TCRs and epitopes. Here, we present the utility of transformers, a deep learning strategy that incorporates an attention mechanism that learns the informative features, and show that these models pre-trained on a large set of protein sequences outperform current strategies. We compared three pre-trained auto-encoder transformer models (ProtBERT, ProtAlbert, and ProtElectra) and one pre-trained auto-regressive transformer model (ProtXLNet) to predict the binding specificity of TCRs to 25 epitopes from the VDJdb database (human and murine). Two additional modifications were performed to incorporate gene usage of the TCRs in the four transformer models. Of all 12 transformer implementations (four models with three different modifications), a modified version of the ProtXLNet model could predict TCR-epitope pairs with the highest accuracy (weighted F1 score 0.55 simultaneously considering all 25 epitopes). The modification included additional features representing the gene names for the TCRs. We also showed that the basic implementation of transformers outperformed the previously available methods, i.e. TCRGP, TCRdist, and DeepTCR, developed for the same biological problem, especially for the hard-to-classify labels. We show that the proficiency of transformers in attention learning can be made operational in a complex biological setting like TCR binding prediction. Further ingenuity in utilizing the full potential of transformers, either through attention head visualization or introducing additional features, can extend T-cell research avenues.
Availability And Implementation:
Data and code are available on https://github.com/InduKhatri/tcrformer.
More Related Videos
09:53Using X-ray Crystallography, Biophysics, and Functional Assays to Determine the Mechanisms Governing T-cell Receptor Recognition of Cancer Antigens
Published on: February 6, 2017
08:48Generating De Novo Antigen-specific Human T Cell Receptors by Retroviral Transduction of Centric Hemichain
Published on: October 25, 2016
Related Concept Videos
T Cell Activation and Clonal Selection
Naive T cells that have not yet encountered an antigen express two primary CD...
Diversity of Antigen Receptors
Before encountering any antigen, lymphocytes express these receptors. On B cells, the antigen receptor is a membrane-bound antibody molecule called BCR; on T cells, it is a T cell receptor or TCR. B and T cell receptors are composed of two...