An empirical Bayes method for differential expression analysis of single cells with deep generative models

Pierre Boyeau, Jeffrey Regier, Adam Gayoso, Michael Jordan, Nir Yosef

TL;DR

Researchers have developed lvm-DE, a Bayesian framework that brings rigorous statistical testing to deep generative models for single-cell RNA sequencing. By combining the power of Variational Autoencoders (VAEs) with Empirical Bayes methods, lvm-DE provides more accurate gene expression analysis and reliable False Discovery Rate (FDR) control than traditional linear models.

What Problem Does This Paper Address?

In single-cell RNA sequencing (scRNA-seq), scientists try to identify "differentially expressed" (DE) genes—genes that turn on or off between different cell types or conditions. However, the biological signal is buried under massive technical noise: varying sequencing depths, "dropout" events (where a gene is expressed but not detected), and "batch effects" (differences caused by different lab protocols or days).

Traditional tools like DESeq2 or edgeR rely on Generalized Linear Models (GLMs). While robust, GLMs struggle with the complex, non-linear batch effects found in modern, million-cell datasets. Conversely, newer Deep Generative Models (DGMs) like scVI are excellent at denoising data but historically lacked the statistical "teeth" to provide formal significance testing, effect size control, or guaranteed False Discovery Rates. This paper fills that gap.

Methods

The authors introduce lvm-DE, a generic wrapper that can be applied to various DGMs (specifically tested on scVI and scSphere). The process follows five key steps:

  1. Model Fitting: A VAE is trained on the entire dataset to learn a low-dimensional "latent space" representing cell states, effectively denoising the data.
  2. Cell State Oracles: The model uses cell annotations to build a posterior distribution of the latent representations for specific groups (e.g., "Cell Type A" vs. "Cell Type B").
  3. Sampling Normalized Scales: It propagates these representations back through the model's decoder to infer the "true" underlying expression levels, removing technical biases.
  4. Bayesian Hypothesis Testing: Instead of a simple p-value, it treats the Log Fold Change (LFC) as a random variable. It uses a "composite alternative" hypothesis, meaning it only looks for genes where the change is larger than a specific biological threshold ($\delta$), ignoring statistically significant but biologically tiny changes.
  5. FDR Control: It employs a Bayesian decision rule to rank genes and select a cutoff that strictly controls the expected False Discovery Rate at a user-defined level ($\alpha$).

Datasets

The framework was evaluated using a mix of synthetic and real-world data:

  • SymSim & MUSCAT: Simulation frameworks used to create "ground truth" scenarios with known DE genes and realistic technical noise.
  • 10X PBMC: A dataset of ~9,400 peripheral blood mononuclear cells used to test performance in a single-batch setting.
  • PbmcBench: A multi-protocol collection (Drop-seq, 10X, etc.) used to evaluate how well the model "pools" information across different sequencing technologies.
  • Blish COVID-19 Dataset: A large-scale dataset (~44,700 cells) from healthy and COVID-infected patients, used to test the model's ability to find subtle inflammatory signals within specific cell types.

Key Insights and Ideas

  • Information Pooling: Unlike traditional methods that only look at the two groups being compared, lvm-DE benefits from the entire dataset. By learning gene-gene correlations across all cells during the VAE training, it can more accurately infer expression in rare cell types where data is sparse.
  • Beyond Point Estimates: Traditional methods often provide a single "best guess" for LFC. lvm-DE provides a full probability distribution, allowing researchers to quantify their uncertainty.
  • The Power of IWELBO: The authors found that training models with the Importance-Weighted Evidence Lower Bound (IWELBO) rather than the standard ELBO significantly improved the variance estimates needed for downstream DE analysis.
  • Automatic Thresholding: The paper suggests a Gaussian Mixture Model approach to automatically set the effect-size threshold ($\delta$), taking the guesswork out of what constitutes a "meaningful" change.

Key Results

  • Superior LFC Estimation: In simulations, lvm-DE-based models (scVI-lvm and scSphere-lvm) consistently showed lower error in estimating Log Fold Changes compared to MAST, edgeR, and DESeq2.
  • Better Calibration: lvm-DE successfully controlled the FDR at the target levels (e.g., 5%), whereas the original Bayes factor approach used in scVI often resulted in high false-positive rates.
  • Rare Cell Type Sensitivity: lvm-DE maintained high power and accuracy even when one of the compared groups had as few as 50 cells, outperforming GLM-based methods that require larger samples to overcome noise.
  • Bulk RNA-seq Agreement: When tested on real patient data, the genes identified by lvm-DE showed significantly higher correlation with "gold standard" bulk RNA-seq data than traditional single-cell DE methods.

Limitations and Future Work

  • Library Size Sensitivity: The authors noted that how a DGM models library size (the total number of transcripts per cell) is critical. Models that treat library size deterministically (like the original scSphere) required modifications to work effectively with lvm-DE.
  • Annotation Dependency: The accuracy of the DE results is heavily reliant on the quality of the initial cell type clustering or annotations. If cells are mislabeled, the "oracle" step will produce biased results.
  • Future Directions: The authors suggest extending this framework to multi-omic data (e.g., combining RNA and DNA methylation) and incorporating spatial information to better understand how cell-to-cell communication drives differential expression.

Summary updated

BibTeX
@inproceedings{boyeau2024empirical,
  author = {Pierre Boyeau and Jeffrey Regier and Adam Gayoso and Michael Jordan and Nir Yosef},
  title = {{An empirical Bayes method for differential expression analysis of single cells with deep generative models}},
  booktitle = {Proceedings of the National Academy of Sciences},
  year = {2024},
  url = {https://openreview.net/forum?id=g0oRBAiZ0C},
}
Figure