Using H.E.R.D.

A practical guide to running HERD, understanding its models, reading the performance metrics, and choosing a decision threshold for host-aware protein immunogenicity prediction.

15host species (6 core + 9 auxiliary)
ESM-2 650M1,280-D protein embedding
0.916integrated pooled AUROC
23 / 24licensed vaccine antigens recovered

What HERD predicts

HERD (Host-aware Estimation of antigen immunogenicity and Ranking through Deep-learning) predicts, for a given protein and a chosen host species, the probability that the protein is immunogenic in that host. Unlike host-agnostic tools that assign one score per protein, HERD models immunogenicity as a protein-intrinsic signal shaped by the host in which it is evaluated.

It is trained on curated, protein-level, host-resolved immunogenicity data (manual literature curation + IEDB B-cell records), with length-matched, homology-filtered negatives so the classifier cannot exploit trivial sequence cues. Predictions can be used to prioritise and rank antigen candidates for reverse-vaccinology pipelines across veterinary and human hosts.

Three ways to run HERD

Web

Quick prediction

Submit sequences in the browser and get per-protein immunogenicity scores in minutes. No install.

Live on Hugging Face
Cloud

Google Colab

Run batches in a pre-configured notebook with a GPU backend.

Coming soon
Local / HPC

Install & CLI

Deploy on your machine or cluster for large-scale scoring.

Coming soon

Web tool — step by step

  1. Open the immunoHERD Space on Hugging Face.
  2. Paste one or more protein sequences in FASTA format (or upload a FASTA file).
  3. Select the host species whose immune context you want to model.
  4. Run the prediction and read the immunogenicity probability returned for each sequence.
  5. Rank your candidates by score, or apply a cutoff (see Decision threshold).

What goes in, what comes out

Input

  • Format: protein sequences in FASTA (amino-acid, single-letter).
  • Length: sequences shorter than 40 residues are outside the training regime; sequences longer than 1,022 residues are truncated before encoding.
  • Residues: non-canonical residues / chemical modifications are not supported.

Output

  • A probability in [0, 1] per protein for the selected host — higher means more likely immunogenic.
  • Use the raw score to rank candidates, or a threshold to get a binary immunogenic / non-immunogenic call.

How the models are built

Every protein is first turned into features by a protein language model; those features then feed the predictors.

Protein representation — ESM-2

Each sequence is encoded with ESM-2 (esm2_t33_650M_UR50D, 650M parameters, 33 layers). The final-layer per-residue vectors are mean-pooled into a single 1,280-dimensional embedding per protein, which is the input to all downstream models.

Individual (host-specific) models

One model per core host: a multilayer perceptron over the 1,280-D embedding — a normalization layer, three fully connected layers (1,024 → 256 → 64 ReLU units, dropout after the first two) and a sigmoid output. Trained with Adam + binary cross-entropy, class weighting, and early stopping; dropout and learning rate tuned with Optuna (objective: validation AUROC).

Integrated (pan-species) model

A single network with a shared trunk (1,024–256–64) feeding one sigmoid head per host; the host identity selects its head. Joint training lets hosts share cross-species immunogenicity signal while keeping host-specific decision functions. It is trained on 15 hosts — the 6 core hosts plus 9 additional IEDB-only species — with a tunable per-host weighting so large datasets do not dominate.

Recommended: the integrated model matched or improved every core host versus its individual model (no AUROC decrease), so it is the default choice. The largest gain was for the hardest host, Bos taurus (AUROC 0.776 → 0.826).

Auxiliary models (the 9 additional heads)

Nine extra species were mined from IEDB and added primarily to broaden the shared antigen repertoire seen by the trunk — they were not used for model selection, hence "auxiliary". In practice their heads still classify accurately (AUROC 0.86–0.96), so several are usable predictors in their own right for additional hosts of applied interest (e.g. Capra hircus 0.900, Ovis aries 0.859).

Hosts covered

Core hosts (curated + IEDB, used for model selection)

HumanHomo sapiens BovineBos taurus PorcineSus scrofa AvianGallus gallus CanineCanis sp. EquineEquus caballus

Auxiliary hosts (IEDB-only, additional heads)

Camelidae Capra hircus Cavia porcellus Macaca sp. Mus musculus Non-human primate Oryctolagus cuniculus Ovis aries Rattus sp.

Metrics

Discrimination is threshold-independent (AUROC, AUPRC); at the default 0.5 threshold we also report precision, recall, F1, Matthews correlation coefficient (MCC) and balanced accuracy. All values are pooled out-of-fold predictions from homology-aware nested cross-validation.

Individual models — nested cross-validation

Table 2. Species-specific model performance (homology-aware nested CV, out-of-fold). N+ / N− = positives / negatives.
HostN+N−AUROCAUPRCPrec.RecallF1MCCBal.acc.
Homo sapiens356234730.9160.9290.8930.7860.8360.6930.845
Bos taurus4414410.7760.7670.7140.7010.7070.4200.710
Sus scrofa5285280.8470.8470.7910.7410.7650.5470.773
Gallus gallus4604600.8300.8300.7820.7480.7640.5400.770
Canis sp.3383380.7940.7900.7600.6360.6920.4410.717
Equus caballus3353350.8960.8530.8130.8690.8400.6700.834
Generalisation to unseen pathogens — LOPO (Table 3)
Leave-one-pathogen-out CV: each source genus withheld in turn. Discrimination largely preserved (AUROC 0.74–0.90); loss largest where training spans few genera.
HostAUROCAUPRCPrec.RecallF1MCCBal.acc.Pathogens
Homo sapiens0.8970.9160.8960.7470.8150.6660.82966
Bos taurus0.7840.7860.7170.7260.7220.4400.72016
Sus scrofa0.8060.8060.8010.7230.7600.5460.77215
Gallus gallus0.7440.7410.7150.6040.6550.3670.6828
Canis sp.0.7400.7370.7360.6040.6630.3940.6949
Equus caballus0.8550.8080.7710.8120.7910.5710.78510

Integrated (pan-species) model

Under the same nested-CV framework the integrated model matched or improved all six core hosts. Across all 15 species it reached a pooled AUROC 0.916 (AUPRC 0.922): 0.902 for the six core species and 0.929 for the nine auxiliary species. Some of the smallest auxiliary heads were among the best (Macaca sp. n=248, AUROC 0.963; Cavia porcellus n=124, AUROC 0.959).

Individual → integrated, selected hosts (values reported in the manuscript).
HostAUROC (indiv.)AUROC (integ.)MCC (indiv.)MCC (integ.)
Bos taurus0.7760.8260.4200.520
Homo sapiens0.9160.9270.6930.725
Benchmark vs other predictors — veterinary hosts (Table 4)
Table 4. HERD vs runnable external tools (host-specific nested CV, out-of-fold). Best value per host & metric in teal.
HostMethodPrec.RecallF1MCC
Bos taurusHERD (integrated)0.7990.6870.7390.520
HERD (individual)0.7140.7010.7070.420
IApred0.6910.6530.6710.361
Vaxign-ML0.5880.5800.5840.173
Sus scrofaHERD (integrated)0.8310.7180.7700.577
HERD (individual)0.7910.7410.7650.547
IApred0.6660.5360.5940.272
Vaxign-ML0.5860.4410.5030.131
Gallus gallusHERD (integrated)0.7850.7480.7660.544
HERD (individual)0.7820.7480.7640.540
IApred0.5610.5830.5710.126
Vaxign-ML0.6270.2040.3080.107
Canis sp.HERD (integrated)0.7650.7020.7320.488
HERD (individual)0.7600.6360.6920.441
IApred0.6430.5620.6000.252
Vaxign-ML0.6670.2530.3670.161
Equus caballusHERD (integrated)0.8290.7970.8130.633
HERD (individual)0.8130.8690.8400.670
IApred0.6820.6720.6770.358
Vaxign-ML0.6530.2720.3840.242

Independent external benchmark (iBPA)

On the third-party iBPA bacterial protective-antigen set (131 positives / 115 negatives), under each method's native threshold, the integrated HERD model ranked first overall and is the best sequence-only predictor — matching a structure-based method without needing protein structures.

Table 5. Independent iBPA benchmark. Best value per metric in teal.
MethodInputPrec.RecallF1MCC
HERD (integrated)Sequence0.8320.7940.8120.610
PLGDLSeq + structure0.8000.8400.8200.600
HERD (individual)Sequence0.7920.7860.7890.551
Vaxign-MLSequence0.7500.8100.7600.510
Vaxign-DLSequence0.7300.8300.7400.490
Vaxi-DLSequence0.6700.9200.7000.460
IApredSequence0.7130.8170.7620.453
VaxiJen3Sequence0.7100.7800.7100.420
VaxiJenSequence0.6800.6900.6600.320
VaxignSequence0.7900.3200.5600.270

Recovery of licensed vaccine antigens

As a real-world positive control, the final pan-species model scored 24 antigens from licensed/commercial vaccines across the six core hosts. HERD recovered 23 of 24 (95.8%) as immunogenic, mean predicted probability 0.914. Per-host recovery was 100% for all hosts except Canis (4/5). The single miss was Protein Q of LETIFEND (0.378), an engineered maltose-binding-protein fusion outside the natural antigen sequence space.

Homo sapiensmean 0.993 Bos taurusmean 0.880 Sus scrofamean 0.997 Gallus gallusmean 0.891 Canis sp.mean 0.869 Equus caballusmean 0.922
Full antigen panel (Table 6)
HostPathogen (example vaccine)AntigenScore
Homo sapiensHPV-16 (Gardasil/Cervarix)L1 major capsid (VLP)0.999
Homo sapiensHBV (Engerix-B/Recombivax)HBsAg (S protein)1.000
Homo sapiensC. tetani (DT/Td/DTaP)Tetanus toxoid0.980
Bos taurusBVDV-1 (DIVENCE)E2 glycoprotein0.840
Bos taurusBVDV-2 (DIVENCE)E2 glycoprotein0.893
Bos taurusR. microplus (Gavac/TickGARD)Bm860.963
Bos taurusRhipicephalus sp. (NORAVAC)Subolesin0.822
Sus scrofaPCV2 (CircoFLEX/Circovac/Porcilis)ORF2 capsid1.000
Sus scrofaCSFV (Porcilis Pesti/Bayovac)E2 glycoprotein0.995
Gallus gallusAIV H5N1 (VOLVAC B.E.S.T.)Hemagglutinin H50.980
Gallus gallusIBDV (YEBIO VP2)VP20.887
Gallus gallusFAdV-4 subunitFiber-20.952
Gallus gallusEDSV (Pulike multivalent)Truncated Fiber (tFiber)0.747
Canis sp.L. infantum (Leish-Tec)A20.989
Canis sp.B. burgdorferi (Vanguard/Nobivac Lyme)OspA0.991
Canis sp.B. burgdorferi (Vanguard/Nobivac Lyme)OspC0.991
Canis sp.B. burgdorferi B31 (Vanguard crLyme)OspA (B31)0.996
Canis sp.L. infantum (LETIFEND)Protein Q (MBP-fusion)0.378
Equus caballusC. tetani (Equilis Tetanus)Tetanus toxoid0.927
Equus caballusS. equi (STRANGVAC)Eq85 fusion0.954
Equus caballusS. equi (STRANGVAC)CCE fusion0.896
Equus caballusS. equi (STRANGVAC)CNEEAG fusion0.886
Equus caballusS. equi (STRANGVAC)IE5 fusion0.927
Equus caballusS. equi (STRANGVAC)CPCE fusion0.944

Choosing & adjusting the threshold

HERD returns a probability, not a hard label. The reported classification metrics use a default decision threshold of 0.5: scores above are called immunogenic, below non-immunogenic. AUROC and AUPRC do not depend on this choice.

How to move it

  • Raise the threshold (e.g. 0.7–0.9) → higher precision, fewer false positives. Best when you can only take a short list of candidates forward to the lab.
  • Lower the threshold → higher recall, fewer missed immunogens, at the cost of more false positives.
  • Just rank — for prioritisation you often don't need a cutoff at all; sort candidates by score and take the top N.

Reading a score & caveats

  • A score is the estimated probability of humoral immunogenicity in the selected host — the principal correlate of protection for most licensed vaccines, and for T-dependent protein antigens it generally implies concomitant CD4⁺ T-helper recognition.
  • Immunogenicity ≠ protection. A high score flags a promising candidate, not a guaranteed protective antigen.
  • Host matters: the same protein can score differently across hosts by design. Pick the host that matches your application.
  • Engineered / chimeric sequences (fusion constructs, artificial linkers) may fall outside the natural antigen space and score low even when protective (e.g. the LETIFEND Protein Q fusion).

Citation & contact

Manuscript in preparation — citation details will be updated after publication.

HERD: A pan-species, host-aware deep learning framework for protein immunogenicity prediction.
Isidro Sobrino · Noelia Vallez Enano · Gloria Bueno · Margarita Villar · José de la Fuente

Questions about the models, the data or running the tool:
isidro.sobrino@uclm.es

› Launch immunoHERD