Online single-cell data integration through projecting heterogeneous datasets into a common cell-embedding space

Lei Xiong, Tian Kang, Yuzhe Li, Weixi Ning, Xin Gao, Qiangfeng Cliff ZhangNature Communications 2022

Abstract

Computational tools for integrative analyses of diverse single-cell experiments are facing formidable new challenges including dramatic increases in data scale, sample heterogeneity, and the need to informatively cross-reference new data with foundational datasets. Here, we present SCALEX, a deep-learning method that integrates single-cell data by projecting cells into a batch-invariant, common cell-embedding space in a truly online manner (i.e., without retraining the model). SCALEX substantially outperforms online iNMF and other state-of-the-art non-online integration methods on benchmark single-cell datasets of diverse modalities, (e.g., single-cell RNA sequencing, scRNA-seq, single-cell assay for transposase-accessible chromatin use sequencing, scATAC-seq), especially for datasets with partial overlaps, accurately aligning similar cell populations while retaining true biological differences. We showcase SCALEX's advantages by constructing continuously expandable single-cell atlases for human, mouse, and COVID-19 patients, each assembled from diverse data sources and growing with every new data. The online data integration capacity and superior performance makes SCALEX particularly appropriate for large-scale single-cell applications to build upon previous scientific insights.

Introduction

Single-cell sequencing has reached a scale where datasets frequently exceed millions of cells, yet integrating these diverse experiments remains a significant challenge. Technical noise, or "batch effects," introduced by different laboratories, protocols, or equipment often obscures underlying biological signals. Existing computational tools for data integration typically struggle with three major issues: exponential growth in computational costs, the requirement to retrain models from scratch when adding new data, and the tendency to "over-correct" by force-aligning distinct cell types in partially overlapping datasets.

SCALEX addresses these hurdles by providing a deep-learning framework for "true online" integration. Once trained, SCALEX can project new data into an existing, batch-invariant embedding space without retraining, making it exceptionally scalable and resistant to common integration pitfalls.

Methods

SCALEX is built upon a Variational Autoencoder (VAE) architecture optimized for online projection through three key design strategies:

  1. Batch-free Encoder: The encoder is designed to be agnostic to batch labels, forcing it to learn universal biological features ($z$) that are invariant across different experiments.
  2. Batch-specific Decoder: Technical noise is handled exclusively in the decoder using Domain-Specific Batch Normalization (DSBN). This allows the decoder to reconstruct batch-specific data during training while keeping the encoder's latent space "pure."
  3. Global Mini-batch Strategy: Training involves sampling cells from all available batches simultaneously in each mini-batch, ensuring the model learns a global biological distribution.
SCALEX architecture (left) and benchmark performance (right) showing superior ARI and NMI scores across multiple tissues.

Once the model is established, the encoder functions as a universal projection tool. New datasets can be mapped instantly into the reference embedding space, similar to how pre-trained neural networks are used in computer vision.

Results

Benchmark Performance and Accuracy

SCALEX was validated against a wide range of datasets, including human pancreas, heart, liver, lung cancer (NSCLC), and PBMC benchmarks. It consistently outperformed state-of-the-art tools such as Seurat v3, Harmony, and scVI, achieving higher Adjusted Rand Index (ARI) and Normalized Mutual Information (NMI) scores. Notably, SCALEX excels at maintaining biological separation in datasets with only partial overlaps, avoiding the "over-correction" trap where distinct cell types are erroneously merged.

Linear Scalability

A defining feature of SCALEX is its computational efficiency. While traditional methods often exhibit exponential increases in runtime as cell counts grow, SCALEX demonstrates linear scalability. In testing, it integrated 4 million cells in approximately 20 minutes on a single GPU, significantly outperforming other online and non-online methods.

Runtime comparison showing SCALEX's linear scalability versus the exponential growth of other integration tools.

Cross-Modality and Large-Scale Applications

The method's versatility extends to cross-modality integration, such as combining scRNA-seq and scATAC-seq data into a single view of cellular states. The authors demonstrated this by constructing a massive COVID-19 PBMC atlas (~860,000 cells), which revealed specific immune cell subpopulations that correlate with disease severity. Furthermore, by projecting bronchial epithelium data into a pancreas atlas, SCALEX enabled the discovery of rare, previously uncharacterized SLC16A7+ epithelial cells in the pancreas.

Discussion

SCALEX represents a significant step toward building "living" single-cell atlases. Its ability to perform online integration allows researchers to continuously expand reference maps with new data without the computational burden of retraining.

However, challenges remain, particularly the requirement for input datasets to share a common feature set (e.g., the same gene list). Future work may focus on methods to align heterogeneous feature spaces. Despite this, SCALEX's robustness and efficiency make it a powerful tool for large-scale applications, such as the creation of pan-cancer atlases that can be updated in real-time as new patient samples are sequenced.

Summary updated

BibTeX
@inproceedings{xiong2022online,
  author = {Lei Xiong and Tian Kang and Yuzhe Li and Weixi Ning and Xin Gao and Qiangfeng Cliff Zhang},
  title = {{Online single-cell data integration through projecting heterogeneous datasets into a common cell-embedding space}},
  booktitle = {Nature Communications},
  year = {2022},
  doi = {10.1038/s41467-022-33758-z},
}
Figure