All models

scbert

A Performer encoder pretrained on single-cell RNA-seq data and fine-tuned to annotate cell types.

Molecules, proteins and genomics · 439 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 (11 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
8.4M
Operations
439
Framework
PyTorch
Recurrent
No
Published
2022, Nature Machine Intelligence
Cited by
614 (as of 22 October 2026)
Authors
Fan Yang, Wenchuan Wang, Fang Wang and others
License
GPL-3.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
m9075
Graph hash
8ee1ff6ddba7dd7fd20078531223cff7fbc79ba0745e802a90ebb4845ac6cd94
Skeleton hash
eb4e3f640634602c1f5a135fb7544a229693c0703aae28bd543b192c1a5abc5b
Architecture hash
9ba31a3c2ba945103b8f6794e96b5cf82c0a6d9a826530d2cc25be44ca0d9763
Diagram SHA-256
e29f18539908e98811cd86ddfc446b53c36b1b0afa7a8d11413d58cc8ff103dc
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

What it is

scBERT (single-cell Bidirectional Encoder Representations from Transformers) is a pretrained model for cell type annotation, the labeling of each cell in single-cell RNA sequencing data with its type. Its authors argue that existing annotation methods suffer from a lack of curated marker gene lists, improper handling of batch effects and difficulty in using the latent gene–gene interaction information. Following BERT's approach to pretraining and fine-tuning, the model first gains a general understanding of gene–gene interactions from large amounts of unlabeled scRNA-seq data, and is then fine-tuned with supervision on unseen and user-specific data.

The network is a Performer encoder. Performers are Transformer architectures that estimate regular softmax attention using only linear, as opposed to quadratic, space and time complexity. They do so with a mechanism called FAVOR+, Fast Attention Via positive Orthogonal Random features. The default configuration in the repository uses 7 bins in the expression embedding, an embedding vector of size 200, 10 attention heads and 6 Performer encoder layers.

The paper notes that the pretrained model was trained on over 1,000,000 cells from public scRNA-seq data from PanglaoDB. After fine-tuning, the expected output of inference is the cell type of each individual cell. Novel cell types can be detected by thresholding the predicted probabilities, at a default threshold of 0.5.

Key idea. The paper applies BERT-style pretraining and fine-tuning to single-cell RNA-seq data, producing a model that learns gene–gene interactions from unlabeled data and is fine-tuned for cell type annotation.

  • scBERT
  • single-cell BERT
  • cell type annotation
  • single-cell RNA-seq
  • scRNA-seq
  • Performer encoder
  • gene expression
  • pretrained single-cell model
  • novel cell type detection

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

Cite the paper

@article{performer2022,
  title = {scBERT as a large-scale pretrained deep language model for cell type annotation of single-cell RNA-seq data},
  author = {Fan Yang and Wenchuan Wang and Fang Wang and Yuan Fang and Duyu Tang and Junzhou Huang and Hui Juan Lu and Jianhua Yao},
  year = {2022},
  journal = {Nature Machine Intelligence},
  doi = {10.1038/s42256-022-00534-z}
}