OmniTCR: a foundation model unifying T cell receptor recognition prediction and conditional sequence generation
Abstract
T cell receptor (TCR) recognition prediction and receptor generation are traditionally modelled separately, leaving vast TCR sequence collections disconnected from smaller TCR–peptide–MHC datasets. Here we present OmniTCR, a 113-million-parameter autoregressive foundation model pretrained on 328 million formatted human immune-sequence records. Sequence-type tokens and complementary component orders enable joint learning from individual TCR chains and partial or complete TCR–pMHC associations. On unseen epitopes, OmniTCR achieved AUPRCs of 0.7009 for peptide– TCRβ recognition and 0.8235 for TCR–pMHC interaction prediction, exceeding the strongest evaluated comparators by 0.3396 and 0.3451, respectively. It distinguishes cancer from healthy repertoires across 11 independent pan-cancer cohorts (mean AUROC, 0.9436). The model achieved the highest sequence recovery on internal and external generation benchmarks. Structural modelling supported the plausibility of selected pMHC-conditioned CDR3β candidates. OmniTCR bridges heterogeneous immune sequence data, providing a foundation for computational immunology and receptor design.