All models

cell2sentence.C2S

A Pythia-410m language model that reads a cell's top genes as a sentence and names the cell type.

Molecules, proteins and genomics · 1,062 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (6 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
405.3M
Operations
1,062
Framework
PyTorch
Recurrent
No
Published
ICML 2024 (PMLR 235)
Cited by
62 (as of 16 October 2026)
Authors
Daniel Levine, Syed Asad Rizvi, Sacha Lévy and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m3753
Graph hash
c39b9efd8efa1658cad54d7e157bcd42df6b1599c3bc226f9458d92e452a4d00
Skeleton hash
569d8d3d2ff052d96f4f90a33b353349fcf7a5aa2ecd776f4d6f4ac1a23a812a
Architecture hash
5e78c895c6d1b3bf72c29b9d4ca9278f7f11c4593db542ccd7323eae07296e84
Diagram SHA-256
79e31360ddfe019b5cd4a1c31cc973de27512ace1e27050e2b3046100cae23b9
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

transformers.AutoModelForCausalLM.from_config()

What it is

Cell2Sentence, or C2S, adapts large language models to single-cell transcriptomics, the measurement of gene expression in individual cells. The trick is to turn each cell's expression profile into a cell sentence, a sequence of gene names ordered by expression level, so an ordinary text model can read it. A simple linear model recovers over 81% of the variation in gene expression from the rank alone, so little is lost in the conversion.

The captured member is the C2S-Pythia-410m cell type prediction model, based on the Pythia-410m architecture developed by EleutherAI. It was trained on over 57 million human and mouse cells from over 800 single-cell RNA sequencing datasets in CellxGene and the Human Cell Atlas. Each cell sentence holds the top 200 genes per cell. No classifier head is added and the architecture is not modified; the model is prompted with a cell sentence and asked to name its cell type in natural language.

The original paper showed that GPT-2, fine-tuned with C2S, can generate biologically valid cells from a cell type and accurately predict cell types from cell sentences. The authors also found that natural language pretraining boosts performance on cell sentence tasks. The code and models come from the van Dijk Lab.

Key idea. C2S shows that converting single-cell expression into rank-ordered gene-name sentences lets existing language models be fine-tuned for cell generation, cell type annotation and text generation with no architectural change.

  • Cell2Sentence
  • C2S
  • C2S-Pythia-410m
  • cell sentences
  • single-cell RNA sequencing
  • cell type prediction
  • Pythia
  • GPT-2
  • van Dijk Lab

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Levine_2023, title={Cell2Sentence: Teaching Large Language Models the Language of Biology}, url={http://dx.doi.org/10.1101/2023.09.11.557287}, DOI={10.1101/2023.09.11.557287}, publisher={openRxiv}, author={Levine, Daniel and Rizvi, Syed Asad and Lévy, Sacha and Pallikkavaliyaveetil, Nazreen and Zhang, David and Chen, Xingyu and Ghadermarzi, Sina and Wu, Ruiming and Zheng, Zihe and Vrkic, Ivan and Zhong, Anna and Raskin, Daphne and Han, Insu and de Oliveira Fonseca, Antonio Henrique and Caro, Josue Ortega and Karbasi, Amin and Dhodapkar, Rahul M. and van Dijk, David}, year={2023}, month=Sept }