Explaining Google’s zero shot translation


Google revealed that it can perform zero-shot translation between Korean and Japanese in both directions. It manages this without ever being trained on those language pairs, and without routing through a third language first. Many people I talked to didn’t see why that mattered. In this post I’ll unpack what it means and what follows from it, using an analogy.

Picture yourself playing a “translation game” with a friend. You read some text in a language you don’t yet understand, sketch it out, and hand the sketch to your friend in another room. He writes down text in a language he doesn’t yet understand. Your friend receives feedback on what his text should have been, and can in turn tell you what he expected from your sketch.

It’s easy to imagine this taking the two of you a long while, but gradually you both begin to grasp these languages and spot patterns in them. Your drawings probably won’t look very realistic and will often fail to capture the sentence’s meaning. Fortunately, your friend will start to understand what you’re getting at and will offer useful feedback.

Take an example: suppose we want to translate the sentence “tiger in a swimming pool.” Perhaps you’ve noticed that one symbol tends to appear in a “cat-like” context, so you draw a “cat-like” shape plus a ‘big water-holding thing’ on your canvas. When your friend realizes the word he had to write was ‘tiger,’ he’ll point out that you should have added stripes.

That is basically how a Neural Machine Translation engine is set up. Two components learn a new language from scratch while agreeing on a way to represent — and thereby communicate — the sentences they must translate. The “painting” here isn’t a real painting but a long sequence of numbers. As you’d expect, this is a hard job that would take a human a very long time to master. Fortunately, with plenty of computing power, we can let a computer play this game!

Now imagine playing the same game with three friends. You still take sentences as input and make a drawing, and they use that drawing to produce a translation in the language each is learning. This time three people give you feedback on your drawing, so everything you draw must be understandable to all of them. That forces you to draw in a very generic way, producing sketches anyone can read. Your drawings improve, and so does your translation across every language.

You can also swap the roles: three friends make drawings from three different languages and hand them to you. Your job is now to turn those drawings into translated output in a single language. Since you must interpret three “drawing styles,” you become very good at reading them. Your friends start to converge on a similar style as you give them feedback. Their drawings get better, and so does translation from all languages.

The final version of the game has several people taking input and drawing, and several people taking those drawings and translating them. Everyone must use the same generic drawing style and the same interpreting style: you never know who will receive your image, and you never know whose image you’re looking at.

Google then ran this test: what if, during training, the person reading Japanese never hands a drawing to the person translating into Korean, and the person reading Korean never hands one to the person translating into Japanese? If you now pass a drawing from the Japanese reader to someone translating into Korean, will the result be a good translation? The answer is yes: without any training on those language pairs, you can translate to and from these languages.

But there’s more…

Google goes one step further: it uses just two people to handle the entire translation process. At the start of the sentence they want to translate, they state which language they want to translate into. So the sentence “Hello, how are you” becomes “<2es> Hello, how are you?” (whose answer should be: ¿Hola como estás? ). The computer isn’t even told the source language — it works that out on its own. Apparently, even if you switch languages halfway through a sentence, the computer can still produce the right translation.

What this means

Normally, building a good translation model requires a large amount of training data between one language and another. Without that parallel data, you can still try routing from one language into a third, more common language, then translating that into the language you actually wanted. How well that works is illustrated by the site “translationparty.com”: http://www.translationparty.com/ten-cats-were-eating-their-food-while-five-dogs-were-12843805. Given these results, translation between uncommon languages would improve without needing more data.

By now you should have a clearer picture of what Google did and why it’s worth paying attention to. If anything is still unclear, feel free to get in touch.

Facebook Comments ()

G+ Comments (add)