正在把原文翻译成中文,长文需要一两分钟;先显示原文。

Download PDF

Nature Methods (2026) Cite this article

View saved research

Abstract

Interactions between T-cell receptors (TCRs) and antigenic peptides presented on major histocompatibility complex (MHC) molecules are central to the immune recognition of infected and malignant cells. The complexity of the TCR sequence space, the flexibility of the TCR–epitope interface and the lack of a standardized framework to visualize TCR specificity have hindered a comprehensive understanding of the principles governing TCR–epitope recognition across a broad range of epitopes. Here we introduce TCR specificity profiles (TSPs), a fully interpretable probabilistic framework that captures fundamental properties distinguishing epitope-specific from baseline TCR repertoires. We demonstrate that TSPs unravel key determinants of TCR–epitope recognition specificity. By identifying and analyzing thousands of TCRs recognizing multiple epitope variants, we show that TSPs can predict cross-reactivity and reveal how TCR specificity evolves with epitope sequence, binding mode and MHC restriction. TSPs further show how AlphaFold3 can help decipher key determinants of TCR recognition specificity for some epitopes.

Main

TCRs recognize epitopes consisting of antigenic peptides displayed on MHC molecules. T cells generate heterodimeric TCRs with different sequences through a process called V(D)J recombination. First, specific V and J genes are assembled in the alpha and the beta chains (with an additional small D segment in TCRβ chains). The theoretical diversity of Vα/Jα/Vβ/Jβ combinations is roughly 106. Second, insertions and deletions occur at the V(D)J junctions, which are located within the complementarity-determining region 3 (CDR3) loops.

TCRs recognize epitopes through several loops, called CDR1, CDR2 and CDR3. Structural analyses have suggested that residues in CDR1 and CDR2 loops (which are determined by V usage) preferentially interact with the MHC, and residues in CDR3 loops preferentially interact with the peptide, although many counterexamples exist1. This has led some studies to hypothesize that V usage would primarily encode MHC recognition and CDR3s would encode peptide recognition2,3,4.

Analysis of epitope-specific TCR sequences has revealed features characterizing TCRs recognizing distinct epitopes5,6. Many studies have focused on CDR3 sequences, using tools like motifs, k-mers or other machine learning approaches6,7,8,9. Studies have also reported enrichment in V/J genes5,10,11,12,13,14,15,16. Some attempts have been proposed to visualize specificity patterns in TCR sequences5,17. However, standardized frameworks to analyze and interpret these patterns are missing.

Epitope-specific TCRs have been used to train TCR–epitope recognition predictors8,[18](#ref-CR18 "Jensen, M. F. & Nielsen, M. NetTCR 2.2 - improved TCR specificity predictions by combining pan- and peptide-specific training strategies, loss-scaling and integration of sequence similarity. Elife https://doi.org/10.7554/eLife.93934.3

           (2024)."),[19](#ref-CR19 "Croce, G. et al. Deep learning predictions of TCR-epitope interactions reveal epitope-specific chains in dual alpha T cells. Nat Commun 15, 3211 (2024)."),[20](https://www.nature.com/articles/s41592-026-03328-y#ref-CR20 "Mayer-Blackwell, K. et al. TCR meta-clonotypes for biomarker discovery with tcrdist3 enabled identification of public, HLA-restricted clusters of SARS-CoV-2 TCRs. Elife 10, e68605 (2021)."). These tools reach reasonable accuracy for epitopes with abundant training data, but predictions remain unreliable for epitopes with little or no training data[21](https://www.nature.com/articles/s41592-026-03328-y#ref-CR21 "Nielsen, M. et al. Lessons learned from the IMMREP23 TCR-epitope prediction challenge. ImmunoInformatics 16, 100045 (2024)."),[22](https://www.nature.com/articles/s41592-026-03328-y#ref-CR22 "Drost, F. et al. Benchmarking of T cell receptor-epitope predictors with ePytope-TCR. Cell Genom. 
            https://doi.org/10.1016/j.xgen.2025.100946

           (2025)."). The application of powerful AI models for protein structure prediction, such as AlphaFold (AF)[23](https://www.nature.com/articles/s41592-026-03328-y#ref-CR23 "Abramson, J. et al. Accurate structure prediction of biomolecular interactions with AlphaFold 3. Nature 630, 493–500 (2024)."), shows promise for epitopes without experimentally known TCRs[24](#ref-CR24 "McMaster, B., Thorpe, C., Ogg, G., Deane, C. M. & Koohy, H. Can AlphaFold’s breakthrough in protein structure help decode the fundamental principles of adaptive cellular immunity?. Nat. Methods 21, 766–776 (2024)."),[25](#ref-CR25 "Bradley, P. Structure-based prediction of T cell receptor:peptide-MHC interactions. Elife 12, e82813 (2023)."),[26](#ref-CR26 "Quast, N. P. et al. T-cell receptor structures and predictive models reveal comparable alpha and beta chain structural diversity despite differing genetic complexity. Commun. Biol. 8, 362 (2025)."),[27](#ref-CR27 "Deleuran, S. N. & Nielsen, M. NetTCR-struc, a structure driven approach for prediction of TCR-pMHC interactions. Front. Immunol. 16, 1616328 (2025)."),[28](#ref-CR28 "Messemaker, M. et al. Functional evaluation of TCR-pMHC pairs at scale allows in silico TCR reactivity prediction. Immunity 
            https://doi.org/10.1016/j.immuni.2026.09.007

           (2026)."),[29](#ref-CR29 "Ascunce-París, A., Romero-Durana, M., Valencia, A., Farriol-Duran, R. & Guallar, V. Structural quality-tier assessment for TCR-pMHC functional enrichment. Front. Immunol. 17, 1869810 (2026)."),[30](https://www.nature.com/articles/s41592-026-03328-y#ref-CR30 "Chao, C.-C. et al. AI/ML-empowered approaches for predicting T cell-mediated immunity and beyond. Front. Immunol. 16, 1651533 (2025)."). Unfortunately, interpretation of all these predictions remains challenging.

Here, we introduce a probabilistic framework to visualize properties distinguishing epitope-specific TCRs from TCRs with unknown specificities (referred to as ‘baseline’ repertoires) that captures key determinants of TCR–epitope recognition specificity and cross-reactivity.

Results

TSPs accurately capture specificity in T cell epitope recognition

When modeling TCR–epitope recognition specificity, a key step is to find patterns that distinguish epitope-specific TCRs from baseline repertoires31. This comparison is important because baseline repertoires exhibit diversity in many of their properties. For instance, some V or J segments occur at high frequency, while others occur at very low frequency (Extended Data Fig. 1a). In addition, biases related to sequencing protocols, patient genotype and immune history impact baseline repertoires and lead to variability in V and J usage32.

To address these issues, we collected hundreds of baseline repertoires, representing more than 106 alpha chains and 108 beta chains in human and mouse (Methods and Supplementary Table 1). We derived the mean (denoted with Q) and standard deviation for V usage, J usage, CDR3 length distribution and CDR3 amino acid frequencies for each chain and each species (Methods). As CDR3 lengths and amino acid sequences are influenced by V and J genes[33](https://www.nature.com/articles/s41592-026-03328-y#ref-CR33 "Moreno, D. L., Croce, G. & Gfeller, D. Statistical modelling of CDR3 sequences provides robust quality control for TCR repertoire datasets. Preprint at bioRxiv https://doi.org/10.64898/2025.12.11.693618

           (2025)."), we derived residual probabilities for the CDR3 length distributions (that is, *Q*(*L*\|*V*, *J*)) and CDR3 amino acid frequencies (that is, *Q*(*CDR*3\|*V*, *J*, *L*); chains and species are omitted for clarity).

We then developed a fully interpretable visualization framework, termed TCR specificity profile (TSP), to compare properties of epitope-specific TCRs with those of baseline repertoires (Fig. 1a). First, V and J usage in epitope-specific TCRs are compared to the mean and standard deviation of V and J usage in baseline repertoires. Second, CDR3 length distributions in epitope-specific TCRs are compared to the expected distributions in baseline repertoires with the same V/J usage (\({Q}_{P({V,J})}\left(L\right)\)). Third, CDR3 amino acid frequencies are compared to those in baseline repertoires with the same V/J usage (\({Q}_{P(V,J|L)}\left({\rm{CDR}3}|L\right)\); Fig. 1a and Extended Data Fig. 1b). Using TCRs recognizing a yellow fever (YF) epitope LLWNGPMAV restricted to HLA-A*02:01 (Fig. 1a), specific patterns emerged in V/J usage and CDR3α length distribution. Some of these patterns, such as enrichment in TRAV12-2 or in CDR3α of length 10, have been reported in previous studies10, while others had not been detected because of the difficulty to quantify enrichment without a model of baseline repertoires. CDR3 sequence patterns can also be visualized with the difference or the ratio between the CDR3 motifs of epitope-specific TCRs and those of the baseline (Extended Data Fig. 1c). Similar observations can be made for other epitopes in human and mouse, many of which show strong specificity in some V or J genes (see Extended Data Fig. 1d and https://tcrmotifatlas.unil.ch/). These results confirm previous observations5,6,10,11,14,17,34 and demonstrate how TSPs provide a unified framework to investigate TCRs recognizing a broad range of epitopes.

Fig. 1: TSPs accurately capture specificity in T cell epitope recognition.

Fig. 1: TSPs accurately capture specificity in T cell epitope recognition.

Full size image

a, Illustration of the TSP visualization framework based on TCRs recognizing the YF epitope. b, AUC for the cross-validation analysis with TEMPO and other tools retrained on the same data. Each point represents an epitope with at least 20 paired TCRs (n = 98). c, AUC obtained with TEMPO and the published pretrained version of other tools on the IMMREP23 dataset (n = 20). d, AUC obtained with TEMPO and the published pretrained version of other tools on the ePytope-TCR dataset (n = 14). The red points show the mean values. P values represent signed-rank, two-sided Wilcoxon paired tests.

Source data

To explore how accurately TSPs capture specificity in TCR–epitope recognition, we developed a TCR–epitope motif-based interaction predictor (TEMPO) where every coefficient represents the log fold-change between the probabilities derived from epitope-specific TCRs (that is, P(V), P(J), P(L) and P(CDR**3|L)), and the baseline (that is, Q(V), Q(J), \({Q}_{P({V,J})}\left(L\right)\) and \({Q}_{P(V,J|L)}\left({CDR}3|L\right)\); Methods). To compare the predictive power of TEMPO with other tools, we compiled a dataset of nearly 100,000 TCRs recognizing hundreds of epitopes in human and mouse (Methods and Supplementary Table 2). For each epitope with at least 20 complete paired TCRαβ, we split these TCRs into five groups and iteratively used four groups for training and one group for testing. To avoid leakage, TCRs with the same CDR3α or same CDR3β as a TCR in the test set were excluded from the training. Negatives in the test set were selected from TCR repertoires not used to build the baseline models. Training and testing TEMPO and other tools8,[18](https://www.nature.com/articles/s41592-026-03328-y#ref-CR18 "Jensen, M. F. & Nielsen, M. NetTCR 2.2 - improved TCR specificity predictions by combining pan- and peptide-specific training strategies, loss-scaling and integration of sequence similarity. Elife https://doi.org/10.7554/eLife.93934.3

           (2024)."),[19](https://www.nature.com/articles/s41592-026-03328-y#ref-CR19 "Croce, G. et al. Deep learning predictions of TCR-epitope interactions reveal epitope-specific chains in dual alpha T cells. Nat Commun 15, 3211 (2024)."),[35](https://www.nature.com/articles/s41592-026-03328-y#ref-CR35 "Sidhom, J. -W., Larman, H. B., Pardoll, D. M. & Baras, A. S. DeepTCR is a deep learning framework for revealing sequence concepts within T-cell repertoires. Nat. Commun. 12, 1605 (2021)."),[36](https://www.nature.com/articles/s41592-026-03328-y#ref-CR36 "Jokinen, E., Huuhtanen, J., Mustjoki, S., Heinonen, M. & Lähdesmäki, H. Predicting recognition between T cell receptors and epitopes with TCRGP. PLoS Comput. Biol. 17, e1008814 (2021).") on these data revealed a higher area under the curve (AUC) for TEMPO (Fig. [1b](https://www.nature.com/articles/s41592-026-03328-y#Fig1)). Similar results were obtained when using AUC01 (Extended Data Fig. [1e](https://www.nature.com/articles/s41592-026-03328-y#Fig6)) or the area under the precision recall curves (AUPRC; Extended Data Fig. [1f](https://www.nature.com/articles/s41592-026-03328-y#Fig6)), when considering only epitopes with at least 200 TCRs (Extended Data Fig. [1g](https://www.nature.com/articles/s41592-026-03328-y#Fig6)) or when using as negatives TCRs interacting with other epitopes[37](https://www.nature.com/articles/s41592-026-03328-y#ref-CR37 "Dens, C., Laukens, K., Bittremieux, W. & Meysman, P. The pitfalls of negative data bias for the T-cell epitope specificity challenge. Nat. Mach. Intell. 5, 1060–1062 (2023).") (Extended Data Fig. [1h](https://www.nature.com/articles/s41592-026-03328-y#Fig6)). Similar results were also observed after excluding epitopes restricted to HLA\-A\*02:01 (Extended Data Fig. [1i](https://www.nature.com/articles/s41592-026-03328-y#Fig6)) or when considering only epitopes with 10 to 19 TCRs (Extended Data Fig. [1j](https://www.nature.com/articles/s41592-026-03328-y#Fig6)). Predictions with TEMPO were quite robust to contamination levels of up to 50% in the training data[28](https://www.nature.com/articles/s41592-026-03328-y#ref-CR28 "Messemaker, M. et al. Functional evaluation of TCR-pMHC pairs at scale allows in silico TCR reactivity prediction. Immunity 
            https://doi.org/10.1016/j.immuni.2026.09.007

           (2026).") (Extended Data Fig. [1k](https://www.nature.com/articles/s41592-026-03328-y#Fig6)). More stringent strategies to remove redundancy between training and testing data led to similar observations (Extended Data Fig. [1l](https://www.nature.com/articles/s41592-026-03328-y#Fig6)).

We next explored how different baseline repertoires affect TEMPO. We considered other studies not included in the default baseline, TCR repertoires simulated with OLGA38 or uniform distributions of all features (Methods). We did not observe major changes when using different experimental TCR repertoires (Extended Data Fig. 1m). Slightly lower accuracy was obtained with OLGA and much lower accuracy with a uniform baseline.

To benchmark TEMPO on external datasets, we used the IMMREP23 (ref. 21) and the ePytope-TCR[22](https://www.nature.com/articles/s41592-026-03328-y#ref-CR22 "Drost, F. et al. Benchmarking of T cell receptor-epitope predictors with ePytope-TCR. Cell Genom. https://doi.org/10.1016/j.xgen.2025.100946

           (2025).") studies. All data related to these studies were excluded from the training of TEMPO. We observed similar or better AUC values with TEMPO (Fig. [1c,d](https://www.nature.com/articles/s41592-026-03328-y#Fig1) and Extended Data Fig. [1n,o](https://www.nature.com/articles/s41592-026-03328-y#Fig6)).

Overall, these results demonstrate that TSPs accurately capture key information underlying TCR–epitope recognition specificity available in today’s data. TEMPO can score a million TCRs in one minute on a standard CPU (Extended Data Fig. 1p), requires approximately 100 times less space than tools such as MixTCRpred19 and works equally with paired or single-chain TCR repertoires.

TSPs reveal key determinants of T cell epitope recognition specificity

To investigate how different features in TCR sequences contribute to specificity, we trained TEMPO combining different features or using each individually (Fig. 2a and Extended Data Fig. 2a–f). The best performance was achieved when considering all features (that is, V + J + L + CDR3). The difference with a model considering only V and J genes was statistically significant, although modest in absolute numbers. When looking at single features, the most predictive one was V usage. To investigate the structural basis of these observations, we collected X-ray structures of TCR–epitope complexes and annotated all residues in CDR loops as being encoded in the V segment (that is, CDR1, CDR2 and beginning of CDR3) or the J segment (that is, end of CDR3) or resulting from insertions at the VJ junction in the CDR3 (referred to as ‘CDR3_VJ’; Methods). We observed that a much higher number of TCR residues in contact with the epitope or the peptide were encoded in the V and J segments than in CDR3_VJ (Fig. 2b,c and Supplementary Table 3). These results are fully consistent with our observation that V/J usage encodes much of the TCR–epitope recognition specificity.

Fig. 2: TSPs reveal key determinants of TCR–epitope recognition specificity.

Fig. 2: TSPs reveal key determinants of TCR–epitope recognition specificity.

Full size image

a, AUC for the cross-validation analysis with TEMPO considering different features for both chains. ‘CDR3_VJ’ stands for the model based on CDR3 motifs (P(CDR3|L)) with the \({Q}_{P\left(V,{J|L}\right)}({CDR}3{|L})\) normalization. Chain indication is omitted for clarity (n = 98). b, Number of TCR residues in contact with the epitope (that is, peptide + MHC) and encoded by the V and J segments or resulting from insertions at the V/J junction in CDR3s (referred to as ‘CDR3_VJ’). (n = 104). c, Number of TCR residues in contact with the peptide and encoded by the V and J segments or resulting from insertions at the V/J junction in CDR3s (n = 104). d, Binding between YF and different Vα variants of TCR_YF. The *y-*axis shows the fraction of Jurkat cells transfected with different TCRs that were stained by the YF multimer. e, Binding between YF and different Jα variants of TCR_YF. f, Binding between YF and CDR3 variants of TCR_YF, representing all amino acids except cysteine at P4 in CDR3α (upper) and at P5 in CDR3β (lower). g, Binding between YF and CDR3 variants of TCR_YF with an alanine at CDR3 positions not determined by V/J usage and with no alanine in TCR_YF (P4 in CDR3α and P4–P7 in CDR3β). h, CDR3α motif of TCRs obtained from a phage library with diversified CDR3α positions P4–P7 (orange dashed box) and screened against the NY-ESO-1 epitope. i, UMAP view of epitopes with human TCRs embedded in their TSP space. Colors and shapes indicate different MHC restrictions. j, Comparison of the average TSP between HLA-A*02:01 and non-HLA-A*02 restricted class I epitopes. Error bars show the mean ± s.d. k, TRBV13 usage in HLA-A*02:01 and non-HLA-A*02 restricted class I epitopes. l, TRAV12-2 usage in HLA-A*02:01 and non-HLA-A*02 restricted class I epitopes. P values in a–c were computed with a signed-rank, two-sided paired Wilcoxon test (shown only for independent variables in b and c). P values in k and l were computed with a rank-sum, two-sided unpaired Wilcoxon test including multiple-testing Benjamini–Hochberg correction. Each data point shows one epitope; n_A02 = 33, n_non-A02 = 55.

Source data

To experimentally validate this result, we used a YF-specific TCR (TCR_YF: TRAV12-2_TRAJ30_CAVGDDKIIF_TRBV28_TRBJ2-7_CASTPQTAYEQYF) and replaced TRAV12-2 with Vα genes with similar CDR3α. Jurkat cells were transfected with the TCR variants and stained with the YF multimer (Fig. 2d, Extended Data Fig. 2g, Supplementary Table 4 and Methods). The results confirmed the specificity for Vα usage observed in Fig. 1a. We then replaced TRAJ30 with several Jα genes compatible with CDR3α of length 10. The results broadly confirmed the specificity observed in the TSP (Fig. 2e and Supplementary Table 4). Similar results were obtained with a TCR binding to A0201_GILGFVFTL (Extended Data Fig. 2h and Supplementary Table 4).

We then explored the limited specificity at some CDR3 positions. We selected the fourth position (P4) in the CDR3α and the fifth position (P5) in the CDR3β of TCR_YF and tested all amino acids except cysteine. For more than 30% of the P4 variants and in almost all P5 variants the binding was retained (Fig. 2f and Supplementary Table 4). We then replaced all CDR3 residues that were not encoded in V/J genes (that is, P4 in CDR3α and P4–P7 in CDR3β) with alanine. We observed that the binding was retained (Fig. 2g). These few examples confirm the high specificity in V/J usage and limited specificity at CDR3 positions at the V/J junction for TCRs recognizing YF.

To further investigate specificity in CDR3 positions not determined by V/J usage, we performed a phage-display experiment with a TCR recognizing the NY-ESO-1 epitope (A0201_SLLMWITQC; Methods)39. P4–P7 displayed variability in baseline TCRα repertoires with the corresponding Vα and Jα (Extended Data Fig. 2i). These positions were diversified, and the phage library was selected against the A0201_SLLMWITQC monomer (Supplementary Table 5). No specificity was observed at P5 to P7 (R at P4 reflects the sequence of the Vα; Fig. 2h and Extended Data Fig. 2j). This is consistent with the limited interactions mediated by the side chains of these residues (Extended Data Fig. 2k).

We then explored whether some patterns in TSPs, including V/J usage, may reflect specificity for MHCs. To this end, we considered all epitopes with at least 20 human TCRα and TCRβ and documented MHC restriction. These epitopes were embedded in their TSP space, and uniform manifold approximation and projection (UMAP) was used to visualize the data (Methods). The results revealed some trends but also extensive variability, with no clear cluster encompassing all epitopes restricted to the same MHC (Fig. 2i). We also compared the average TSP of HLA-A*02:01 versus non-HLA-A*02 restricted class I epitopes (Fig. 2j). We observed some differences, but most of them were contained within the expected variability across epitopes. Only one gene (TRBV13) reached statistical significance (Fig. 2k). For TRAV12-2, which had been associated with HLA-A*02:01 restricted epitopes10,40, we could only see over-representation in one-third of the HLA-A*02:01 epitopes (Fig. 2l). These data demonstrate substantial variability in V/J usage across TCRs recognizing epitopes restricted to the same MHC.

We next investigated the performance of TEMPO when trained on single-chain TCRs. Lower and roughly equal AUC values were obtained when considering only the alpha or only the beta chain (Extended Data Fig. 2l)41. This indicates that, on average, both chains encode similar specificity, which is consistent with the number of TCR residues in each chain contacting the epitope (Extended Data Fig. 2m,n).

TSPs can predict cross-reactivity

We hypothesized that similarity in TSPs may be used to predict cross-reactivity. To demonstrate this hypothesis, we experimentally quantified cross-reactivity and TSP similarity between YF and dozens of YF variants (Fig. 3a and Table 1).

Fig. 3: TSPs can predict cross-reactivity.

Fig. 3: TSPs can predict cross-reactivity.

Full size image

a, Overall pipeline to study the relationship between TSP dissimilarity and cross-reactivity. b, Example of cross-reactivity plots between YF (*x-*axis) and a sequence variant (L7), an MHC variant (B1302) or an unrelated epitope (GIL). c, TSPs for the three epitopes of b. For clarity, CDR3 motifs have been omitted (see Supplementary Fig. 3 for the full TSPs). d, Relationship between cross-reactivity and TSP dissimilarity. The red arrow shows the TSP dissimilarity between YF and Melan-A (A0201_ELAGIGILTV). e, Comparison between the YF and the Melan-A TSPs. f, Cross-reactivity between YF and Melan-A. g, Validation of the binding to YF and Melan-A for two cross-reactive TCRs transfected in Jurkat cells and stained with the YF and each of the two variants of the Melan-A multimers (Supplementary Table 9). h, Relationship between TSP dissimilarity and cross-reactivity based on the number of shared TCRs across all pairs of class I epitopes in human with at least 20 paired TCRs. Non-conserved residues are marked in red. Correlations and P values for d and h were calculated with a two-sided Pearson test. Error bars in a, c and e show the mean ± s.d. among the different studies in baseline TCR repertoire, n = 8.

Source data

Table 1 List of YF variants and unrelated epitopes

Full size table

We first stimulated peripheral blood mononuclear cell (PBMC) samples from vaccinated donors with the YF peptide, sorted epitope-specific T cells with YF multimers and sequenced their TCRs with SEQTR42 (Methods and Supplementary Table 6). The TSPs displayed high similarity with the one from public data (Supplementary Fig. 1a). For one sample, we sequenced the YF-specific TCRs with the 10x Genomics pipeline (Supplementary Table 7). We also sorted stimulated CD8+ T cells based on CD137 expression. This resulted in highly similar TSPs (Supplementary Fig. 1b,c), demonstrating that TSPs are reproducible across donors, TCR-sequencing protocols and sorting strategies.

We next stimulated our PBMC samples with different variants of the YF peptide, including all alanine variants, other single or double variants, variants in peptide length, variants in MHC restriction and some unrelated antigenic peptides (Table 1). CD8+ T cells were stained with multimers corresponding to YF and all other epitopes to measure cross-reactivity (Fig. 3b, Supplementary Fig. 2 and Supplementary Table 8). When available, TCRs from multimer-positive cells were sequenced to determine the TSPs (Fig. 3c, Supplementary Fig. 3 and Supplementary Table 6). Dozens of TCRs binding to diverse variants were tested in vitro to confirm the sequencing results (Supplementary Table 9 and Supplementary Fig. 4). We then developed an information theory-based measure of TSP dissimilarity (Methods). To mimic a realistic situation where TCRs are collected across different donors, public data were used to derive the TSP for YF, and the newly generated data were used to establish the TSPs for the other epitopes. We observed a significant correlation between cross-reactivity and TSP dissimilarity (Fig. 3d and Extended Data Fig. 3a). When considering only YF variants of the same length and same MHC restriction, we still observed the correlation, although it was barely significant (Extended Data Fig. 3b). We next computed the TSP dissimilarity between YF and all epitopes with publicly available TCRs. The epitopes with the most similar TSPs were related to the Melan-A epitope (A0201_ELAGIGILTV)10,43 (Fig. 3e). Fluorescence-activated cell sorting (FACS) analysis of a PBMC sample confirmed some cross-reactivity between YF and Melan-A (Fig. 3f and Extended Data Fig. 3c). We then selected TCR chains from Melan-A-positive cells and that were compatible with the YF TSP. Jurkat cells were transfected with some of them and stained with YF Melan-A and the L2A Melan-A variant (EAAGIGILTV) to confirm the cross-reactivity (Fig. 3g and Supplementary Table 9). We then explored whether these observations hold true for other cases of cross-reactivity. We computed the TSP dissimilarity for all pairs of class I epitopes in human with at least 20 αβTCRs and assessed cross-reactivity based on TCR repertoire overlap (Methods). Epitope pairs with shared TCRs displayed a lower TSP dissimilarity (Fig. 3h).

Overall, our results demonstrate that TSP dissimilarity can be used to predict cross-reactivity between epitopes even when these epitopes show very limited sequence similarity.

TSPs reveal how TCR specificity evolves with epitope sequences, binding modes and MHC restrictions

Our TCRs recognizing multiple sequence, length and MHC variants provide an opportunity to explore molecular mechanisms underlying TSP conservation. We first observed that amino acid variants at the beginning or the end of the YF peptide and preserving the binding to HLA-A*02:01 tend to preserve TSPs and lead to extensive cross-reactivity (Fig. 4a). Conversely, several variants in the middle of the peptide impacted TCR recognition. To functionally test these observations, we selected three TCRs binding to YF and tested recognition with all amino acid variants (Methods, Fig. 4b, Extended Data Fig. 4a and Supplementary Table 10). We observed that most variants at P1/P2 or P8/P9 that were compatible with HLA-A*02:01 binding could be recognized, while many variants at P3–P7, and especially P3–P5, impacted TCR recognition.

Fig. 4: TSPs reveal how TCR specificity evolves with peptide sequences, binding modes and MHC restrictions.

Fig. 4: TSPs reveal how TCR specificity evolves with peptide sequences, binding modes and MHC restrictions.

Full size image

a, Summary of the cross-reactivity for the different YF sequence variants in Table 1. b, Results of X-scan assay for all YF single amino acid variants. Each point represents the average reactivity of three different YF-specific TCRs. c, Cross-reactivity observed between YF and the S0 and S10 length variants. d, X-ray crystallography of S10, YF and S0 in complex with HLA-A*02:01. e, Cross-reactivity observed between YF and three MHC variants. f, Structural view of the conservation of the TCR interface for the three MHC alleles of e with respect to HLA-A*02:01. Residues in the TCR interface are shown with balls. Non-conserved residues are shown in red. g, Activity values for the single amino acid variants in the BATCAVE database grouped based on three different categories of positions used in MixTCRcross. Scores were offset by 1 and plotted on a log10 axis to accommodate zero values (n = 1,257 of 10,286). Statistics were computed on scores before offset adjustment. Data grouped by conservation category: Non-anchor P3–P5/non-HLA binding (n = 4,565), non-anchor P6–P7 (n = 2,271) and other positions (n = 3,450). Box plots show the median (center line), 25th–75th percentiles (box bounds), and whiskers extend to the most extreme values within 1.5 times the interquartile range. No data points fell beyond the whiskers, and no data were excluded. Red diamonds indicate the geometric mean. Rank-sum, two-sided unpaired Wilcoxon test for three comparisons: non-anchor P3–P5/non-HLA binding versus non-anchor P6–P7, P = 5.9 × 10−31; non-anchor P3–P5/non-HLA binding versus other positions, P = 2.2 × 10−193; non-anchor P6–P7 versus other positions, P = 1.5 × 10−46. h, Comparison of MixTCRcross predictions with those of CrossDome (n = 14) and BATMAN (n = 15) in the unseen epitope context based on the 9-mer class I epitopes in the BATCAVE databases. i, Average number of interactions with TCR residues mediated by peptide residues at the three different categories of positions used in MixTCRcross. j, Top 9-mer peptides from the human proteome predicted to show cross-reactivity with MAGE-A3 by MixTCRcross, together with their binding to HLA-A*02:01 predicted by MixMHCpred (%rank). P values in i are computed with a rank-sum, two-sided unpaired Wilcoxon test. P values in h represent signed-rank, two-sided Wilcoxon paired tests.

Source data

The two length variants, SLLWNGPMAV (S0) and LLWNGPMAVS (S10), exhibited distinct behaviors. S10 showed high cross-reactivity and high TSP similarity with YF, while S0 displayed no cross-reactivity and had a distinct TSP (Fig. 4c, see also Fig. 3d and Supplementary Fig. 3). To determine the exact binding mode of these two peptides, we used X-ray crystallography (Methods and Supplementary Table 11). Both variants adopted a bulging binding mode. S10 had a structurally conserved N-terminal part, while S0 displayed extensive structural rearrangements in the N-terminal part (Fig. 4d and Extended Data Fig. 4b). The cross-reactivity and high TSP similarity between YF and S10 are consistent with our observation that changes outside P3–P5 are more likely to preserve recognition of YF variants.

We observed cross-reactivity and high TSP similarity for the YF peptide in complex with HLA-A*02:01, HLA-A*02:06 and to a lesser extent with HLA-A*02:05 but no cross-reactivity and a distinct TSP with HLA-B*13:02 (Fig. 4e, see also Fig. 3c,d and Supplementary Fig. 3). HLA-A*02:06 and HLA-A*02:05 have the same TCR interface as HLA-A*02:01, while HLA-B*13:02 displays multiple amino acid changes (Fig. 4f). For HLA-A*02:05, some differences occur at positions that may indirectly impact TCR recognition.

Altogether, our results support a cross-reactivity model for YF variants where presentation on MHC alleles with a conserved TCR interface and conservation of non-anchor residues at positions P3 to P7 in general lead to similar TSPs and high risk of cross-reactivity. Among other YF variants, those with conserved residues at P3 to P5 show the highest risk of cross-reactivity.

To explore whether this model, called MixTCRcross, shows predictive power for other epitopes, we collected thousands of variants of 15 epitopes from the BATCAVE database[44](https://www.nature.com/articles/s41592-026-03328-y#ref-CR44 "Banerjee, A. et al. T cell receptor cross-reactivity prediction improved by a comprehensive mutational scan database. Cell Syst. 20, 101345 https://doi.org/10.1016/j.cels.2025.101345

           (2025).") ([Methods](https://www.nature.com/articles/s41592-026-03328-y#Sec9)). We observed a significantly lower activity for variants at non\-anchor positions P3–P5 compared with those at non\-anchor positions P6–P7, and even more with those at other positions (Fig. [4g](https://www.nature.com/articles/s41592-026-03328-y#Fig4)). We then compared MixTCRcross predictions with those from CrossDome[45](https://www.nature.com/articles/s41592-026-03328-y#ref-CR45 "Fonseca, A. F. & Antunes, D. A. CrossDome: an interactive R package to predict cross-reactivity risk using immunopeptidomics databases. Front. Immunol. 14, 1142573 (2023).") and from BATMAN[44](https://www.nature.com/articles/s41592-026-03328-y#ref-CR44 "Banerjee, A. et al. T cell receptor cross-reactivity prediction improved by a comprehensive mutational scan database. Cell Syst. 20, 101345 
            https://doi.org/10.1016/j.cels.2025.101345

           (2025).") in the leave\-one\-epitope\-out setting ([Methods](https://www.nature.com/articles/s41592-026-03328-y#Sec9)). Similar predictions were obtained with MixTCRcross (Fig. [4h](https://www.nature.com/articles/s41592-026-03328-y#Fig4)). These results show that our proposed model captures in a fully interpretable way some determinants of TCR specificity conservation shared across epitopes.

We then computed for each peptide residue the number of contacts with the TCR across existing TCR–epitope structures (Methods and Supplementary Table 12). We observed that residues at positions predicted by MixTCRcross to impact TSPs (that is, non-anchor P3–P5, and to a lesser extent P6–P7) were involved in a significantly higher number of interactions with the TCRs (Fig. 4i and Extended Data Fig. 4c).

We next explored whether MixTCRcross could recapitulate cases of cross-reactivity with cancer epitopes. To this end, we considered the HLA-A*01:01 restricted MAGE-A3 epitope (EVDPIGHLY). We collected all 9-mers from the human proteome (1.1 × 107 peptides). Based on MixTCRcross predictions, the Ttn peptide (ESDPIVAQY), which is responsible for the cross-reactivity in clinical trials with MAGE-A3-specific TCRs, ranked third46 (Fig. 4j).

Altogether, our results reveal that some patterns are conserved across epitopes to predict variants more likely to preserve TSPs, and therefore at higher risk of cross-reactivity, with key features including the position of the non-conserved residues and presentation on MHC alleles with similar TCR interfaces.

TSPs enable interpretation of sequence- and structure-based TCR–epitope recognition predictions

We hypothesized that TSPs may help interpret machine learning TCR–epitope predictors. To this end, we scored a repertoire of 106 TCRs with several tools for different epitopes (Methods). TSPs built from the top 0.1% predicted TCRs were compared with the experimental TSPs. For epitopes with abundant training data, we observed that TEMPO and NetTCR could accurately recapitulate the experimental TSPs (Fig. 5a and Supplementary Fig. 5a–c). TULIP, which only considers CDR3 sequences, often failed to recover V usage. We next tested on the A0101_SALPTNADLY epitope and the B1302 variant algorithms that can, in principle, make predictions for any epitope. In both cases, NetTCR and TULIP failed to reproduce the experimental TSPs (Fig. 5b and Supplementary Fig. 5d,e). This confirms the lack of predictive power for ‘unseen’ epitopes21,[22](https://www.nature.com/articles/s41592-026-03328-y#ref-CR22 "Drost, F. et al. Benchmarking of T cell receptor-epitope predictors with ePytope-TCR. Cell Genom. https://doi.org/10.1016/j.xgen.2025.100946

           (2025)."),[47](https://www.nature.com/articles/s41592-026-03328-y#ref-CR47 "Grazioli, F. et al. On TCR binding predictors failing to generalize to unseen peptides. Front. Immunol. 13, 1014256 (2022)."), even when these differ only in MHC restriction from epitopes with abundant training data.

Fig. 5: TSPs enable interpretation of sequence- and structure-based TCR–epitope recognition predictions.

Fig. 5: TSPs enable interpretation of sequence- and structure-based TCR–epitope recognition predictions.

Full size image

a, Comparison between experimental and predicted TSPs for YF. b, Comparison between experimental and predicted TSPs for the B1302_LLWNGPMAV epitope. c, TSPs predicted by AF3 for YF. See Supplementary Figs. 5 and 6 for the full TSPs with CDR3 motifs. Error bars in a–c show the mean ± s.d. among the different studies in baseline TCR repertoire, n = 8.

We then investigated whether AF3 (ref. 23) could be used to infer TSPs. To this end, we sequenced the ex vivo TCRαβ repertoire of a yellow fever vaccinated donor (Supplementary Table 13) and ranked these TCRs based on the interchain predicted alignment error (PAE) in complex with YF (Methods). The TSP of the top predicted binders recapitulated several patterns found in the experimental TSP (Fig. 5c and Supplementary Fig. 6a). The same analysis with GIL could only partly recapitulate the experimental TSP (Supplementary Fig. 6b). Renormalizing the PAE score of each TCR did not improve the predicted TSP25 (Methods and Supplementary Fig. 6c). These results reveal how TSPs can be used to interpret AF3 predictions and show that PAE AF3 scores can be used to approximate the YF TSP, even if this epitope has no structures in complex with a TCR.

We next explored whether TSPs could reveal biases in negative data used to benchmark TCR–epitope interaction predictors. A widely used approach consists of using TCRs binding to other epitopes21,37. We hypothesized that this may create biases reflecting TCRs binding to widely studied epitopes, like GIL48. A clear footprint of the GIL TSP could be observed in the average TSP for TCRs used as negatives across all non-GIL epitopes in the IMMREP23 competition21 (Supplementary Fig. 7a).

We then hypothesized that TSPs may be used to detect low-quality datasets. We first selected the A0301_KLGGALQAK epitope from the 10x Genomics dataset suggested to contain many contaminants19,49. The TSP showed very limited specificity (Supplementary Fig. 7b). We next explored whether other epitopes displayed such limited specificity. One of the most striking examples was A0201_NLVPMVATV (Supplementary Fig. 7c). This result is fully consistent with a recent study aiming at validating reported TCR–epitope interactions[28](https://www.nature.com/articles/s41592-026-03328-y#ref-CR28 "Messemaker, M. et al. Functional evaluation of TCR-pMHC pairs at scale allows in silico TCR reactivity prediction. Immunity https://doi.org/10.1016/j.immuni.2026.09.007

           (2026).").

Overall, our results show how TSPs can be used to interpret TCR–epitope recognition predictors and investigate putative issues in epitope-specific TCRs.

Discussion

Systematic understanding of the principles governing TCR recognition specificity across multiple epitopes has been hampered by the size of the TCR sequence space, the flexibility of the TCR–epitope interface and the lack of standardized visualization frameworks. By using the natural alphabet of TCRs (that is, V and J genes, CDR3 lengths and CDR3 sequences) and carefully modeling baseline repertoires, we show that this complexity can be tackled in a fully interpretable manner that accurately captures key determinants of TCR–epitope recognition specificity encoded in today’s data. Our results indicate that much of the specificity in epitope recognition by native TCRs is encoded in V/J usage. This is consistent with previous observations5,10,11,12,13,14,16,34,43,50 and with our analysis of experimental TCR–epitope X-ray structures. Beyond specificity in V/J usage, TSPs can reveal additional specificity in CDR3 lengths or V(D)J junction residues. Our work further reveals high variability in V/J usage across epitopes, including those restricted to the same MHC allele. Apart from a few exceptions, this indicates that the rules of TCR–epitope recognition are distinct for most epitopes.

The relatively limited specificity observed in some, although not all, CDR3 binding motifs when regressing out the influence of V/J usage does not mean that CDR3 sequences do not contribute to TCR–epitope recognition. Instead, it reflects that a substantial fraction of the CDR3 residues is encoded in V/J genes[33](https://www.nature.com/articles/s41592-026-03328-y#ref-CR33 "Moreno, D. L., Croce, G. & Gfeller, D. Statistical modelling of CDR3 sequences provides robust quality control for TCR repertoire datasets. Preprint at bioRxiv https://doi.org/10.64898/2025.12.11.693618

           (2025).").

TSPs consider each feature as independent and therefore cannot capture correlations. Such correlations exist, but many are unrelated to epitope recognition. For instance, extensive correlations exist between Vα and Jα, because of constraints in V/J recombination51. Correlations related to epitope recognition can arise from distinct clusters of TCRs recognizing the same epitope5,6,52. However, it remains unclear whether machine learning tools benefit from modeling such correlations. Moreover, contaminations or batch effects can give rise to apparent clusters that do not reflect epitope recognition specificity[28](https://www.nature.com/articles/s41592-026-03328-y#ref-CR28 "Messemaker, M. et al. Functional evaluation of TCR-pMHC pairs at scale allows in silico TCR reactivity prediction. Immunity https://doi.org/10.1016/j.immuni.2026.09.007

           (2026)."). Our demonstration that a linear model based on TSPs reaches similar or better accuracy than other state\-of\-the\-art tools indicates that neglecting such correlations is a reasonable compromise between accuracy and interpretability. The limited impact of disregarding correlations can be further understood by observing that non\-binding combinations of features compatible with TSPs represent only a tiny fraction of baseline repertoires and are rarely expanded in vivo.

V/J alleles were not considered in TSPs since this information is often not available, and some rare allelic variants may not be included in IMGT[53](https://www.nature.com/articles/s41592-026-03328-y#ref-CR53 "Mantena, S., Akbari, A. & Raychaudhuri, S. TCR germline diversity reveals evidence of natural selection on variable and joining alpha chain genes. Preprint at bioRxiv https://doi.org/10.1101/2025.08.20.671277

           (2025)."). However, TSPs can be constructed with allele information in the MixTCRviz R package. In this case, we advocate using baseline repertoires derived from the same donor[54](https://www.nature.com/articles/s41592-026-03328-y#ref-CR54 "Brennan, R. M. et al. The impact of a large and frequent deletion in the human TCR β locus on antiviral immunity. J. Immunol. 188, 2742–2748 (2012)."),[55](https://www.nature.com/articles/s41592-026-03328-y#ref-CR55 "Brennan, R. M. et al. Missense single nucleotide polymorphisms in the human T cell receptor loci control variable gene usage in the T cell repertoire. Br. J. Haematol. 166, 148–152 (2014)."). We also did not include *TRBD* genes as these consist of only two genes, which are often not reported.

Our analysis of the recognition of multiple YF variants did not rely on a list of predefined TCRs. We could therefore assess the emergence of new TSPs in cases like B1302. Our results suggest a model for TCR specificity conservation propensity across YF variants, which can be summarized with a few criteria. These include conservation of peptide residues at non-anchor middle positions, and conserved presentation on MHCs with the same TCR interface. The observation that this model has some predictive power across class I 9-mer epitopes indicates that our criteria capture some shared determinants of TCR specificity conservation, even if many exceptions exist1. For epitopes that do not pass these criteria, cross-reactivity is less likely, but cannot be excluded. In these cases, predictions of cross-reactivity should leverage TSP dissimilarity, when such data are available.

Among positions sensitive to amino acid changes in YF, P3 is less often in contact with TCRs in existing TCR–epitope 3D structures, but variants at this position may alter the peptide binding mode and allosterically impact TCR recognition.

In this study, we focused on epitopes with a reasonable number of experimentally available TCRs. For this reason, TSPs are available only for a bit more than 100 epitopes, which reflects an important limitation in today’s data. However, our observation that AF3 can, at least in some cases, approximate TSPs by scoring TCRs from ex vivo repertoires indicates that this approach may be extended to a much larger panel of epitopes. For YF, some AF3 predictions may reflect biases that would mirror the YF TSP. Additional work is required to explore how much this could impact AF3-predicted TSPs for other epitopes.

Altogether, our work demonstrates that key determinants of TCR–epitope recognition specificity can be captured with TSPs for hundreds of epitopes restricted to dozens of MHC alleles in human and mouse. This unified probabilistic framework, together with the TEMPO tool, enables investigation and interpretation of TCR–epitope recognition specificity, as well as efficient annotation of large TCR repertoires. Our observation that AF3 can be used, at least for some epitopes, to approximate TSPs provides a way to expand the investigation of TCR recognition specificity to many more cases. Finally, our proposed criteria to predict TCR specificity conservation could guide the off-target toxicity assessment of TCRs considered for clinical applications.

Methods

Ethical regulations

The study protocol was approved by the Human Research Ethics Committee of the Canton de Vaud (protocol 329/12). Upon written informed consent, eligible volunteers donated blood according to the standards of the Blood Transfusion Center (Service Vaudois de Transfusion Sanguine).

Collection of baseline TCR repertoires

To build an accurate model of baseline TCR repertoires accounting for the variability across studies and individuals, data available at iReceptor were collected56 (Supplementary Table 1). These include paired and single-chain TCR repertoires from a large diversity of studies with many different sequencing protocols, many TCR reconstruction approaches, as well as different immunological status and genetic backgrounds of the donors. Samples from particular immunological conditions (for example, leukemia) and showing large discrepancies in V/J usage were not included. Entries with V/J names that did not follow the IMGT reference were corrected based on an extensive manual compilation of all encountered alternative names. Cases where correction was not possible (for example, TRBJ2S13) were not considered. Only TCRs with CDR3 of length 7 to 22 and with CDR3 sequences compatible with V and J gene annotation based on the first one and the last two amino acids were considered.

In total, this led to a collection of more than 6 million TCRα and more than 200 million TCRβ sequences in human and mouse. For each species, each study and for each chain, V/J usage, CDR3 length distributions and CDR3 amino acid frequencies for each length were computed. The means (that is, Q(V), Q(J), Q(L) and Q(CDR**3|L), where the latter represents the 20 x L amino acid frequency matrix at each position of CDR3s of length L) and the standard deviations of these probability distributions were computed across all studies for each chain in each species (for clarity, chain and species information were omitted from the formula). In human, the single-chain studies were first averaged, and the final means were computed across this average and the seven studies with paired TCRs (Supplementary Table 1). Residual probabilities for the CDR3 length and amino acid usage for each VJ combination (that is, Q(L|V, J) and Q(CDR3|V, J, L)) were further derived.

TSP construction

TSPs provide a fully interpretable framework to compare a set of epitope-specific TCRs (probabilities designed with the letter P) with a baseline TCR repertoire (probabilities designed with the letter Q) for both alpha and beta chains (for clarity, the chain is not included in the rest of this section). For V and J genes, the y axis shows P(V) and P(J), respectively, while the x axis shows the mean and standard deviation of Q(V) and Q(J), respectively (Fig. 1a). For CDR3 length distributions, P(L) is compared with the expected baseline distribution with the same V/J usage. This is mathematically defined as shown in equation (1):

$${Q}_{P\left(V,\;J\right)}\left(L\right)=\sum _{\left\{V,\;J\right\}}Q\left(L\right|V,J)P(V,J)$$

(1)

For CDR3 sequences of a specific length L, P(CDR3|L) represents the amino acid frequency at each position in the CDR3 of epitope-specific TCRs (that is, 20 × L matrices), which are visualized as sequence motifs. The baseline motifs used for comparison are mathematically defined as shown in equation (2):

$${Q}_{P\left(V,J|L\right)}({CDR3}{|L})=\sum _{\left\{V,\;J\right\}}Q({CDR3}|V,J,L)P(V,J|L)$$

(2)

By default, the CDR3 motifs corresponding to the most frequent CDR3 length (that is, \(\mathop{{\rm{argmax}}}\limits_{L}\left\{P(L)\right\})\)) are shown in the main plot (Fig. 1a), and motifs for other CDR3 lengths are shown in separate plots (Supplementary Fig. 1b).

For visualization, TSPs display the names of specific V and J genes, based on their frequency and fold-change with respect to baseline repertoires. By default, TSPs are shown at the gene level. Allele-level visualization is supported, although some care is needed when interpreting the results given that allele-level baselines are more challenging to accurately estimate. Specific baseline repertoires can also be provided by the users (this is the recommended way when using allele-level view). Instead of baseline CDR3 motifs used for comparison in the TSPs, options are available to plot either the motif corresponding to subtraction of the probability distributions P(CDR**3|L) and \({Q}_{P(V,J|L)}\left({CDR3}|L\right)\) normalized by the information content at each position5, or to the ratio between the two probability distributions (Extended Data Fig. 1c). However, it should be noted that the motifs based on subtraction tend to overemphasize differences in residues with high frequencies, while the ratio can be sensitive to low sampling. Other options are described in the documentation of the MixTCRviz R package.

TCR–epitope motif-based interaction predictor (TEMPO)

TEMPO builds upon the widely used concept of binding motifs, which includes estimation of frequencies in input data (for example, epitope-specific TCRs) and renormalization by baseline frequencies. The different coefficients of the predictor are computed as: \(\log \frac{P(V)}{Q(V)}\), \(\log \frac{P(J)}{Q(J)}\), \(\log \frac{P(L)}{{Q}_{P(V,J)}(L)}\), \(\log \frac{P({CDR}3{|L})}{{Q}_{P(V,{J|L})}({CDR}3{|L})}\) for both chains. These values are directly derived from the analytical solution of the log-likelihood maximization of a probabilistic model defined as P(V,J,L,CDR**3) = P(V)P(J)P(L|V,J)P(CDR**3|V,J,L). Regularization was done by adding a pseudocount of 50 in the epitope-specific TCRs. The same pseudocount correction was performed on the baseline to ensure that features not observed in the epitope-specific TCRs and the baseline (for example, non-cysteine amino acids at the first CDR3 position) will not contribute to the predictor.

The final score of a TCR is shown in equation (3):

$$\begin{array}{l}S\left({V}_{\alpha },{J}_{\alpha },{{CDR}3}_{\alpha },{V}_{\beta },{J}_{\beta },{{CDR}3}_{\beta }\right)=\\\sum _{\gamma \in \left\{\alpha ,\beta \right\}}\left(\log \left\{\displaystyle\frac{P({V}_{\gamma })}{Q({V}_{\gamma })}\right\}+\log \left\{\displaystyle\frac{P({J}_{\gamma})}{Q({J}_{\gamma })}\right\}\right.\\\left.+\;\log \left\{\displaystyle\frac{P({L}_{\gamma })}{{Q}_{P({V}_{\gamma },{J}_{\gamma })}({L}_{\gamma })}\right\}+\mathop{\sum }\limits_{i=1}^{{L}_{\gamma }}\log \left\{\displaystyle\frac{P({{CDR}3}_{\gamma ,i}|{L}_{\gamma })}{{Q}_{P({V}_{\gamma },{J}_{\gamma }|{L}_{\gamma })}({{CDR}3}_{\gamma ,i}|{L}_{\gamma })}\right\}\right)\end{array}$$

(3)

where \({{CDR}3}_{\alpha ,i}\) stands for the amino acid at the ith position in CDR3α. To improve interpretability, the percentage rank (%rank) was computed by comparing the score of an input TCR with a score distribution from a dataset of 106 TCRs sampled from baseline TCR repertoires.

Collection of epitope-specific TCRs

TCR–epitope pairs were collected from different databases, including VDJdb and IEDB, as well as specific studies19,57,58, in both human and mouse. All V and J names were mapped to the IMGT reference and all CDR3s were checked for compatibility with V/J genes based on the first one and last two amino acids. For each epitope, the MHC restriction was manually verified in the original publications. For clarity, epitopes are referred to by the MHC short name (for example, A0201) and the peptide sequence (for example, LLWNGMPAV), resulting in names like A0201_LLWNGPMAV. Cases where the MHC allele could not be retrieved (because of either the nature of the experiments or the inability to retrieve it from the source publications) are denoted as ‘na’. Epitope peptide source organisms and source proteins were manually verified and harmonized across entries. Entries coming from the 10x Genomics dataset were not included, as this dataset was reported to contain a substantial amount of contaminants19,49. Entries with incomplete chains (for example, missing J segment) were not considered. Only TCRs from human or mouse were considered. This led to a total of 93,155 TCR–epitope pairs (Supplementary Table 2). Among epitopes with at least 20 paired human αβTCRs, the most frequent allele was HLA-A*02:01 (33%, without counting the YF variants specifically designed in this work), which reflects more or less the frequency in the human population.

Benchmarking predictions of TCR–epitope interactions

For the cross-validation analysis, all epitopes with at least 20 complete paired TCRαβ were considered. These TCRs were split into five subsets using iteratively one subset as test data and the other four as training data. To avoid leakage between training and testing data, we excluded from the training data any entry that had the same CDR3α or CDR3β as a TCR in the test set. As a more stringent alternative, we considered the situation where TCRs that had a single amino acid difference in CDR3α or CDR3β from a TCR in the test set were further excluded from the training data (Extended Data Fig. 1l). For the negatives used in the test set, we selected TCRs from TCR repertoire studies not included in our baseline (Supplementary Table 1) and used four times more negatives than positives. For MixTCRpred19, NetTCR[18](https://www.nature.com/articles/s41592-026-03328-y#ref-CR18 "Jensen, M. F. & Nielsen, M. NetTCR 2.2 - improved TCR specificity predictions by combining pan- and peptide-specific training strategies, loss-scaling and integration of sequence similarity. Elife https://doi.org/10.7554/eLife.93934.3

           (2024)."), DeepTCR[35](https://www.nature.com/articles/s41592-026-03328-y#ref-CR35 "Sidhom, J. -W., Larman, H. B., Pardoll, D. M. & Baras, A. S. DeepTCR is a deep learning framework for revealing sequence concepts within T-cell repertoires. Nat. Commun. 12, 1605 (2021).") and TCRGP[36](https://www.nature.com/articles/s41592-026-03328-y#ref-CR36 "Jokinen, E., Huuhtanen, J., Mustjoki, S., Heinonen, M. & Lähdesmäki, H. Predicting recognition between T cell receptors and epitopes with TCRGP. PLoS Comput. Biol. 17, e1008814 (2021)."), negatives in the training data were retrieved from the baseline TCR repertoires coming from the same studies as those used to estimate the baseline in TEMPO. In the cross\-validation analysis, TEMPO, MixTCRpred, NetTCR, TCRGP, DeepTCR and TULIP were trained on the exact same data to ensure that differences in AUC could not result from differences in the training data. NetTCR was downloaded from [https://github.com/mnielLab/NetTCR\-2\.2/](https://github.com/mnielLab/NetTCR-2.2/) and trained using the train\_nettcr\_2\_2\_peptide.py script. DeepTCR was downloaded from <https://github.com/sidhomj/DeepTCR/>, and a supervised single\-sequence classifier (DeepTCR\_SS) was trained for each epitope. As this tool does not provide a standalone pretrained version, it was only used in the benchmarks that included retraining of the tools. TCRGP was downloaded from <https://github.com/emmijokinen/TCRGP/> and for each epitope a separate Gaussian\-process classifier was trained. TULIP was downloaded from [https://github.com/barthelemymp/TULIP\-TCR/](https://github.com/barthelemymp/TULIP-TCR/) and trained with the full\_learning\_new.py script and the shallow0\_decoupled.config.json configuration. MixTCRpred was retrained with our internal training module. AUC, AUC01 (that is, partial AUC based on a threshold of 0\.1 on the false\-positive rate) and AUPRC metrics were used to assess the predictive power. Alternatively, negative data in the test set were generated by randomly selecting TCRs binding to other epitopes (the so\-called ‘swapped negatives’), ensuring similar numbers of TCRs from each epitope (Extended Data Fig. [1h](https://www.nature.com/articles/s41592-026-03328-y#Fig6)). Contaminants in the training data (Extended Data Fig. [1k](https://www.nature.com/articles/s41592-026-03328-y#Fig6)) were simulated by adding randomly selected TCRs from the TCR repertoires considered in this work at different fractions of the number of positives in the training set.

To compare with existing publicly available methods in their published form, we capitalized on two recent benchmarking studies (IMMREP23 (ref. 21) and ePytope-TCR[22](https://www.nature.com/articles/s41592-026-03328-y#ref-CR22 "Drost, F. et al. Benchmarking of T cell receptor-epitope predictors with ePytope-TCR. Cell Genom. https://doi.org/10.1016/j.xgen.2025.100946

           (2025).")) whose data have not been used for training public TCR–epitope interaction predictors. All data from IMMREP23 itself, from the Immunoscape study[59](https://www.nature.com/articles/s41592-026-03328-y#ref-CR59 "Schmidt, F. et al. In-depth analysis of human virus-specific CD8+ T cells delineates unique phenotypic signatures for T cell specificity prediction. Cell Rep. 42, 113250 (2023).") and from our own internal investigation of IMMREP23 epitopes[21](https://www.nature.com/articles/s41592-026-03328-y#ref-CR21 "Nielsen, M. et al. Lessons learned from the IMMREP23 TCR-epitope prediction challenge. ImmunoInformatics 16, 100045 (2024)."), as well as any TCR present in these two benchmarking datasets, were removed from the training of TEMPO. Results were compared to those obtained with the published version of MixTCRpred (v1\.0\), NetTCR (v2\.2\) and TULIP (v1\.0\) and the distributed pretrained TCRGP per\-epitope models, which consider only the beta chain. DeepTCR was not included in these independent benchmarks, as this tool does not provide pretrained specificity models. In the IMMREP23 competition, MixTCRpred had been retrained with extended data, which is why AUC values are not the same here and in the IMMREP23 publication[21](https://www.nature.com/articles/s41592-026-03328-y#ref-CR21 "Nielsen, M. et al. Lessons learned from the IMMREP23 TCR-epitope prediction challenge. ImmunoInformatics 16, 100045 (2024)."). For epitopes not supported in MixTCRpred and TEMPO, AUC and AUC01 were set to 0\.5\. For other baseline models, we used experimental TCRs from the studies that we kept apart to sample negatives in the test set, the uTILity database (<https://github.com/ncborcherding/utility/>) and the Vlasova dataset[60](https://www.nature.com/articles/s41592-026-03328-y#ref-CR60 "Vlasova, E. K. et al. Inference of SARS-CoV-2 exposure biomarkers using large-scale T-cell repertoire profiling. Genome Med. 18, 20 (2026)."). For the baseline derived from OLGA predictions[38](https://www.nature.com/articles/s41592-026-03328-y#ref-CR38 "Sethna, Z., Elhanati, Y., Callan, C. G., Walczak, A. M. & Mora, T. OLGA: fast computation of generation probabilities of B- and T-cell receptor amino acid sequences and motifs. Bioinformatics 35, 2974–2981 (2019)."), we simulated a TCR repertoire of 107 TCRs for both the alpha and the beta chain. For the uniform baseline, all values for the baseline distributions (*Q*) were set to the inverse of the alphabet size.

For the time benchmarking, TEMPO, MixTCRpred, NetTCR and TULIP were tested on a standard workstation equipped with an Intel Core i9-11900H CPU (8 cores, 16 threads) and an NVIDIA GeForce RTX 3050 Laptop GPU (4 GB VRAM), running Linux with CUDA 12.2.

Analysis of contacts with epitopes mediated by TCR residues

Experimental structures of human TCR–epitope complexes were retrieved from the Protein Data Bank (PDB)61 (downloaded on 19 April 2024 for class I and on 25 August 2025 for class II). Only X-ray structures with a resolution of 4 Å or better and class I MHC molecules were included. Redundant entries, defined as those with the same six CDR and epitope sequences, were filtered by retaining the structure with the highest number of contacts. Only TCRs with native V genes were considered (for example, excluding cases with mutations in CDR1/CDR2 enhancing the affinity). Contacts between a TCR residue and either epitope (that is, peptide + MHC) or peptide residues were defined based on a threshold of 5 Å between any heavy atom. TCR residues were annotated as encoded by the V segment if they belonged to CDR1, CDR2 or the part in the beginning of the CDR3 that matches the sequence of the corresponding V segment. TCR residues were annotated as encoded by the J segment if they belonged to the part in the end of the CDR3 that matches the sequence of the corresponding J segment. The other residues in the CDR3 were annotated as ‘CDR3_VJ’. The number of TCR residues in each category making contacts with the epitope (that is, peptide + MHC) or the peptide only was computed for each structure (Supplementary Table 3). To avoid biases due to well-studied epitopes with several X-ray structures, these numbers were averaged across structures corresponding to the same epitope.

TCR transfection into Jurkat cells and peptide–MHC multimer staining

Paired TCR α- and β-chain sequences were obtained from GeneArt (Thermo Fisher Scientific) as gene strings. The DNA sequences were codon-optimized, and the human constant regions were replaced with mouse constant regions. These modified DNA fragments served as templates for in vitro transcription and polyadenylation using the HiScribe T7 In Vitro Transcription Kit (New England Biolabs), following the manufacturer’s instructions. TCRα/TCRβ mRNAs were co-transfected into Jurkat cells using the Neon Electroporation System (Thermo Fisher Scientific) as described in ref. 62. The Jurkat cells used were derived from the T Cell Activation Bioassay NFAT line (Promega) and had been genetically modified in-house via CRISPR–Cas9-mediated knockout of endogenous TCRα and TCRβ chains and by stable transduction with CD8a and CD8b (Jurkat-NFAT-CD8).

For electroporation, Jurkat cells were washed in PBS, resuspended at 20 × 106 cells per ml in Buffer R (Neon Transfection System 10 μl Kit), and 2 × 105 cells were co-electroporated with 300 ng of each TCR chain mRNA using the following parameters: 1325 V, 10 ms, three pulses. After electroporation, cells were resuspended in complete medium and incubated overnight at 37 °C.

Each batch of TCR-electroporated cells was split in two. One half was stained with in-house-synthesized peptide–MHC multimers conjugated to phycoerythrin (PE), followed by a surface staining panel consisting of anti-human CD3 APC-Fire 750 (clone SK7, BioLegend), anti-human CD8 FITC (clone SK1, BioLegend) and Aqua viability dye (Thermo Fisher Scientific). The other half was stained with the same surface panel, including anti-mouse β-chain allophycocyanin (APC; clone H57-597, BioLegend) to assess electroporation efficiency.

The template TCR binding to YF (TCR_YF) consists of TRAV12-2, TRAJ30, CAVGDDKIIF, TRBV28, TRBJ2-7 and CASTPQTAYEQYF. The template TCR binding to A0201_GILGFVFTL (TCR_GIL) consists of TRAV27, TRAJ42, CAGGGSQGNLIF, TRBV19, TRBJ2-7 and CASSIRSSYEQYF.

Phage display

Phage libraries with diversified positions at P4–P7 in the CDR3α were constructed on the codon-optimized (Escherichia coli) 1G4 single-chain TCR scaffold (TRAV21, TRAJ6, CAVRPTSGGSYIPTF, TRBV6-5, TRBJ2-2, CASSYVGNTGELFF) incorporating Vβ CDR2 ‘anchoring’ point mutations (VGAGI > VSVGM; c50). These mutations have been shown to enhance TCR affinity without appreciably modifying the cognate TCR–peptide contacts or TCR docking orientation63. The P4–P7 residues (‘RPTS’) were randomized in a two-step PCR using primers spanning the signal peptide/Vα junction (NcoI/FOR) and the CDR3α (KpnI/REV), the latter containing trimer-defined (TRIM) codon mixtures (Ella Biotech, Germany) formulated to approximate the native CDR3α amino acid frequencies found at these positions. The diversified Vα fragment PCR product was double-digested with NcoI/KpnI and ligated into a pUC19-based phagemid (pCHV101, proprietary construct) vector backbone housing the 1G4 Vβ[c50]Cβ to generate a library of TCR variants fused in-frame with the N terminus of the M13/f1 gIII major coat protein. Phage libraries were produced from electroporated TG1 E. coli according to established protocols using monovalent M13 helper phage (Life Technologies). Phage panning was performed according to standard protocols against monomeric, biotinylated HLA-A*02:01_NY-ESO-1157–165 immobilized on M-280 streptavidin magnetic beads (Thermo Fisher Scientific) using an irrelevant HLA-A*0201 antigen for negative deselection of any nonselective binders. A single round of panning was conducted in which unbound phages were eluted following 5× PBST (PBS containing 0.1% Tween-20) and 1× PBS washes using trypsin cleavage and amplified by infecting logarithmic-phase E. coli. Following bulk purification of amplified output phagemid DNA, enrichment of specific CDR3α was assessed by NGS (2 × 300-bp paired-end) using an in-house Illumina MiSeq platform. Raw sequencing data were processed with MiXCR v3.0.13 with standard parameters (mixcr analyze amplicon --species hs --starting-material dna --5-end v-primers --3-end j-primers --receptor-type TRA) to reconstruct CDR3α sequences both for the input library and the output library after selection with NY-ESO-1 (Supplementary Table 5). For the output library, MoDec64 was used to remove putative contaminants. CDR3α motifs for the input and output libraries were built with ggseqlogo65 (Fig. 2h; see Extended Data Fig. 2j for motifs built without running MoDec).

Embedding epitopes into TSP space

To embed epitopes into their TSP space, the TEMPO coefficients \(\log \left\{\frac{P(V)}{Q(V)}\right\}\), \(\log \left\{\frac{P(J\;)}{Q(J\;)}\right\}\) and \(\log \left\{\frac{P(L)}{{Q}_{P\left(V,J\right)}(L)}\right\}\) (including pseudocount regularization) for both chains were used as features. This resulted in a 220-dimension space. UMAP (based on R package umap with default parameters) was used to visualize the data in two dimensions. All epitopes with a known MHC restriction and at least 20 human TCRα and TCRβ were used for this analysis.

Average TSPs

To explore TSPs representing groups of epitopes (HLA-A*02:01 versus non-HLA-A*02:01 restricted class I epitopes), the average and standard deviation for each feature in the TSPs were computed across the epitopes in each group. For the non-HLA-A*02:01 restricted epitopes, an average TSP was first computed for epitopes restricted to each MHC. These TSPs were then averaged across all MHC alleles to avoid biases resulting from common MHC alleles with multiple epitopes. Only epitopes restricted to human class I alleles were considered.

Collection of PBMC samples

Blood donors were recruited from HLA-A*02:01-positive individuals who received the yellow fever vaccine due to future virus exposure risk10. Three donors were included (LAU5050, LAU5052, LAU5013). All participants provided written informed consent and received no compensation for their participation.

Peripheral blood samples were obtained in heparin-coated tubes and immediately processed for cryopreservation for downstream applications. To isolate PBMCs, heparinized whole blood was first diluted at a 1:1 ratio with PBS and carefully layered onto Lymphoprep for density-gradient separation. Samples were centrifuged for 30 min at 400g at room temperature with no breaks. The PBMC layer was collected and washed once in complete medium (RPMI 1640 supplemented with penicillin, streptomycin, HEPES buffer and 10% fetal calf serum) by centrifugation at 350g for 5 min. Cells were then immediately resuspended in ice-cold freezing medium (Complete Medium with 40% fetal calf serum and 10% dimethyl sulfoxide), frozen overnight at −80 °C, and transferred into liquid N2 for long-term storage.

Stimulation and sorting of epitope-specific CD8+ T cells

CD8+T cells from cryopreserved PBMCs were enriched using magnetic-activated cell sorting technology (Miltenyi Biotec). The CD8− fraction of cells was irradiated (30 Gray) and used as antigen-presenting cells to stimulate peptide-specific T cells. The CD8+ and irradiated CD8− cells were co-cultured with the different peptides in RPMI supplemented with 8% human serum (Biowest), penicillin–streptomycin and beta-mercaptoethanol. Recombinant human interleukin-2 was added to the culture at a starting concentration at 10 U ml−1 and increased gradually to 100 U ml−1 by changing the culture medium every second day. After 11–14 days of culturing, T cells were analyzed by FACS with pMHC multimers to determine the cross-reactivity (YF multimer in APC and other multimers in PE). Epitope-specific CD8+ T cells were then sorted and sequenced using the SEQTR method42 for each epitope listed in Table 1 for which such cells could be detected. The same approach was used to explore cross-reactivity between YF and Melan-A (A0201_ELAGIGILTV).

Stimulation and sorting of activated T cells

Isolated CD8+ T cells after in vitro stimulation were incubated with the 1 μM of the peptide for 8 h at 37 °C and 5% CO2. After incubation, the cells were stained with anti-CD8 FITC (BioLegend 344704), anti-CD4 Pacific Blue (BD Biosciences 558116) and anti-CD137 PE (4-1BB) (Milteniy, 130-119-885) for 20 min at 4 °C in PBS.

After washing, the cells were resuspended in PBS containing DAPI at a 1:1,000 dilution as viability dye. The samples were sorted on a BD Aria II instrument equipped with the FACS Diva software. Data analysis was performed with FlowJo v10.5 software. For TCR sequencing, the sorted cells were centrifuged and resuspended in Lysis/Binding buffer (Invitrogen, A33562) and immediately frozen at −80 °C.

TCR sequencing and reconstruction

TCR sequencing of sorted CD8+ T cells was performed with the SEQTR pipeline for both alpha and beta chains42. Raw sequencing data were processed with MiXCR to reconstruct both the alpha and beta chains66. A threshold of 5 was used on the unique molecular identifier counts. To account for expected batch effects, a dedicated baseline was built for SEQTR data, based on TCR repertoires from different PBMC samples42.

Single-cell TCR sequencing

Single-cell TCR sequencing was performed using the Protocol chromium GEM-X Universal 5′ Gene Expression v3 4-plex OCM (CG000770 rev A) (10x Genomics) according to the manufacturer’s protocol. Pre-stimulated and tetramer-sorted T cells were washed, counted and adjusted to the recommended loading density before microfluidic partitioning. Single cells were encapsulated with barcoded gel beads in GEMs (Gel Beads-in-Emulsion) using the Chromium X controller. Within each GEM, cell lysis and reverse transcription produced barcoded full-length cDNA, which was subsequently amplified. Amplified cDNA underwent targeted enrichment of TCR α- and β-chain sequences via two PCR amplifications according to the 10x Genomics workflow. A 5′ gene expression library was also made from the same cDNA. Libraries were indexed, pooled and sequenced on the AVITI platform (Element Biosciences) on a Cloudbreak Freestyle flow cell with sequencing parameters 10-10-28-90 (index 1, index 2, read 1, read 2). Demultiplexing was done using the Bases2Fastq software (v2.0, Element Biosciences). Raw sequencing data were processed with Cell Ranger (v9.0.0, 10x Genomics) using the refdata-cellranger-vdj-GRCh38-alts-ensembl-7.1.0 genome reference, to assemble contigs, identify clonotypes and annotate paired TCR α/β sequences, yielding high-resolution TCR repertoire profiles for downstream analysis.

Cross-reactivity analysis

To measure cross-reactivity, CD8+ T cells were stained with both the A0201_LLWNGPMAV multimer and the multimer corresponding to each variant. Cross-reactivity was assessed by the following formula ½ Q2/(Q1 + Q2) + ½ Q2/(Q2 + Q3), where Q2 denotes the fraction of double-positive cells, Q1 the fraction of cells positive only for the first epitope and Q3 the fraction of cells positive only for the second epitope (Fig. 3a). In this way, fully cross-reactive epitopes have a score of 1, while non-cross-reactive epitopes have a score of 0.

TCR repertoire overlap

For publicly accessible epitope-specific TCR repertoires, we estimate the cross-reactivity based on TCR repertoire overlap. The overlap was calculated by ½ Ncom/N1 + ½ Ncom/N2, where Ncom stands for the number of TCRs found in both repertoires, N1 is the number of TCRs in the first repertoire, and N2 is the number of TCRs in the second repertoire. Similar to the cross-reactivity, fully overlapping repertoires have a score of 1, and nonoverlapping repertoires have a score of 0.

Quantifying TSP dissimilarity

TSP dissimilarity for two epitopes (E1 and E2) was computed as in equation (4):

$$\begin{array}{l}{{D}_{\text{TCR}}\left({E}_{1},{E}_{2}\right)}^{2}=\frac{1}{{N}_{f}}\left\{\sum _{\left\{V\right\}}\left\{\frac{{P}_{1}\left(V\right)+{P}_{2}\left(V\right)}{2}\left(\log \left\{\frac{{P}_{1}\left(V\right)}{{Q}_{1}\left(V\right)}\right\}\right.\right.\right.\\\left.\left.\left.\qquad\qquad\qquad\quad-\;\log \left\{\frac{{P}_{2}\left(V\right)}{{Q}_{2}\left(V\right)}\right\}\right)^{2}\right\}+\sum _{\left\{J\right\}}\left\{\frac{{P}_{1}\left(J\right)+{P}_{2}\left(J\right)}{2}\left(\log \left\{\frac{{P}_{1}\left(J\right)}{{Q}_{1}\left(J\right)}\right\}\right.\right.\right.\\\left.\left.\left.\qquad\qquad\qquad\quad-\;\log \left\{\frac{{P}_{2}\left(J\right)}{{Q}_{2}\left(J\right)}\right\}\right)^{2}\right\}+\sum _{\left\{L\right\}}\left\{\frac{{P}_{1}\left(L\right)+{P}_{2}\left(L\right)}{2}\left(\log \left\{\frac{{P}_{1}\left(L\right)}{{Q}_{{1}_{P\left({V}_{1}{,J}_{1}\right)}}\left(L\right)}\right\}\right.\right.\right.\\\left.\left.\left.\qquad\qquad\qquad\quad-\;\log \left\{\frac{{P}_{2}\left(L\right)}{{Q}_{{2}_{P\left({V}_{2}{,J}_{2}\right)}}\left(L\right)}\right\}\right)^{2}\right\}\right\}\end{array}$$

(4)

Where N**f stands for the number of features (that is, number of V genes, J genes and number of CDR3 lengths), and pseudocount regularization was included in the ratio between probabilities. As before, for clarity, the sum over the two chains is omitted from the formula. The version including the CDR3_VJ contribution used in Extended Data Fig. 3a was obtained by adding the following contribution as in equation (5):

$$\begin{array}{l}\displaystyle\frac{1}{|\{L\}|}\sum _{\{L\}}\displaystyle\frac{1}{L\cdot 20}\mathop{\sum }\limits_{l=1}^{L}\mathop{\sum }\limits_{i=1}^{20}\left\{\displaystyle\frac{{P}_{1}\left({CDR}{3}_{l,i}{|L}\right)+{P}_{2}\left({CDR}{3}_{l,i}{|L}\right)}{2}\right.\\\left.\;{\left(\log \left\{\displaystyle\frac{{P}_{1}\left({CDR}{3}_{l,i}{|L}\right)}{{Q}_{{1}_{P\left({V}_{1}{,J}_{1}{|L}\right)}}\left({CDR}{3}_{l,i}{|L}\right)}\right\}-\log \left\{\displaystyle\frac{{P}_{2}\left({CDR}{3}_{l,i}{|L}\right)}{{Q}_{{2}_{P\left({V}_{2}{,J}_{2}{|L}\right)}}\left({CDR}{3}_{l,i}{|L}\right)}\right\}\right)}^{2}\right\}\end{array}$$

(5)

X-scan assay

For each TCR (TCR_YF: TRAV12-2, CAVGDDKIIF, TRAJ30, TRBV28, CASTPQTAYEQYF, TRBJ2-7, TCR_YF2: TRAV12-2, CAVNPDKIIF, TRAJ30, TRBV4-2, CASSQEDRGPEKLFF, TRBJ1-4; TCR_YF3: TRAV12-2, CAAGDDKIIF, TRAJ30, TRBV29-1, CSVATSGGSNEQFF, TRBJ2-1), a dose–response experiment using the T Cell Activation Bioassay NFAT (Promega) was performed to determine the EC90 value. Briefly, 2 × 104 TCR-transfected Jurkat-NFAT-CD8 cells (as described above) in 25 μl were co-cultured with 4 × 104 T2 cells (American Type Culture Collection) in 25 μl in a white 96-well plate (Costar) in the presence of a serial dilution of the YF native peptide (LLWNGPMAV) (25 μl). All conditions were tested in duplicate. After overnight incubation at 37 °C, the plate was equilibrated to room temperature, and one volume of Bio-Glo Reagent (Promega) was added to each well. Luminescence was measured using a Spark microplate reader (Tecan). Data were analyzed by nonlinear regression (four-parameter model) using GraphPad Prism v10.

A panel of peptide variants based on the native epitope (LLWNGPMAV) was synthesized in-house, with systematic substitution at each position using all standard amino acids, excluding cysteine. This panel was diluted to three times the EC90 concentration determined for each TCR.

A total of 8 × 106 Jurkat-NFAT-CD8 cells, transfected with TCRs, were prepared using the Neon Transfection System 100 μl Kit (4 × 100 μl tips). Six white 96-well plates (Costar) were used for co-culture of the TCR-transfected Jurkat-NFAT-CD8 cells and T2 cells with the panel of peptide variants, in duplicate (as described above). Each plate included wells containing the native peptide and medium only as controls. After overnight incubation at 37 °C, luminescence was quantified as previously described.

For each plate, luminescence responses were normalized by setting the response to the native peptide as 100% and the response to medium only as 0% using GraphPad Prism v10.

X-ray crystallography

Crystals were obtained by vapor diffusion using sitting-drop crystallization. Equal volumes (0.2 μl + 0.2 μl) of protein–peptide complex and reservoir solution were dispensed using a Mosquito robot (STP Labtech). Crystallization drops were incubated at 18 °C for several weeks until crystals appeared. C0-crystals of the complex with YF peptide (sequence: LLWNGPMAV) were obtained in 0.005 M cadmium chloride hemi(pentahydrate), 0.1 M Tris pH 8.5, and 20% wt/vol PEG 4000. Co-crystals of the S0 variant (sequence: SLLWNGPMAV) were obtained in 0.005 M nickel(II) chloride hexahydrate, 0.1 M Tris pH 7.5, and 20% wt/vol PEG 4000, while co-crystals of the S10 variant (sequence: LLWNGPMAVS) formed in 0.2 M ammonium nitrate, 0.1 M HEPES pH 7.5 and 20% vol/vol PEG Smear Broad. Crystals were cryoprotected by briefly soaking in mother liquor supplemented with 25% (vol/vol) glycerol and flash-frozen in liquid nitrogen. X-ray diffraction data were collected at beamline ID30B/ID30A1 of the European Synchrotron Radiation Facility (Grenoble, France) and processed using the Autoprocess pipeline (Global Phasing)67,68,69,70.

Structures were solved by molecular replacement using Phaser-MR71 and PDB entry 5N6B as the template model10. Manual model building and structure refinement were carried out in Phenix Suite using coot software and phenix-refine, respectively. After validation, the models were deposited in the PDB under accession numbers PDB 9SL0 (YF), PDB 9SKP (S0) and PDB 9SKO (S10). Data collection and refinement statistics are summarized (Supplementary Table 11). Structural representations were prepared using PyMOL (https://pymol.org/).

Predicting cross-reactivity with MixTCRcross

MixTCRcross predicts cross-reactivity between two epitopes (E1 and E2) restricted to their respective MHC (MHC1 and MHC2) by comparing the sequences of E1 and E2, the similarity between the TCR interfaces of the two MHC molecules (positions 65, 68, 69, 72, 73, 75, 76, 146, 150, 151, 154, 157 and 158, numbering following X-ray structures) and the binding affinity of E2 to MHC2 (that is, B2, computed as %rank of MixMHCpred72). The three cross-reactivity levels (CR) are defined as*:*

  • 0, for at least one variant at non-anchor P3–P5, for MHCs with different TCR interfaces or for B2 > 2; otherwise,
  • 1, for at least one variant at non-anchor P6–P7;
  • 2, for variants only at other positions.

The final score combines CR and the %rank of E2 (that is, B2) as: \(S={\rm{CR}}-\frac{{\log }_{10}\left(\max ({B}_{2},{10}^{-6}\right)+6}{8}+1\). This score goes from 0 (lowest risk of cross-reactivity) to almost 3 (highest risk of cross-reactivity). Anchor residues for different MHC alleles present in our dataset were defined as the second and last residues, except for HLA-B*08:01 or HLA-B*37:01 where an additional anchor was present at P5.

Analysis of BATCAVE data

All data for 9-mer epitopes were downloaded from the BATCAVE database[44](https://www.nature.com/articles/s41592-026-03328-y#ref-CR44 "Banerjee, A. et al. T cell receptor cross-reactivity prediction improved by a comprehensive mutational scan database. Cell Syst. 20, 101345 https://doi.org/10.1016/j.cels.2025.101345

           (2025)."). For each TCR–peptide variant pair, activity scores were normalized by the activity of the index peptide. To benchmark how predictions of MixTCRcross can generalize to other epitopes and compare with those of BATMAN[44](https://www.nature.com/articles/s41592-026-03328-y#ref-CR44 "Banerjee, A. et al. T cell receptor cross-reactivity prediction improved by a comprehensive mutational scan database. Cell Syst. 20, 101345 
            https://doi.org/10.1016/j.cels.2025.101345

           (2025).") and CrossDome[45](https://www.nature.com/articles/s41592-026-03328-y#ref-CR45 "Fonseca, A. F. & Antunes, D. A. CrossDome: an interactive R package to predict cross-reactivity risk using immunopeptidomics databases. Front. Immunol. 14, 1142573 (2023).") in the context of unseen epitopes, BATMAN was retrained for each index peptide on all BATCAVE data except activity measurements with variants of the index peptide (that is, leave\-one\-epitope\-out cross\-validation), using the script kindly provided at [https://github.com/meyer\-lab\-cshl/BATMAN\-paper/](https://github.com/meyer-lab-cshl/BATMAN-paper/). CrossDome was used in its published version, which supports only a subset of the epitopes in the BATCAVE database. For AUC calculations, activity scores were binned in two categories based on a threshold of 10% with respect to the activity of the index peptides.

Prediction of MAGE-A3 cross-reactive self-peptides

All human proteins were retrieved from UniProt and chopped into all possible 9-mers (11,292,067 peptides in total). MixTCRcross scores were computed for all these peptides using as input peptide (E1) the MAGE-A3 epitope (EVDPIGHLY), and with the HLA-A*01:01 allele.

Analysis of the contact with TCRs mediated by peptide residues

The number of interactions with the TCRs mediated by each peptide residue was computed across all X-ray structures of human native TCRs in complex with 9-mer peptides, based on a threshold of 5 Å. Peptide positions were grouped as non-anchor P3–P5, non-anchor P6–P7 and other positions. The average number of interactions was retrieved for each set of positions and each X-ray structure (Supplementary Table 12). Average values were taken across structures with the same epitope.

Analysis of negative data used in IMMREP23

Negative data in the IMMREP23 competition were collected for all non-A0201_GILGFVFTL epitopes. The average TSP (mean + standard deviation across all non-A0201_GILGFVFTL) was derived and compared with the TSP of TCRs recognizing A0201_GILGFVFTL.

Interpretation of machine learning TCR–epitope interaction predictions

To interpret machine learning predictions of TCR–epitope recognition, we first generated a repertoire of 106 TCRs with exactly the same VJ distribution as our baseline model for both chains. This dataset comprises both TCRs from paired TCR repertoires as well as randomly paired TCRs from single-chain repertoires. We then applied TEMPO, NetTCR, MixTCRpred and TULIP on these data with five epitopes: A0201_LLWNGPMAV, A0201_GILGFVFTL, B0801_RAKFKQLL, B1302_LLWNGPMAV and A0101_SALPTNADLY. The first three epitopes have large amount of training data, while the last two were used as examples of unseen epitopes (hence MixTCRpred and TEMPO could not be applied on them). The top 0.1% predicted TCRs were used to display the predicted TSPs.

AlphaFold3-based predictions of TSPs

The interactions between YF and TCRs from the ex vivo TCRαβ repertoire from donor LAU5013 determined in this study (that is, 6,624 unique paired TCRαβs; Supplementary Table 13) were predicted using AF3 (ref. 23). Five inferences, using five different seeds, were performed for each TCR. The final score was defined as the sum of interchain PAE between the epitope (that is, peptide + MHC) and the TCR (that is, TCRα + TCRβ). The top 1% best-scoring TCRs were used to display the TSP predicted by AF3. The same analysis was done with three unrelated epitopes (A0201_GILGFVFTL, A0101_ATDALMTGF and B0702_RPPIFIRRL) and the average interchain PAE across all three epitopes was used to renormalize the interchain PAE score of each TCR with YF.

Statistics and reproducibility

No statistical method was used to predetermine sample size. Sample sizes were determined by the number of epitopes with sufficient TCR data. For the experiments, sample sizes depended on the number of donors available and the number of multimer-positive T cells. No experimental data were excluded from the analyses; criteria used to curate public TCR datasets and structures are described in the corresponding Methods sections. The experiments were not randomized. The investigators were not blinded to allocation during experiments and outcome assessment.

All statistical tests were two-sided. Exact statistical methods, P values and sample sizes are described in the figure legends.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

Data availability

New X-ray structures were deposited in the PDB under accession numbers PDB 9SL0 (YF), PDB 9SKP (S0) and PDB 9SKO (S10). The raw sequencing data (fastq files) of the input and output phage-display libraries were deposited at the European Nucleotide Archive under the project number PRJEB95024. All other data are available in Supplementary Tables 1–13. Source data are provided with this paper.

Code availability

The MixTCRviz R package used to build TSPs is available at https://github.com/GfellerLab/MixTCRviz/ (the reference version is available on Zenodo via https://doi.org/10.5281/zenodo.20830182; ref. [73](https://www.nature.com/articles/s41592-026-03328-y#ref-CR73 "Gfeller, D. MixTCRviz (version v1.0) (computer software). Zenodo https://doi.org/10.5281/zenodo.20830182

           (2026).")). The TCR–epitope motif\-based interaction predictor (TEMPO) is available at <https://github.com/GfellerLab/TEMPO/> (the reference version is available on Zenodo via [https://doi.org/10\.5281/zenodo.20830315](https://doi.org/10.5281/zenodo.20830315); ref. [74](https://www.nature.com/articles/s41592-026-03328-y#ref-CR74 "Croce, G. & Gfeller, D. TEMPO (computer software). Zenodo 
            https://doi.org/10.5281/zenodo.20830315

           (2026).")). The cross\-reactivity predictor (MixTCRcross) is available at: <https://github.com/GfellerLab/MixTCRcross/> (the reference version is available on Zenodo via [https://doi.org/10\.5281/zenodo.20795275](https://doi.org/10.5281/zenodo.20795275); ref. [75](https://www.nature.com/articles/s41592-026-03328-y#ref-CR75 "Liu, Y. & Gfeller, D. MixTCRcross (computer software). Zenodo 
            https://doi.org/10.5281/zenodo.20795275

           (2026).")). All tools are freely available for academic research. Licensing information for commercial users is included with each tool.

References

  1. Gray, G. I. et al. The evolving T cell receptor recognition code: the rules are more like guidelines. Immunol. Rev. 329, e13439 (2025).
  2. Sim, B. C., Zerva, L., Greene, M. I. & Gascoigne, N. R. Control of MHC restriction by TCR Valpha CDR1 and CDR2. Science 273, 963–966 (1996).

Article  CAS  PubMed  Google Scholar 3. Turner, S. J., Doherty, P. C., McCluskey, J. & Rossjohn, J. Structural determinants of T-cell receptor bias in immunity. Nat. Rev. Immunol. 6, 883–894 (2006).

Article  CAS  PubMed  Google Scholar 4. Garcia, K. C. & Adams, E. J. How the T cell receptor sees antigen-a structural view. Cell 122, 333–336 (2005).

Article  CAS  PubMed  Google Scholar 5. Dash, P. et al. Quantifiable predictive features define epitope-specific T cell receptor repertoires. Nature 547, 89–93 (2017). 6. Glanville, J. et al. Identifying specificity groups in the T cell receptor repertoire. Nature 547, 94–98 (2017). 7. Scheffer, L. et al. Predictability of antigen binding based on short motifs in the antibody CDRH3. Brief Bioinform. 25, bbae537 (2024). 8. Meynard-Piganeau, B., Feinauer, C., Weigt, M., Walczak, A. M. & Mora, T. TULIP: a transformer-based unsupervised language model for interacting peptides and T cell receptors that generalizes to unseen epitopes. Proc. Natl Acad. Sci. USA 121, e2316401121 (2024). 9. Zhang, H., Zhan, X. & Li, B. GIANA allows computationally-efficient TCR clustering and multi-disease repertoire classification by isometric transformation. Nat. Commun. 12, 4699 (2021). 10. Bovay, A. et al. T cell receptor alpha variable 12-2 bias in the immunodominant response to Yellow fever virus. Eur. J. Immunol. 48, 258–272 (2018).

Article  CAS  PubMed  Google Scholar 11. Gras, S. et al. A structural voyage toward an understanding of the MHC-I-restricted immune response: lessons learned and much to be learned. Immunol. Rev. 250, 61–81 (2012).

Article  PubMed  Google Scholar 12. Huseby, E. S., Crawford, F., White, J., Marrack, P. & Kappler, J. W. Interface-disrupting amino acids establish specificity between T cell receptors and complexes of major histocompatibility complex and peptide. Nat. Immunol. 7, 1191–1199 (2006).

Article  CAS  PubMed  Google Scholar 13. Culshaw, A. et al. Germline bias dictates cross-serotype reactivity in a common dengue-virus-specific CD8+T cell response. Nat. Immunol. 18, 1228–1237 (2017).

Article  CAS  PubMed  Google Scholar 14. Trautmann, L. et al. Dominant TCR V alpha usage by virus and tumor-reactive T cells with wide affinity ranges for their specific antigens. Eur. J. Immunol. 32, 3181–3190 (2002).

Article  CAS  PubMed  Google Scholar 15. Chaurasia, P. et al. Structural basis of biased T cell receptor recognition of an immunodominant HLA-A2 epitope of the SARS-CoV-2 spike protein. J. Biol. Chem. 297, 101065 (2021). 16. Day, E. B. et al. Structural basis for enabling T-cell receptor diversity within biased virus-specific CD8+ T-cell responses. Proc. Natl Acad. Sci. USA 108, 9536–9541 (2011). 17. Mullan, K. A. et al. TCR_Explore: a novel webtool for T cell receptor repertoire analysis. Comput. Struct. Biotechnol. J. 21, 1272–1282 (2023). 18. Jensen, M. F. & Nielsen, M. NetTCR 2.2 - improved TCR specificity predictions by combining pan- and peptide-specific training strategies, loss-scaling and integration of sequence similarity. Elife https://doi.org/10.7554/eLife.93934.3 (2024). 19. Croce, G. et al. Deep learning predictions of TCR-epitope interactions reveal epitope-specific chains in dual alpha T cells. Nat Commun 15, 3211 (2024).

Article  CAS  PubMed  Google Scholar 20. Mayer-Blackwell, K. et al. TCR meta-clonotypes for biomarker discovery with tcrdist3 enabled identification of public, HLA-restricted clusters of SARS-CoV-2 TCRs. Elife 10, e68605 (2021). 21. Nielsen, M. et al. Lessons learned from the IMMREP23 TCR-epitope prediction challenge. ImmunoInformatics 16, 100045 (2024).

Article  CAS  Google Scholar 22. Drost, F. et al. Benchmarking of T cell receptor-epitope predictors with ePytope-TCR. Cell Genom. https://doi.org/10.1016/j.xgen.2025.100946 (2025). 23. Abramson, J. et al. Accurate structure prediction of biomolecular interactions with AlphaFold 3. Nature 630, 493–500 (2024).

Article  CAS  PubMed  Google Scholar 24. McMaster, B., Thorpe, C., Ogg, G., Deane, C. M. & Koohy, H. Can AlphaFold’s breakthrough in protein structure help decode the fundamental principles of adaptive cellular immunity?. Nat. Methods 21, 766–776 (2024).

Article  CAS  PubMed  Google Scholar 25. Bradley, P. Structure-based prediction of T cell receptor:peptide-MHC interactions. Elife 12, e82813 (2023). 26. Quast, N. P. et al. T-cell receptor structures and predictive models reveal comparable alpha and beta chain structural diversity despite differing genetic complexity. Commun. Biol. 8, 362 (2025). 27. Deleuran, S. N. & Nielsen, M. NetTCR-struc, a structure driven approach for prediction of TCR-pMHC interactions. Front. Immunol. 16, 1616328 (2025). 28. Messemaker, M. et al. Functional evaluation of TCR-pMHC pairs at scale allows in silico TCR reactivity prediction. Immunity https://doi.org/10.1016/j.immuni.2026.09.007 (2026). 29. Ascunce-París, A., Romero-Durana, M., Valencia, A., Farriol-Duran, R. & Guallar, V. Structural quality-tier assessment for TCR-pMHC functional enrichment. Front. Immunol. 17, 1869810 (2026). 30. Chao, C.-C. et al. AI/ML-empowered approaches for predicting T cell-mediated immunity and beyond. Front. Immunol. 16, 1651533 (2025). 31. Isacchini, G., Walczak, A. M., Mora, T. & Nourmohammad, A. Deep generative selection models of T and B cell receptor repertoires with soNNia. Proc. Natl Acad. Sci. USA 118, e2023141118 (2021). 32. Barennes, P. et al. Benchmarking of T cell receptor repertoire profiling methods reveals large systematic biases. Nat. Biotechnol. 39, 236–245 (2021).

Article  CAS  PubMed  Google Scholar 33. Moreno, D. L., Croce, G. & Gfeller, D. Statistical modelling of CDR3 sequences provides robust quality control for TCR repertoire datasets. Preprint at bioRxiv https://doi.org/10.64898/2025.12.11.693618 (2025). 34. Mudd, P. A. et al. SARS-CoV-2 mRNA vaccination elicits a robust and persistent T follicular helper cell response in humans. Cell 185, 603–613 (2022).

Article  CAS  PubMed  Google Scholar 35. Sidhom, J. -W., Larman, H. B., Pardoll, D. M. & Baras, A. S. DeepTCR is a deep learning framework for revealing sequence concepts within T-cell repertoires. Nat. Commun. 12, 1605 (2021). 36. Jokinen, E., Huuhtanen, J., Mustjoki, S., Heinonen, M. & Lähdesmäki, H. Predicting recognition between T cell receptors and epitopes with TCRGP. PLoS Comput. Biol. 17, e1008814 (2021). 37. Dens, C., Laukens, K., Bittremieux, W. & Meysman, P. The pitfalls of negative data bias for the T-cell epitope specificity challenge. Nat. Mach. Intell. 5, 1060–1062 (2023).

Article  Google Scholar 38. Sethna, Z., Elhanati, Y., Callan, C. G., Walczak, A. M. & Mora, T. OLGA: fast computation of generation probabilities of B- and T-cell receptor amino acid sequences and motifs. Bioinformatics 35, 2974–2981 (2019). 39. Croce, G. et al. Phage display enables machine learning discovery of cancer antigen-specific TCRs. Sci. Adv. 11, eads5589 (2025). 40. Romero, P., Speiser, D. E. & Rufer, N. Deciphering the unusual HLA-A2/Melan-A/MART-1-specific TCR repertoire in humans. Eur. J. Immunol. 44, 2567–2570 (2014).

Article  CAS  PubMed  Google Scholar 41. Springer, I., Tickotsky, N. & Louzoun, Y. Contribution of T cell receptor alpha and beta CDR3, MHC typing, V and J genes to peptide binding prediction. Front. Immunol. 12, 664514 (2021). 42. Genolet, R. et al. TCR sequencing and cloning methods for repertoire analysis and isolation of tumor-reactive TCRs. Cell Rep. Methods 3, 100459 (2023). 43. Dietrich, P. -Y. et al. Prevalent role of TCR alpha-chain in the selection of the preimmune repertoire specific for a human tumor-associated self-antigen. J. Immunol. 170, 5103–5109 (2003).

Article  CAS  PubMed  Google Scholar 44. Banerjee, A. et al. T cell receptor cross-reactivity prediction improved by a comprehensive mutational scan database. Cell Syst. 20, 101345 https://doi.org/10.1016/j.cels.2025.101345 (2025).

Article  CAS  Google Scholar 45. Fonseca, A. F. & Antunes, D. A. CrossDome: an interactive R package to predict cross-reactivity risk using immunopeptidomics databases. Front. Immunol. 14, 1142573 (2023). 46. Cameron, B. J. et al. Identification of a Titin-derived HLA-A1-presented peptide as a cross-reactive target for engineered MAGE A3-directed T cells. Sci. Transl. Med. 5, 197ra103 (2013).

Article  PubMed  PubMed Central  Google Scholar 47. Grazioli, F. et al. On TCR binding predictors failing to generalize to unseen peptides. Front. Immunol. 13, 1014256 (2022). 48. Gfeller, D., Racle, J. & Roessner, R. A. Modeling TCR -epitope recognition specificity: what we should learn to succeed. Immunol. Rev. 340, e70140 (2026). 49. Povlsen, H. R. et al. Improved T cell receptor antigen pairing through data-driven filtering of sequencing information from single cells. Elife 12, e81810 (2023). 50. Simon, S. et al. TCR analyses of two vast and shared melanoma antigen-specific T cell repertoires: common and specific features. Front. Immunol. 9, 1962 (2018).

Article  PubMed  PubMed Central  Google Scholar 51. Dupic, T., Marcou, Q., Walczak, A. M. & Mora, T. Genesis of the αβ T-cell receptor. PLoS Comput. Biol. 15, e1006874 (2019).

Article  PubMed  PubMed Central  Google Scholar 52. Henderson, J., Nagano, Y., Milighetti, M. & Tiffeau-Mayer, A. Limits on inferring T cell specificity from partial information. Proc. Natl Acad. Sci. USA 121, e2408696121 (2024). 53. Mantena, S., Akbari, A. & Raychaudhuri, S. TCR germline diversity reveals evidence of natural selection on variable and joining alpha chain genes. Preprint at bioRxiv https://doi.org/10.1101/2025.08.20.671277 (2025). 54. Brennan, R. M. et al. The impact of a large and frequent deletion in the human TCR β locus on antiviral immunity. J. Immunol. 188, 2742–2748 (2012).

Article  CAS  PubMed  Google Scholar 55. Brennan, R. M. et al. Missense single nucleotide polymorphisms in the human T cell receptor loci control variable gene usage in the T cell repertoire. Br. J. Haematol. 166, 148–152 (2014).

Article  CAS  PubMed  Google Scholar 56. Corrie, B. D. et al. iReceptor: a platform for querying and analyzing antibody/B-cell and T-cell receptor repertoire data across federated repositories. Immunol Rev. 284, 24–41 (2018). 57. Vita, R. et al. The Immune Epitope Database (IEDB): 2024 update. Nucleic Acids Res. 53, D436–D443 (2025). 58. Goncharov, M. et al. VDJdb in the pandemic era: a compendium of T cell receptors specific for SARS-CoV-2. Nat. Methods 19, 1017–1019 (2022).

Article  CAS  PubMed  Google Scholar 59. Schmidt, F. et al. In-depth analysis of human virus-specific CD8+ T cells delineates unique phenotypic signatures for T cell specificity prediction. Cell Rep. 42, 113250 (2023).

Article  CAS  PubMed  Google Scholar 60. Vlasova, E. K. et al. Inference of SARS-CoV-2 exposure biomarkers using large-scale T-cell repertoire profiling. Genome Med. 18, 20 (2026).

Article  PubMed  PubMed Central  Google Scholar 61. Burley, S. K. et al. RCSB Protein Data Bank: powerful new tools for exploring 3D structures of biological macromolecules for basic and applied research and education in fundamental biology, biomedicine, biotechnology, bioengineering and energy sciences. Nucleic Acids Res. 49, D437–D451 (2021). 62. Chiffelle, J. et al. Tumor-reactive T cell clonotype dynamics underlying clinical response to TIL therapy in melanoma. Immunity 57, 2466–2482 (2024).

Article  CAS  PubMed  Google Scholar 63. Dunn, S. M. et al. Directed evolution of human T cell receptor CDR2 residues by phage display dramatically enhances affinity for cognate peptide-MHC without increasing apparent cross-reactivity. Protein Sci. 15, 710–721 (2006). 64. Racle, J. et al. Robust prediction of HLA class II epitopes by deep motif deconvolution of immunopeptidomes. Nat. Biotechnol. 37, 1283–1286 (2019).

Article  CAS  PubMed  Google Scholar 65. Wagih, O. ggseqlogo: a versatile R package for drawing sequence logos. Bioinformatics 33, 3645–3647 (2017).

Article  CAS  PubMed  Google Scholar 66. Bolotin, D. A. et al. MiXCR: software for comprehensive adaptive immunity profiling. Nat. Methods 12, 380–381 (2015).

Article  CAS  PubMed  Google Scholar 67. Evans, P. Scaling and assessment of data quality. Acta Crystallogr. D Biol. Crystallogr. 62, 72–82 (2006).

Article  PubMed  Google Scholar 68. Vonrhein, C. et al. Data processing and analysis with the autoPROC toolbox. Acta Crystallogr. D Biol. Crystallogr. 67, 293–302 (2011). 69. Kabsch, W. XDS. Acta Crystallogr. D Biol. Crystallogr. 66, 125–132 (2010). 70. Agirre, J. et al. The CCP4 suite: integrative software for macromolecular crystallography. Acta Crystallogr. D Struct. Biol. 79, 449–461 (2023). 71. Liebschner, D. et al. Macromolecular structure determination using X-rays, neutrons and electrons: recent developments in Phenix. Acta Crystallogr. D Struct. Biol. 75, 861–877 (2019).

Article  CAS  PubMed  Google Scholar 72. Tadros, D. M., Racle, J. & Gfeller, D. Predicting MHC-I ligands across alleles and species: how far can we go?. Genome Med. 17, 25 (2025).

Article  PubMed  PubMed Central  Google Scholar 73. Gfeller, D. MixTCRviz (version v1.0) (computer software). Zenodo https://doi.org/10.5281/zenodo.20830182 (2026). 74. Croce, G. & Gfeller, D. TEMPO (computer software). Zenodo https://doi.org/10.5281/zenodo.20830315 (2026). 75. Liu, Y. & Gfeller, D. MixTCRcross (computer software). Zenodo https://doi.org/10.5281/zenodo.20795275 (2026).

Download references

Acknowledgements

Library preparation and single-cell TCR sequencing was performed at the Lausanne Genomic Technologies Facility, University of Lausanne, Switzerland (https://wp.unil.ch/gtf/). We acknowledge the European Synchrotron Radiation Facility for provision of synchrotron radiation facilities under proposal number MX2644. We also thank the beamline scientists for assistance and support in using beamline MASSIF-1 and ID30B. We thank N. Rufer and J. Schmidt for practical help and advice throughout the project.

Funding

This project has received funding from the SNF Sinergia program (CRSII5_193749), the SNF Project Grant (231333) and the ISREC foundation. Open access funding provided by University of Lausanne.

Ethics declarations

Competing interests

The authors declare no competing interests.

Peer review

Peer review information

Nature Methods thanks William Lees and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Peer reviewer reports are available. Primary Handling Editor: Madhura Mukhopadhyay, in collaboration with the Nature Methods team.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Extended data

Extended Data Fig. 1 TCR specificity profiles accurately capture specificity in T cell epitope recognition.

a, V and J gene usage in baseline TCR repertoires (average over all studies in Supplementary Table 1). b: Comparisons of CDR3 motifs of different lengths in YF-specific TCRs with the CDR3 motifs of baseline TCR repertoires with the same V/J usage. c, Alternative visualization of differences in CDR3 motifs with respect to the baseline, based either on the subtraction of probabilities, or the ratio of probabilities. d, TSPs for A0201_GILGFVFTL (class I Influenza epitope in human), DPA10103 − DPB10401_TFEYVSQPFLMDLE (class II COVID-19 epitope in human) and H2−Ab_DIYKGVYQFKSV (class II LCMV epitope in mouse). (Error bars show mean ± s.d. among different studies, n_human = 8 and n_mouseα = 3, and n_mouseβ = 11). See other examples in https://tcrmotifatlas.unil.ch/. e, AUC01 obtained in the cross-validation for different tools trained on the same data. (n = 98) f, AUPRC obtained in the cross-validation for different tools trained on the same data. (n = 98) g, AUC values obtained in the cross-validation for different tools trained on the same data for epitopes with at least 200 paired TCRs (n = 20). h, AUC01 obtained in the cross-validation for different tools trained on the same data when using as negatives in the test set TCRs found to interact with other epitopes (the so-called ‘swapped negatives’). (n = 98) i, AUC obtained in the cross-validation for different tools trained on the same data when excluding HLA-A*02:01 epitopes. (n = 71) j, AUC obtained in the cross-validation for different tools trained on the same data considering epitopes with 10 to 19 TCRs (i.e., excluding most epitopes eliciting public shared responses across patients). (n = 34) k, TEMPO AUC values obtained with different fractions of noise in the training data (n = 98). l, AUC values obtained when further removing in the training data any TCR with a CDR3a or a CDR3b with one amino acid difference with a TCR in the test set. (n = 98) m, Comparison of AUC values for epitopes in human when using the TEMPO default baseline or other baseline models. (n = 87) n, AUC01 values obtained on the IMMREP23 data using the published version of different tools. (n = 20) o, AUC01 values obtained on the ePytope-TCR data using the published version of different tools. (n = 14) p, Comparison of running time as a function of the number of TCRs to predict for TEMPO and other tools. P-values were computed with signed-rank, two-sided paired Wilcoxon test.

Source data

Extended Data Fig. 2 TSPs reveal key determinants of T cell epitope recognition specificity.

a, AUC for the cross-validation analysis with TEMPO considering different features for both chains. ‘CDR3_VJ’ stands for the model based on CDR3 motifs (P(CDR3|L)) with the Q**P(V,J|L) (CDR3|L) normalization. ‘L_VJ’ stands for the model based on CDR3 motifs (P(L)) with the Q**P(V,J) (L) normalization. ‘TEMPO’ corresponds to the V + J + L_VJ + CDR3_VJ model. Chain indication is omitted for clarity. Each point stands for one epitope (n = 98) b, AUC01 for the cross-validation analysis with TEMPO considering different features. (n = 98) c, AUC for the cross-validation analysis when restricting to epitopes with at least 200 paired TCRs. (n = 20) d, AUC01 for the cross-validation analysis with swapped negatives in the test set. (n = 98) e, AUC obtained in the cross-validation for different tools trained on the same data and excluding HLA-A*02:01 epitopes. (n = 71) f, AUC obtained in the cross-validation for different tools trained on the same data considering epitopes with 10 to 19 TCRs (i.e., excluding most of the public shared epitopes). (n = 34) g, Representative FACS plots for measuring epitope recognition by transfecting into Jurkat cells different variants of TCR_YF (TRAV12-2, TRAJ30, CAVGDDKIIF, TRBV28, TRBJ2-7, CASTPQTAYEQYF) and staining them with the YF multimer (see Supplementary Table 4). h, Results of the staining with A0201_GILGFVFTL of Jurkat cells transfected with diverse Vb and Ja variants of TCR_GIL (TRAV27, TRAJ42, CAGGGSQGNLIF, TRBV19, TRBJ2-7, CASSIRSSYEQYF). I, CDR3a motif of baseline TCR repertoire with TRAV21, TRAJ6 and CDR3 length of 15 (i.e., Q(CDR3α |TRAV21, TRAJ6, L**α = 15)). j, CDR3a motifs obtained in the output phage library before running MoDec. k, X-ray structure of the template TCR used in the phage display screen in complex with NY-ESO-1 (PDB: 2BNR). Residues at the four positions diversified in the phage display screen (R4, P5, T6, S7) are shown in orange, the peptide (SLLMWITQC) is shown in yellow and the MHC (HLA-A*02:01) is shown in grey. l, AUC values obtained in the cross-validation when training and testing TEMPO on both chains, only on alpha chains (TEMPOα) or only on beta chains (TEMPOβ). (n = 98) m, Number of TCRα and TCRβ residues in contact with the epitope (i.e., peptide+MHC) in experimental X-ray structures (n = 104). n, Number of TCRα and TCRβ residues in contact with the peptide in experimental X-ray structures (n = 104). P-values were computed with signed-rank, two-sided paired Wilcoxon test. In panels a-f, *** indicate P-values smaller than 0.0005, ** indicate P-values between 0.0005 and 0.005, * indicate P-values between 0.005 and 0.05 and ns indicate not significant. The exact P-values can be found in the Source Data.

Source data

Extended Data Fig. 3 TSPs can predict cross-reactivity.

a, Correlation between cross-reactivity and TSP dissimilarity when including CDR3_VJ contribution in the TSP dissimilarity measure (Each point represents one variant, n = 27). b, Correlation between cross-reactivity and TSP dissimilarity when considering only the variants of the YF epitope with the same length and same MHC restriction (n = 19). c, Gating strategy for the cross-reactivity analysis between the YF and Melan-A (A0201_ELAGIGILTV) epitopes. Correlations and P-values for panels A and B are calculated with the two-sided unpaired Pearson test.

Source data

Extended Data Fig. 4 TSPs reveal how TCR specificity evolves with epitope sequences, binding modes and MHC restrictions.

a, Results of the X-scan for three YF specific TCRs (TCR_YF: TRAV12-2, CAVGDDKIIF, TRAJ30, TRBV28, CASTPQTAYEQYF, TRBJ2-7; TCR_YF2: TRAV12-2, CAVNPDKIIF, TRAJ30, TRBV4-2, CASSQEDRGPEKLFF, TRBJ1-4; TCR_YF3: TRAV12-2, CAAGDDKIIF, TRAJ30, TRBV29-1, CSVATSGGSNEQFF, TRBJ2-1). b, Electron density of X-ray structure for the S10 variant, the YF and the S0 variant. For each epitope, a top view and a side view are displayed. c, Number of interactions with TCR residues mediated by peptide residues at positions P1 to P9 across crystal structures of 9-mer peptides in complex with a TCR (values are averaged for crystal structures with the same peptide).

Source data

Supplementary information

Supplementary Information (download PDF )

Supplementary Figs. 1–7.

Reporting Summary (download PDF )

Peer Review File (download PDF )

Supplementary Table 1 (download CSV )

List of baseline TCR repertoire studies used to establish the baseline model (denoted with letter Q) in the TSPs.

Supplementary Table 2 (download CSV )

List of publicly available TCR–epitope interactions used in this work.

Supplementary Table 3 (download XLSX )

a, List of TCR–epitope PDB structures with the number of contacts with the epitope (that is, peptide + MHC) mediated by residues encoded in the V segment, the J segment or the part of the CDR3 resulting from insertions at the VJ junction (referred to as ‘CDR3_VJ’). Small letters in CDR1, CDR2 and CDR3 sequences indicate residues making direct contacts with the peptide. b, List of PDB structures with the number of contacts with the peptide mediated by residues encoded in the V segment, the J segment or the part of the CDR3 resulting from insertions at the VJ junction. Small letters in CDR1, CDR2 and CDR3 sequences indicate residues making direct contacts with the peptide.

Supplementary Table 4 (download XLSX )

Fraction of multimer-positive Jurkat cells transfected with diverse TCRs and stained with the YF or GIL multimers.

Supplementary Table 5 (download CSV )

Results of the phage display experiments with a library of diversified CDR3 (P4 to P7) selected against the NY-ESO-1 (A0201_SLLMWITQC) monomer. ‘Input’ stands for the input library before any selection. ‘Output’ stands for the output library after selection with NY-ESO-1 monomers.

Supplementary Table 6 (download CSV )

TCR sequences identified by SEQTR after sorting CD8+ T cells with the YF epitope, variants or the YF epitope, unrelated epitopes or an antibody recognizing the CD137 activation marker.

Supplementary Table 7 (download CSV )

Results of the single-cell TCR sequencing with 10x Genomics for YF-specific CD8+ T cells in donor LAU5013.

Supplementary Table 8 (download CSV )

Cross-reactivity values for each epitope in Table 1.

Supplementary Table 9 (download XLSX )

Fraction of multimer-positive Jurkat cells transfected with diverse TCRs and stained with the YF variants or Melan-A.

Supplementary Table 10 (download XLSX )

Results of the X-scan assay on three TCRs recognizing the YF epitope.

Supplementary Table 11 (download XLSX )

PDB report for the three X-ray structures (S10, YF, S0).

Supplementary Table 12 (download CSV )

Average number of interactions with TCR residues mediated by peptide residues at different categories of positions (that is, non-anchor P3–P5, non-anchor P6–P7, other positions) and for each position separately for X-ray structures of 9-mer epitopes in complex with human TCRs. For each epitope, values were averaged across all structures with this epitope.

Supplementary Table 13 (download CSV )

Results of the single-cell TCR sequencing with 10x Genomics for CD8+ T cells collected ex vivo (that is, before any stimulation) from donor LAU5013. Only complete single-alpha and single-beta TCRs are reported.

Source data

Source Data Fig. 1 (download XLSX )

Source data for Fig. 1.

Source Data Fig. 2 (download XLSX )

Source data for Fig. 2.

Source Data Fig. 3 (download XLSX )

Source data for Fig. 3.

Source Data Fig. 4 (download XLSX )

Source data for Fig. 4.

Source Data Extended Data Fig. 1 (download XLSX )

Source data for Extended Data Fig. 1.

Source Data Extended Data Fig. 2 (download XLSX )

Source data for Extended Data Fig. 2. P values included.

Source Data Extended Data Fig. 3 (download XLSX )

Source data for Extended Data Fig. 3.

Source Data Extended Data Fig. 4 (download XLSX )

Source data for Extended Data Fig. 4.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and permissions

About this article

Cite this article

Liu, Y., Croce, G., Tadros, D.M. et al. Key determinants of T cell epitope recognition revealed by TCR specificity profiles. Nat Methods (2026). https://doi.org/10\.1038/s41592\-026\-03328\-y

Download citation

  • Received: 06 March 2026
  • Accepted: 15 October 2026
  • Published: 01 December 2026
  • Version of record: 01 December 2026
  • DOI: https://doi.org/10\.1038/s41592\-026\-03328\-y

Share this article

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative