All projects
Machine learningOct 2026 · London AI × Science hackathon · Team of 2

PepShield

Peptide–HLA stability, predicted with a calibrated interval.

PyTorch models trained on 28,166 stability measurements across 75 HLA alleles. I rebuilt the evaluation after finding a 93% train/test leak, compared three ways to encode an allele, and shipped a live app with conformal 90% intervals.

sarah04menla--pepshield.modal.run
The deployed PepShield app: peptide GLYGNGILV on HLA-A*02:01, predicted stability 10.3 hours with a 90% interval of 5.0 to 21.2 hours, beside a rendered HLA protein.
The live app: 10.3 h predicted, with its 90% interval.
RoleDeveloper 1: data, evaluation, models and uncertainty
TeamTeam of 2
WhenOctober 2026, one hackathon weekend
Built withPyTorch, Streamlit, Modal
01

Skills it shows

Leakage-aware evaluation

Found the same peptide in train and test for about 93% of random-split test rows, then built peptide-, similarity-clustered and allele-held-out splits.

Controlled experiments

Compared three allele encodings in one fixed network. Frozen ESM-2 lost to the allele-name baseline on unseen peptides (Spearman 0.54 vs 0.64).

Uncertainty quantification

A 5-model ensemble with split-conformal 90% intervals, reaching about 90% coverage on unseen peptides.

ML deployment

Served on Modal as a Streamlit app. On an unseen allele the spread stopped tracking error, so the app withholds the interval there.

02

Problem, build, result

1Problem

Whether a T cell ever sees a target depends on how long the peptide–HLA complex holds together. Lab measurement is slow, and models usually give one number with no error bar.

2What I built

One unchanged MLP for every experiment, so differences come from the features: allele name, ESM-2, and 34 groove-contact residues. Then an ensemble with conformal intervals, behind an API.

3Result

A deployed predictor with about 90% interval coverage on unseen peptides. Only the groove-contact encoding ranked an unseen allele above chance (Spearman 0.15, 95% CI 0.05–0.25).

28,166stability measurements
~93%train/test leak found and fixed
0.64Spearman on unseen peptides
~90%coverage of the 90% interval
03

In pictures

Select any image to see it larger.

A well-supported pair: 1.1 h, interval 0.1–5.6 h.
An allele outside the 75: a prediction, but no interval.
Does disagreement track error? Not on a new allele.
Dropping the least certain predictions lowers the error.
04

Tech stack

Tools and data
PythonPyTorchscikit-learnNumPypandasSciPyMatplotlibStreamlitModalCursorGitHubESM-2
Methods
Conformal predictionDeep ensemblesLeakage-aware splitsSpearman correlation