# Neural Machine Translation of Rare Words with Subword Units

語を小さな部分に分けて未知語も訳せるようにする翻訳手法

Rico Sennrich, Barry Haddow, Alexandra Birch · arXiv · 2015年8月31日

- **課題** 従来のNMTは語彙を固定するため、語彙にない希少語や未知語を正しく訳せませんでした。そのため辞書で代わりの語を引く方法に頼っていました。
- **手法** BPEという方法で、よく現れる文字の組を次々にまとめて部分語の辞書を作ります。辞書に入らない語は部分語の列に分けて訳させ、辞書で置き換えずに済ませます。
- **結果** 英独と英露のWMT15翻訳タスクで、辞書を使うベースラインよりBLEUが英独で1.1、英露で1.3向上しました。

## 希少語が訳せない理由

NMTは語彙を固定して学習するため、語彙に入らない語を正しく訳せないという問題を抱えています。語彙の上限は一般に30 000–50 000語程度に抑えられますが、翻訳はもともと開語彙の問題です。特に凝集語や複合語が多い言語では、語の形が次々に変わるため、この差が大きく響きます。たとえばドイツ語のAbwasser\|behandlungs\|anlangeのような複合語は、固定長のベクトルに押し込むより、部分に分けた方が扱いやすいです。

従来は、語彙外の語を辞書の引き当てに後退させて訳す方法が取られてきました。しかし、この方法は原文と訳文の語が1対1に対応するとは限らない点で前提が崩れます。さらに単語単位のモデルは未知語を訳したり生成したりできず、名前のコピーは形態変化や音写が必要な場合に足りません。

そこで本研究は、NMTのネットワーク自体に開語彙翻訳を担わせ、後退辞書を要らなくすることを目指します。

## サブワードへの分割という発想

中心となる考えは、希少語を語より小さいサブワードの列として表し、NMTにはその列を訳させることです。直感的には、名前は文字の写しや音写で、複合語は部分ごとの訳で、借用語は音韻や形態の変化規則で訳せるため、小さな単位で十分だと考えられます。この方式は語彙を固定したまま、未知の語にも同じ部分の知識を使って対応できるはずだという仮説です。

実際に学習データで50 000の頻出語に入らない100語を調べると、複合語が56、人名が21で、大半が部分の組み合わせで訳せる語でした。分割が過剰でも、NMTは一定の頑健性を示すと著者らは見ています。

既存のSMT向けの分割は保守的で、語彙を大きく減らせず未知語も残るため、本研究はより積極的な分割を狙います。

## BPEによる語彙の作り方

本研究はこれを文字の結合に応用し、最頻の文字対を新しい記号に統合していきます。語末には特殊記号を付けて、翻訳後に元の分かち書きを復元できるようにします。

マージ操作の回数は唯一のハイパーパラメータで、最終的な記号語彙の大きさは初期語彙に操作数を足した数になります。単語の境界をまたぐ対は数えず、頻度で重み付けした単語の辞書から学習します。図1は、辞書{'low','lowest','newer','wider'}から学習したマージ操作の順序を示しています。

![Figure 1: BPE merge operations learned from dic- tionary {‘low’, ‘lowest’, ‘newer’, ‘wider’}](https://refivu.com/papers/0950e659-f6cc-4852-b244-bbb2742bf059/figures/figure-a21f923d3d2302e8bd31ac351b0522ed.png?thumb=512)

**Figure 1** : BPE merge operations learned from dic- tionary {‘low’, ‘lowest’, ‘newer’, ‘wider’}.

[出典](https://arxiv.org/abs/1508.07909v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Rico Sennrich, Barry Haddow, Alexandra Birch · Neural Machine Translation of Rare Words with Subword Units · 論文の図を引用 · 元のPDFの4ページ目から図の部分を抽出しています。

テスト時は、まず単語を文字列に分け、学習済みの操作を順に当てて既知の記号にまとめます。たとえばOOVの'lower'は'low er·'に分割されます。テストデータでは、学習時に統合されて消えた記号は観測されなかったと著者らは述べています。BPEはHuffman符号のような可変長符号化と異なり、記号列が解釈可能な部分語のまま残る点が違います。

原文と訳文でBPEを別々に学習すると、同じ名前が言語ごとに違う分割になり、対応を学びにくくなります。そこで英露では、ロシア語をISO-9でラテン文字に変換して共同のBPEを学習し、結果の操作をキリル文字に戻して適用します。

## 分割方法ごとの語彙と系列長

開発データはnewstest2013、評価はnewstest2014とnewstest2015です。

表1は、ドイツ語側のコーパスを各方式で分割したときのトークン数と型数を示しています。分割なしでは1 750 000型があり、1079の未知トークンが出ます。BPEは63 000型で未知トークンが0、共同BPEは82 000型で未知トークンが32です。文字単位では550 m tokensに増え、系列が長くなります。

複合語分割では1 100 000型が残り、643の未知トークンも残ります。文字n-gramは系列が長くなるため、頻出語の上位k個だけは分割せず残す方法も検討されました。

## 英独翻訳の結果

英独では、語を単位とするWDictと、文字やBPEのサブワードを使う方式を同じ条件で比べました。アンサンブルのBLEUは、WDictの24.2に対し、BPE-J90kが24.7、文字bigramのC2-50kが25.3となりました。BPE-60kの24.5もWDictを上回っており、どのサブワード方式も辞書型を上回りました。

![Table 2: English→German translation performance (B LEU, CHR F3 and unigram F 1) on newstest2015. Ens-8: ensemble of 8 models. Best NMT system in bold. Unigram…](https://refivu.com/papers/0950e659-f6cc-4852-b244-bbb2742bf059/figures/figure-ba4d61f4dbbffb523067cc9fdc70b542.png?thumb=512)

**Table 2** : English→German translation performance (B LEU, CHR F3 and unigram F 1) on newstest2015. Ens-8: ensemble of 8 models. Best NMT system in bold. Unigram F1 (with ensembles) is computed for all words (n = 44085), rare words (not among top 50 000 in training set; n = 2900), and OOVs (not in training set; n = 1168).

[出典](https://arxiv.org/abs/1508.07909v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Rico Sennrich, Barry Haddow, Alexandra Birch · Neural Machine Translation of Rare Words with Subword Units · 論文の図を引用 · 元のPDFの6ページ目から図の部分を抽出しています。

希少語のunigram F1は、WDictの36.8%からBPE-J90kの41.8%に上がりました。希少語は評価データの9-11%ほどしか占めないため、BLEUやCHRF3では効果が薄く見えると著者らは考えています。

BLEUで最良のC2-50kと、CHRF3で最良のBPE-J90k（54.1）が一致しないのは、BLEUが精度に、CHRF3が再現率に偏るためだと著者らは考えています。構文ベースSMTの単一モデル24.4と比べると、最良のサブワード系はBLEUで上回りますが、CHRF3では上回りません。Luong et al.（2015a）の25.9は、8モデルのアンサンブルにドロップアウトを加えた条件なので、本実験と直接は比べられません。

## 英露翻訳の結果

英露では名前を辞書でそのまま写せず、音写が必要になります。

![Table 3: English→Russian translation performance (B LEU, CHR F3 and unigram F 1) on newstest2015. Ens-8: ensemble of 8 models. Best NMT system in bold. Unigram…](https://refivu.com/papers/0950e659-f6cc-4852-b244-bbb2742bf059/figures/figure-f84510bf573c515643e307fae69775ae.png?thumb=512)

**Table 3** : English→Russian translation performance (B LEU, CHR F3 and unigram F 1) on newstest2015. Ens-8: ensemble of 8 models. Best NMT system in bold. Unigram F1 (with ensembles) is computed for all words (n = 55654), rare words (not among top 50 000 in training set; n = 5442), and OOVs (not in training set; n = 851).

[出典](https://arxiv.org/abs/1508.07909v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Rico Sennrich, Barry Haddow, Alexandra Birch · Neural Machine Translation of Rare Words with Subword Units · 論文の図を引用 · 元のPDFの8ページ目から図の部分を抽出しています。

OOVの精度は9.2%から21.9%、再現率は5.2%から15.6%になり、音写を学べていることが読み取れます。

## 頻度とOOVの内訳から見た効き方

頻度順に語を並べると、どの方式も頻度が下がるほどunigram F1が落ちる傾向があります。著者らは、サブワード単位は単語よりスパースでないためだと考えています。

OOVの内訳では、WDictは再現率26.5%、精度60.6%と精度を重視する傾向があります。C2-50kは再現率33.0%、BPE-60kは精度32.4%・再現率26.6%、BPE-J90kは精度38.6%・再現率29.8%で、共同BPEが両方を改善しました。

出力例では、ベースラインは語を落とすか原文をそのままコピーする失敗をしています。research→Fo\|rs\|ch\|un\|gのような過分割でも、正しい訳が出ることがあります。BPE-60kではMirz\|ayevaとMir\|za\|evaのように原文と訳文の分割が一致せず、rakﬁskの音写でпが挿入されkが削除される誤りが見られます。

## 未検証の範囲と限界

モデル間の差は開発データで最大1 BLEUあり、単一の結果は揺れを含むと著者らは指摘しています。語彙サイズは先行研究との比較で決めたやや恣意的な選択で、最適値は今後の課題です。

1-gram表現は性能が悪かったため、報告した結果はbigram表現によるもので、テストの一部トークンは学習語彙では表せません。共同BPEでは、英語にしか現れない分割がテストトークンの0.05%で未知になります。BLEUとCHRF3は希少語の効果を過小評価している可能性があると著者らは見ています。

## 論文情報

- **著者**: Rico Sennrich, Barry Haddow, Alexandra Birch
- **学会・ジャーナル**: arXiv · プレプリント
- **公開日**: 2015年8月31日
- **登録日**: 2026年10月20日
- **更新日**: 2016年6月10日
- **バージョン**: v5
- **arXiv**: 1508.07909
- **カテゴリ**: cs.CL
- **ライセンス**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **掲載内容**: 論文情報・解説・論文の図

[元論文 ↗](https://arxiv.org/abs/1508.07909v5) · [PDF ↗](https://arxiv.org/pdf/1508.07909v5)

この解説は、Refivuの韓国語解説をAIで翻訳したものです。不正確な翻訳や誤りが含まれる可能性があります。論文と図の利用条件は各出典に従います。

## アブストラクト

Neural machine translation (NMT) models typically operate with a fixed vocabulary, but translation is an open-vocabulary problem. Previous work addresses the translation of out-of-vocabulary words by backing off to a dictionary. In this paper, we introduce a simpler and more effective approach, making the NMT model capable of open-vocabulary translation by encoding rare and unknown words as sequences of subword units. This is based on the intuition that various word classes are translatable via smaller units than words, for instance names (via character copying or transliteration), compounds (via compositional translation), and cognates and loanwords (via phonological and morphological transformations). We discuss the suitability of different word segmentation techniques, including simple character n-gram models and a segmentation based on the byte pair encoding compression algorithm, and empirically show that subword models improve over a back-off dictionary baseline for the WMT 15 translation tasks English-German and English-Russian by 1.1 and 1.3 BLEU, respectively.

## この論文を引用

Rico Sennrich, Barry Haddow, Alexandra Birch (2015). Neural Machine Translation of Rare Words with Subword Units. arXiv:1508.07909v5. https://arxiv.org/abs/1508.07909v5

**BibTeX**

```
@misc{sennrich2015neural,
  title = {{Neural Machine Translation of Rare Words with Subword Units}},
  author = {Rico Sennrich and Barry Haddow and Alexandra Birch},
  year = {2015},
  eprint = {1508.07909},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1508.07909v5}
}
```

## この論文の用語

- [BLEU](https://refivu.com/ja/terms/42cd9b97719e-bleu)
- [neural machine translation](https://refivu.com/ja/terms/17d91eb90f6d-neural-machine-translation)
- [Byte pair encoding (BPE)](https://refivu.com/ja/terms/01ca65833b58-byte-pair-encoding-bpe)
- [character n-grams](https://refivu.com/ja/terms/9a07e0fb422e-character-n-grams)
- [unigram F1](https://refivu.com/ja/terms/0814177b1311-unigram-f1)

## 関連論文

- [SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processing](https://refivu.com/ja/papers/c64c64c7-89ac-42cf-95c2-918372e7f9ad-sentencepiece-a-simple-and-language-independent-subword.md)
- [Effective Approaches to Attention-based Neural Machine Translation](https://refivu.com/ja/papers/58ab56a7-1cd5-4c5e-be62-69ff9c1387c7-effective-approaches-to-attention-based-neural-machine.md)
- [Cross-lingual Language Model Pretraining](https://refivu.com/ja/papers/8d4c53c4-5c75-4330-9085-1b84a43703b6-cross-lingual-language-model-pretraining.md)
- [OpenNMT: Open-Source Toolkit for Neural Machine Translation](https://refivu.com/ja/papers/d158ab7b-d0c6-4ffd-a069-53d34c28b7eb-opennmt-open-source-toolkit-for-neural-machine-translation.md)
- [Convolutional Sequence to Sequence Learning](https://refivu.com/ja/papers/48e91a54-308d-4269-9616-28e683053df1-convolutional-sequence-to-sequence-learning.md)
- [Google's Multilingual Neural Machine Translation System: Enabling Zero-Shot Translation](https://refivu.com/ja/papers/0924ecf7-d413-4972-9e1d-36ae4961169c-google-s-multilingual-neural-machine-translation-system.md)

## ほかの論文解説

- [SQuAD: 100,000+ Questions for Machine Comprehension of Text](https://refivu.com/ja/papers/b88d7f5b-b008-4a74-a452-4513427bbf9f-squad-100-000-questions-for-machine-comprehension-of.md)
- [Measuring Massive Multitask Language Understanding](https://refivu.com/ja/papers/c93df260-9bcd-49a6-95e1-3da2df6130ee-measuring-massive-multitask-language-understanding.md)
- [GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding](https://refivu.com/ja/papers/2481fdbe-b100-433d-877a-6976f982ccaa-gshard-scaling-giant-models-with-conditional-computation-and.md)
- [GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding](https://refivu.com/ja/papers/a5e0caad-afbf-4fa4-b072-f6f5cab0c916-glue-a-multi-task-benchmark-and-analysis-platform.md)
- [ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators](https://refivu.com/ja/papers/0e7c3940-ee80-4356-b951-389a0a857775-electra-pre-training-text-encoders-as-discriminators-rather.md)
- [Fast Inference from Transformers via Speculative Decoding](https://refivu.com/ja/papers/41a03564-b5d1-4b7f-8db4-502dbc43fbe0-fast-inference-from-transformers-via-speculative-decoding.md)
- [Constitutional AI: Harmlessness from AI Feedback](https://refivu.com/ja/papers/91e9437c-36ce-49cd-965c-18d9ca4664d6-constitutional-ai-harmlessness-from-ai-feedback.md)
- [Scaling Instruction-Finetuned Language Models](https://refivu.com/ja/papers/6f9b141d-190c-4397-9e41-4f796f4ef56e-scaling-instruction-finetuned-language-models.md)
- [Distilling the Knowledge in a Neural Network](https://refivu.com/ja/papers/d39fc594-ec58-4492-b1f4-d2d3600a6455-distilling-the-knowledge-in-a-neural-network.md)
- [GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers](https://refivu.com/ja/papers/46a31638-80a6-4626-a5e7-028ae5ccea93-gptq-accurate-post-training-quantization-for-generative-pre.md)
- [Dense Passage Retrieval for Open-Domain Question Answering](https://refivu.com/ja/papers/c44c51e1-e59a-4cb6-8e94-20a4b572abc0-dense-passage-retrieval-for-open-domain-question-answering.md)
- [ZeRO: Memory Optimizations Toward Training Trillion Parameter Models](https://refivu.com/ja/papers/30a4fae5-65d8-4fa2-8552-c186c4a4d88f-zero-memory-optimizations-toward-training-trillion-parameter.md)

---

AI解説には誤りが含まれることがあります。 [Refivu](https://refivu.com/ja/papers/0950e659-f6cc-4852-b244-bbb2742bf059-neural-machine-translation-of-rare-words-with-subword)
