# 神经机器翻译

**神经机器翻译**（Neural machine translation，NMT）是一种端到端的自动翻译方法，其中神经网络在平行文本上训练，将源语言句子直接映射为目标语言句子。与基于短语的机器翻译不同——后者将输入句子拆成词和短语，并基本独立地翻译——NMT 将整个输入句子视为一个单元，因此需要的人工设计选择更少。<sup>[1](https://research.google/blog/a-neural-network-for-machine-translation-at-production-scale/?hl=in)</sup> 自2016年首次生产部署以来，NMT 已在主要商业服务中取代基于短语的系统，并成为机器翻译的主导研究范式。<sup>[1](https://research.google/blog/a-neural-network-for-machine-translation-at-production-scale/?hl=in)</sup><sup> • </sup><sup>[2](https://research.google/pubs/googles-neural-machine-translation-system-bridging-the-gap-between-human-and-machine-translation/)</sup>

| 关键事实 | 详情 |
|---|---|
| 核心思想 | 将整个输入句子视为一个翻译单元，而不是像基于短语的机器翻译那样基本独立地翻译词和短语<sup>[1](https://research.google/blog/a-neural-network-for-machine-translation-at-production-scale/?hl=in)</sup> |
| 首个生产系统 | 谷歌神经机器翻译（Google Neural Machine Translation，GNMT），于2016年9月27日宣布，并部署到100%的中译英翻译中，每天约1800万次<sup>[1](https://research.google/blog/a-neural-network-for-machine-translation-at-production-scale/?hl=in)</sup> |
| 实测增益 | 由双语人工评分员对抽样的维基百科和新闻句子进行评判，GNMT 在若干主要语言对上将翻译错误降低了55%以上至85%<sup>[1](https://research.google/blog/a-neural-network-for-machine-translation-at-production-scale/?hl=in)</sup> |
| 架构里程碑 | Transformer（2017）完全摒弃了循环和卷积；在 WMT 2014 英译德上得分28.4 BLEU，在英译法上得分41.8 BLEU<sup>[3](https://arxiv.org/abs/1706.03762)</sup> |
| 稀有词处理 | 2016年为 NMT 引入的子词分词（字节对编码）将 WMT 15 英→德和英→俄分别提升最多1.1和1.3 BLEU，后来成为大多数大语言模型的默认分词方法<sup>[4](https://aclanthology.org/P16-1162/)</sup> |
| 已知失效模式 | 暴露偏差会导致领域偏移下的幻觉，并导致随着束宽增加性能下降<sup>[5](https://aclanthology.org/2020.acl-main.326/)</sup> |
| 低资源前沿 | NLLB-200 项目将 NMT 扩展到200种语言；挖掘数据加回译在将极低资源语言翻译成英语时带来 +12.5 chrF++<sup>[6](https://www.nature.com/articles/s41586-024-07335-x)</sup> |

## NMT 如何工作

NMT 系统是一个序列到序列神经网络，其编码器读取源句子，解码器逐个生成词元，组成目标句子。早期最佳模型通过注意力机制连接编码器和解码器，使解码器能够关注与正在生成的词最相关的源词；在 GNMT 的中译英可视化中，解码器在每一步关注编码源向量上的加权分布。<sup>[3](https://arxiv.org/abs/1706.03762)</sup><sup> • </sup><sup>[1](https://research.google/blog/a-neural-network-for-machine-translation-at-production-scale/?hl=in)</sup>

**扩展到生产环境。** 由谷歌（Google）的吴永辉（Yonghui Wu）、迈克·舒斯特（Mike Schuster）、国·V·黎（Quoc V. Le）及其同事描述的 GNMT，使用深度 LSTM 网络，包含8个编码器层和8个解码器层，并带有注意力和残差连接；它将最底层解码器层连接到最顶层编码器层以提高并行性，并使用低精度算术来加速推理。<sup>[2](https://research.google/pubs/googles-neural-machine-translation-system-bridging-the-gap-between-human-and-machine-translation/)</sup> 部署依赖 [TensorFlow](https://www.edgepedia.org/zh/tensorflow) 和张量处理单元（Tensor Processing Units，TPU），它们提供了满足[谷歌翻译](https://www.edgepedia.org/zh/google-translate)（Google Translate）延迟要求所需的计算能力。<sup>[1](https://research.google/blog/a-neural-network-for-machine-translation-at-production-scale/?hl=in)</sup> 在这些工程改动之前，NMT 在规模不大的公开基准上已表现出与基于短语的系统相当的准确率，但速度和准确率都不足以投入生产使用。<sup>[1](https://research.google/blog/a-neural-network-for-machine-translation-at-production-scale/?hl=in)</sup>

**Transformer。** 2017年，阿希什·瓦斯瓦尼（Ashish Vaswani）及其同事提出了 [Transformer](https://www.edgepedia.org/zh/transformer)，这是一种完全基于注意力机制的架构，完全摒弃了循环和卷积。它被证明质量更优，同时更可并行化、训练速度快得多：在八块 GPU 上训练3.5天后，在 WMT 2014 英译法上达到41.8 BLEU，训练成本仅为此前最佳模型的一小部分。<sup>[3](https://arxiv.org/abs/1706.03762)</sup> Transformer 模型仍然是当前最先进 NMT 系统的标准。<sup>[7](https://aclanthology.org/2020.icon-adapmt.4/)</sup>

## 处理稀有词

早期 NMT 系统难以处理稀有词，这一问题阻碍了实际部署。<sup>[2](https://research.google/pubs/googles-neural-machine-translation-system-bridging-the-gap-between-human-and-machine-translation/)</sup> 有两条工作路线解决了它。GNMT 将词划分为一组有限的常见子词单元（“词片”），用于输入和输出，在字符级模型的灵活性与词级模型的效率之间取得平衡。<sup>[2](https://research.google/pubs/googles-neural-machine-translation-system-bridging-the-gap-between-human-and-machine-translation/)</sup> 独立地，里科·森里希（Rico Sennrich）、巴里·哈多（Barry Haddow）和亚历山德拉·伯奇（Alexandra Birch）引入了基于字节对编码压缩算法的子词切分，在回退词典基线上将 WMT 15 英→德和英→俄分别提升最多1.1和1.3 BLEU。<sup>[4](https://aclanthology.org/P16-1162/)</sup> ACL 社区后来以时间检验奖（Test of Time Award）表彰这项工作，指出字节对编码已成为大多数大语言模型的默认分词方法。<sup>[4](https://aclanthology.org/P16-1162/)</sup>

## 失效模式：幻觉与暴露偏差

NMT 系统可能产生**幻觉**，即完全脱离源材料的译文。谷歌的[阿希什·阿加瓦尔](https://www.edgepedia.org/zh/ashish-agarwal)（Ashish Agarwal）及其同事表明，许多常见的 NMT 架构变体都容易产生幻觉，用简单搜索就能找到这类幻觉，而一种数据增强技术能显著降低其频率；产生幻觉的网络会在注意力矩阵和解码器稳定性度量中显示出特征。<sup>[8](https://research.google/pubs/hallucinations-in-neural-machine-translation/)</sup>

王超军（Chaojun Wang）和里科·森里希（Rico Sennrich）2020年的一项研究将幻觉与**暴露偏差**联系起来，即标准训练过程与推理之间的不匹配：训练时模型以金标准前序词元为条件，推理时则以自身输出为条件。在三个数据集、多个测试领域的实验中，他们表明暴露偏差是领域偏移下幻觉的部分原因，避免暴露偏差的最小风险训练（Minimum Risk Training）可以缓解这一点，并且暴露偏差还与束搜索问题有关——随着束宽增加，翻译质量会下降。减少暴露偏差可以提高对领域偏移的鲁棒性，即使它不能改善域内测试性能。<sup>[5](https://aclanthology.org/2020.acl-main.326/)</sup>

## 领域适应与术语

神经网络需要大量数据且对领域敏感，因此在通用数据上训练的 NMT 引擎在被要求翻译来自新领域、包含许多特定技术术语的文本时，往往表现不佳。<sup>[9](https://aclanthology.org/D19-5606/)</sup><sup> • </sup><sup>[10](https://aclanthology.org/2018.eamt-main.15/)</sup> 适应方法包括基于语料的微调、基于实例的适应（即时微调，并可在翻译时处理多个领域）、使用领域分类器的成本加权、嵌入层的词汇适应，以及用单一网络覆盖多个领域的领域控制。<sup>[10](https://aclanthology.org/2018.eamt-main.15/)</sup><sup> • </sup><sup>[11](https://aclanthology.org/W17-3205/)</sup><sup> • </sup><sup>[12](https://aclanthology.org/2020.findings-emnlp.381/)</sup><sup> • </sup><sup>[13](https://aclanthology.org/R17-1049/)</sup> 基于实例的适应显著提升了领域特定术语的翻译准确率，其质量可与更昂贵的基于语料的方法相媲美。<sup>[10](https://aclanthology.org/2018.eamt-main.15/)</sup> 组织还可以在解码期间注入经审核的术语，将词元与注意力向量对齐，并插入获批的术语译文。<sup>[14](https://aclanthology.org/2020.lrec-1.593/)</sup>

## 低资源与多语言翻译

由于缺乏大型平行语料库，NMT 在低资源语言对上的表现仍弱于高资源语言对。<sup>[15](https://doi.org/10.1145/3567592)</sup> 多语言模型在一个系统上训练多种语言对，其表现优于双语对应系统，尤其是当语言数量较少且语言相关时。<sup>[15](https://doi.org/10.1145/3567592)</sup> 回译（back-translation）用目标侧为人工撰写、源侧为机器生成的合成句对来扩充平行数据，在最先进的系统中被广泛采用，在平行数据稀缺时尤其有用。<sup>[16](https://research.google/blog/recent-advances-in-google-translate/)</sup>

零样本翻译（zero-shot translation），即在没有平行训练数据的语言方向之间翻译，是可能的但不稳定：在一个多语言系统中，零样本性能在不同训练运行之间波动超过6 BLEU，而通过单一桥接语言（如英语）进行训练会导致一种失效模式，即模型忽略语言标签并产生英语输出；非英语语言对中的少量平行数据减少了这种偏差。<sup>[17](https://aclanthology.org/2020.wmt-1.64/)</sup> NLLB-200 项目将多语言 NMT 扩展到200种语言，使用覆盖148个英语中心语言对和1,465个非英语中心语言对的挖掘双语文本、用于挖掘平行数据的 LASER3 句子编码，以及分阶段引入语言对的课程学习；挖掘数据加回译为将极低资源语言翻译成英语带来 +12.5 chrF++。<sup>[6](https://www.nature.com/articles/s41586-024-07335-x)</sup>

## 评估

最广泛使用的自动指标是 **BLEU**，它给系统译文与人工生成的参考译文之间的相似度打分。<sup>[16](https://research.google/blog/recent-advances-in-google-translate/)</sup> BLEU 对高质量系统存在已知缺陷，包括来自翻译腔的偏差——翻译文本会携带源语言的词序等属性。<sup>[16](https://research.google/blog/recent-advances-in-google-translate/)</sup> 此后引入了学习型神经指标：由里卡多·雷伊（Ricardo Rei）、克雷格·斯图尔特（Craig Stewart）、安娜·C·法里尼亚（Ana C Farinha）和阿隆·拉维（Alon Lavie）提出的 COMET，在直接评估（Direct Assessments）、人工介导的翻译编辑率（Human-mediated Translation Edit Rate）和多维质量指标（Multidimensional Quality Metrics）等人工判断上训练多语言评估模型，同时利用源输入和目标语言参考，并在 WMT 2019 指标共享任务上取得了与人工判断相关性的最先进水平。<sup>[18](https://aclanthology.org/2020.emnlp-main.213/)</sup>

## 部署

谷歌于2016年11月将 NMT 引入谷歌翻译，最初支持英语、法语、德语、西班牙语和中文，一次翻译整个句子，而不是逐短语翻译。<sup>[19](https://time.com/4572942/google-translate-app-update-2016/)</sup><sup> • </sup><sup>[20](https://docs.cloud.google.com/translate/docs/advanced/nmt-model)</sup> 2020年6月的一次更新报告称，相较于之前的 GNMT 模型，平均 BLEU 提升 +5 分，其中50种最低资源语言平均提升 +7 BLEU，这一改进可与四年前从基于短语的翻译到 NMT 的原始转变相媲美。<sup>[16](https://research.google/blog/recent-advances-in-google-translate/)</sup> 同一来源指出，NMT 比基于短语的机器翻译对数据质量更敏感，这决定了生产环境中必须如何整理训练数据。<sup>[16](https://research.google/blog/recent-advances-in-google-translate/)</sup>

## References

1. [Quoc V. Le and Mike Schuster (2016). A Neural Network for Machine Translation, at Production Scale. Google Research Blog.](https://research.google/blog/a-neural-network-for-machine-translation-at-production-scale/?hl=in)
2. [Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V. Le, et al. (2016). Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation. CoRR abs/1609.08144.](https://research.google/pubs/googles-neural-machine-translation-system-bridging-the-gap-between-human-and-machine-translation/)
3. [Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin (2017). Attention Is All You Need. arXiv:1706.03762.](https://arxiv.org/abs/1706.03762)
4. [Rico Sennrich, Barry Haddow, Alexandra Birch (2016). Neural Machine Translation of Rare Words with Subword Units. ACL 2016, pages 1715–1725.](https://aclanthology.org/P16-1162/)
5. [Chaojun Wang, Rico Sennrich (2020). On Exposure Bias, Hallucination and Domain Shift in Neural Machine Translation. ACL 2020, pages 3544–3552.](https://aclanthology.org/2020.acl-main.326/)
6. [Scaling neural machine translation to 200 languages. Nature (2024).](https://www.nature.com/articles/s41586-024-07335-x)
7. [Rejwanul Haque, Yasmin Moslem, Andy Way (2020). Terminology-Aware Sentence Mining for NMT Domain Adaptation. Adap-MT 2020.](https://aclanthology.org/2020.icon-adapmt.4/)
8. [Ashish Agarwal, Clara Wong-Fannjiang, David Sussillo, Katherine Lee, Orhan Firat (2018). Hallucinations in Neural Machine Translation. ICLR 2018.](https://research.google/pubs/hallucinations-in-neural-machine-translation/)
9. [Zi-Yi Dou, Xinyi Wang, Junjie Hu, Graham Neubig (2019). Domain Differential Adaptation for Neural Machine Translation. WNGT 2019, pages 59–69.](https://aclanthology.org/D19-5606/)
10. [M. Amin Farajian, Nicola Bertoldi, Matteo Negri, Marco Turchi, Marcello Federico (2018). Evaluation of Terminology Translation in Instance-Based Neural MT Adaptation. EAMT 2018, pages 169–178.](https://aclanthology.org/2018.eamt-main.15/)
11. [Boxing Chen, Colin Cherry, George Foster, Samuel Larkin (2017). Cost Weighting for Neural Machine Translation Domain Adaptation. First Workshop on Neural Machine Translation, pages 40–46.](https://aclanthology.org/W17-3205/)
12. [Vocabulary Adaptation for Domain Adaptation in Neural Machine Translation. Findings of EMNLP 2020.](https://aclanthology.org/2020.findings-emnlp.381/)
13. [Domain Control for Neural Machine Translation. RANLP 2017.](https://aclanthology.org/R17-1049/)
14. [Duane K. Dougal, Deryle Lonsdale (2020). Improving NMT Quality Using Terminology Injection. LREC 2020, pages 4820–4827.](https://aclanthology.org/2020.lrec-1.593/)
15. [Neural Machine Translation for Low-resource Languages: A Survey. ACM Computing Surveys (2022).](https://doi.org/10.1145/3567592)
16. [Isaac Caswell, Bowen Liang (2020). Recent Advances in Google Translate. Google Research Blog.](https://research.google/blog/recent-advances-in-google-translate/)
17. [Annette Rios, Mathias Müller, Rico Sennrich (2020). Subword Segmentation and a Single Bridge Language Affect Zero-Shot Neural Machine Translation. WMT 2020, pages 528–537.](https://aclanthology.org/2020.wmt-1.64/)
18. [Ricardo Rei, Craig Stewart, Ana C Farinha, Alon Lavie (2020). COMET: A Neural Framework for MT Evaluation. EMNLP 2020, pages 2685–2702.](https://aclanthology.org/2020.emnlp-main.213/)
19. [Google's Translation App Is About To Get Much Better. Time (16 November 2016).](https://time.com/4572942/google-translate-app-update-2016/)
20. [Neural Machine Translation (NMT) model. Google Cloud Documentation.](https://docs.cloud.google.com/translate/docs/advanced/nmt-model)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Language and vision AI › Natural language processing › NLP tasks and methods › Machine translation

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/neural-machine-translation

English original: https://www.edgepedia.org/neural-machine-translation
