TOSICA (Transformer for One-Stop Interpretable Cell-type Annotation)
Transformer that annotates cell types from gene expression, using tokens that stand for pathways.
Molecules, proteins and genomics · 91 operations Checked
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
- 86.5M
- Operations
- 91
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2023, Nature Communications
- Cited by
- 189 (as of 28 October 2026)
- Authors
- Jiawei Chen, Hao Xu, Wanyu Tao and others
- Source
- GitHub: JackieHanLab/TOSICA
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m20822
- Graph hash
- 41ee7eda8bd5cddcb99b05a800918022c7777874ae93edb130e6c4a51194130c
- Skeleton hash
- 7cca2aca7734833ce5389985ebd3240bcbc53c2e7a1f99ac3cd35d5f4b529820
- Architecture hash
- 4495e7ed00ce1b5d2844374f13b4609dd670270d72e53028838572313f37e58b
- Diagram SHA-256
- bbd687438ab238b97b467812e3ecf9543036e9c6c91dea8f53911d60de30cbb1
- 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
TOSICA (Transformer for One-Stop Interpretable Cell-type Annotation) is a multi-head self-attention network that annotates cell types in single-cell data. Through supervised training it learns the projection from gene expression to cell type, and it transfers cell type labels from a reference dataset to a query dataset.
The model has three parts: a Cell Embedding layer, a Multi-head Self-attention layer and a Cell-Type Classifier. The embedding turns genes into tokens with a linear transformation whose weight matrix is masked by expert knowledge, so that one token only receives information from specific genes and stands for a pathway. A class token (CLS), a trainable parameter, is appended to the tokens and is used to predict the cell type. The attention scores between CLS and the pathway tokens indicate the importance of each pathway to the classification. The CLS output is passed to a fully connected network and a softmax function to obtain the probability of cell types.
The masks in the paper are based on knowledge datasets from GSEA, with defaults of at most 300 genes in each gene set and at most 300 gene sets. The paper tests TOSICA on six datasets and reports that its mean accuracy of 86.69% was the highest among the 19 methods compared.
Key idea. TOSICA is a Transformer-based model that makes cell type annotation interpretable by using biologically understandable entities, such as pathways or regulons, as its tokens.
- TOSICA
- Transformer for One-Stop Interpretable Cell-type Annotation
- cell type annotation
- single-cell RNA-seq
- scRNA-seq
- pathway attention
- regulon mask
- label transfer
- interpretable transformer
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{Chen_2023, title={Transformer for one stop interpretable cell type annotation}, volume={14}, ISSN={2041-1723}, url={http://dx.doi.org/10.1038/s41467-023-35923-4}, DOI={10.1038/s41467-023-35923-4}, number={1}, journal={Nature Communications}, publisher={Springer Science and Business Media LLC}, author={Chen, Jiawei and Xu, Hao and Tao, Wanyu and Chen, Zhaoxiong and Zhao, Yuxuan and Han, Jing-Dong J.}, year={2023}, month=Jan }