A Joint Deep Learning Model for Simultaneous Batch Effect Correction, Denoising and Clustering in Single-Cell Transcriptomics

Justin Lakkis, David Wang, Yuanchao Zhang, Gang Hu, Kui Wang, Huize Pan, Lyle Ungar, Muredach P. Reilly, Xiangjie Li, Mingyao LibioRxiv 2020

TL;DR

This paper introduces CarDEC, a novel deep learning framework that simultaneously addresses three critical challenges in single-cell RNA sequencing (scRNA-seq) data analysis: batch effect correction, denoising, and clustering. By effectively removing batch effects from both the low-dimensional embedding and the raw gene expression space, CarDEC significantly improves downstream analyses like trajectory inference and reveals biological signals previously obscured by technical noise.

What Problem Does This Paper Address?

Single-cell RNA sequencing (scRNA-seq) has revolutionized our understanding of cellular heterogeneity, but its analysis is plagued by "batch effects." These are systematic technical variations introduced during sample processing, sequencing, or experimental conditions, which can obscure true biological differences between cells. While many methods exist to correct batch effects, they often operate in a low-dimensional "embedding" space, which is useful for tasks like cell clustering but leaves the original gene expression data still contaminated. This contamination hinders crucial gene-level analyses such as differential expression and trajectory inference. Correcting batch effects directly in the high-dimensional gene expression space is significantly more challenging, especially for genes with low expression levels (lowly variable genes or LVGs), which constitute the majority of the transcriptome. Existing methods like MNN struggle with multiple batches and are computationally intensive, while others like scVI, while powerful, still leave LVGs susceptible to batch effects.

Methods

CarDEC employs a joint deep learning framework with a unique "branching architecture." The core idea is to treat highly variable genes (HVGs) and lowly variable genes (LVGs) differently.

  • Preprocessing: Standard filtering of cells and genes, followed by cell-level and gene-level normalization. HVGs are selected based on variability, while the rest are designated LVGs.
  • Pretraining: An autoencoder is pretrained on HVGs to learn initial representations.
  • Branching Architecture: This is the key innovation.
  • HVGs are used to drive a self-supervised clustering loss, which regularizes the embedding and helps remove batch effects in this space.
  • LVGs are processed through a separate branch. Crucially, the decoder for LVGs uses a concatenated embedding from both HVGs and LVGs. This allows CarDEC to leverage the strong biological signal from HVGs for clustering while using the refined, batch-corrected embedding to denoise and correct batch effects in the LVGs.
  • Loss Function: A multi-component loss function combines reconstruction losses for both HVGs and LVGs with the self-supervised clustering loss from HVGs.
  • Optional Count Denoising: An additional step models denoised expression on the original count scale using a negative binomial distribution, which is more comparable to raw UMI counts.

Datasets

The authors evaluated CarDEC on several publicly available scRNA-seq datasets:

  • Human Pancreatic Islet Data: From four different protocols (Fluidigm C1, SMART-seq2, CEL-seq, CEL-seq2). This dataset was used to demonstrate the utility of the branching architecture.
  • Macaque Retina Data: Featuring a strong, multi-level batch effect across two regions, four macaques, and thirty samples.
  • Mouse Cortex and PBMC Data: From four different scRNA-seq protocols, presenting a significant challenge for batch effect correction and denoising, especially for rare cell types.
  • Human Monocyte Data: From three technical replicates of the same subject, used to evaluate pseudotemporal trajectory analysis.
  • Human Fetal Liver Data: A large-scale dataset (104,694 cells) used to assess scalability.

Key Insights and Ideas

  • Treating HVGs and LVGs Differently is Crucial: The branching architecture, which processes HVGs and LVGs separately but integrates them for LVG reconstruction, is key to CarDEC's success. This allows the model to leverage the strong signals in HVGs for robust clustering and batch correction while still effectively denoising and correcting batch effects in the vast majority of genes (LVGs).
  • Batch Effect Correction in Gene Space is Hard, but Possible: The paper strongly emphasizes that correcting batch effects in the gene expression space is significantly harder than in the embedding space, especially for LVGs. CarDEC's success in this domain is a major contribution.
  • Denoising Boosts LVG Signal: CarDEC's denoising and batch correction significantly enhance the signal-to-noise ratio in LVGs, making them as informative for clustering as HVGs. This is crucial because LVGs represent most of the transcriptome.
  • Improved Downstream Analysis: By providing cleaner, batch-corrected gene expression data, CarDEC enables more accurate trajectory inference and reveals biological signals (e.g., marker genes, transcription factors) that are otherwise obscured by batch effects.

Key Results

  • Superior Performance: CarDEC consistently outperformed state-of-the-art methods (scVI, DCA, MNN, scDeepCluster) across multiple datasets in terms of batch effect correction and clustering accuracy, particularly for LVGs.
  • High ARI Scores: For example, on the macaque retina dataset, CarDEC achieved an ARI of 0.98 for both HVGs and LVGs, compared to much lower scores for other methods (e.g., MNN 0.86 for HVGs, 0.03 for LVGs). On the challenging mouse cortex dataset, CarDEC achieved an ARI of 0.75 for HVGs and 0.74 for LVGs.
  • Effective Pseudotime Analysis: CarDEC enabled the best pseudotime analysis on human monocyte data, with well-mixed batches and clear pseudotemporal paths, revealing expected marker gene expression patterns. Other methods failed to mix batches effectively and obscured biological signals.
  • Scalability: CarDEC scales linearly with the number of cells and is computationally efficient, completing analysis of a large dataset (104,694 cells) in under 3.5 hours, significantly faster than scVI and MNN.

Limitations and Future Work

  • Hyperparameter Tuning: While the paper mentions hyperparameters (e.g., $\alpha$ for loss weighting), the optimal settings might require tuning for specific datasets.
  • Unsupervised Nature: The current implementation is unsupervised, meaning it doesn't use cell type labels for training. While this is a strength for discovering novel cell types, incorporating label information could potentially further refine results if labels are available.
  • Future Work: The authors highlight that CarDEC's ability to provide harmonized counts in the gene expression space can be used for various downstream analyses, including estimating unbiased log fold changes, identifying marker genes, and reconstructing trajectories. The computational efficiency and effectiveness of CarDEC make it a promising tool for future large-scale scRNA-seq studies.

Summary updated

Abstract

Abstract Recent development of single-cell RNA-seq (scRNA-seq) technologies has led to enormous biological discoveries. As the scale of scRNA-seq studies increases, a major challenge in analysis is batch effect, which is inevitable in studies involving human tissues. Most existing methods remove batch effect in a low-dimensional embedding space. Although useful for clustering, batch effect is still present in the gene expression space, leaving downstream gene-level analysis susceptible to batch effect. Recent studies have shown that batch effect correction in the gene expression space is much harder than in the embedding space. Popular methods such as Seurat3.0 rely on the mutual nearest neighbor (MNN) approach to remove batch effect in the gene expression space, but MNN can only analyze two batches at a time and it becomes computationally infeasible when the number of batches is large. Here we present CarDEC, a joint deep learning model that simultaneously clusters and denoises scRNA-seq data, while correcting batch effect both in the embedding and the gene expression space. Comprehensive evaluations spanning different species and tissues showed that CarDEC consistently outperforms scVI, DCA, and MNN. With CarDEC denoising, those non-highly variable genes offer as much signal for clustering as the highly variable genes, suggesting that CarDEC substantially boosted information content in scRNA-seq. We also showed that trajectory analysis using CarDEC’s denoised and batch corrected expression as input revealed marker genes and transcription factors that are otherwise obscured in the presence of batch effect. CarDEC is computationally fast, making it a desirable tool for large-scale scRNA-seq studies.
BibTeX
@misc{lakkis2020joint,
  author = {Justin Lakkis and David Wang and Yuanchao Zhang and Gang Hu and Kui Wang and Huize Pan and Lyle Ungar and Muredach P. Reilly and Xiangjie Li and Mingyao Li},
  title = {{A Joint Deep Learning Model for Simultaneous Batch Effect Correction, Denoising and Clustering in Single-Cell Transcriptomics}},
  year = {2020},
  doi = {10.1101/2020.09.23.310003},
  howpublished = {bioRxiv},
}
Figure