GeneCompass
A BERT-style model over gene tokens, pre-trained on 120 million human and mouse cells with biological priors folded in.
Molecules, proteins and genomics · 354 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
- 149.2M
- Operations
- 354
- Framework
- PyTorch
- Recurrent
- No
- Published
- Cell Research 2024
- Cited by
- 144 (as of 17 October 2026)
- Authors
- Xiaodong Yang, Guole Liu, Guihai Feng and others
- 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
- m1201
- Graph hash
- 3875ff1167f535813cee8f959ae0b942435cfb8b93f1fa5436b3ce5ab11c213d
- Skeleton hash
- f8c6194e80fbba4d8f20b4082d8fb4031ebf9f485150306025fa67f8c060c06c
- Architecture hash
- 0c063de7e65ff408279b89fa9c41809d906d82dbc437d7610b486d5d6acbc2a9
- Diagram SHA-256
- 55b813710e899077c52d6dacbf09c74e7de9b41383c8a1b03191841f9a89812a
- 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
GeneCompass is a knowledge-informed, cross-species foundation model for single-cell transcriptomes, pre-trained on more than 120 million human and mouse cells. Earlier single-cell foundation models the paper names, scGPT, Geneformer and scFoundation, were built from human data alone. The authors' complaint is that such models rely on data from a single species even though gene regulation is largely conserved. Human and mouse genes are aligned by sharing IDs for homologous genes, and the token dictionary holds 17,465 homologous genes out of 36,092 in total.
Each cell is a sequence of gene tokens, where a gene's ID is concatenated with its absolute expression value and genes are ranked within the cell by normalized expression. Four kinds of prior biological knowledge, promoter sequences, gene co-expression networks, gene family and transcription factor-target regulation networks, are encoded into one embedding space and folded into the tokens. A species token embedding is prepended to each cell to say whether it is human or mouse. The encoder is a 12-layer self-attention transformer with 12 heads per layer. It operates on 2048 gene tokens of 768 dimensions, which pushes the parameter count past 100,000,000. Pre-training is masked language modeling over gene tokens, where 15% of genes per cell are masked and two decoding heads recover their IDs and expression values at once. The code builds on PyTorch and the Hugging Face Transformers library, extended to take external knowledge as input.
Two pretrained checkpoints are published, GeneCompass_Small with 6 layers and GeneCompass_Base with 12, and the traced member follows the 12-layer configuration. Fine-tuned GeneCompass is reported to beat Geneformer and scGPT on single-species cell type annotation in accuracy and macro-F1. In an ablation, adding promoter embeddings alone did not help cell annotation, while GRN, co-expression or gene family embeddings each did. The published version adds that predicted candidate genes from the model's in silico search induced human embryonic stem cells toward the gonadal fate. The repository's citation lists the paper in Cell Research.
Key idea. A cross-species single-cell foundation model that folds four types of prior biological knowledge and absolute expression values into gene tokens, pre-trained with masked modeling on over 120 million human and mouse cells.
- genecompass
- single-cell foundation model
- cross-species
- knowledge-informed
- single-cell transcriptomics
- scrna-seq
- gene embeddings
- cell type annotation
- in silico perturbation
- gene regulatory network
- sccompass-126m
- geneformer
- scgpt
- xcompass
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{Yang_2024, title={GeneCompass: deciphering universal gene regulatory mechanisms with a knowledge-informed cross-species foundation model}, volume={34}, ISSN={1748-7838}, url={http://dx.doi.org/10.1038/s41422-024-01034-y}, DOI={10.1038/s41422-024-01034-y}, number={12}, journal={Cell Research}, publisher={Springer Science and Business Media LLC}, author={Yang, Xiaodong and Liu, Guole and Feng, Guihai and Bu, Dechao and Wang, Pengfei and Jiang, Jie and Chen, Shubai and Yang, Qinmeng and Miao, Hefan and Zhang, Yiyang and Man, Zhenpeng and Liang, Zhongming and Wang, Zichen and Li, Yaning and Li, Zheng and Liu, Yana and Tian, Yao and Liu, Wenhao and Li, Cong and Li, Ao and Dong, Jingxi and Hu, Zhilong and Fang, Chen and Cui, Lina and Deng, Zixu and Jiang, Haiping and Cui, Wentao and Zhang, Jiahao and Yang, Zhaohui and Li, Handong and He, Xingjian and Zhong, Liqun and Zhou, Jiaheng and Wang, Zijian and Long, Qingqing and Xu, Ping and Li, Xin and Wang, Hongmei and Hu, Baoyang and Li, Wei and Gao, Fei and Guo, Jingtao and Yu, Leqian and Gu, Qi and Zhai, Weiwei and Zou, Zhengting and Feng, Guihai and Liu, Wenhao and Tian, Yao and Fang, Chen and Dong, Jingxi and Liu, Yana and Yu, Jingqi and Wu, Wenhui and Lin, Xinxin and Li, Cong and Zou, Yu and Ren, Yongshun and Li, Fan and Zhao, Yixiao and Xin, Yike and Han, Longfei and Jiang, Shuyang and Ma, Kai and Chen, Qicheng and Wang, Haoyuan and Wu, Huanhuan and He, Chaofan and Hu, Yilong and Guo, Shuyu and Li, Yiyun and Zhou, Yuanchun and Wang, Yangang and Wang, Xuezhi and Wang, Pengfei and Li, Fei and Meng, Zhen and Wang, Zaitian and Xu, Ping and Cui, Wentao and Hu, Zhilong and He, Huimin and Zong, Shan and Wang, Jiajia and Chen, Yan and Zhang, Chunyang and Wang, Chengrui and Zhang, Ran and Xiao, Meng and Wang, Yining and Chen, Yiqiang and Zhao, Yi and Yang, Xiaodong and Bu, Dechao and Qin, Xin and Qin, Jiaxin and Yang, Zhaohui and Li, Chenhao and Xu, Zhufeng and Zhang, Zeyuan and Qi, Xiaoning and Chen, Shubai and Huang, Wuliang and Li, Yaning and Yang, Ge and Liu, Jing and Liu, Guole and Zhong, Liqun and Luo, Yaoru and Zhou, Jiaheng and Wang, Zichen and Luo, Qinxuan and Liu, Ziwen and Li, Ao and Wang, Teng and Huang, Yiming and Li, Handong and Wang, Yong and Zhang, Shihua and Zhang, Jiahao and Zhang, Yiyang and Li, Shirui and Liang, Zhongming and Man, Zhenpeng and Dong, Kangning and Shen, Qunlun and Wang, Hongmei and Meng, Zhen and Wang, Xuezhi and Wang, Yangang and Wang, Yong and Zhang, Shihua and Guo, Jingtao and Zhao, Yi and Zhou, Yuanchun and Li, Fei and Liu, Jing and Chen, Yiqiang and Yang, Ge and Li, Xin}, year={2024}, month=Oct, pages={830–845} }