stat946w18/Unsupervised Machine Translation Using Monolingual Corpora Only: Difference between revisions

From statwiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 13: Line 13:
In what follows I will discuss this plan in more detail.
In what follows I will discuss this plan in more detail.


==Notation==
Let <math display="inline">S</math> denote the set of words in the source language, and let <math display="inline">T</math> denote the set of words in the target language.  Moreover, let <math display="inline">S'</math> and <math display="inline">T'</math> denote the set of finite sequences of words in the source and target language, where each such sequence is initiated with a special language-specific start-of-string token and terminated by a special end-of-string token.
==Word vector alignment ==
==Word vector alignment ==


Line 25: Line 27:
==Decoder==
==Decoder==


The decoder is a mono-directional LSTM that reads a sequence of hidden states <math display="inline">(h_1,\ldots, h_m)</math> from the latent space and  
The decoder is a mono-directional LSTM that reads a sequence of hidden states <math display="inline">(h_1,\ldots, h_m)</math> from the latent space and outputs a probability distribution over





Revision as of 18:04, 19 February 2018

Introduction

Neural machine translation systems must be trained on large corpora consisting of pairs of pre-translated sentences. This paper proposes an unsupervised neural machine translation system, which can be trained without using any such parallel data.

Overview of unsupervised translation system

The unsupervised translation system has the following plan:

  • Sentences from both the source and target language are mapped to a common latent vector space.
  • A de-noising auto-encoder loss encourages the latent space representations of sentences to be insensitive to noise.
  • An adversarial loss encourages the latent space representations of source and target sentences to be indistinguishable from each other. The idea is that the latent space representations should reflect the meaning of a sentence, and not the particular language in which it is expressed.
  • A reconstruction loss is computed as follows: sample a sentence from one of the languages, and apply the translation model of the previous epoch to translate it to the other language. Then corrupt this translation with noise. The reconstruction loss encourages the model to able to recover the original sampled sentence from its corrupted translation by passing through the latent vector space.

In what follows I will discuss this plan in more detail.

Notation

Let [math]\displaystyle{ S }[/math] denote the set of words in the source language, and let [math]\displaystyle{ T }[/math] denote the set of words in the target language. Moreover, let [math]\displaystyle{ S' }[/math] and [math]\displaystyle{ T' }[/math] denote the set of finite sequences of words in the source and target language, where each such sequence is initiated with a special language-specific start-of-string token and terminated by a special end-of-string token.

Word vector alignment

Conneau et al. (2017) describe an unsupervised method for aligning word vectors across languages. By "alignment", I mean that their method groups vectors corresponding to words with similar meanings close to one another, regardless of the language of words. Moreover, if word C is the target-language literal translation of the source language word B, then-- after alignment -- C's word vector tends to be the closest target-language word vector to the word vector of B. This unsupervised alignment method is crucial to the translation scheme of the current paper. From now on we denote by [math]\displaystyle{ A: S' \cup T' \to \mathcal{Z}' }[/math] the function that maps source and target language word sequences to their aligned word vectors.

Encoder

The encoder [math]\displaystyle{ E }[/math] reads a sequence of word vectors [math]\displaystyle{ (z_1,\ldots, z_m) }[/math] and outputs a sequence of hidden states [math]\displaystyle{ (h_1,\ldots, h_m) }[/math] in the latent space. Crucially, because the word vectors of the two languages have been aligned, the same encoder can be applied to both. That is, to map a source sentence [math]\displaystyle{ x=(x_1,\ldots, x_M) }[/math] to the latent space, we compute [math]\displaystyle{ E(A(x)) }[/math], and to map a target sentence [math]\displaystyle{ x=(y_1,\ldots, y_K) }[/math] to the latent space, we apply [math]\displaystyle{ E(A(y)) }[/math].

The encoder consists of two LSTMs, one of which reads the word-vector sequence in the forward direction, and one of which reads it in the backward direction. The hidden state sequence is generated by concatenating the hidden states produced by the forward and backward LSTM at each word vector.

Decoder

The decoder is a mono-directional LSTM that reads a sequence of hidden states [math]\displaystyle{ (h_1,\ldots, h_m) }[/math] from the latent space and outputs a probability distribution over


Overview of objective

The objective function is the sum of three terms:

  1. The de-noising auto-encoder loss
  2. The translation loss
  3. The adversarial loss


References

  1. Bahdanau, Dzmitry, Kyunghyun Cho, and Yoshua Bengio. "Neural machine translation by jointly learning to align and translate." arXiv preprint arXiv:1409.0473 (2014).
  2. Alexis Conneau, Guillaume Lample, Marc’Aurelio Ranzato, Ludovic Denoyer, Hervé Jégou. "Word Translation without Parallel Data". arXiv:1710.04087, (2017)
  3. Tomas Mikolov, Quoc V Le, and Ilya Sutskever. "Exploiting similarities among languages for machine translation." arXiv preprint arXiv:1309.4168. (2013).
  4. Sutskever, Ilya, Oriol Vinyals, and Quoc V. Le. "Sequence to sequence learning with neural networks." Advances in neural information processing systems. 2014.