EpiFormer: Learning Antigen-Antibody Interactions for Epitope Prediction via Geometric Deep Learning
Letting antigen and antibody inform each other at every encoder layer, rather than only at the output, lifts epitope-prediction F1 on AsEP from 0.337 to 0.482, and the gain holds across GNN backbones.
Georgia State University and Georgia Institute of Technology · Georgia State University
arXiv preprint arXiv:2606.04154
Antibody-aware epitope predictors encode each chain alone and fuse them late, and the task’s extreme class imbalance defeats standard training objectives. EpiFormer interleaves bidirectional cross-attention inside the GNN encoder and pairs it with sparsity-aware losses. On the AsEP benchmark of 1,721 complexes it leads all 20 baselines on every primary metric, and its learned gates rediscover that the antibody adapts to the antigen more than the reverse.
Abstract
Antibodies neutralize foreign antigens by binding to specific surface regions called epitopes. Computational epitope prediction is critical for understanding immune recognition and guiding antibody engineering. However, existing methods face three fundamental challenges: antibody-aware models encode each chain independently and combine them only at a late stage, failing to capture co-dependent structural features that define binding interfaces, whereas severe class imbalance and scarcity of known antibody-antigen complexes render standard training objectives ineffective. We propose EpiFormer, a general encoder-decoder framework that addresses these challenges jointly. Our key design principle is interleaved cross-attention within GNN encoding layers, enabling bidirectional antigen-antibody information flow throughout representation learning rather than only at the output. This early-fusion principle is backbone-agnostic, providing consistent gains across GNN architectures from simple GCNs to equivariant models. We further show that sparsity-aware objectives are effective when paired with early-fusion architectures for the epitope prediction task. EpiFormer improves over the previous best method by over 40% in F1 score on standard benchmarks, demonstrating generalizability and cross-dataset transferability. Notably, EpiFormer discovers known biological principles as emergent behaviors of end-to-end training, where the learned cross-attention gates favor antigen-to-antibody information flow, consistent with the asymmetric roles of the two chains at the binding interface, and the model's preference for geometric over evolutionary features aligns with the established finding that epitope residues are not evolutionarily conserved.
Contributions
A backbone-agnostic early-fusion framework: interleaved bidirectional cross-attention inside the GNN encoder, so antigen and antibody representations inform each other at every layer rather than only in the decoder.
An architecture–loss co-design principle: sparsity-aware objectives (Dice, count regularisation, bipartite edge prediction, distance supervision) built for class imbalance and data scarcity, which help early-fusion models and can hurt late-fusion ones.
Evidence that compact geometric features outperform high-dimensional protein-language-model embeddings for epitope prediction, and that the learned cross-attention gates expose a consistent antigen–antibody asymmetry.
0.482
F1 on AsEP, against 0.337 for the next-best method
20
Baselines across five categories, all retrained on AsEP
0.786
Mean zero-shot AUC on three external benchmarks
The problem
Late fusion misses the binding interface
F1 on the AsEP epitope-ratio split, mean of three seeds. Baselines were retrained on AsEP with their published configurations.
1,721
Antibody–antigen complexes in AsEP after preprocessing
0.720 / 0.363
Recall and precision, balanced where WALLE trades 0.114 precision for 0.926 recall
0.890
Mean AUC on the external benchmarks after leave-one-dataset-out fine-tuning
Findings
0.482
F1 on AsEP, epitope-ratio split
EpiFormer leads all 20 baselines on every primary metric; the next-best antibody-aware method, MIPE, reaches 0.337 F1.
AUC 0.924, AUPRC 0.493, MCC 0.464, mean of three seeds. On the harder epitope-group split, where test epitopes never appear in training, it holds 0.826 AUC and 0.305 F1.
0.447
F1 with a plain GCN encoder
The gain comes from the interleaved cross-attention, not the backbone: swapping the equivariant encoder for a plain GCN still beats every baseline.
On top of that, equivariance adds +0.018 F1, multi-relational edges +0.012, and learned coordinate updates +0.017.
+0.146
F1 from the sparsity-aware losses
The auxiliary losses lift EpiFormer from 0.336 F1 with plain cross-entropy to 0.482, yet raise F1 for only three of six late-fusion baselines and lower it for the other three.
Loss and architecture have to be designed together: the same objectives that help an early-fusion model can hurt a late-fusion one.
0.924 vs 0.889
AUC with geometric vs language-model features
Geometric features beat protein-language-model embeddings inside EpiFormer, while baselines that lean on those embeddings drop by up to 0.133 AUC without them.
Consistent with epitope residues not being evolutionarily conserved. The learned gates also favour antigen-to-antibody flow in every encoder block, matching the adaptive role of the antibody’s CDR loops.
How it was done
Approach
Encoder–decoder GNN with interleaved bidirectional cross-attention (EGNN-R backbone) and a joint sparsity-aware objective
Datasets
AsEP (1,721 antibody–antigen complexes; epitope-ratio and epitope-group splits); SAbDab, CoV-AbDab, and ANABAG for transfer
Measures
AUC, AUPRC, F1, MCC, precision, and recall, mean of three seeds
BibTeX
Mansoor Ahmed, Huirong Chai, Haoxin Wang, Hemanth Venkateswara, and Murray Patterson (2026). EpiFormer: Learning Antigen-Antibody Interactions for Epitope Prediction via Geometric Deep Learning. arXiv preprint arXiv:2606.04154. https://doi.org/10.48550/arXiv.2606.04154
@misc{ahmed2026epiformer,
title = {EpiFormer: Learning Antigen-Antibody Interactions for Epitope Prediction via Geometric Deep Learning},
author = {Mansoor Ahmed and Huirong Chai and Haoxin Wang and Hemanth Venkateswara and Murray Patterson},
booktitle = {arXiv preprint arXiv:2606.04154},
year = {2026},
doi = {10.48550/arXiv.2606.04154},
url = {https://arxiv.org/abs/2606.04154}
}Publications