DecoderTCR: Compositional Pretraining and Entropy-Guided Decoding for TCR-pMHC Interactions

Boqiao Lai, Melissa Englund, Ramit Bharanikumar, Isabel Nocedal, Ali Davariashtiyani, Jason Perera, Aly A KhanICML 2026

Introduction

T-cell receptors (TCRs) are the sentinels of the adaptive immune system, tasked with identifying foreign peptides presented by Major Histocompatibility Complexes (pMHCs). Predicting and designing these TCR-pMHC interactions is a holy grail in computational immunology, holding immense potential for novel cancer immunotherapies and infectious disease treatments.

However, a massive data imbalance plagues the field: while we possess millions of individual TCR and pMHC sequences (marginal data), validated pairs of interacting sequences are exceedingly rare. Furthermore, existing generative models often rely on "left-to-right" autoregressive decoding, a method that ignores the biophysical reality of protein loops where the ends are anchored and the middle remains flexible.

To overcome these hurdles, researchers have introduced DecoderTCR, a masked language model framework that masters the complex "handshake" between TCRs and pMHCs through novel pre-training and decoding strategies.

Methodology: Curriculum Learning and Confidence-First Decoding

DecoderTCR tackles the data sparsity and biophysical modeling challenges through two core innovations:

1. Compositional Continual Pre-training

Rather than training on all data simultaneously, DecoderTCR employs a curriculum learning approach to maximize the utility of available datasets.

  • Stage 1: The model learns the fundamental "grammar" of individual components using abundant unpaired data (roughly $10^7$ TCRs and $10^6$ pMHCs).
  • Stage 2: It then refines its understanding of cross-chain dependencies using a much smaller dataset of validated interacting pairs (~$10^5$ pairs).

2. Iterative Entropy-Guided Refinement (IEGR)

IEGR is a novel non-autoregressive decoding strategy specifically designed for generating the hypervariable CDR3 loops of the TCR. Instead of generating sequences sequentially from start to finish, IEGR calculates the predictive entropy (uncertainty) across all sequence positions. It resolves the most certain "anchor" positions first, providing a stable biophysical scaffold. It then fills in the more uncertain, flexible regions, concluding with a "Block Gibbs Refinement" phase to polish the final sequence. This "confidence-first" approach inherently mirrors biology, as resolving conserved anchor residues naturally constrains the search space for the hypervariable regions responsible for antigen specificity.

Data and Zero-Shot Evaluation

The model leverages massive datasets, including TCR repertoires from the Observed Antibody Space (OAS) and pMHC ligandomes from the MHC Motif Atlas, alongside paired data from VDJdb.

To ensure robust evaluation, DecoderTCR was tested on strictly held-out alleles and epitopes (such as the SARS-CoV-2 Spike peptide YLQPRTFLL), guaranteeing true zero-shot generalization.

Key Performance Metrics: * Zero-Shot Binding: DecoderTCR achieved a remarkable 0.96 AUROC for pMHC binding prediction, vastly outperforming generic protein language models like ESM-2 (0.45 AUROC). * TCR Recognition: For epitope-specific TCR recognition, it reached 0.76 AUROC, approaching the performance of supervised models (like NetTCR-2.2) explicitly trained on those targets. * Emergent Structure: Remarkably, without ever being exposed to 3D coordinate data during training, the model successfully learned to identify structural contact points between the TCR and the peptide.

Wet-Lab Validation and the "Lab-in-the-Loop" Paradigm

A crucial insight from the study is the distinction between ranking and generating. A model can excel at ranking existing binders (high AUROC) but still struggle to generate viable new ones from scratch. This "prediction-generation gap" suggests that generation requires capturing sufficient conditions, which are fundamentally harder to learn than the necessary conditions required for prediction.

To bridge this gap, the researchers employed an iterative "lab-in-the-loop" paradigm. In the first round of de novo wet-lab design, the model achieved a 3% hit rate. By feeding the failures back into the system as "hard negatives" to train a simple classifier, the hit rate quadrupled to 12% in the second iteration. Furthermore, the generated sequences exhibited realistic recombination statistics, staying within the "natural" repertoire as measured by standard immunological tools.

Limitations and Future Directions

While groundbreaking, DecoderTCR has limitations. The current framework focuses on redesigning CDR3 loops while keeping the rest of the TCR framework (V/J genes) fixed; truly scaffold-free design remains an open challenge. Additionally, performance varies across different antigens due to inherent noise and bias in current immunological databases.

Looking forward, the authors suggest that the model's architecture could be inverted: rather than designing TCRs for a fixed peptide, it could theoretically design peptides for a fixed TCR. This reverse-design capability opens exciting new avenues for targeted vaccine development.

Summary updated

BibTeX
@inproceedings{lai2026decodertcr,
  author = {Boqiao Lai and Melissa Englund and Ramit Bharanikumar and Isabel Nocedal and Ali Davariashtiyani and Jason Perera and Aly A Khan},
  title = {{DecoderTCR: Compositional Pretraining and Entropy-Guided Decoding for TCR-pMHC Interactions}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=yzes8qBM70},
}
Figure