20
読む人: 慶應義塾大学大学院 山本眞大 Context Gates for Neural Machine Translation 最先端NLP勉強会 Zhaopeng Tu, Yang Liu, Zhengdong Lu, Xiaohua Liu, Hang Li (TACL2017) 基本的に図表は原論文からの引用です。

最先端NLP勉強会 Context Gates for Neural Machine Translation

Embed Size (px)

Citation preview

Page 1: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

読む人: 慶應義塾大学大学院

山本眞大

Context Gates for Neural Machine Translation

最先端NLP勉強会

Zhaopeng Tu, Yang Liu, Zhengdong Lu, Xiaohua Liu, Hang Li (TACL2017)

※基本的に図表は原論文からの引用です。

Page 2: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

概要 1

• NMTにおいて、sourceとtargetのcontextが

adequacyとfluencyにどう影響するかを調査

• sourceのcontext: adequacyに影響

• targetのcontext: fluencyに影響adequacy: sourceの単語が正確に翻訳できているか

fluency : 単語のつながりの自然さ

• (直感的にも…)

• 内容語を生成する際: sourceのcontextを参照すべき

• 機能語を生成する際: targetのcontextを参照すべき

• 既存のNMT: 各contextを均一に扱う

→ sourceとtargetのcontextを動的に参照するための

gate (context gates)を提案

Page 3: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

Neural Machine Translation 2

• 翻訳確率

• i番目の単語の生成確率

入力系列出力系列

Encoderの情報Decoderの隠れ層

線形変換を行った後、sofrmax関数を適用する

Page 4: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

Neural Machine Translation 3

• i番目のデコーダの隠れ層

単語ベクトルRNNtarget context source context

Page 5: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

Source & Target Contextの影響の調査 4

• 目的: sourceとtargetのcontextが

adequacyとfluencyに影響するかを調査

• 方法:デコーダの隠れ層の計算方法を変更

• 一般的な計算方法

• 今回の計算方法

target context source contextスカラー値

スカラー値

Page 6: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

Source & Target Contextの影響の調査 5

• 定性的な調査

(a, b) = (1.0, 0.5)

Fluencyが低い

(a, b) = (0.5, 1.0)

Adequacyが低い

Page 7: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

Source & Target Contextの影響の調査 6

• 翻訳の長さについての調査

• targetの割合を減少

→ 長い文が生成されやすい

• sourceの割合を減少

→ 短い文が生成されやすい

Page 8: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

Source & Target Contextの影響の調査 7

• AdequacyとFluencyに関する調査

• sourceの割合を減少

→ Adequecyが減少

• targetの割合を減少

→ Fluencyが減少

+ Adequecyも減少

なぜ?

・繰り返しによる生成長の限界

Page 9: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

Context Gatesを導入したNMT 8

• Context gatesの基本的な構成

• 各contextをどの程度利用するか計算 ( )

• 各context と を要素毎に乗算

• sourceのみ: source

• targetのみ : target

• 両方 : both

Page 10: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

Context Gatesを導入したNMT 9

• source: sourceのcontextと を要素毎に乗算

※一般的な計算方法

要素積

Page 11: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

Context Gatesを導入したNMT 10

• target: targetのcontextと を要素毎に乗算

※一般的な計算方法

Page 12: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

Context Gatesを導入したNMT 11

• both: 両方のcontextと を要素毎に乗算

※一般的な計算方法

Page 13: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

実験 12

• 中英翻訳

• LDCコーパス (1.25M 対訳対)

• 実験内容

• 翻訳の質の評価 (BLEU, 主観)

• アライメントの質の評価

• ネットワーク構造の分析

• 文長の影響の調査

• 比較手法

• Moses: SMT

• GroundHog: NMT

• GroundHog-Coverge: 被覆を導入したNMT

Page 14: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

実験 13

• 翻訳の質の評価: BLEUによる評価

• #2-4: パラメータを減らしつつ、GRUと同じくらいの性能

• #4-7: 提案手法による性能の向上、bothが一番良い性能

• #1, 8-9: 提案手法による性能の向上、SMTよりも高い性能

Page 15: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

実験 14

• 翻訳の質の評価: 主観評価

• ランダム選択した200文を2名の主観で評価

• 出力された2文を見てどちらが良いか判断

• 結果

• Adequacy: 30%良, 52%同じ, 18%悪

• Fluency : 29%良, 52%同じ, 19%悪

Page 16: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

実験 15

• アライメントの質の評価

• GroundHogにcontext gateを加えても良くならない

• 被覆の概念を導入したモデルに加えると良くなる

※低いほうが良い

Page 17: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

実験 16

• アライメントの質の評価

Page 18: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

実験 17

• ネットワーク構造の分析

• #2-3: 要素積により性能が向上

• #3-4: 両方参照したほうがいい

• #4-5: Encoderの情報を使ったほうがいい

• #5-6: 1個前に生成された単語の情報は有用

Page 19: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

実験 18

• 文長の影響の調査

• 長い文についても、GroundHogほど精度が落ちない

Page 20: 最先端NLP勉強会 Context Gates for  Neural Machine Translation

まとめ 19

• 各contextがadequacyとfluencyにどう影響するか調査

• source context: adequacyに影響

• target context : fluencyに影響

• context gateを提案

• 動的に各contextの影響をコントロール可能