# scGPT

**scGPT** 是一个面向单细胞生物学的、基于 Transformer 的基础模型，建立在一个生成式预训练 Transformer 之上，并在超过 3300 万个细胞的库上训练<sup>[1](https://www.nature.com/articles/s41592-024-02201-0)</sup>。它于 2024 年发表在《自然·方法》（*Nature Methods*）上<sup>[1](https://www.nature.com/articles/s41592-024-02201-0)</sup>。经过迁移学习后，scGPT 支持细胞类型注释、多批次整合、多组学整合、扰动响应预测和基因网络推断<sup>[1](https://www.nature.com/articles/s41592-024-02201-0)</sup>。其代码和权重在 [MIT 许可证](https://www.edgepedia.org/zh/mit-license)下分发<sup>[1](https://www.nature.com/articles/s41592-024-02201-0)</sup>。

| 关键事实 | 详情 |
|---|---|
| 它是什么 | 一个面向单细胞多组学的生成式预训练 Transformer 基础模型，在超过 3300 万个细胞上预训练<sup>[1](https://www.nature.com/articles/s41592-024-02201-0)</sup> |
| 预训练语料 | 超过 3300 万个人类正常细胞（包括重复细胞），覆盖 51 个组织和 441 项研究<sup>[2](https://media.springernature.com/original/springer-static/esm/art%3A10.1038%2Fs41580-024-00756-6/MediaObjects/41580_2024_756_MOESM1_ESM.pdf)</sup> |
| 模型规模 | 约 5000 万参数；12 层 Transformer，8 个注意力头，参数数量约为 Geneformer 的 3 倍<sup>[2](https://media.springernature.com/original/springer-static/esm/art%3A10.1038%2Fs41580-024-00756-6/MediaObjects/41580_2024_756_MOESM1_ESM.pdf)</sup><sup> • </sup><sup>[3](https://link.springer.com/article/10.1186/s13059-025-03574-x)</sup> |
| 输入设计 | 基因标记、按每个细胞分别分箱到基于分位数的箱中的非零表达值（零值单独一箱），以及条件标记；基因被当作自然语言生成中的词一样处理<sup>[4](https://www.biorxiv.org/content/10.1101/2023.04.30.538439v2.full)</sup><sup> • </sup><sup>[3](https://link.springer.com/article/10.1186/s13059-025-03574-x)</sup><sup> • </sup><sup>[13](https://scgpt.readthedocs.io/en/latest/_modules/scgpt/preprocess.html)</sup> |
| 微调后的任务 | 细胞类型注释、多批次和多组学整合、扰动响应预测、基因网络推断<sup>[1](https://www.nature.com/articles/s41592-024-02201-0)</sup> |
| 许可证与获取 | MIT 许可证；代码位于 GitHub 和 Zenodo，权重也位于 Hugging Face<sup>[1](https://www.nature.com/articles/s41592-024-02201-0)</sup><sup> • </sup><sup>[5](https://huggingface.co/tdc/scGPT)</sup> |
| 独立基准测试 | 零样本下，scGPT 不如高变基因选择配合 Harmony 或 scVI 等简单基线，且一个训练均值（Train Mean）基线在四个 Perturb-seq 数据集上胜过它<sup>[3](https://link.springer.com/article/10.1186/s13059-025-03574-x)</sup><sup> • </sup><sup>[6](https://link.springer.com/article/10.1186/s12864-025-11600-2)</sup> |

## 背景：单细胞数据与基础模型

面向单细胞数据的基础模型沿用了产生大语言模型的那套方法：在一个大型无标注语料上预训练一个 Transformer，然后把学到的表示迁移到更小的下游任务上。开发者称 scGPT 是单细胞领域首个采用生成式预训练方法的基础模型，它使用堆叠的 Transformer 层和多头注意力，同时生成细胞嵌入和基因嵌入<sup>[4](https://www.biorxiv.org/content/10.1101/2023.04.30.538439v2.full)</sup>。

该工作流程分为两个阶段：在大型细胞图谱上进行通用预训练，随后在更小的数据集上针对具体应用进行微调<sup>[4](https://www.biorxiv.org/content/10.1101/2023.04.30.538439v2.full)</sup>。

## 架构与训练

scGPT 的输入由三个主要部分组成：基因（或峰）标记、表达值和条件标记<sup>[4](https://www.biorxiv.org/content/10.1101/2023.04.30.538439v2.full)</sup>。每个基因被视为最小的信息单元，类似于自然语言生成中的一个词，词表由跨研究的基因并集构建<sup>[4](https://www.biorxiv.org/content/10.1101/2023.04.30.538439v2.full)</sup>。由于表达值是连续的而非离散的，scGPT 对每个基因表达向量进行预处理：按每个细胞分别将非零表达值分箱到基于分位数的箱中，并为零值保留单独一箱；分箱后的值和基因标记分别嵌入，然后在嵌入空间中相加<sup>[3](https://link.springer.com/article/10.1186/s13059-025-03574-x)</sup><sup> • </sup><sup>[13](https://scgpt.readthedocs.io/en/latest/_modules/scgpt/preprocess.html)</sup>。

预训练是自监督的，使用专门设计的注意力掩码和生成式训练流程来联合优化细胞表示和基因表示<sup>[4](https://www.biorxiv.org/content/10.1101/2023.04.30.538439v2.full)</sup>。预训练将基于提示的组件（基因提示和细胞提示）与基于掩码的组件（注意力掩码）结合起来<sup>[2](https://media.springernature.com/original/springer-static/esm/art%3A10.1038%2Fs41580-024-00756-6/MediaObjects/41580_2024_756_MOESM1_ESM.pdf)</sup>。一个掩码语言建模任务预测被掩码的基因表达箱，并使用细胞嵌入迭代地细化它们<sup>[3](https://link.springer.com/article/10.1186/s13059-025-03574-x)</sup>。对于扰动任务，scGPT 在被扰动基因的标记中加入一个扰动标记，以建模扰动效应<sup>[6](https://link.springer.com/article/10.1186/s12864-025-11600-2)</sup>。

## 任务与应用

经过迁移学习后，该模型支持细胞类型注释、多批次整合、多组学整合、扰动响应预测和基因网络推断<sup>[1](https://www.nature.com/articles/s41592-024-02201-0)</sup>。在美国癌症研究协会（AACR）会议上展示的一项针对胰腺导管腺癌临床试验单核数据的真实世界评估中，零样本 scGPT 在聚类方面表现强劲，但在基因表达预测和重建方面表现欠佳，而微调显著提升了包括治疗扰动预测和基因调控网络推断在内的各项任务能力<sup>[7](https://aacrjournals.org/cancerres/article/84/17_Supplement_2/A029/747634/Abstract-A029-Evaluating-and-interpreting-scGPT-A)</sup>。

下游研究人员还将 scGPT 嵌入用作其他模型的输入。一篇 2025 年预印本使用 scGPT-human 零样本检查点嵌入单细胞数据，以增强 DeepCDR 药物反应预测框架；scGPT 嵌入的维度为 512，而 scFoundation 为 768<sup>[8](https://arxiv.org/html/2504.14361v2)</sup>。

## 数字一览

推荐的全人类检查点在 3300 万个正常人类细胞上预训练<sup>[9](https://github.com/bowang-lab/scGPT/)</sup>；综述补充数据将该语料描述为超过 3300 万个人类正常细胞（包括重复细胞），覆盖 51 个组织和 441 项研究，模型规模为 5000 万参数<sup>[2](https://media.springernature.com/original/springer-static/esm/art%3A10.1038%2Fs41580-024-00756-6/MediaObjects/41580_2024_756_MOESM1_ESM.pdf)</sup>。组织和疾病特异性检查点包括脑（1320 万个细胞）、血液（1030 万）、肺（210 万）、心脏（180 万）、泛癌（570 万）和肾（81.4 万）<sup>[9](https://github.com/bowang-lab/scGPT/)</sup>。与 [Geneformer](https://www.edgepedia.org/zh/geneformer) 相比，scGPT 的参数数量是它的 3 倍，使用 12 层 Transformer 和 8 个注意力头<sup>[3](https://link.springer.com/article/10.1186/s13059-025-03574-x)</sup>。

在 3300 万个细胞上的参考映射使用 faiss 相似性搜索库：索引占用不到 1 GB 内存，在 GPU 上对 1 万个查询细胞进行相似性搜索耗时不到 1 秒<sup>[9](https://github.com/bowang-lab/scGPT/)</sup>。

## 与其他单细胞模型的比较

独立评估检验了基础模型增加的规模和预训练是否能转化为更好的下游结果。在 2025 年发表于《基因组生物学》（*Genome Biology*）的一项零样本评估中，以平均 BIO（AvgBio）分数判断，scGPT 和 Geneformer 在细胞类型聚类上都落后于选择高变基因（HVG）并配合 Harmony 和 scVI 等成熟方法的策略——即便是在相似组织和技术条件下的有利基准上也是如此，而且两者都难以处理批次效应。<sup>[3](https://link.springer.com/article/10.1186/s13059-025-03574-x)</sup>

扰动预测显示出同样的模式。一项发表于《BMC基因组学》（*BMC Genomics*）的基准测试覆盖四个 Perturb-seq 数据集（Adamson、Norman、Replogle K562、Replogle RPE1），发现基础模型总体上不如一个预测训练样本均值的简单基线：训练均值（Train Mean）达到的皮尔逊相关系数分别为 0.711、0.557、0.373 和 0.628，而 scGPT 为 0.641、0.554、0.327 和 0.596<sup>[6](https://link.springer.com/article/10.1186/s12864-025-11600-2)</sup>。一个带有[基因本体](https://www.edgepedia.org/zh/gene-ontology)（Gene Ontology）特征的随机森林回归器大幅优于基础模型，在四个数据集上分别为 0.739、0.586、0.480 和 0.648<sup>[6](https://link.springer.com/article/10.1186/s12864-025-11600-2)</sup>。一项相关的 2025 年《自然·方法》比较将五个基础模型和另外两个深度学习模型与简单基线进行对照，结论是：尽管微调需要大量计算开销，没有任何一个深度学习模型能够持续优于均值预测或线性模型<sup>[10](https://www.nature.com/articles/s41592-025-02772-6)</sup>。

这些发现与开发者自己的报告相矛盾，后者称微调后的 scGPT 在其任务套件中表现强劲。这一分歧尚未解决：开发者评估的是微调后的性能和规模扩展行为，而独立研究评估的是零样本使用，并与刻意简单的基线进行比较<sup>[1](https://www.nature.com/articles/s41592-024-02201-0)</sup><sup> • </sup><sup>[3](https://link.springer.com/article/10.1186/s13059-025-03574-x)</sup>。

## 反响与局限

有记录的最强局限涉及批次效应。开发者本人也承认，纯粹的自监督预训练并不能天然减轻 II 型技术（批次）效应，并认为这一局限是为保持“无偏”预训练而必须作出的取舍<sup>[11](https://github.com/bowang-lab/scGPT/tree/main/tutorials/zero-shot)</sup>。

零样本性能与微调性能之间的差距在各项评估中反复出现。《基因组生物学》研究进一步表明，扩大预训练数据并不能可靠地提升 scGPT 的性能，而且即便是预训练期间遇到过的数据，其细胞类型聚类表现也很弱。<sup>[3](https://link.springer.com/article/10.1186/s13059-025-03574-x)</sup> AACR 临床数据评估同样发现零样本聚类表现强劲，但基因表达预测和重建表现欠佳，需要微调才能显著提升性能<sup>[7](https://aacrjournals.org/cancerres/article/84/17_Supplement_2/A029/747634/Abstract-A029-Evaluating-and-interpreting-scGPT-A)</sup>。《自然·方法》的作者总结道，基础模型提供细胞状态的可泛化表示并预测尚未进行的实验结果这一目标仍然难以实现<sup>[10](https://www.nature.com/articles/s41592-025-02772-6)</sup>。

## 近期进展

经同行评审的《自然·方法》论文于 2024 年发表<sup>[1](https://www.nature.com/articles/s41592-024-02201-0)</sup>。2023 年 12 月 31 日，开发者发布了零样本应用教程和一个持续预训练检查点 scGPT_CP；该检查点继承全人类检查点，并在持续预训练阶段由来自 Tabula Sapiens 数据集的额外细胞类型标签进一步监督，在细胞嵌入任务上取得相当或更好的零样本性能，尤其是在存在批次效应的数据集上<sup>[9](https://github.com/bowang-lab/scGPT/)</sup><sup> • </sup><sup>[11](https://github.com/bowang-lab/scGPT/tree/main/tutorials/zero-shot)</sup>。2024 年 2 月 26 日，团队宣布在 integrate-huggingface-model 分支上初步支持使用 [Hugging Face](https://www.edgepedia.org/zh/hugging-face) 运行预训练工作流程<sup>[9](https://github.com/bowang-lab/scGPT/)</sup>。2025 年 2 月，后续预印本 scGPT-spatial 将 scGPT 的持续预训练应用于空间转录组学，支持细胞类型解卷积和情境化缺失基因表达插补，并优于许多现有方法<sup>[12](https://www.biorxiv.org/content/10.1101/2025.02.05.636714v1)</sup>。

## 获取与运行模型

代码库在 MIT 许可证下公开于 GitHub 和 Zenodo（DOI 10.5281/zenodo.10466117）<sup>[1](https://www.nature.com/articles/s41592-024-02201-0)</sup>。权重也在 Hugging Face 上镜像<sup>[5](https://huggingface.co/tdc/scGPT)</sup>。该软件适用于 Python >= 3.7.13 和 R >= 3.6.1，可从 PyPI 安装；自 2023 年 11 月 7 日起，flash-attention 成为可选依赖项，使预训练权重能够加载到 PyTorch CPU、GPU 和 flash-attn 后端上<sup>[9](https://github.com/bowang-lab/scGPT/)</sup>。基于 faiss 的参考映射工作流程可在不到 1 GB 内存中运行 3300 万细胞索引，并在 GPU 上对 1 万个查询细胞进行亚秒级搜索<sup>[9](https://github.com/bowang-lab/scGPT/)</sup>。

## References

1. [scGPT: toward building a foundation model for single-cell multi-omics using generative AI, Nature Methods (2024)](https://www.nature.com/articles/s41592-024-02201-0)
2. [Supplementary material: Harnessing the deep learning power of foundation models in single-cell omics, Nature Reviews Molecular Cell Biology (2024)](https://media.springernature.com/original/springer-static/esm/art%3A10.1038%2Fs41580-024-00756-6/MediaObjects/41580_2024_756_MOESM1_ESM.pdf)
3. [Zero-shot evaluation reveals limitations of single-cell foundation models, Genome Biology (2025)](https://link.springer.com/article/10.1186/s13059-025-03574-x)
4. [scGPT: Towards Building a Foundation Model for Single-Cell Multi-omics Using Generative AI, bioRxiv preprint](https://www.biorxiv.org/content/10.1101/2023.04.30.538439v2.full)
5. [tdc/scGPT, Hugging Face](https://huggingface.co/tdc/scGPT)
6. [Benchmarking foundation cell models for post-perturbation RNA-seq prediction, BMC Genomics (2025)](https://link.springer.com/article/10.1186/s12864-025-11600-2)
7. [Abstract A029: Evaluating and interpreting scGPT in real-world cancer clinical trial data, Cancer Research (AACR)](https://aacrjournals.org/cancerres/article/84/17_Supplement_2/A029/747634/Abstract-A029-Evaluating-and-interpreting-scGPT-A)
8. [Integrating Single-Cell Foundation Models with Graph Neural Networks for Drug Response Prediction, arXiv (2025)](https://arxiv.org/html/2504.14361v2)
9. [bowang-lab/scGPT, official GitHub repository](https://github.com/bowang-lab/scGPT/)
10. [Deep-learning-based gene perturbation effect prediction does not yet outperform simple linear baselines, Nature Methods (2025)](https://www.nature.com/articles/s41592-025-02772-6)
11. [scGPT zero-shot tutorials, official documentation](https://github.com/bowang-lab/scGPT/tree/main/tutorials/zero-shot)
12. [scGPT-spatial: Continual Pretraining of Single-Cell Foundation Model for Spatial Transcriptomics, bioRxiv (February 2025)](https://www.biorxiv.org/content/10.1101/2025.02.05.636714v1)
13. [scgpt.preprocess, scGPT 0.2.1 documentation](https://scgpt.readthedocs.io/en/latest/_modules/scgpt/preprocess.html)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 现代人工智能：基础模型、生成式人工智能与人工智能产业 › Model families and named models

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/scgpt

English original: https://www.edgepedia.org/scgpt
