# 蛋白质语言模型

蛋白质语言模型是一种神经网络，通常是 [Transformer](https://www.edgepedia.org/zh/transformer)，在海量氨基酸序列数据库上训练，以生成用于计算生物学中结构、功能与设计预测的表征。输入为一条蛋白质序列（对于基于 MSA 的变体，则为一个比对）；输出为逐残基嵌入、逐词元似然，或新生成的序列。奠基性结果是：一个仅在 2.5 亿条序列上训练以预测掩码氨基酸的 Transformer，其学到的表征可通过线性投影读出二级结构和长程残基接触，而推理时无需任何进化比对。<sup>[1](https://www.pnas.org/doi/10.1073/pnas.2016239118)</sup> 将此类模型扩展至 150 亿参数，使单序列原子结构预测成为可能，<sup>[2](https://doi.org/10.1126/science.ade2574)</sup> 而多模态后继模型如今可同时在序列、结构与功能三个维度上生成蛋白质。<sup>[3](https://www.science.org/doi/10.1126/science.ads0018)</sup>

| 关键事实 | 数值 |
|---|---|
| 输入 / 输出 | 输入氨基酸序列；输出逐词元嵌入、残基似然或生成序列<sup>[4](https://huggingface.co/docs/transformers/v4.52.3/model_doc/esm)</sup><sup> • </sup><sup>[5](https://github.com/evolutionaryscale/esm)</sup> |
| ESM-1b | 6.5 亿参数，33 层，在 2.5 亿条序列（860 亿氨基酸）上做掩码语言建模<sup>[1](https://www.pnas.org/doi/10.1073/pnas.2016239118)</sup> |
| ESM-2 / ESMFold | 800 万至 150 亿参数；ESMFold（36.9 亿）预测了超过 6.17 亿个宏基因组结构，其中超过 2.25 亿个为高置信度<sup>[2](https://doi.org/10.1126/science.ade2574)</sup><sup> • </sup><sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC12806033/)</sup> |
| ProtTrans 训练规模 | 六种架构，在多达 3930 亿氨基酸上训练，使用 5,616 块 GPU 及多达 1,024 核的 TPU 集群<sup>[7](https://doi.org/10.1109/tpami.2021.3095381)</sup> |
| ESM3 | 980 亿参数，以 \( 1.07 \times 10^{24} \) FLOPs 在 27.8 亿个蛋白质和 7710 亿个唯一词元上训练<sup>[3](https://www.science.org/doi/10.1126/science.ads0018)</sup> |
| 适应度基准 | ProteinGym：217 项深度突变扫描实验，超过 40 个高性能模型；TranceptEVE 综合最佳<sup>[8](https://proceedings.neurips.cc/paper_files/paper/2023/file/cac723e5ff29f65e3fcbb0739ae91bee-Paper-Datasets_and_Benchmarks.pdf)</sup> |
| 规模警示 | 变体效应与适应度表现往往在中等规模模型（约 6.5 亿参数）处达到峰值<sup>[9](https://doi.org/10.1016/j.isci.2025.113495)</sup><sup> • </sup><sup>[10](https://doi.org/10.48550/arxiv.2206.13517)</sup> |

## 工作原理

大多数蛋白质语言模型是编码器，以掩码语言建模为目标训练：随机隐藏氨基酸，模型在给定掩码序列作为上下文的情况下，最小化每个真实残基的负对数似然，\( \mathcal{L} = -\log p(x_{i} \mid x_{\backslash M}) \)。<sup>[1](https://www.pnas.org/doi/10.1073/pnas.2016239118)</sup> 在 ESM-1b 表征上做线性探针，可恢复二级结构（CB513 上八分类准确率 71.6%，与 HMM 谱的 71.2% 相当）和长程接触，在所有结构泛化层级上均超过无监督的 CCMpred 耦合分析。<sup>[1](https://www.pnas.org/doi/10.1073/pnas.2016239118)</sup>

对 ESM-2 3B 做分类雅可比计算，预测接触在 1,431 个蛋白质上的平均准确率为 0.80，而线性模型为 0.67，提示存在一种基于基序的存储方案。<sup>[11](https://www.pnas.org/doi/10.1073/pnas.2406285121)</sup> 另一种目标是自回归下一词元预测，UniRep 和 ProGen2 解码器采用此法；在 ProteinGym 上，自回归模型在零样本适应度评分中往往优于掩码模型，而两者都为有监督任务提供了有用的嵌入。<sup>[8](https://proceedings.neurips.cc/paper_files/paper/2023/file/cac723e5ff29f65e3fcbb0739ae91bee-Paper-Datasets_and_Benchmarks.pdf)</sup>

## 操作方式

实践者选择一个预训练检查点（例如 800 万至 150 亿参数的 ESM-2，或基于 T5 的 ProtT5 与 Ankh<sup>[12](https://pmc.ncbi.nlm.nih.gov/articles/PMC11358375/)</sup><sup> • </sup><sup>[13](https://doi.org/10.1101/2023.01.16.524265)</sup>），然后提取嵌入或对似然打分。ESM 仓库的 `esm-extract` 命令行接口 可导出所选层的逐词元表征、逐层平均池化向量或序列起始嵌入；无监督接触预测通过对 20 个结构做逻辑回归，拟合注意力头的稀疏线性组合。<sup>[14](https://github.com/facebookresearch/esm)</sup> 零样本变体评分则比较模型对突变氨基酸与野生型氨基酸的概率。<sup>[15](https://doi.org/10.1101/2021.07.09.450648)</sup>

对于有监督任务，微调几乎总能改善预测，优于冻结嵌入，而 LoRA 可达到相近质量，训练速度最高提升 4.5 倍；对蛋白质级任务进行 ESM-2 微调时，预测头接在第一个（特殊）词元上。<sup>[12](https://pmc.ncbi.nlm.nih.gov/articles/PMC11358375/)</sup> 数据卫生很重要：按 MMseqs2 [序列聚类](https://www.edgepedia.org/zh/sequence-clustering)（结构任务用 Foldseek）划分训练、验证和测试集，对于突变景观，在单突变体上训练、在高阶突变体上测试。<sup>[12](https://pmc.ncbi.nlm.nih.gov/articles/PMC11358375/)</sup> 算力限制是真实存在的：ESM-2 15B 即使使用 LoRA 也无法在 NVIDIA H100 GPU 上微调，即便是 3B 在包含最长蛋白质的最大规模数据集上也会失败。<sup>[16](https://link.springer.com/article/10.1038/s41598-025-05674-x)</sup>

## 起源

最早的蛋白质嵌入是非上下文化的：ProtVec 将 word2vec 的 skip-gram 方法应用于氨基酸三联体，把序列映射到 100 维潜空间。<sup>[17](https://link.springer.com/article/10.1186/s12859-019-3220-8)</sup> 上下文化模型随后于 2019 年出现。Heinzinger 及其同事将 ELMo 双向 LSTM 改造用于蛋白质，称为 SeqVec，二级结构 Q3 达到 79%。<sup>[17](https://link.springer.com/article/10.1186/s12859-019-3220-8)</sup> Alley 及其同事训练了 UniRep，一种用于蛋白质工程的下一词元 LSTM。<sup>[18](https://doi.org/10.1038/s41592-019-0598-1)</sup> 奠基性的 Transformer 模型来自 Rives 及其同事 2019 年的 bioRxiv 预印本，该工作在 2.5 亿条序列上训练了一个深度掩码语言模型，发表于 PNAS 时成为 ESM-1b。<sup>[19](https://doi.org/10.1101/622803)</sup> Elnaggar 及其同事的 ProtTrans（2021）在多达 3930 亿氨基酸上训练了 BERT、T5 及其他四种架构。<sup>[7](https://doi.org/10.1109/tpami.2021.3095381)</sup> ESM 家族随后经由 ESM-1b（2021）、MSA Transformer 与 ESM-1v（2021）以及 ESM-2 与 ESMFold（2022）逐步壮大。<sup>[14](https://github.com/facebookresearch/esm)</sup>

## 变体

**编码器模型。** ESM-1b（6.5 亿参数，33 层）是通用基线；ESM-1v 是 6.5 亿参数模型，在 9800 万条 UniRef90 序列上训练用于零样本变体效应，通常将用五个不同随机种子训练的模型集成。<sup>[1](https://www.pnas.org/doi/10.1073/pnas.2016239118)</sup><sup> • </sup><sup>[15](https://doi.org/10.1101/2021.07.09.450648)</sup> MSA Transformer 以多序列比对为输入，在 2600 万个 MSA 上训练。<sup>[20](https://doi.org/10.1101/2021.02.12.430858)</sup> ESM-2 覆盖 800 万至 150 亿参数；ESMFold 将 ESM-2 主干与折叠头耦合，无需 MSA 步骤，输出 pLDDT、ptm 和预测对齐误差。<sup>[2](https://doi.org/10.1126/science.ade2574)</sup><sup> • </sup><sup>[4](https://huggingface.co/docs/transformers/v4.52.3/model_doc/esm)</sup> ProtBERT 和 ProtT5 来自 ProtTrans 的六架构比较；ProtT5 嵌入的三态二级结构准确率达到 81% 至 87%，是首批超越基于 MSA 的最先进方法的单序列结果。<sup>[7](https://doi.org/10.1109/tpami.2021.3095381)</sup>

**生成式与多模态模型。** ProGen 是建立在 CTRL 架构上的条件解码器，在 2.8 亿条序列上训练，带有用于可控生成的控制标签。<sup>[21](https://www.nature.com/articles/s41587-022-01618-2)</sup><sup> • </sup><sup>[22](https://doi.org/10.48550/arxiv.1909.05858)</sup> ProGen2 将解码器扩展至 64 亿参数，训练于超过十亿个蛋白质。<sup>[10](https://doi.org/10.48550/arxiv.2206.13517)</sup> [ProtGPT2](https://www.edgepedia.org/zh/protgpt2) 是用于蛋白质设计的无监督解码器。<sup>[23](https://doi.org/10.1038/s41467-022-32007-7)</sup> ESM3 将序列、结构和功能表示为离散词元轨道，并在 `.generate()` 中迭代采样掩码位置；开源版本 `esm3-open-small` 有 14 亿参数，其权重和源代码以 MIT 许可证在 GitHub 上提供，更大模型通过 Forge API 提供服务。<sup>[5](https://github.com/evolutionaryscale/esm)</sup>

## 应用

**规模化结构预测。** ESMFold 为超过 6.17 亿条宏基因组序列预测了结构，其中超过 2.25 亿条为高置信度，收录于 ESM 宏基因组图谱，相比基于比对的流程加速一个数量级。<sup>[2](https://doi.org/10.1126/science.ade2574)</sup>

**变体效应。** 一套 ESM1b 工作流预测了 42,336 个人类蛋白质异构体上全部约 4.5 亿个可能的错义效应，在 ClinVar/HGMD 分类和 DMS 预测上优于其他 45 种方法。<sup>[24](https://www.nature.com/articles/s41588-023-01465-0)</sup> 在 ProteinGym 上，截至 2026 年，替换基准上综合最佳的零样本方法是 AIDO Protein-RAG（16B）和 VenusREM（平均 Spearman 0.518），而 ProteinNPT 给出最佳有监督表现。<sup>[8](https://proceedings.neurips.cc/paper_files/paper/2023/file/cac723e5ff29f65e3fcbb0739ae91bee-Paper-Datasets_and_Benchmarks.pdf)</sup><sup> • </sup><sup>[25](https://benchmarklist.com/benchmarks/proteingym/)</sup><sup> • </sup><sup>[26](https://doi.org/10.1101/2023.12.06.570473)</sup>

**生成。** 用五个家族微调的 ProGen 所生成的溶菌酶，在序列同一性低至 31.4% 的情况下，催化效率与天然溶菌酶相近。<sup>[21](https://www.nature.com/articles/s41587-022-01618-2)</sup> ESM3 产生了一种与已知荧光蛋白同一性为 58% 的明亮荧光蛋白，作者估计这相当于模拟了 5 亿年的进化。<sup>[3](https://www.science.org/doi/10.1126/science.ads0018)</sup>

## 局限与替代方案

**对进化近邻的依赖。** ESM-2 的准确率在所有模型规模上都与其训练集中序列近邻的数量强烈相关，作者认为这与模型学到了折叠物理的假说相矛盾；预测在可变剪接异构体上也一贯出错，将它们当作结构化片段处理。<sup>[11](https://www.pnas.org/doi/10.1073/pnas.2406285121)</sup> 上下文长度受二次注意力限制：ESM1b 最多处理 1,022 个氨基酸，约 12% 的人类蛋白质超过此限，需要至少 511 个残基重叠的滑动窗口。<sup>[24](https://www.nature.com/articles/s41588-023-01465-0)</sup> 对于适应度预测，性能在超过一定模型规模后下降，因为更大的模型给野生型序列分配的概率如此之高，以至于几乎所有突变都得到均匀相似的分数；<sup>[27](https://www.biorxiv.org/content/10.1101/2025.04.25.650688v2)</sup> ESM-2 的变体效应准确率在 6.5 亿参数处达到峰值（46.6 ± 17.5%），在 3B 或 15B 处没有提升。<sup>[9](https://doi.org/10.1016/j.isci.2025.113495)</sup>

**与基于 MSA 的方法比较。** 已发表的比较在 ESMFold 的准确率上存在分歧。其作者报告，对于低困惑度序列，准确率与 AlphaFold2 和 [RoseTTAFold](https://www.edgepedia.org/zh/rosettafold) 相近，<sup>[2](https://doi.org/10.1126/science.ade2574)</sup> 而一项针对 1,337 条 PDB 链的基准发现 AlphaFold2 领先（中位 TM-score 0.96，ESMFold 为 0.95），无比对方法则快 10 至 30 倍。<sup>[28](https://www.frontiersin.org/journals/genetics/articles/10.3389/fgene.2025.1715037/full)</sup> 一项 NeurIPS 2022 的比较发现，进化感知模型（AlphaFold 的 Evoformer、MSA Transformer）仅在结构预测上更优，而 ESM-1b 在大多数功能任务上更好。<sup>[29](https://papers.nips.cc/paper_files/paper/2022/file/fe066022bab2a6c6a3c57032a1623c70-Paper-Conference.pdf)</sup> 在缺乏 Pfam 注释的蛋白质上，同一基准发现三种结构工具准确率都较低，但一项综述报告 ESMFold 在孤儿蛋白和从头蛋白上表现出色，因此这一点尚无定论。<sup>[28](https://www.frontiersin.org/journals/genetics/articles/10.3389/fgene.2025.1715037/full)</sup><sup> • </sup><sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC12806033/)</sup>

## References

1. [Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences (ESM-1b)](https://www.pnas.org/doi/10.1073/pnas.2016239118)
2. [Zeming Lin and colleagues (2023). Evolutionary-scale prediction of atomic-level protein structure with a language model. Science.](https://doi.org/10.1126/science.ade2574)
3. [Simulating 500 million years of evolution with a language model (ESM3, Hayes et al., Science 2025)](https://www.science.org/doi/10.1126/science.ads0018)
4. [ESM, Hugging Face Transformers documentation](https://huggingface.co/docs/transformers/v4.52.3/model_doc/esm)
5. [EvolutionaryScale esm repository README (ESM3-open)](https://github.com/evolutionaryscale/esm)
6. [A survey of downstream applications of evolutionary scale modeling protein language models](https://pmc.ncbi.nlm.nih.gov/articles/PMC12806033/)
7. [Ahmed Elnaggar and colleagues (2021). ProtTrans: Toward Understanding the Language of Life Through Self-Supervised Learning. IEEE Transactions on Pattern Analysis and Machine Intelligence.](https://doi.org/10.1109/tpami.2021.3095381)
8. [ProteinGym: Large-Scale Benchmarks for Protein Fitness Prediction and Design](https://proceedings.neurips.cc/paper_files/paper/2023/file/cac723e5ff29f65e3fcbb0739ae91bee-Paper-Datasets_and_Benchmarks.pdf)
9. [Efficient inference, training, and fine-tuning of protein language models (iScience, 2025)](https://doi.org/10.1016/j.isci.2025.113495)
10. [Nijkamp, Erik and colleagues (2022). ProGen2: Exploring the Boundaries of Protein Language Models. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2206.13517)
11. [Protein language models learn evolutionary statistics of interacting sequence motifs](https://www.pnas.org/doi/10.1073/pnas.2406285121)
12. [Fine-tuning protein language models boosts predictions across diverse tasks](https://pmc.ncbi.nlm.nih.gov/articles/PMC11358375/)
13. [Ahmed Elnaggar and colleagues (2023). Ankh ☥: Optimized Protein Language Model Unlocks General-Purpose Modelling. bioRxiv (Cold Spring Harbor Laboratory).](https://doi.org/10.1101/2023.01.16.524265)
14. [facebookresearch/esm: official repository for Meta's transformer protein language models](https://github.com/facebookresearch/esm)
15. [Joshua Meier and colleagues (2021). Language models enable zero-shot prediction of the effects of mutations on protein function. bioRxiv (Cold Spring Harbor Laboratory).](https://doi.org/10.1101/2021.07.09.450648)
16. [Medium-sized protein language models perform well at transfer learning on realistic datasets](https://link.springer.com/article/10.1038/s41598-025-05674-x)
17. [Modeling aspects of the language of life through transfer-learning protein sequences (SeqVec)](https://link.springer.com/article/10.1186/s12859-019-3220-8)
18. [Ethan C. Alley and colleagues (2019). Unified rational protein engineering with sequence-based deep representation learning. Nature Methods.](https://doi.org/10.1038/s41592-019-0598-1)
19. [Alexander Rives and colleagues (2019). Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences. bioRxiv (Cold Spring Harbor Laboratory).](https://doi.org/10.1101/622803)
20. [Roshan Rao and colleagues (2021). MSA Transformer. bioRxiv (Cold Spring Harbor Laboratory).](https://doi.org/10.1101/2021.02.12.430858)
21. [Large language models generate functional protein sequences across diverse families (ProGen)](https://www.nature.com/articles/s41587-022-01618-2)
22. [Keskar, Nitish Shirish and colleagues (2019). CTRL: A Conditional Transformer Language Model for Controllable Generation. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1909.05858)
23. [Noelia Ferruz, Steffen Schmidt, Birte Höcker (2022). ProtGPT2 is a deep unsupervised language model for protein design. Nature Communications.](https://doi.org/10.1038/s41467-022-32007-7)
24. [Genome-wide prediction of disease variant effects with a deep protein language model (ESM1b VEP)](https://www.nature.com/articles/s41588-023-01465-0)
25. [ProteinGym Benchmark Scores & AI Model Leaderboard | BenchmarkList](https://benchmarklist.com/benchmarks/proteingym/)
26. [Pascal Notin and colleagues (2023). ProteinNPT: Improving Protein Property Prediction and Design with Non-Parametric Transformers. bioRxiv (Cold Spring Harbor Laboratory).](https://doi.org/10.1101/2023.12.06.570473)
27. [Understanding Language Model Scaling on Protein Fitness Prediction](https://www.biorxiv.org/content/10.1101/2025.04.25.650688v2)
28. [Balancing speed and precision in protein folding: a comparison of AlphaFold2, ESMFold, and OmegaFold](https://www.frontiersin.org/journals/genetics/articles/10.3389/fgene.2025.1715037/full)
29. [Exploring evolution-aware & -free protein language models as protein function predictors](https://papers.nips.cc/paper_files/paper/2022/file/fe066022bab2a6c6a3c57032a1623c70-Paper-Conference.pdf)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 现代人工智能：基础模型、生成式人工智能与人工智能产业 › Foundation-model methods and training

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/protein-language-model

English original: https://www.edgepedia.org/protein-language-model
