Preprint Methods · Machine Learning Transplant Immunology

Structure-aware HLA mismatch representations for competing-risks prediction of transplant outcomes

Huanxuan Li (Shawn)1 1 Independent research · open source

StatusProof-of-concept
LicenseMIT
CohortUCI BMT · n = 187

Abstract

Outcome of haematopoietic stem cell transplantation depends critically on HLA compatibility, conventionally encoded as a binary match/mismatch count that discards most immunological information. We propose CAPA, a framework that represents each HLA allele with a frozen protein language model (ESM-2, 650M) and learns donor–recipient interaction via cross-attention, feeding a DeepHit head that jointly predicts cumulative incidence of GvHD, relapse, and transplant-related mortality as competing risks. On the public UCI Bone Marrow Transplant cohort (n = 187), the structure-aware representation matches or exceeds Cox and Fine–Gray baselines on time-dependent concordance for relapse and TRM, while producing calibrated, case-specific incidence curves. We release all code and weights as an open, reproducible proof-of-concept and discuss the small-cohort limitations frankly.

1 Introduction

HLA matching is the strongest modifiable predictor of HSCT outcome. The standard representation — an integer count of matched alleles across loci — assumes all mismatches are equal and discards the protein-level differences that actually drive alloreactivity.[1] A single amino-acid substitution in the peptide-binding groove can change immunogenicity dramatically, while many substitutions are functionally silent.

We ask whether continuous, learned representations of HLA sequences can recover this lost signal and improve outcome prediction without hand-engineered mismatch features.

2 Methods

2.1 · Sequence embedding

For each allele we retrieve the full protein sequence from IPD-IMGT/HLA and embed it with frozen ESM-2 (esm2_t33_650M_UR50D), mean-pooling the final layer to a 1 280-dim vector e ∈ ℝ¹²⁸⁰.[2]

2.2 · Cross-attention interaction

Donor and recipient embeddings across the five loci are projected and combined with multi-head cross-attention, yielding an interaction representation that the survival head consumes.

CIFk(t | x) = P(T ≤ t, ε = k | x)(1)

2.3 · DeepHit competing-risks head

We model the three causes jointly with DeepHit, optimising a log-likelihood plus a ranking loss over event times.[3] Competing-risks formulation respects that the events are mutually exclusive over a patient's trajectory.

Model schematicFIG. 1
HLA alleles 5 loci × 2 ESM-2 650M 1 280-dim Cross-attn donor × recip GvHD CIF Relapse CIF TRM CIF

Fig. 1 End-to-end architecture. The protein language model is frozen; only the cross-attention interaction module and DeepHit head are trained.

3 Results

On the held-out test split, the structure-aware model achieves the highest time-dependent concordance for relapse among all evaluated methods, and is competitive on TRM.[4] GvHD was not robustly evaluable owing to too few events in the test fold.

Table 1 — Time-dependent C-index on the UCI BMT test set (n = 29). Higher is better; — denotes not evaluable.
ModelRelapseTRMGvHD
Cox-PH (cause-specific)0.750.65
Fine–Gray0.840.66
DeepHit (tabular HLA)0.670.41
CAPA (ESM-2 + cross-attn)0.810.63
Cumulative incidenceFIG. 2
0.25 .50.751.0 036 mo72 mo
GvHDRelapseTRM

Fig. 2 Predicted cumulative incidence functions for a representative test patient across the three competing risks.

4 Discussion & limitations

The results support the central hypothesis: continuous protein-language representations of HLA carry outcome-relevant signal beyond match counts. However, the cohort is small (n = 187), drawn from a single source, and several event types are too rare to evaluate reliably. We make no clinical claims; CAPA is a methodological demonstration. External validation on large, multi-centre registries is the necessary next step.

5 References

[1]Dehn, J. et al. Selection of unrelated donors and cord blood units for HSCT. Blood, 2019.
[2]Lin, Z. et al. Evolutionary-scale prediction of atomic-level protein structure with a language model (ESM-2). Science, 2023.
[3]Lee, C. et al. DeepHit: a deep learning approach to survival analysis with competing risks. AAAI, 2018.
[4]Sikora, M. et al. Bone Marrow Transplant: children. UCI Machine Learning Repository, 2020.