HyperAIHyperAI

Command Palette

Search for a command to run...

アライメントと翻訳を結合的に学習するニューラル機械翻訳

Dzmitry Bahdanau KyungHyun Cho Yoshua Bengio

概要

ニューラル機械翻訳は、機械翻訳に対する最近提案されたアプローチであり、従来の統計的機械翻訳とは異なり、翻訳性能を最大化するために結合的にチューニング可能な単一のニューラルネットワークの構築を目指す。ニューラル機械翻訳のために最近提案されたモデルは、多くの場合、エンコーダ・デコーダモデルの一種に属し、ソース文を固定長ベクトルにエンコードし、デコーダがそこから訳文を生成する。本論文では、固定長ベクトルの使用がこの基本的なエンコーダ・デコーダアーキテクチャの性能向上におけるボトルネックであると仮定し、明示的なハードセグメントとしてこれらの部分を形成することなく、ターゲット語の予測に関連するソース文の部分に対してモデルが自動的にソフト検索を行えるようにすることで、このアーキテクチャを拡張することを提案する。この新しいアプローチにより、英仏翻訳タスクにおいて、既存の最先端の熟語ベースシステムと同等の翻訳性能を達成した。さらに、定性的分析により、モデルによって発見されたソフトアライメントが人間の直観とよく一致することが明らかになった。

One-sentence Summary

Bahdanau et al. (Jacobs University Bremen and Université de Montréal) propose an attention mechanism for neural machine translation that overcomes the fixed-length vector bottleneck by letting the decoder soft-search over relevant source positions, achieving translation performance comparable to state-of-the-art phrase-based systems on English-to-French translation.

Key Contributions

  • The paper introduces RNNsearch, an attention-based neural machine translation model that extends a standard encoder-decoder architecture by soft-searching over source words or encoder annotations when predicting each target word. This design removes the need to encode an entire source sentence into a single fixed-length vector and trains the alignment jointly with translation.

  • RNNsearch significantly outperforms the conventional encoder-decoder model RNNencdec on English-to-French translation and is reported to be more robust to source-sentence length. The results also achieve translation quality comparable to a phrase-based statistical machine translation system.

  • Qualitative analysis shows that the soft alignments produced by RNNsearch often match human intuition by linking generated target words to relevant source words or annotations. This evidence supports that the attention mechanism learns useful alignment information during translation generation.

Introduction

Neural machine translation aims to build a single large network that reads a source sentence and directly produces a translation, making machine translation more end to end than traditional phrase based systems. Early encoder decoder models compressed an entire source sentence into one fixed length vector before decoding, which limited performance on long sentences because the model had to store all information in a single bottleneck. The authors address this by introducing a model that jointly learns to align and translate, using soft search to focus on relevant source words for each generated target word, removing the fixed length bottleneck and improving translation quality, especially on longer sentences.

Dataset

  • The dataset comes from the WMT ’14 English–French parallel corpora. It includes Europarl (61M words), news commentary (5.5M words), UN (421M words), and two crawled corpora (90M and 272.5M words), for a total of 850M words.

  • The authors do not use monolingual data beyond these parallel corpora. To manage corpus size, they reduce the combined training data to 348M words using the data selection method of Axelrod et al. (2011), following the procedure described by Cho et al.

  • The training set is the selected English–French parallel corpus. The development (validation) set is created by concatenating news-test-2012 and news-test-2013. The final evaluation is performed on the WMT ’14 test set, which contains 3003 sentences that are not present in the training data.

  • For processing, the authors apply standard tokenization and build a vocabulary shortlist of the 30,000 most frequent words in each language. All out-of-vocabulary words are mapped to a special token: [UNK].

  • No additional preprocessing is applied, such as lowercasing or stemming.

Method

The authors build the translation system on an encoder-decoder structure, but they replace the fixed-length summary vector used by a conventional model with a dynamic attention mechanism that is learned jointly with the language model. The overall objective remains the same: given a source sentence x=(x1,…,xTx)\mathbf{x}=(x_1,\dots,x_{T_x})x=(x1​,…,xTx​​), produce a target sentence y=(y1,…,yTy)\mathbf{y}=(y_1,\dots,y_{T_y})y=(y1​,…,yTy​​) by factorizing the sequence probability as

p(y)=∏i=1Typ(yi∣y1,…,yi−1,x).p(\mathbf{y})=\prod_{i=1}^{T_y} p(y_i\mid y_1,\dots,y_{i-1},\mathbf{x}).p(y)=i=1∏Ty​​p(yi​∣y1​,…,yi−1​,x).

In a standard RNN encoder-decoder, the encoder first compresses the input sentence into a single context vector, and the decoder predicts each target word using that fixed representation. The authors propose to generate, instead, a separate context vector for every target position. This allows the decoder to consult the source sequence selectively while generating the next word.

Refer to the framework diagram.

The encoder is a bidirectional recurrent neural network that reads the source sentence in both directions and produces an annotation for each source token. For position jjj, the forward RNN yields a forward hidden state h→j\overrightarrow{h}_jhj​, while the backward RNN yields a backward hidden state h←j\overleftarrow{h}_jhj​. These are concatenated into an annotation vector

hj=[h→j⊤;h←j⊤]⊤.h_j=\left[\overrightarrow{h}_j^{\top};\overleftarrow{h}_j^{\top}\right]^{\top}.hj​=[hj⊤​;hj⊤​]⊤.

Because each annotation summarizes information from both preceding and following words, it provides a richer representation of the source context around xjx_jxj​.

The decoder maintains an RNN hidden state sis_isi​ and predicts the next target word yiy_iyi​ according to

p(yi∣y1,…,yi−1,x)=g(yi−1,si,ci),p(y_i\mid y_1,\dots,y_{i-1},\mathbf{x}) = g(y_{i-1}, s_i, c_i),p(yi​∣y1​,…,yi−1​,x)=g(yi−1​,si​,ci​),

where sis_isi​ is updated by

si=f(si−1,yi−1,ci).s_i=f(s_{i-1},y_{i-1},c_i).si​=f(si−1​,yi−1​,ci​).

The key change is that cic_ici​ is no longer a global vector shared across all decoding steps. It is computed as a weighted combination of the source annotations:

ci=∑j=1Txαijhj.c_i=\sum_{j=1}^{T_x}\alpha_{ij}h_j.ci​=j=1∑Tx​​αij​hj​.

The weights αij\alpha_{ij}αij​ are determined by an alignment model that scores how well the source position jjj matches the current decoding state before emitting yiy_iyi​. The score is defined as

eij=a(si−1,hj),e_{ij}=a(s_{i-1},h_j),eij​=a(si−1​,hj​),

and the final attention weights are obtained via a softmax normalization:

αij=exp⁡(eij)∑k=1Txexp⁡(eik).\alpha_{ij}=\frac{\exp(e_{ij})}{\sum_{k=1}^{T_x}\exp(e_{ik})}.αij​=∑k=1Tx​​exp(eik​)exp(eij​)​.

In this formulation, αij\alpha_{ij}αij​ can be interpreted as the probability that the target word yiy_iyi​ is aligned to the source word xjx_jxj​, and cic_ici​ is the expected annotation under this distribution. Unlike traditional machine translation pipelines, alignment is not treated as a latent variable requiring discrete inference. It is a continuous, differentiable soft alignment, so gradients from the translation loss can flow directly into the alignment model and the encoder.

This design relieves the encoder of the need to encode the entire source sentence into one fixed-length vector. Instead, the information remains distributed across the sequence of annotations, and the decoder can selectively retrieve the relevant parts of the source sequence at each generation step.

Experiment

Experiments evaluate English-to-French translation on WMT ’14 data, comparing the proposed RNNsearch model with a standard RNN Encoder–Decoder under matched training and evaluation settings. The results validate the overall effectiveness of the proposed architecture, especially for long sentences, where the baseline model loses accuracy and begins omitting or altering meaning. Qualitative alignment analysis further supports the interpretation that attention weights provide useful soft alignments, capturing both monotonic correspondences and necessary non-monotonic reordering in translations.

The attention-based RNNsearch models achieve higher BLEU scores than the corresponding encoder-decoder baselines, especially on translations that contain no unknown words. Extended training of the longer RNNsearch variant further improves performance and brings it close to the phrase-based Moses baseline on known-word sentences. The gains align with the reported advantage for translating long sentences, where the baseline loses fidelity as input length grows. RNNsearch outperforms RNNencdec on both all sentences and known-word subsets. On sentences without unknown words, RNNsearch approaches the Moses system despite Moses using additional monolingual data. Training the longer RNNsearch model further improves translation quality and supports its robustness to long sentences.

The experiments compare attention-based RNNsearch models with encoder-decoder baselines and a phrase-based Moses system using BLEU scores on all sentences and subsets without unknown words. RNNsearch consistently outperforms the encoder-decoder baseline, with stronger gains on known-word translations and sentences where longer inputs reduce baseline fidelity. Further training of a longer RNNsearch variant improves performance and approaches Moses on known-word sentences, despite Moses leveraging additional monolingual data, indicating that attention improves robustness for challenging long translations.


AIでAIを構築

アイデアからローンチまで — 無料のAIコーディング支援、すぐに使える環境、最高のGPU価格でAI開発を加速。

AI コーディング補助
すぐに使える GPU
最適な料金体系

HyperAI Newsletters

最新情報を購読する
北京時間 毎週月曜日の午前9時 に、その週の最新情報をメールでお届けします
メール配信サービスは MailChimp によって提供されています