When a machine-learning model predicts whether a T-cell receptor — the surface protein a T cell uses to recognize infected or cancerous cells — will bind a particular peptide, its training data almost never come from a random sample of biology. They come from a handful of public databases (VDJdb, McPAS-TCR, IEDB) whose entries were produced by a handful of labs, assays, sequencing instruments, and study designs, each with its own reporting bias. A model trained on this data can score brilliantly on standard test splits while having learned "which lab and which assay produced this pair" instead of the biophysics of the receptor–peptide interface. This is precisely the failure mode that medical imaging documented years ago: pneumothorax detectors learned to recognize the chest tube inserted after diagnosis, achieving a ROC AUC of 0.94 on cases with the tube and 0.77 on the untreated cases where detection actually matters Hidden stratification causes clinically meaningful failures in machine learning for medical imaging. Nobody has checked whether paired TCR–peptide binding models fail the same way, and the field's current headline numbers — including a retrospective ROC-AUC of 0.999 on unseen peptides TCR-EML: Explainable Model Layers for TCR-pMHC Prediction — are exactly the kind of score that medical AI has learned to distrust.
This proposal treats database, institution, and assay provenance in immune-receptor data as a shortcut feature in the technical sense: a non-causal signal that predicts the label in training but breaks under deployment. The plan is to audit existing paired-chain models for provenance shortcuts, build a model that removes them through two combined mechanisms (predicted contact-geometry supervision and causal adjustment over an unsupervised confounder dictionary), publish the crossed evaluation protocol that makes the shortcuts measurable, and define the decisive test as a prospective, phased, human-in-the-loop validation on live patient repertoires modeled on the mammography arbitration trial that finally established clinical value for a medical AI system Prospective implementation of AI-assisted screen reading to improve early detection of breast cancer.
Core Claim
Current paired α/β TCR–peptide binding models are evaluated on splits that preserve provenance confounding — the same source database, assay, and institution appear on both sides of the train/test divide — so their reported performance conflates biophysical learning with database-specific batch signatures. When provenance is explicitly decoupled from the label, we claim performance will drop in a structured, measurable way; and that a model whose binding decision must pass through an explicit predicted residue–residue contact geometry, combined with a backdoor adjustment over a learned dictionary of provenance contexts, will retain substantially more of its performance under this decoupling than models trained on sequences alone. The claim is only certified, however, by prospective in-vitro validation on uncurated patient repertoires, because retrospective cross-validation cannot expose the spectrum and prevalence biases that dominate live deployment Paper.
The closest existing work is TRAP: a contrastive learning-enhanced framework for robust TCR–pMHC binding prediction with improved generalizability, which already observed that TCR models exploit antigen reporting frequency in public databases and reduced healthy-donor false positives on the viral epitope YVLDHLIVV from 43.2% to 13.2% through a unified negative-sampling ratio. TRAP's fix is a data-level rebalancing within static databases. But the medical-imaging literature this proposal draws on showed directly that rebalancing is not enough: when the input representation still carries the non-causal feature, models keep exploiting it, and only supervising the model on where the pathology is (bounding boxes, segmentation masks) restored robust AUROC from 0.46 to 0.82 on chest radiographs Reducing Reliance on Spurious Features in Medical Image Classification with Spatial Specificity. Our difference is architectural and causal, not just sampling: we constrain the decision to predicted contact geometry and intervene on the provenance confounder, and we evaluate under splits TRAP never used.
Research Program
The program has four parts: an audit, a model, a benchmark protocol, and a prospective validation design.
The audit applies the three procedures formalized in radiology — schema completion over database metadata, retrospective error auditing, and latent-space clustering Hidden stratification causes clinically meaningful failures in machine learning for medical imaging — to the combined VDJdb/McPAS-TCR/IEDB paired-α/β corpus, the same raw sources behind both TRAP's 38,491 positive pairs and TCR-EML's 349,716 paired sequences. We stratify every evaluation by source database, assay methodology, sequencing-library type, clonal-frequency band, and human leukocyte antigen (HLA, the molecule that presents peptides to T cells) background, then report stratum-wise AUC rather than the aggregate. The audit's central quantity is a shortcut-robust AUC: performance on splits where provenance carries no label information, obtained by leave-one-source-out splits with label-preserving resampling, directly analogous to Saab's robust AUROC on test subsets where the chest-tube shortcut was broken.
The model — we will call it the deconfounded contact TCR (DC-TCR) — combines two ingredients with separate precedents. First, the binding decision is computed from an explicit pairwise residue–residue contact matrix, extending the contact prototype layers of TCR-EML: Explainable Model Layers for TCR-pMHC Prediction, which enforced that decisions derive from physical contact points and achieved a Binding Region Hit Rate above 0.71 against the 274 ground-truth crystallographic structures in TCR-XAI. The gap we close is that TCR-EML's prototypes were evaluated against static solved structures, of which fewer than 300 exist; we instead use AlphaFold-Multimer predicted contact maps as weak supervision across the full corpus, since TRAP already demonstrated that predicted structures carry usable signal, reaching an unseen-epitope AUC of 0.75 when combined with sequence contrastive learning. This is the receptor-modeling translation of Saab's finding that spatial specificity supervises away shortcuts — except that here the "mask" is a predicted contact geometry rather than an expert segmentation, because expert contact annotations at corpus scale do not exist. Second, we adapt the interventional deconfounding of Interventional Bag Multi-Instance Learning On Whole-Slide Pathological Images from gigapixel histology slides to sequence repertoires: an unsupervised dictionary of provenance contexts is built by clustering pair embeddings, and the training objective uses the causal interventional distribution rather than the observational one. Following IBMIL, which models slide context as a confounder $C$ on the backdoor path $X \leftarrow C \rightarrow Y$ and delivered a +6.36% AUC gain over pooled baselines on Camelyon16, we estimate
$$P(Y \mid \text{do}(X)) = \sum_{c \in \mathcal{C}} P(Y \mid X, c)\, P(c),$$
where $c$ indexes provenance-context clusters and the sum replaces the model's reliance on whichever context happens to co-occur with the training label. The model consumes full paired α/β input across all six complementarity-determining regions, the hypervariable loops that make contact with the peptide, since paired modeling is known to be essential: NetTCR-2.0 showed paired training reaching an AUC of 0.89 against 0.79 for the single-chain CDR3β model on the same cohort, and T-cell receptor structures and predictive models reveal comparable alpha and beta chain structural diversity despite differing genetic complexity showed the α chain is structurally as informative as the β chain, not a passive partner.
The benchmark protocol crosses three axes that the literature has never combined. The Distance Split algorithm of Assessing the generalization capabilities of TCR binding predictors via peptide distance analysis binned test peptides by structural RMSD and showed that models degrade as structural distance grows while sequence-similarity splits make performance look better with distance — but it was restricted to single-chain β data from VDJdb and explicitly omitted paired α chains. We extend it to paired data and cross it with provenance-decoupled institutional splits and HLA-background strata, delivering a public protocol where generalization difficulty is indexed by physical and institutional distance rather than by database identity alone, closing the gap noted in the cross-institutional literature that arbitrary leave-one-institution-out splits fail to index the distance between sites.
The prospective design is deliberately phased, copying the structure of the Hungarian Mia rollout, which moved from single-center pilot to multicenter pilot to live rollout across 28,811 women and showed that value came from an arbitration workflow — the AI read only cases where two human experts agreed on normal — costing just 4–6% additional reading workload Prospective implementation of AI-assisted screen reading to improve early detection of breast cancer. Our phases are in vitro rather than clinical: in phase one, DC-TCR ranks candidate clonotypes from a single center's fresh patient-derived repertoire, and peptide–MHC multimer staining assays prospectively measure which top-ranked clonotypes actually bind, together with cross-reactive false positives against the uncurated repertoire — the live-stream analogue of TRAP's healthy-donor false-positive measurement. Phase two replicates across additional centers with different sequencing pipelines. Phase three embeds the model as an assistive filter in a therapeutic TCR-selection workflow for adoptive cell transfer, where immunologists arbitrate only discordant candidates, and we measure the human verification workload and downstream safety profile explicitly — the immune-receptor version of Mia's 0.23% unnecessary-recall accounting. We are explicit that the funded scope is the protocol, phase one, and phase-two design: a live therapeutic trial is beyond a single proposal, and the sepsis-alerting literature shows why the workflow design must precede deployment, since high offline accuracy with poor alert thresholds led clinicians to abandon the system entirely Paper.
Baselines
The naive reference point is the single-chain CDR3β model: a shallow one-dimensional CNN over BLOSUM50-encoded sequences, exactly the NetTCR_b configuration of NetTCR-2.0, which reports an AUC of 0.79 on its in-house cohort while the paired NetTCR_aβ reaches 0.89. This baseline matters because it defines what chain pairing alone buys; anything we build must at least match the paired 0.89 on conventional splits before its robustness claims are worth discussing. It will be trained on identical data with the same tuning budget as every other model.
The strongest competitor is TRAP TRAP: a contrastive learning-enhanced framework for robust TCR–pMHC binding prediction with improved generalizability, because it is the only prior work that both diagnoses shortcut learning in this exact task and reports the strongest robustness-oriented numbers on the same combined-database corpus: a random-split AUC of 0.92 with AUPR of 0.84 (a 22% improvement over the second-best model), an unseen-epitope AUC of 0.75 (nearly 11% higher than the second-best model), and the healthy-donor false-positive reduction from 43.2% to 13.2% for YVLDHLIVV. We will run TRAP's released configuration on our crossed splits with matched compute and tuning. Beating it means a higher shortcut-robust AUC under provenance-decoupled and structure-distance-stratified splits at matched or better random-split AUC, plus a lower cross-reactive false-positive rate on prospectively assayed patient repertoires — because a win on robust splits alone could still fail the live test that matters. A second strong competitor is TCR-EML TCR-EML: Explainable Model Layers for TCR-pMHC Prediction, with its ROC-AUC of 0.999 on top-100 unseen peptides against MixTCRpred at 0.906 and TULIP at 0.821; it is the architectural ancestor of our contact layers, and retraining it on our corpus under our splits is the cleanest way to test whether its extraordinary retrospective score survives provenance decoupling. Its published baselines give us the comparison numbers to hold constant. Finally, the critical ablations are DC-TCR minus the backdoor adjustment (contact supervision alone) and minus the contact supervision (adjustment alone), which isolate which ingredient carries robustness; Saab's results predict the binary-label-only version should collapse toward the 0.46 robust AUROC regime when the shortcut is broken, and our ablations test exactly that transfer.
Why not just…?
Why not just rebalance the negative samples, as TRAP already does? This is the most serious alternative, because TRAP's unified negative sampling already halved the healthy-donor false-positive problem. But the medical-imaging evidence is directly against sufficiency: models trained on rebalanced binary labels still fell below random guessing when the spurious marker was decoupled, and only spatial supervision restored robust AUROC from 0.46 to 0.82 Reducing Reliance on Spurious Features in Medical Image Classification with Spatial Specificity. Our experiment settles it empirically: we run TRAP's sampling strategy as a baseline under our provenance-decoupled splits. If TRAP's robustness holds there, the rebalancing alternative wins and we will report that; if it degrades while DC-TCR does not, the architectural claim is supported.
Why not just pool data from all databases and institutions? The cross-institutional literature shows pooling helps but does not finish the job: pooled multi-site pathology models still latched onto staining and scanner artifacts, and adding the backdoor adjustment on top of pooling was worth a further +6.36% AUC on Camelyon16 Interventional Bag Multi-Instance Learning On Whole-Slide Pathological Images, while pooled chest-radiograph models still showed a 0.94-versus-0.77 gap between strata with and without the chest-drain shortcut Hidden stratification causes clinically meaningful failures in machine learning for medical imaging. Pooled-only training is one of our baselines, so the comparison is built in rather than argued around.
Why not just stick to single-chain β models trained on the much larger bulk-sequencing corpora? NetTCR-2.0 tested precisely this trade and found data quality beats volume: the paired model reached 0.89 versus 0.79 for the single-chain model on the identical cohort NetTCR-2.0 enables accurate prediction of TCR-peptide binding by using paired TCRα and β sequence data, and structural analysis confirms the α chain contributes comparable contact complexity T-cell receptor structures and predictive models reveal comparable alpha and beta chain structural diversity despite differing genetic complexity. The honest residual risk is that paired data's scarcity makes it more prone to provenance shortcuts than the bulk corpora; our audit will report the shortcut-robust AUC of single-chain models trained on bulk data alongside the paired models, so if single-chain bulk models turn out more robust, that result stands.
Why not just do stricter retrospective validation — unseen-epitope and distance splits — and skip the prospective part? Because the retrospective-prospective gap literature is a catalog of exactly this failure: near-perfect offline metrics that did not translate into clinical value, from legacy CAD systems that were abandoned for false-alarm burden to sepsis alerts whose high offline accuracy changed no therapeutic trajectories Paper, while only the phased prospective design established genuine incremental benefit — 0.7 to 1.6 additional cancer detections per 1,000 cases at 0.23% unnecessary recalls Prospective implementation of AI-assistant screen reading to improve early detection of breast cancer. TCR-EML's 0.999 retrospective AUC is precisely the profile that should be suspected, not trusted; the prospective multimer-staining phases are what convert a benchmark claim into a usable one.
Proposed Experiments and Decisive Checks
Experiment one is the audit itself. We train or retrain the four architectures — NetTCR-2.0, TSpred (which reports a mean ROC-AUC of 0.857 and PR-AUC of 0.662 on the NetTCR_full benchmark of 26 peptides and 6,353 positive pairs), TRAP, and TCR-EML — on the combined paired corpus and report stratum-wise AUC under provenance, assay, clonal-frequency, and HLA stratification. The audit succeeds as a contribution regardless of outcome: if stratum gaps exceed roughly 0.05 AUC anywhere, we have documented a new clinically meaningful shortcut; if no model shows gaps, that is a negative result that materially strengthens confidence in the current evaluation culture and we will publish it as such. No reported result found on Lacuna for provenance-stratified performance of any paired TCR model, which is why this is an audit rather than a re-analysis.
Experiment two is the robustness comparison. All models run on identical data, compute, and tuning budget, evaluated on the crossed protocol: provenance-decoupled splits × structure-distance bins (RMSD-based, extending the single-chain Distance Split result that AUROC decreases significantly with structural distance while sequence-similarity splits disguise it — the paired-data version has no reported result on Lacuna) × HLA strata. Metrics are shortcut-robust AUC, unseen-epitope AUC (the number to beat is TRAP's 0.75), and distance-binned AUROC retention. Experiment three is the physical-faithfulness check: the predicted-contact supervision must not degrade binding-region recovery, measured as Binding Region Hit Rate against the 274 TCR-XAI crystal contacts, with TCR-EML's 0.71 as the reference level; a model that wins robust splits by ignoring geometry entirely would fail this check and be rejected.
Experiment four is the prospective pilot. On fresh patient-derived repertoires from one center, DC-TCR and TRAP rank candidate clonotypes for a set of target peptides; multimer staining assays measure realized positive-predictive value and cross-reactive false-positive rates against the uncurated repertoire, with TRAP's 13.2% healthy-donor false-positive rate for YVLDHLIVV as the retrospective number the prospective measurement must be compared against. The decisive checks are stated in advance: the core claim fails if the audit finds no provenance shortcut; it fails if TRAP under rebalancing matches DC-TCR on the crossed splits; and it fails if prospective cross-reactivity bears no relation to shortcut-robust AUC, which would mean our robustness metric is itself a shortcut-prone retrospective proxy. Conversely, a model that retains performance where provenance is decoupled, keeps contact-level physical fidelity, and ranks clonotypes that a live assay confirms — at an arbitration workload immunologists can actually absorb — is the first paired TCR model whose number means what a clinician needs it to mean.
References
- Hidden Stratification Causes Clinically Meaningful Failures in Machine Learning for Medical Imaging
- TCR-EML: Explainable Model Layers for TCR-pMHC Prediction
- Prospective implementation of AI-assisted screen reading to improve early detection of breast cancer
- Automated segmentation and diagnosis of pneumothorax on chest X-rays with fully convolutional multi-scale ScSE-DenseNet: a retrospective study
- TRAP: a contrastive learning-enhanced framework for robust TCR–pMHC binding prediction with improved generalizability
- Reducing Reliance on Spurious Features in Medical Image Classification with Spatial Specificity
- Interventional Bag Multi-Instance Learning On Whole-Slide Pathological Images
- NetTCR-2.0 enables accurate prediction of TCR-peptide binding by using paired TCRα and β sequence data
- T-cell receptor structures and predictive models reveal comparable alpha and beta chain structural diversity despite differing genetic complexity
- Assessing the generalization capabilities of TCR binding predictors via peptide distance analysis
- Creating an automated trigger for sepsis clinical decision support at emergency department triage using machine learning
- Foundation versus domain-specific models for left ventricular segmentation on cardiac ultrasound