SeriesDeep Learning12 / 20

Machine Translation (Meta)

Module 12 of CS 7643 - Deep Learning @ Georgia Tech.

Introduction#

Machine Translation is a natural language processing task which involves mapping text from a source language to a target language.

Neural Machine Translation#

Difficulties of Machine Translation#

Why is machine translation a difficult problem?

  1. Many different correct translations for a typical input sequence.
  2. Language is ambiguous / depends on the context.
  3. Different languages have different structure, implications, etc.

Machine Translation as an NLP Problem#

We can frame translation as the following machine learning problem:

translation-viz

That is, given a source sequence ss, we are interested in modeling the conditional probability distribution over our target sequences tTt \in T. We can then generate a prediction by taking the argmax over this estimated distribution argmaxtPr(ts)\arg \max_t \Pr(t\|s).

Machine translation typically uses a sequence-to-sequence model implemented via an encoder-decoder architecture. The major model types include RNNs (typically LSTMs), CNNs, and transformers.

Unfortunately, the number of possible target sequences tTt \in T is intractable - there are simply too many possible predicted translations for us to explore them all. We can instead use methods to approximate the true argmax over the full target distribution.

Beam Search is an algorithm which searches exponential space in linear time.

Inference Efficiency#

Inference refers to the process of generating prediction(s) using a machine learning model. There are certain model characteristics which can influence inference efficiency.

We can improve inference efficiency via a number of strategies:


(all images obtained from Georgia Tech DL course materials)

License

CC BY-NC-SA 4.0 This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Related Posts