본문 바로가기

NLP

Neural Machine Translation

Neural Machine Translation


Translation

Source-language text → Target-language text

 

Machine Translation

Sentence x from source language → Sentence y from target language

Most Biggest Research Area: ACL 2021 Accepted Papers, EMNLP 2021 Accepted Papers

 

 

History of Machine Translation

 


Statisical Machine Translation

(~2015)

Probabilistic model from data

P(x|y): Translation Model

P(y): Language Model

Alignment: Word-level correspondence between source sentence x and target sentence y

→ Target sentence 必, But some words have no counterpart

SMT의 한계점

 

 

Difficulties of SMT

- Extremely complex

- Many subcomponents

- Feature engineering

- Human effort to maintain

→ 단어, 문법, 용례 등 주기적인 update 必


Neural Machine Translation

2014 Neurips: Sequence-to-sequence Learning with Neural Networks

2015 ICLR: Neural Machine Translation by Jointly Learning to Align and Translate

 

Evaluation of Machine Translation

Reference: Half of my heart is in Hanana ooh na na

Predicted: Half as my heart is in Obama ooh na

 

BLEU

(Bilingual Evaluation Understudy)

- N-gram overlap between machine translation output and reference sentence

- Precision for n-grams for 1~4

- Add brevity penalty for too short translations

 

 

Diverse N-grams to calculate precisions

Reference: Half of my heart is in Havana ooh na na 

Predicted (from model 1): Half as my heart is in Obama ooh na

Predicted (from model 2): Havana na in heart my is Half ooh of na

Metric Model 1 Model 2
Precision (1-gram) 7/9 10/10
Precision (2-gram) 4/8 0/9
Precision (3-gram) 2/7 0/8
Precision (4-gram) 1/7 0/7
Brevity penalty 9/10 10/10
BLEU 0.9 x sqrt(0.07)^(1/4) 0

BLEU score의 한계점: 0 값으로 인한  BLEU score 값이 0으로 산출될 수 있음

 

Advanced/Other Evaluation Criteria

· SacreBLEU

0값을 0에 가까운 값으로 smoothing

· YiSi

· ESIM

Ground-truth와 얼마나 일치하는지가 아닌, 얼마나 의미가 유사한지를 측정

 

 

Supervised Neural Machine Translation

Open source parallel corpus: OPUS

Drawback) Many monolingual corpus, few parallel corpus

 

 

Unsupervised Neural Machine Translation

On monolingual dataset: Denoising (Encoder)

On bilingual dataset: Backtranslation (번역)

 

Denoising

Optimize the probability of encoding a nosied version of the sentence → Reconstructing with the decoder

 

Backtranslation

Retranslating sentence from the target language back to its source language

 

 

Difficulties of NMT

(in bilingual NMT)

1. Domain Mismatch

In-domain과 Out-domain 차이

Difference of In-domain and Out-domain

 

2. Amout of Traninig Data

Outperforms SMT under high-resource conditions

 

3. Rare Words

Solution: Sub-word Embedding

 

4. Long Sentences

Approach: Attention is all you need, Transformer-XL, Train short, test long

 

5. Word Alignment

Attention이 반드시 correspond하지는 않는다.

 

6. Beam Search

Too slow ..

→ Solution) Threshold 설정하여 Normalization

Increasing the beam size does not consistently improve translation quality

 


Multilingual Neural Machine Translation

Different lanugate pair들의 translate parameter들을 sharing

Zero-shot translation: Japanese↔English, Korean↔English의 두 translation에서 paramter 공유하여 Korean↔Japanese translation generate

 


References

 

Papers with Code - Machine Translation

Machine translation is the task of translating a sentence in a source language to a different target language. Approaches for machine translation can range from rule-based to statistical to neural-based. More recently, encoder-decoder attention-based archi

paperswithcode.com

 

statistical machine translation – a translator thinking outside the box

I can’t imagine a world in which artificial intelligence can stand on its own, free from the hand and heart of a human translator. As Ben Screen says in his article The future of translation is part human, part machine— We are nowhere near an infal

translartisan.wordpress.com

 

Incorporating BERT into Neural Machine Translation

The recently proposed BERT (Devlin et al., 2019) has shown great power on a variety of natural language understanding tasks, such as text classification, reading comprehension, etc. However, how to...

openreview.net

 

Unsupervised Neural Machine Translation

In spite of the recent success of neural machine translation (NMT) in standard benchmarks, the lack of large parallel corpora poses a major practical problem for many language pairs. There have been several proposals to alleviate this issue with, for insta

arxiv.org

 

Unsupervised Machine Translation Using Monolingual Corpora Only

Machine translation has recently achieved impressive performance thanks to recent advances in deep learning and the availability of large-scale parallel corpora. There have been numerous attempts to extend these successes to low-resource language pairs, ye

arxiv.org

 

Zero-Shot Translation with Google’s Multilingual Neural Machine Translation System

Posted by Mike Schuster (Google Brain Team), Melvin Johnson (Google Translate) and Nikhil Thorat (Google Brain Team) In the last 10 years, G...

ai.googleblog.com

 

'NLP' 카테고리의 다른 글

Text Generation  (0) 2022.07.07
Sequence/Token Classification  (0) 2022.07.06
GPT  (0) 2022.07.05
BERT  (0) 2022.07.01
Sinusoidal Positional Encoding 직접 계산해보기  (0) 2022.07.01