T cells are a critical component of the adaptive immune system, playing a role in infectious disease, autoimmunity, and cancer. T cell function is mediated by the T cell receptor (TCR) protein, a highly diverse receptor targeting specific peptides presented by the major histocompatibility complex (pMHCs). Predicting the specificity of TCRs for their cognate pMHCs is central to understanding adaptive immunity and enabling personalized therapies. However, accurate prediction of this protein-protein interaction remains challenging due to the extreme diversity of both TCRs and pMHCs. Here, we present ImmSET (Immune Synapse Encoding Transformer), a novel sequence-based architecture designed to model interactions among sets of variable-length biological sequences. We train this model across a range of dataset sizes and compositions and study the resulting models' generalization to pMHC targets. We describe a failure mode in prior sequence-based approaches that inflates previously reported performance on this task and show that ImmSET remains robust under stricter evaluation. In systematically testing the scaling behavior of ImmSET with training data, we show that performance scales consistently with data volume across multiple data types and compares favorably with the pre-trained protein language model ESM2 fine-tuned on the same datasets. Finally, we demonstrate that ImmSET can outperform AlphaFold2 and AlphaFold3-based pipelines on TCR-pMHC specificity prediction when provided sufficient training data. This work establishes ImmSET as a scalable modeling paradigm for multi-sequence interaction problems, demonstrated in the TCR-pMHC setting but generalizable to other biological domains where high-throughput sequence-driven reasoning complements structure prediction and experimental mapping.
Alex: Welcome to another episode of ResearchPod. Sam, walk us through the paper we're discussing today.
Sam: The paper, titled ImmSET: Sequence-Based Predictor of TCR-pMHC Specificity at Scale, comes from researchers at Adaptive Biotechnologies. T cells are like the body's security guards—they patrol for invaders like viruses or cancer cells. Each T cell has a special protein on its surface called a T cell receptor, or TCR, that checks out tiny pieces of proteins, called peptides, stuck to other cells on structures known as major histocompatibility complexes, or MHCs. Together with the peptide, they're called pMHCs. The key question is whether a specific TCR will stick to and react to a particular pMHC, which triggers the immune response.
Alex: So this paper is basically tackling how to predict if a T cell receptor will recognize a new peptide on an MHC molecule that it's never seen before?
Sam: Yes, exactly. Predicting that interaction is tough because there are billions of possible TCRs and peptides, with no simple rules. It's not just about how tightly they bind, but dynamic contacts during recognition.
Alex: That scale sounds overwhelming—like matching every lock in a city to every key. So what's the main issue with past sequence-based approaches that just look at the amino acid strings?
Sam: Prior sequence models often process each part—the TCR loops and the pMHC—separately first. That misses how they influence each other from the start. They also got inflated scores by testing on peptides too similar to training data. This paper's ImmSET model encodes the sequences together right away. It uses tricks to catch those cross-influences and holds up on truly new peptides.
Alex: So jointly looking at them avoids that shortcut?
Sam: Precisely. Older methods using protein structures, like those from AlphaFold, work okay but take weeks to screen millions of matches for therapies. They model one fixed shape per pair and need heavy computation. ImmSET scales well with more data, beats fine-tuned protein language models like ESM2, and runs thousands of times faster than AlphaFold pipelines on common HLA types—finishing in hours what takes weeks. The paper suggests this fixes key flaws for real-world screening of patient TCRs against tumor peptides.
Alex: Okay, so ImmSET encodes everything together from the start—that joint approach sounds key. But how does it actually learn those cross-influences between the TCR parts and the peptide?
Sam: They train it with extra tasks beyond just predicting if there's a match. One task hides random letters in the amino acid sequences—like blanking out spots in a sentence and guessing them from the rest. The model fills them in, paying attention to clues from all segments together. Another hides a whole chunk, say the entire peptide sequence, and asks the model to rebuild it using only the TCR info. These force the model to build deep links across segments.
Alex: So it's like training a kid to reconstruct a puzzle by looking at connected pieces from different parts, not in isolation?
Sam: Right. They shuffle the order of segments randomly during training and use special marker tokens at the start and end of each, like flags saying "this is the TCR loop" or "this is the peptide." That stops the model from cheating by memorizing positions. It makes it robust even if some info is missing later, like one TCR chain. They focus inputs on just the six key loops of the TCR, called complementarity-determining regions—the contact points—like trimming a map to the roads that matter.
Alex: And without those tricks, models fall into traps like memorizing patterns from similar peptides?
Sam: Yes. The paper shows a model with no peptide info at all still guessed okay on close-match peptides by shortcutting on TCR patterns alone. Performance vanished on distant ones. ImmSET avoids that. It outperforms fine-tuned ESM2 about twice as well on held-out tests with the same data, thanks to this setup. It also beats AlphaFold pipelines on common HLA-A*02:01 matches, even without full TCR inputs.
Alex: So the architecture isn't just clever—it's targeted at real gaps in prior work. With all these extra training tasks pulling in different directions, how does the model stay stable enough to make reliable predictions?
Sam: They add a layer of reliability by using three separate summary tokens right at the start of the input sequence. Each one processes the full joint encoding independently, then makes its own yes-or-no guess on whether there's a match. The final answer averages those three—like polling a small expert panel for a consensus instead of trusting one opinion. This built-in ensembling cuts down on random wobbles during training. For the masked tasks, they weight predictions by chain type, so clues from the TCR loops count more when guessing peptide spots, and vice versa. That sharpens those cross-links.
Alex: Okay, so multiple summaries averaged together—that's a simple way to smooth out noise. Does this setup let it handle variations, like different versions of the MHC part?
Sam: Yes. They trained everything just on pairs using one common MHC variant, HLA-A*02:01—think of HLA as the specific family of presenting proteins, and A*02:01 as a widespread type in many people. Yet when tested on other HLA families it hadn't seen, like A*01:01 or B*08:01, it still picked matches about as well as on the trained one. The paper suggests this emerges because the model learns general rules of recognition from sequences alone, without hard-coding to one structure.
Alex: So sequence patterns carry over across these MHC families—no need for retraining on each?
Sam: Exactly. This cross-family signal shows up steadily across tests, pointing to shared interaction principles.
Alex: Scaling with data makes sense for therapies. How did they test it across different amounts of training examples?
Sam: They built special test sets by starting with a large pool of known matches for one common MHC type, then creating smaller groups inside it—like nesting boxes, where each smaller one is a strict subset of the bigger. For each size, they varied the number of different peptides and matching TCRs per peptide. This let them watch how prediction skill grows as data increases. Prediction accuracy rose steadily with both more peptides and more TCRs per peptide, but steeper for peptides. ImmSET stayed ahead across extra checks like precision in hard cases. For picking the best model during training, they used a validation set of peptides each at least four changes away from any training ones—a measure called Levenshtein distance. The final check came on a holdout set of even more distant peptides, with lab-tested positives and non-matches to mimic real screening.
Alex: So peptides drive the scaling more—that's a clear guide for data collection. How does it stack up against structure tools on blind tests?
Sam: On a competition benchmark with new peptides distant from training data, ImmSET beat AlphaFold2 pipelines from two groups and matched AlphaFold3 closely on the trained HLA-A*02:01. Inference took milliseconds per pair on standard hardware, versus minutes for those structure predictions—thousands of times faster for ensembles. It shows a steady signal on unseen types, but trails AlphaFold3 on more distant ones, as expected given HLA differences. The paper notes this cross-type transfer isn't guaranteed, highlighting a limit to pure sequence learning.
Alex: Fair point—the generalization has limits, but even partial carryover across families is notable from sequences alone. Makes for a grounded advance in matching immune cells to threats.
Sam: Yes. A pan-version across MHC types could scan full patient repertoires—millions of TCRs—against personal cancer targets in minutes, aiding therapies without weeks of structure modeling. This positions sequence approaches as a scalable complement. Research like this steadily builds tools for precision medicine. Thanks for listening to ResearchPod.