scDiffusion: conditional generation of high-quality single-cell data using diffusion model

Erpai Luo, Minsheng Hao, Lei Wei, Xuegong Zhang

Abstract

Single-cell RNA sequencing (scRNA-seq) provides deep insights into cellular heterogeneity but is often limited by high costs and the underrepresentation of rare cell types. We present scDiffusion, a generative framework that leverages latent diffusion models and single-cell foundation models to produce high-fidelity synthetic gene expression data. By utilizing a pre-trained SCimilarity encoder to map high-dimensional data into a latent space and a skip-connected Multilayer Perceptron (MLP) for denoising, scDiffusion achieves superior realism and stability compared to existing GAN and VAE approaches. Furthermore, we introduce a "Gradient Interpolation" strategy that enables the generation of continuous developmental trajectories and rare cell populations. Our results across multiple large-scale datasets demonstrate that scDiffusion generates synthetic cells with high biological accuracy (93% classification accuracy) and captures complex cellular transitions more effectively than traditional interpolation methods.

Introduction

Single-cell RNA sequencing (scRNA-seq) has revolutionized biology by enabling the observation of gene expression at the level of individual cells. However, the technology remains expensive, and certain "rare" cell types are frequently underrepresented in datasets. While generative models like Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs) have been employed to create synthetic data, they often struggle with realism, training stability, and the ability to generate data under specific, user-defined conditions. There is a significant need for a framework that can simulate smooth, continuous cellular transitions and generate high-fidelity data for specific biological contexts.

Methods

The scDiffusion framework adapts the Latent Diffusion Model (LDM) architecture to the specific requirements of genomic data. It is built upon three primary pillars:

  1. Latent Space Compression (SCimilarity): To handle the high dimensionality and sparsity of scRNA-seq data, scDiffusion uses the pre-trained foundation model SCimilarity as an autoencoder. This compresses gene expression profiles into a 128-dimensional latent space, making the diffusion process computationally feasible.
  2. MLP-based Denoising Network: Unlike image generators that use CNNs, scDiffusion employs a skip-connected Multilayer Perceptron (MLP). This is essential because gene vectors are unordered; spatial proximity in the vector does not imply biological proximity, a property that MLPs handle more effectively than convolutional layers.
  3. Conditioning and Gradient Interpolation: The model uses classifier guidance to steer generation toward specific cell types or organs. Most innovatively, the authors proposed Gradient Interpolation, which blends the gradients of two different states (e.g., an initial and a mature cell) to generate the intermediate "missing links" in a developmental path.

Results

scDiffusion was validated across five diverse, large-scale datasets, including the Human Lung Pulmonary Fibrosis (PF) atlas and the Tabular Muris mouse atlas.

Realism and Biological Fidelity

scDiffusion achieved an average Spearman Correlation Coefficient (SCC) of 0.984, outperforming state-of-the-art methods like scGAN and scDesign3. Synthetic cells generated by the model were correctly identified by automated classifiers with 93% accuracy, nearly matching the 98% accuracy of real cells. UMAP visualizations demonstrate that the generated cells closely follow the distribution of real biological samples.

Rare Cell and Combinatorial Generation

The model successfully generated rare populations, such as CD34+ cells (0.4% of the PBMC dataset), while maintaining their unique signatures. Additionally, by training separate classifiers for "Organ" and "Cell Type," scDiffusion performed combinatorial generation of "out-of-distribution" data, such as Mammary B cells, which matched real biological markers despite not being present in the training set.

Trajectory Accuracy

In developmental tasks like the Waddington-OT reprogramming process, scDiffusion’s Gradient Interpolation produced intermediate states with significantly lower Maximum Mean Discrepancy (MMD) scores (0.047) compared to traditional interpolation (0.128), indicating a much higher resemblance to real biological intermediates.

Conclusion

scDiffusion demonstrates the power of combining foundation models with latent diffusion for genomic research. By providing a stable and accurate method for conditional data generation and trajectory simulation, it offers a valuable tool for data augmentation and biological discovery. Future work will explore extending this framework to multi-omics data and incorporating natural language prompts for more intuitive cell generation.

Summary updated

BibTeX
@article{luo2024scdiffusion,
  author = {Erpai Luo and Minsheng Hao and Lei Wei and Xuegong Zhang},
  title = {{scDiffusion: conditional generation of high-quality single-cell data using diffusion model}},
  journal = {Bioinformatics},
  year = {2024},
  doi = {10.1093/bioinformatics/btae518},
}
Figure