ArticleslgStudy

computer science

Neural machine translation

Neural machine translation is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Neural machine translation rather than just read about it. In short: Neural machine translation (NMT) is an approach to machine translation that uses an artificial neural network to predict the likelihood of a sequence of words, typically predicting entire sentences in a single integrated model, however could predict larger sequences, depending on the sophistication of the system architecture. It is the dominant approach in machine translation today and can output predictions that ri…

Key takeaways

  • Neural machine translation belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Neural machine translation to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Neural machine translation from memory before moving on to harder problems.

Reference excerpt

Neural machine translation (NMT) is an approach to machine translation that uses an artificial neural network to predict the likelihood of a sequence of words, typically predicting entire sentences in a single integrated model, however could predict larger sequences, depending on the sophistication of the system architecture. It is the dominant approach in machine translation today and can output predictions that rival human translations when transcribing between high-resource languages under specific conditions. However, there still remain challenges in NMT, particularly with languages that have less available virtual resources, and also in domain adaptation, where NMTs for certain languages may struggle to be applied for others. NMT systems tend to produce literal translations, so semantics may become lost or misconstrued during translation.

Overview In the translation task, a sentence 𝐱=x1,I (consisting of I tokens xi) in the source language is to be translated into a sentence 𝐲=x1,J (consisting of J tokens xj) in the target language. The source and target tokens are then converted into vectors, where they can be processed mathematically. NMT models assign a probability P(y|x) to potential translations y and then search a subset of potential translations for the one with the highest probability. Most NMT models are auto-regressive, meaning they calculate the probability of each target token as a function of the both source sentence and the previous target tokens. The probability of the whole translation is consequently the product of the probabilities of the individual predicted tokens: P(y|x)=∏j=1JP(yj|y1,i−1,𝐱) NMT models differ in how exactly they model the function P, but most use some variation of the encoder-decoder architecture: They first use an encoder network to process 𝐱 , and encode it into a vector (or matrix) representation of the source sentence. The model will then use a decoder network that usually produces one target word at a time, taking into account the source representation, and the tokens it has produced thus far. As soon as the decoder produces a special, end-of-sentence token, the decoding process is terminated.

History

Early approaches In 1987, Robert B. Allen demonstrated the use of feed-forward neural networks for translating auto-generated English sentences with a limited vocabulary of 31 words into Spanish. In this experiment, the sizes of the network's input and output layers were elected to be just large enough for the longest sentences in the source and target language, respectively, because the network lacked the tools to encode sequences of arbitrary length into fixed-size representation. In his summary, Allen also already hinted at the possibility of using auto-associative models, one for encoding the source, and one for decoding the target. Lonnie Chrisman built upon Allen's work in 1991, by training separate recursive auto-associative memory (RAAM) networks (developed by Jordan B. Pollack) for the source and the target language. Each of the RAAM networks were trained to encode an arbitrary-length sentence into a fixed-size, hidden representation and to decode the original sentence again from that representation. Additionally, the two networks were also trained to share their hidden representation, so the source encoder could produce a representation that the target decoder can rapidly re-translate. Forcada and Ñeco simplified this procedure in 1997 to directly train a source encoder and a target decoder in what they called a recursive hetero-associative memory (RHAM). Futhermore, in 1997, Castaño and Casacuberta employed an Elman's recurrent neural network in another machine translation task with very limited vocabulary and complexity. Even though these early approaches begin to resemble modern NMT, the computing resources of the time were insufficient in predicting large text datasets. Instead, other methods like Statistical machine translation (SMT) became the benchmark procedure of computational translation during the late 1990s, to the early 2000s.

Hybrid approaches During the time when Statistical machine translation was prevalent, some computer scientists used neural frameworks to replace various routines in the statistical machine translation, while still using the log-linear approach to hybridise the systems. For example, in various systems alongside various researchers, Holger Schwenk replaced the status-quo n-gram language model with a neural model in combination with estimated phrase translation probabilities, using a feed-forward network.

seq2seq

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Neural machine translation

Start with the simplest possible case. Write down what Neural machine translation claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Neural machine translation before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Neural machine translation ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Neural machine translation

In research
Neural machine translation appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Neural machine translation in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Neural machine translation is common in secondary-school and first-year university syllabi. It links to neighbouring topics Applications of artificial intelligence, Computational linguistics, Machine translation, so understanding it makes those chapters shorter.
In everyday life
Look for Neural machine translation outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Neural machine translation” →

How to study Neural machine translation in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Neural machine translation means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Neural machine translation out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Neural machine translation in simple terms?

Neural machine translation (NMT) is an approach to machine translation that uses an artificial neural network to predict the likelihood of a sequence of words, typically predicting entire sentences in a single integrated model, however could predict larger sequences, depending on the sophistication…

Why does Neural machine translation matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Neural machine translation?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Neural machine translation.

Tags

  • Applications of artificial intelligence
  • Computational linguistics
  • Machine translation
  • Tasks of natural language processing

Keep exploring