Home

Awesome

CellPLM

This is the official codebase for CellPLM: Pre-training of Cell Language Model Beyond Single Cells. The paper has been accepted by ICLR 2024 conference.

Paper License

CellPLM is the first single-Cell Pre-trained Language Model that encodes cell-cell relations and it consistently outperforms existing pre-trained and non-pre-trained models in diverse downstream tasks, with 100x higher inference speed compared to existing pre-trained models. You can also find a brilliant blog about the idea of CellPLM here.

Installation

We recommend PyPI for quick installation. We recommend using python 3.9 and cuda>=11.7 but they are adjustable.

Quick Installation with PyPI

Make sure gpu version of pytorch (>=1.13.0) has been installed before installing CellPLM.

pip install cellplm

Full Installation (recommended for HPC users and developers)

conda create -n cellplm python=3.9 -y && conda activate cellplm
conda install cudatoolkit=11.7 -c pytorch -c nvidia
pip install -r requirements.txt

The full installation will install the same environment as we used during development. This includes rapids used to accelerate evaluation.

Tutorials

We offer several notebooks for various downstream tasks as introductory tutorials. Our latest studies demonstrate CellPLM is competitive on cell-type annotation tasks compared to other SOTA methods and pretrained models. The result table is shown below:

MethodPBMC12KPancreasHLCAImmuneBrainLiver
SingleCellNet0.845+-0.00640.644+-0.00060.811+-0.00460.775+-0.00090.877+-0.00330.872+-0.0023
ACTINN0.614+-0.07090.528+-0.09260.218+-0.04400.236+-0.03000.695+-0.06240.614+-0.0349
scANVI0.930+-0.01480.963+-0.00830.708+-0.01830.851+-0.01330.933+-0.00100.908+-0.0144
CellTypist0.883+-0.00550.882+-0.00110.776+-0.00790.822+-0.00200.901+-0.00310.764+-0.0132
scDiff0.967+-0.00420.968+-0.01430.893+-0.00700.844+-0.00760.947+-0.00740.844+-0.0042
scGPT0.9630.9540.8630.9070.9500.864
Geneformer0.979-0.8330.8560.9340.871
CellPLM0.9750.9830.9290.9020.9670.913

(The evaluation follows the setting in scDiff paper)

Pretrained CellPLM Model Checkpoints

The checkpoint can be acquired from our dropbox. We might update our checkpoints from time to time.

[10/10/2023] The latest version is 20230926_85M.

Citation

@article{wen2023cellplm,
  title={CellPLM: Pre-training of Cell Language Model Beyond Single Cells},
  author={Wen, Hongzhi and Tang, Wenzhuo and Dai, Xinnan and Ding, Jiayuan and Jin, Wei and Xie, Yuying and Tang, Jiliang},
  journal={bioRxiv},
  pages={2023--10},
  year={2023},
  publisher={Cold Spring Harbor Laboratory}
}