ImmuneFM: Pre-training Foundation Model from Cytometry Data for Immunology Research

Sirui Ding, Sanchita Bhattacharya, Atul J. ButtebioRxiv 2025

Abstract

Immunology is a cornerstone of modern biomedicine, influencing oncology, vaccine development, and infectious disease research. Despite the proliferation of cytometry data, the field lacks standardized, AI-ready datasets, and individual studies often suffer from small sample sizes and a lack of labels. We present ImmuneFM, a Transformer-based foundation model pre-trained on a curated dataset of over 100 million single cells from the ImmPort portal. By employing a masked regeneration task, ImmuneFM learns generalized representations of immune cell biology. Our experiments across eight downstream tasks—ranging from COVID-19 diagnosis to cancer staging—demonstrate that ImmuneFM significantly outperforms traditional machine learning and standard deep learning approaches, particularly in label-scarce environments.

Introduction

The field of immunology is currently "data-rich but label-poor." While high-dimensional cytometry allows for the measurement of dozens of protein markers on millions of individual cells, this data is frequently siloed across disparate studies. The lack of standardized protocols makes it difficult to aggregate these datasets into a cohesive corpus for training large-scale artificial intelligence models. Consequently, researchers often rely on manual gating or basic machine learning methods that struggle to capture the complex, non-linear relationships inherent in immune responses.

To address these challenges, we introduce ImmuneFM, a foundation model designed to bridge the gap between massive unlabeled cytometry data and specific clinical applications. By leveraging the "pre-train and fine-tune" paradigm, ImmuneFM provides a robust framework for immunology research that overcomes the limitations of small-cohort studies.

Methodology

Data Curation and Standardization

The foundation of ImmuneFM is a massive, AI-ready dataset curated from the publicly available ImmPort portal. We integrated 53 independent studies, encompassing 203 common protein markers (e.g., CD4, CD8, CD14). To handle the technical variability between studies, we applied arcsinh transformation and binning, converting raw fluorescence intensities into discrete integer representations suitable for processing by a Transformer architecture.

Architecture: The Immune Transformer

ImmuneFM utilizes a Transformer backbone tailored for single-cell data. Unlike Natural Language Processing (NLP) models, ImmuneFM discards positional embeddings. In cytometry, the order of markers in a panel does not convey biological meaning; thus, the model treats the markers as an unordered set, focusing entirely on the relationships between protein expressions within a single cell.

Pre-training and Fine-tuning

The model underwent self-supervised pre-training on 100 million unlabeled cells using a masked regeneration task. During this phase, the model was tasked with predicting the values of randomly masked markers based on the context provided by the remaining markers. This process forces the model to learn the underlying biological "grammar" of immune cells.

For downstream applications, ImmuneFM is fine-tuned using a task-specific Multi-Layer Perceptron (MLP) head. Individual cell embeddings are aggregated via mean pooling to create a sample-level representation, which is then used for clinical diagnosis or disease staging.

Results and Discussion

Performance Across Downstream Tasks

We evaluated ImmuneFM on eight diverse downstream tasks, including COVID-19 severity prediction, HIV diagnosis, liver cancer staging, and peanut allergy prediction. ImmuneFM consistently outperformed three major baselines:

  1. DeepCNN: A standard convolutional approach.
  2. Vanilla Transformer: The same architecture trained from scratch without pre-training.
  3. FlowSOM+GBDT: A traditional pipeline combining clustering with Gradient Boosted Decision Trees.

The results confirmed that while a standard Transformer performs poorly on small clinical datasets, the pre-trained ImmuneFM achieves superior AUROC and Balanced Accuracy (Bacc) by transferring knowledge from the 100M-cell pre-training corpus.

Robustness and Biological Interpretability

A key strength of ImmuneFM is its robustness to "thin" data. The model maintained high diagnostic accuracy even when the number of cells per sample was reduced to as few as 128. In contrast, traditional methods like FlowSOM+GBDT showed a sharp decline in performance as cell counts decreased.

Furthermore, we utilized Grad-CAM (Gradient-weighted Class Activation Mapping) to validate the model's biological relevance. In COVID-19 tasks, the model prioritized markers such as CD39 (associated with immune exhaustion) and CD64 (a marker for monocyte activation). In liver cancer staging, the model correctly identified T-cell reduction and monocyte increase as primary indicators of disease progression, aligning with established clinical findings.

Conclusion

ImmuneFM represents a significant step toward a foundation model for immunology. By standardizing disparate cytometry datasets and leveraging self-supervised learning, we have created a tool that is both high-performing and biologically interpretable. Future work will focus on extending ImmuneFM to multimodal data—incorporating single-cell RNA-seq and clinical text—and exploring generative tasks to predict immune responses to novel vaccines and therapies.

Summary updated

BibTeX
@misc{ding2025immunefm,
  author = {Sirui Ding and Sanchita Bhattacharya and Atul J. Butte},
  title = {{ImmuneFM: Pre-training Foundation Model from Cytometry Data for Immunology Research}},
  year = {2025},
  doi = {10.1101/2025.07.09.664020},
  howpublished = {bioRxiv},
}
Figure