How Google Translate Uses Math to Understand 134 Languages | WSJ Tech Behind

The Wall Street Journal
28 May 202408:20

Summary

TLDRGoogle翻訳は過去20年間で技術的に完全に刷新され、130以上の言語に対応する洗練されたニューラルネットワークへと発展しました。言語をコンピュータが理解できる数学に変換し、単語に数値を割り当てます。これは単語間の関係を示すベクトルの数学的処理に基づいており、特にtransformerモデルが重要な役割を果たします。このモデルは単語をベクトルに変換し、それらを行列として扱い、単語間の関係を数学的に処理します。翻訳の精度を高めるためには、膨大な学習データから得られた機械学習が不可欠です。さらに、Googleの光学文字認識(OCR)技術もtransformerを用いて、画像からのテキスト抽出を精度を向上させています。しかし、言葉のコンテキストを完全に捉えることや、変則な物体表面の文字認識にはまだ課題があります。Googleは翻訳の微調整やさらなる言語の追加を目指しています。

Takeaways

  • 🌐 Google翻訳は過去20年間で技術的に完全に刷新され、130以上の言語を扱う洗練された神経ネットワークへと発展しました。
  • 🔍 Google翻訳は言語をコンピュータが理解できる数学に変換する働き方をしています。
  • 📈 単語に数値を割り当て、意味を表すベクターを作成することで、コンピュータは単語間の関係を数学的に表現できます。
  • 🧩 トランスフォーマーモデルは現代のAIの基礎であり、言語を数学に変える重要な役割を果たしています。
  • 🔄 トランスフォーマーは単語の意味だけでなく、単語間の関係の重要性についても数学的に扱うことができます。
  • 📊 Google翻訳は単語をベクターに変換し、それらを大きな表(行列)にまとめ、単語間の相互作用を数学的に解明します。
  • 🤖 モデルは学習を通じて、数十億の例から得られた数値を調整し、最適な翻訳結果を生み出します。
  • 🌐 翻訳のテストは全てを網羅することは不可能ですが、AIと専門家の翻訳者が正確性をチェックします。
  • 🖼 Google Lensは光学文字認識(OCR)を使用して、画像からのテキストを抽出し翻訳します。
  • 🎨 Google Lensは生成モデルを用いて、翻訳されたテキストを自然に見えるように背景に重ね合わせる処理を行います。
  • 🌐 Googleはより多くの言語をサポートし、ユーザーが翻訳を調整できる機能を追加することを目指しています。

Q & A

  • Google翻訳はどのくらいの言語をサポートしていますか?

    -Google翻訳は、130以上の言語をサポートしています。

  • Google翻訳の技術は過去20年間でどのように進化しましたか?

    -過去20年間で、Google翻訳は基本的なパターンマッチングツールから、130以上の言語を扱う洗練された神経ネットワークへと進化しました。

  • Google翻訳はどのようにして言語をコンピュータが理解できる数学に変換するのですか?

    -Google翻訳は、言語を数学に変換するために、単語に数値を割り当てます。これにより、コンピュータは単語の意味に関する数学を実行できます。

  • Google翻訳におけるトランスフォーマーモデルとは何ですか?

    -トランスフォーマーモデルは、現代のすべてのAIのビルディングブロックであり、言語を数学に変換するプロセスにおいて重要な役割を果たします。

  • 単語を数値として表現する際に重要なポイントは何ですか?

    -単語に割り当てられた特定の数値は重要ではありませんが、重要なのは各単語が他の単語とどのように関連しているかです。

  • トランスフォーマーアーキテクチャはどのように翻訳を支援しますか?

    -トランスフォーマーアーキテクチャは、単語の意味を表すだけでなく、単語同士の関係の重要性を数学的に扱うためのテーブルを作成し、そのテーブル全体に対して数学を実行します。

  • Google翻訳で翻訳する際にコンピュータはどのようにして単語の相互作用を理解するのですか?

    -コンピュータは単語をベクトルに変換し、それらのベクトルを大きなテーブルまたは行列に入れ、各単語が他の単語とどのように相互作用するかを数学的に理解しようとします。

  • コンテキストベクトルとは何ですか?

    -コンテキストベクトルは、単語の意味だけでなく、文全体の意味を表す数字のリストです。モデルが適切に機能している場合、文の単語の合計ではなく、その意味を表すものです。

  • 光学文字認識(OCR)とは何であり、Google翻訳でどのように使われますか?

    -光学文字認識(OCR)は、画像からテキストを抽出する技術であり、Google翻訳では外国語のスクリプトを入力できない多くの人々にとって情報をよりアクセス可能にします。

  • Google Lensはどのようにして文字を認識し、翻訳するのですか?

    -Google Lensは、テキストの行とテキストの方向を特定し、その後特定の文字と単語を決定します。画像を単語に分割する代わりに、ピクセルのパッチ、つまりトークンに分割します。

  • 翻訳の精度をどのようにテストし、保証していますか?

    -翻訳の精度をテストするために、多くの数字と重みがランダムに選択され、コンピュータが数十億の例から学習し、その値を微調整します。デプロイ前に、エンジニアはAIの評価者と専門の人間翻訳者によって多数のテストを実行します。

  • Google翻訳はどのようにして2つの非英語言語間の翻訳を扱うのですか?

    -モデルは英語との翻訳にトレーニングされているため、2つの非英語言語間の翻訳では、英語を経由する必要があります。例えば、日本語からズール語への翻訳では、日本語から英語へ、そして英語からズール語へ変換されます。

  • Google翻訳はどのようにして誤った翻訳を避けようとしていますか?

    -Googleはユーザーが翻訳を微調整できる機能を追加し、翻訳をよりフォーマルまたはカジュアルにしたり、チリのスペイン語ではなくヨーロッパのスペイン語にしたりするなどのオプションを提供しています。

  • Google翻訳はどのくらいの言語をサポートすることを目指していますか?

    -世界には推定される6,000から7,000の言語があり、Google翻訳の目標はそれらすべてをサポートすることです。

Outlines

00:00

🌐 Google翻訳の技術進化とニューラルネットワークの活用

Google翻訳は2000年代初めから技術的に大きく進化し、130以上の言語に対応する洗練されたニューラルネットワークへと発展しました。初期は単純なパターンマッチングツールでしたが、現在では言語を数学的表現に変換し、意味を数値のベクトルとしてコンピュータが理解できる形にしています。特に重要なのは、単語の意味だけでなく、単語同士の関係性も数学的に扱うことができる「トランスフォーマーモデル」です。このモデルは、単語を数値のベクトルに変換し、それらを行列として扱い、単語間の関係性と文脈を考慮した翻訳を提供します。このプロセスにはエンコーダーとデコーダーが関与し、大量のデータを学習して正確性を高める必要があります。

05:01

🔍 Google Lensの光学文字認識(OCR)と翻訳機能

Googleは2002年から図書館のデジタル化にOCR技術を使用しており、現在ではトランスフォーマーモデルを活用してテキストの認識と翻訳を行っています。Google Lensはテキストの行と方向を特定し、文字と単語を認識します。画像をピクセルの集合、すなわちトークンに分割し、それらを同時処理して文字と単語を予測します。さらに、誤ったスペルやスラング、カジュアルな会話など、文脈を考慮して正しい単語を抽出することができます。翻訳のレイアウトも分析し、自然な見た目に翻訳テキストをオーバーレイしますが、時々は文脈を完全に考慮せずに誤った翻訳が生じることがあります。また、変形された物体に貼られたテキストの抽出には限界があり、さらに言語の追加や翻訳のカスタマイズ性も強化する取り組みが進められています。

Mindmap

Keywords

💡Google Translate

Google Translateは、言語を翻訳するオンラインサービスです。ビデオでは、2000年代初めから技術が大きく進化し、130以上の言語を扱う洗練されたニューラルネットワークへと発展したと紹介されています。ビデオのテーマは、Google Translateが言語を数学に変換し、コンピュータが理解できる形にすることで、翻訳の精度と幅を広げたことです。

💡ニューラルネットワーク

ニューラルネットワークは、人間の脳をモデルにして学習するアルゴリズムです。ビデオでは、Google Translateが言語を数学に変換するプロセスを可能にする基盤となっています。言語の単語を数値ベクトルに変換し、それらの関係性に基づいて翻訳を行うための高度な機械学習手法です。

💡ベクトル

ベクトルは、言語の単語を数値として表現する方法です。ビデオでは、Google Translateが各言語の単語をベクトルに変換し、コンピュータが数学演算を行うことで翻訳を行うと説明されています。例えば、「king」から「man」を引いて「woman」を加えると「queen」という意味になるという例が挙げられています。

💡トランスフォーマーモデル

トランスフォーマーモデルは、現代のAIの基礎となるアルゴリズムです。ビデオでは、Google Translateが単語の意味だけでなく、単語間の関係性も数学的に表現することができるようになったと紹介されています。これは、翻訳の精度を高める上で重要な役割を果たしています。

💡光学文字認識(OCR)

光学文字認識は、画像から文字を抽出する技術です。ビデオでは、Google Lensが画像からテキストを抽出し、翻訳するプロセスを説明しています。OCRは、文字を認識し、翻訳の前にテキストのレイアウトを分析する上で欠かせない技術です。

💡マトリックス

マトリックスは、行と列を持つ数値のテーブルです。ビデオでは、Google Translateが単語をベクトルに変換し、それらをマトリックスに格納して単語間の関係性を数学的に表現するプロセスを説明しています。マトリックス乗算によって、文の意味を表すコンテキストベクトルを作成します。

💡エンコーダー

エンコーダーは、トランスフォーマーモデルの一部で、言語の文を数値に変換するプロセスを担当します。ビデオでは、エンコーダーが文の意味を表すコンテキストベクトルを作成し、それをデコーダーに渡すと説明されています。

💡デコーダー

デコーダーは、エンコーダーの逆の役割を果たすトランスフォーマーモデルの一部です。ビデオでは、デコーダーがコンテキストベクトルから単語に戻り、人間が理解できる言語に変換するプロセスを説明しています。

💡コンテキストベクトル

コンテキストベクトルは、文の意味を表す数値のリストです。ビデオでは、Google Translateが単語だけでなく文脈も考慮して翻訳を行うために、エンコーダーによって作成されると説明されています。

💡トークン

トークンは、画像内の文字をピクセルの塊に分割したものです。ビデオでは、OCRが画像をトークンに分割し、それらを同時に処理して文字を認識するプロセスを説明しています。トークンは、画像から文字を抽出する際に重要な単位です。

💡生成モデル

生成モデルは、新しいデータを作成することができる機械学習モデルです。ビデオでは、Google Lensが背景からテキストを消去し、翻訳されたテキストを自然に見えるようにオーバーレイするプロセスを説明しています。生成モデルは、周囲のピクセルに合わせてピクセルを予測・作成する能力を持っています。

Highlights

Google Translateは20年間にわたって技術的に完全に刷新され、130以上の言語を扱う洗練された神経ネットワークへと発展しました。

言語をコンピュータが理解できる数学に変換するというGoogle Translateの技術の背景。

初期のGoogle Translateはインターネットからスクレイピングされた専門家の翻訳例をもとにマッチングゲームをしました。

現在ではより高度な機械学習アプローチであるtransformerモデルを使用しています。

transformerモデルは単語に数字を割り当て、言葉の意味を数学的に表現します。

Google Translateがサポートする各言語の各単語は数値のリスト、つまりベクトルへと変換されます。

単語の特定の数字は重要ではありませんが、重要なのは各単語が他の単語との関係です。

transformerは単語の意味だけでなく、単語同士の関係の重要性を数学的に扱うことができます。

Google Translateは単語をベクトルに変換し、それらを大きな表、つまり行列へと入力します。

コンピュータは各単語が他の単語とどのように相互作用するかを数学的に解き出します。

新しい数値のリスト、つまりコンテキストベクトルは文の意味を表す特別なものです。

transformerの発明者はこれらの数値を組み合わせ、大量のデータをトレーニングすることで文の意味を意味的に表す数値の集合を得ることができます。

デコーダーはエンコーダーの逆で、これらのベクトルを単語へと逆変換します。

この数学を機能させるには大量のトレーニングが必要です。

モデルは英語との翻訳に比べて、2つの非英語言語間の翻訳には多くのステップを必要とする傾向があります。

Google AR翻訳では、まず画像からのテキストの抽出が必要です。

光学文字認識(OCR)はGoogleが2002年に本格的に書籍をデジタル化する際に使用した技術です。

現在ではOCRもtransformerを使用しており、画像をピクセルのパッチ、つまりトークンに分割します。

Google Lensは文のレイアウトを分析し、コンテキストに応じて正しい翻訳を提供します。

光学文字認識は意味を理解することも重要で、そのためにも拡張トレーニングが必要です。

Googleは翻訳の調整やさらに多くの言語の追加など、より多くの機能を追加しています。

世界には推定6,000から7,000の言語があり、Googleの目標はそれら全てをサポートすることです。

Transcripts

play00:00

- [Narrator] In a fraction of a second,

play00:02

Google Translate can make sense of your surroundings.

play00:05

But this isn't the same Google Translate

play00:07

from the early 2000s.

play00:09

Over the past two decades,

play00:10

the technology has gone through a complete overhaul,

play00:13

shifting from a basic pattern matching tool

play00:15

to a sophisticated neural network

play00:17

that handles more than 130 languages.

play00:20

It works by turning language

play00:22

into something computers can understand, math.

play00:25

- Exciting times for people who like language and math.

play00:28

- [Narrator] This is the tech behind Google Translate.

play00:32

- There's very little code left today from the early days

play00:35

of the phrase based translation.

play00:36

We have shut down and deleted almost all of it.

play00:39

- [Narrator] That Google Translate from two decades ago

play00:42

laid the foundation for what we use today.

play00:45

When it launched in 2006, it worked

play00:47

by playing a matching game.

play00:48

First, the model looked at lots of examples

play00:51

of professional translations scraped from the internet.

play00:54

Then when users entered sentences for translation,

play00:57

the tool would break them into the longest possible chunks

play00:59

of words it had seen before and combine the chunks.

play01:03

It now uses a much more sophisticated

play01:05

machine learning approach.

play01:07

A so-called transformer model, which is the building block

play01:10

of all modern AI.

play01:12

transformers turn language into math

play01:15

by assigning numbers to words.

play01:17

- The key insight is that a series

play01:19

of numbers can represent a meaning.

play01:21

You can then do math with those vectors

play01:23

that shows something about the relationships

play01:25

of the meanings of words to each other.

play01:27

- For each language Google Translate supports,

play01:30

every word gets converted into a vector,

play01:32

which is written like a list of numbers.

play01:34

This way the computer can do math with them.

play01:37

For instance, king minus man plus woman equals queen.

play01:42

The specific numbers assigned

play01:43

to each word don't really matter,

play01:45

and they're different in different languages.

play01:48

But what matters is how each word relates

play01:50

to every other word.

play01:51

It's all based on machine learning

play01:53

from billions of examples.

play01:55

But most of the time you wanna translate something,

play01:57

it's not just an individual word.

play01:59

So the computer also has to figure out

play02:01

how words work together,

play02:03

and this is where transformers,

play02:05

a breakthrough in machine learning come in.

play02:07

- The next generation of neural translation

play02:09

is called the transformer architecture,

play02:11

and this added a level,

play02:12

so it moved from representing the meaning of one word

play02:15

by a row of numbers to putting all the meanings

play02:18

of all the words into a table

play02:20

and doing math on that whole table.

play02:22

And that enables you to do math

play02:24

that talks about not only the meaning of each word,

play02:27

but the importance of the relationships

play02:28

of the words to each other.

play02:30

- Say you're trying to translate

play02:32

this Italian sign into English.

play02:34

First, Google Translate would turn each word into a vector,

play02:38

and those vectors would be put into one giant table

play02:41

or matrix.

play02:43

Then the computer tries to figure out

play02:44

how each word interacts with every other word on this sign.

play02:48

Mathematically, this is basically a lot of multiplication.

play02:51

- The most important kind

play02:53

of magical step is laying them out in a matrix

play02:55

and doing what's called matrix multiplication.

play02:57

And if you do enough of that, you can solve this problem.

play03:00

- All this creates a new list of numbers.

play03:04

This is what's called a context vector,

play03:06

and it's something pretty special.

play03:08

This list of numbers actually represents

play03:10

what the sentence means, not just the sum of all

play03:13

of its words, at least if the model

play03:16

has done its job correctly.

play03:17

- If you put that together and are very clever,

play03:19

which the people who invented transformers were,

play03:21

and you train on a lot of data, which we do,

play03:23

you can eventually get to a collection of numbers

play03:25

that meaningfully represents the meaning of the sentence.

play03:28

So that's called the encoder stage.

play03:30

Then you have a decoder,

play03:31

which roughly speaking is the encoder in reverse.

play03:34

- [Narrator] The computer has to decode this

play03:36

back to human language.

play03:37

- The decoder now also goes through lots

play03:40

and lots of operations,

play03:42

and finally you start getting vectors out,

play03:46

which can be mapped back to individual words.

play03:49

So we hopefully get closed for then holiday.

play03:53

So this is how language becomes math.

play03:57

- [Narrator] Getting this math to work

play03:58

requires a lot of training.

play04:00

Lots of the numbers in this math problem are chosen randomly

play04:03

and then refined

play04:04

as the computer learns from billions of examples.

play04:07

Before deploying an update with a set of values

play04:09

and weights, engineers run numerous tests

play04:11

with their AI evaluator

play04:13

and then professional human translators who check accuracy.

play04:16

But since every possible combination of words leads

play04:19

to a unique equation, it's impossible to test everything.

play04:24

Since the model has trained on translations going to

play04:27

or from English, it often requires more steps

play04:30

to go between two non-English languages.

play04:33

For example, if you wanna translate something in Japanese

play04:35

to Zulu, it will go from Japanese to English

play04:39

and then English to Zulu.

play04:41

- The first thing that happens

play04:42

when you use Google AR translate is that we have

play04:45

to actually extract the text from the image,

play04:47

and so as you can see here, it detects

play04:49

that now this is Chinese and it translates to English.

play04:52

It makes information a lot more accessible

play04:54

because for many people,

play04:55

typing script in a foreign language is not an option.

play04:58

- The key component is a technology

play05:00

called Optical Character Recognition, or OCR.

play05:04

Google has been using that since 2002

play05:06

when it started digitizing libraries for Google Books.

play05:09

- Initially, it would do something very simple

play05:11

like pattern matching.

play05:12

So you can think of it as, is this the same as this?

play05:15

Yes, so it's an A or B or whatnot.

play05:18

- [Narrator] But now optical character recognition

play05:20

also uses transformers.

play05:22

First, Google Lens identifies lines of text

play05:25

and text direction.

play05:26

Then it determines specific characters and words.

play05:29

Instead of dividing the sentence into words

play05:31

and assigning numbers to each word, though,

play05:33

it divides an image into patches of pixels.

play05:37

These are called tokens.

play05:38

- The encoder of the transformer is going to process all

play05:41

of these tokens simultaneously to predict the best character

play05:45

and the best word eventually.

play05:47

- [Narrator] This means the Google Lens,

play05:48

the company's visual search tool can often read things

play05:51

even when it can't make out every single letter.

play05:54

- With transformers, they're able to pick up on grammar.

play05:56

If there is a spelling mistake,

play05:58

the transformer will also be able to use the context

play06:00

to disambiguate and still extract the right word.

play06:03

- After it completes optical character recognition,

play06:06

Google Lens analyzes the layout of all the text.

play06:09

That's how a computer would know to translate this sign

play06:12

as you matter, don't give up

play06:14

rather than you don't matter, give up.

play06:17

- When you look at the newspaper,

play06:19

humans are excellent at just glancing at it

play06:21

and understanding what is the reading order?

play06:24

What should you read first?

play06:26

This is a concept that isn't actually easy

play06:28

to solve technically, it's very hard.

play06:30

- [Narrator] The key is for optical character recognition

play06:32

to understand something about the meaning

play06:34

of what it's reading.

play06:35

This is also done through extensive training.

play06:38

After the chunks of text are sent to the translator,

play06:41

Google Lens uses painting models

play06:43

to erase the text off different signs or backgrounds.

play06:46

That way translated text can be placed on top

play06:49

of clean surfaces.

play06:50

- Using generative models, it tries to predict

play06:53

and create pixels that match the surrounding pixels

play06:56

so that when we overlay the translated text,

play06:58

it looks very natural and seamless.

play07:00

- [Narrator] This doesn't always work seamlessly.

play07:02

- You know, this one is not picking up the first line.

play07:05

I'm not sure why.

play07:06

- [Narrator] Some translations

play07:07

don't fully account for context,

play07:09

which is why alto on this Mexican stop sign

play07:12

might be mistranslated to high.

play07:14

And while optical character recognition

play07:16

can frequently identify text in bad lighting

play07:18

or with complicated perspective, it has its limits.

play07:22

- One of them is with deformable objects.

play07:24

Whenever there is text on like a sweater

play07:27

or cookie wrapper, depending on the pose

play07:29

and the angle, it might be more challenging

play07:31

and difficult to extract the right OCR.

play07:34

- Well-formed grammatically correct, fluent text

play07:37

we're quite good at.

play07:39

Where we have challenges is people using slang,

play07:44

using casual speech in chat and social media.

play07:47

We don't necessarily see as much of that

play07:49

because we don't have access to as much data.

play07:51

- Google is working to add some more features,

play07:53

like letting users refine their translations

play07:55

if they want to.

play07:56

Similar to how you can ask Google Gemini

play07:58

or ChatGPT to make translation more or less formal,

play08:02

or in Chilean Spanish rather than European Spanish.

play08:06

And it's also working to add more languages.

play08:09

- There are an estimated 6,000

play08:11

to 7,000 languages in the world.

play08:12

Our goal is to support all of them.

Rate This

5.0 / 5 (0 votes)

Related Tags
Google翻訳ニューラルネット機械学習言語学OCRAI技術翻訳精度光学文字認識数学モデル技術進化
Do you need a summary in English?