FAIR-无监督机器翻译
无监督机器翻译的几篇paper:
Unsupervised machine translation using monolingual corpora only, Lample, et al. ICLR 2018a
Phrase-based & neural unsupervised machine translation. emnlp 2018b
Phrase-Based & Neural Unsupervised Machine Translation
对前两篇无监督机器翻译进行了一个总结:
- carefully initialize the MT system with an inferred bilingual dictionary. 通过双语字典对MT模型进行初始化。
- leverage strong language models, via training the sequence-to-sequence system as a denoising autoencoder. 通过训练seq2eq模型来利用强大的语言模型作为降噪自编码。
- turn the unsupervised problem into a supervised one by automatic generation of sentence pairs via back-translation.把无监督问题转换为有监督的问题,也就是通过back-translation自动生成语言对。
这篇论文的作者将上述方法做了个整合,得到的NMT 系统在无监督翻译上能达到 +10 BLEU, 并且应用到phrase-based MT上,达到了 +12 BLEU.
作者将无监督机器翻译抽象成上述过程。
B. 初始化
C. 语言模型
D. 迭代反向翻译。
Initialization
前人的初始化方法:
利用意思相近的词、短语或是 subword
bilingual dictionary
dictionaries inferred in an unsupervised way. Lample et al. (2018) and Artetxe et al. (2018)
这种初始化的方式对于距离相距较远的语言可能效果不太好。比如中英?
作者的初始化方法:
先对source和target language进行bpe处理(bpe的优势:减小词表大小,消除unknow word),然后联合起来(而不是分开)训练word embedding.
join the monolingual corpora
apply BPE tokenization on the resulting corpus
learn token embeddings (Mikolov et al., 2013) on the same corpus
Language Modeling
基于单语训练得到的语言模型,主要是通过 local substitutions and word reorderings 来提升翻译的质量(也就是 contextual information)。
作者的 language model training 基于 denosing autoencoder.
C is a noise model with some words dropped and swapped. $P_{s→s}$ and $P_{t→t}$ are the composition of encoder and decoder both operating on the source and target sides, respectively. Back-translation:
Iterative Back-translation
Dual Learning for Machine Translation
$fr \rightarrow \hat{en} \rightarrow fr$ fr 是 target language. en 是 source language.
先利用反向模型翻译得到 pesudo en sentence $\hat{en}$. 然后将 $(\hat{en}, fr)$ 作为翻译对进行有监督的学习。尽管 $\hat{en}$ 会非常 noisy,但保证了target端是pure sentence,效果确实不错吧。
作者的 iteration BT 与上述方法一致:
$u^{* }(y)=argmaxP_{t→s}(u|y)$, $u^{* }(y)$ 是 pesudo source sentence.
$v^{* }(x)=argmaxP_{s→t}(v|x)$, $v^{* }(x)$ 是 pesudo target sentence.
作者在实验时,并没有对 $u\rightarrow u^{* }, v\rightarrow v^{* }$ 这个过程进行优化,因为这在实验中并没有提升。同时在训练时,作者是简单的将 $L^{back}$ 和 $L^{lm}$ 加起来进行优化。
为了避免模型混淆两个语言的向量空间,作者提供了一个解决方法,Sharing Latent Representations. 也就是 denosing aotoencoder 和 back-translation 可以用同一个 encoder-decoder 模型,不同语言之间共享 encoder 和 decoder.
While sharing the encoder is critical to get the model to work, shar- ing the decoder simply induces useful regularization.
共享 encoder 对于无监督模型非常关键,而 decoder 的共享则主要是提供有效的正则化。这与 GNMT 模型不一样,不需要加上 tag 来指定翻译方向。