TL;DR
This paper systematically investigates the impact of various design choices on single-cell language models (scLMs) for transcriptomic data. By isolating and tuning components of the pre-training pipeline, the authors establish best practices for scLM construction, revealing that minimal input processing, count distribution-aware losses, and effective masking strategies are key to improved performance. While scLMs don't yet offer a "generational leap" over traditional methods, this work provides a crucial roadmap for building more effective foundation models in single-cell biology.
What Problem Does This Paper Address?
Single-cell RNA sequencing (scRNA-seq) generates massive datasets, and "foundation models" (large, pre-trained neural networks) are emerging as a powerful tool for analyzing this data. These models, often based on the transformer architecture, are trained in a self-supervised manner on vast amounts of unlabeled scRNA-seq data to learn general representations of gene expression. However, the field is characterized by a wide variety of pre-training strategies, making it difficult to pinpoint which design choices lead to successful models and which are less effective. This lack of clarity hinders the development of reliable and high-performing scLMs. The authors aim to address this by systematically evaluating different components of the scLM pre-training process to identify best practices.
Methods
The core of this study is a systematic, component-wise evaluation of scLM configurations using a framework called bento-sc. The authors start with a "base" bidirectional encoder-only transformer model and iteratively modify and test different aspects of its design. Key areas of investigation include:
- Input Count Embeddings: How raw gene counts are represented before being fed into the transformer. They compare various methods like binning, rank-based encoding, normalization, and LogP1 transformation.
- Output Format and Loss Functions: How the model predicts gene counts and what loss functions are used to optimize these predictions. This involves exploring different count distributions (e.g., Poisson, Negative Binomial) and reconstruction losses (e.g., MSE, Cross-Entropy).
- Noising Functions: How the input data is corrupted during pre-training to create a learning signal. They compare masking strategies with other noise injection methods.
- Auxiliary [CLS]-level Loss: Investigating the benefit of adding additional self-supervised or supervised objectives that operate on a global cell embedding, beyond the primary gene expression reconstruction task.
The study employs a greedy hyperparameter optimization approach, where the best-performing configuration from one round is carried over to the next. Performance is evaluated on a diverse set of six downstream tasks, including expression upscaling, GRN inference, and cell-type identification, using both fine-tuning and zero-shot settings.
Datasets
- Pre-training: The scTab dataset (CELLxGENE census) was used for pre-training. This dataset comprises over 20 million human cells and 19,331 human protein-encoding genes.
- Downstream Tasks: A variety of datasets were used for evaluating the trained models, including:
- scTab: Used for expression upscaling, cell-type identification, and GRN inference.
- Perturb-seq dataset (Replogle et al.): Used for post-perturbation expression prediction.
- NeurIPS 2021 CITE-seq dataset: Used for surface protein abundance prediction.
- CELLxGENE datasets: Three separate datasets derived from CELLxGENE were used for batch correction, covering different sequencing chemistries.
Key Insights and Ideas
- Minimal Input Processing is Key: The study strongly suggests that less is more when it comes to preparing input gene counts. Simply using LogP1-transformed or raw counts as input embeddings generally outperforms more complex preprocessing steps like normalization or rank-based encoding.
- Leveraging Count Distributions Matters: Instead of treating gene counts as simple numerical values, using reconstruction losses that explicitly model known count distributions (like Poisson) leads to better performance. This suggests that scLMs can benefit from incorporating prior biological knowledge about count generation.
- Masking is Robust: Masked Language Modeling (MLM), a standard technique in NLP, remains a highly effective pre-training strategy for scLMs, even at high masking rates (up to 50%). Alternative noising strategies did not dethrone masking.
- Auxiliary Losses Complement MLM: While MLM is the primary driver of performance, auxiliary losses (like contrastive learning or cell-type classification) operating on the cell-level embedding can further amplify performance, suggesting a synergistic effect.
- Foundation Models Aren't a Silver Bullet (Yet): Despite the promise of foundation models, the study found that scLMs do not consistently outperform simpler, task-specific baselines across all tasks. This highlights the ongoing challenge of achieving a true "generational leap" in performance.
Key Results
- Best Input Encoding: LogP1-transformed or raw counts were found to be the best input encoding strategies, with LogP1-transformed counts showing a slight edge.
- Best Output Loss: Models modeling Poisson-distributed counts or LogP1-transformed counts with MSE loss performed best.
- Optimal Masking Rate: A masking rate of 50% was found to be the most effective among the tested rates.
- Combined Losses: The best-performing model utilized a combination of MLM, contrastive learning, and cell-type classification auxiliary losses.
- Overall Performance: The optimized scLM configuration achieved superior performance across tasks compared to other tested configurations, often outperforming baselines, though not universally. The final model never achieved the worst score on any task, indicating its general applicability.
Limitations and Future Work
- Data Distribution Shift: The study notes that downstream tasks often use data from non-10X protocols, which can lead to an "out-of-distribution" problem for models pre-trained solely on 10X data (scTab). Future work should focus on pre-training corpora that better cover the diverse data manifold encountered in single-cell analyses.
- Baseline Competitiveness: The fact that traditional methods and unpre-trained transformers remain competitive on many tasks suggests that scLMs are not yet a definitive replacement for all analyses.
- Exploration of Noising Limits: While masking is effective, further research is needed to explore the limits of noising cell profiles for pre-training and to understand why MLM is so robust.
- Generalizability: The study focused on specific design choices. Future work could explore other architectural variations and pre-training objectives.
- Code Availability: The authors have released their code as a PyPI package (
bento-sc), which is a valuable contribution for future research and benchmarking.
Summary updated