Introduction
Reading the adaptive immune system—a field known as immunomics—presents a formidable computational challenge. A typical human immune repertoire contains millions of unique T-cell receptors (TCRs), yet only a tiny fraction (often less than 1%) are specific to any given pathogen. Furthermore, TCR data is heavily influenced by confounding factors such as sequencing depth, batch effects, and the individual's genetic background (HLA types). Traditional models often struggle to distinguish these systematic biases from true disease-specific signals.
This paper introduces AIRIVA (Adaptive Immune Repertoire-Invariant Variational Autoencoder), a deep generative model designed to disentangle these complex signals. By separating disease-specific signatures from background noise, AIRIVA enables accurate diagnosis, handles missing data, and provides a framework for identifying specific disease-associated TCRs through counterfactual generation.
Methodology
AIRIVA is built upon the principles of disentangled representation learning within a Variational Autoencoder (VAE) framework. Unlike standard VAEs that compress all information into a single latent vector, AIRIVA explicitly partitions its latent space ($Z$) into two distinct components:
- Predictive Latents ($Z_Y$): These capture information related to specific labels, such as infection status or vaccination history.
- Residual Latents ($Z_\epsilon$): These capture non-label-specific information, such as sequencing depth or technical batch effects.
To account for the discrete nature of TCR counts, the model employs a Poisson likelihood distribution. A key innovation of AIRIVA is its ability to perform counterfactual generation. By intervening on the latent factors—for example, by taking the representation of a healthy individual and "toggling" the disease-specific latent factor—the model can generate a synthetic repertoire. Comparing this synthetic repertoire to the original allows researchers to pinpoint the specific TCRs the model associates with the disease.
Additionally, the model supports semi-supervised learning, allowing it to incorporate unlabeled clinical samples to improve its internal representations, a common requirement in real-world medical datasets.
Experimental Evaluation
The researchers evaluated AIRIVA using two primary case studies involving infectious diseases:
- COVID-19: A dataset comprising approximately 7,600 samples from naturally infected, healthy, and vaccinated individuals. Findings were validated using external MIRA assay data, which provides experimental ground truth for TCR-antigen binding.
- Herpes Simplex Virus (HSV): A dataset of approximately 1,400 samples labeled for HSV-1 and HSV-2. These viruses share roughly 80% of their genome, making them exceptionally difficult to distinguish via TCR repertoires alone.
Key Results
Classification Performance
AIRIVA demonstrated superior performance in complex diagnostic tasks. In the COVID-19 study, the model was tasked with identifying natural infection in individuals who had already been vaccinated—a scenario where the vaccine-induced TCRs act as a major confounder. AIRIVA achieved an AUROC of 0.94, significantly outperforming the industry-standard benchmark (ESLG), which achieved 0.86.
In the HSV study, AIRIVA maintained robust performance (0.67–0.81 AUROC) for HSV-1 prediction even in the presence of HSV-2 co-infection, whereas baseline models showed significant performance degradation.
TCR Identification and Interpretability
Using its counterfactual generation method, AIRIVA identified Spike-specific TCRs with 95% precision when compared against experimental MIRA hits. The model also successfully distinguished between vaccine-induced and infection-induced immunity. Because vaccines target only the Spike protein while natural infection targets both Spike and Non-Spike proteins, AIRIVA correctly mapped vaccinated individuals to a region of the latent space characterized by Spike activity but zero Non-Spike activity.
Robustness and Semi-Supervised Learning
By isolating sequencing depth into a separate latent factor, AIRIVA proved more robust than traditional models, which are often biased by samples with higher T-cell counts. Furthermore, the inclusion of unlabeled data in the HSV study improved the model's sensitivity, demonstrating the value of its generative architecture in maximizing information from incomplete datasets.
Discussion and Limitations
While AIRIVA represents a significant step forward in immune repertoire modeling, several challenges remain. The current model does not explicitly incorporate HLA types, which are critical because TCRs are HLA-restricted. Future iterations could include HLA as a latent factor. Additionally, while the Poisson distribution is effective, it may not perfectly capture "zero-inflated" data where many TCR counts are zero; more complex distributions may be required. Finally, scaling the model to handle billions of raw TCR sequences directly, rather than pre-selected sequences, remains a computational hurdle for future research.
Summary updated