How Google Translate Uses Math to Understand 134 Languages | WSJ Tech Behind
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
🌐 Google翻訳の技術進化とニューラルネットワークの活用
Google翻訳は2000年代初めから技術的に大きく進化し、130以上の言語に対応する洗練されたニューラルネットワークへと発展しました。初期は単純なパターンマッチングツールでしたが、現在では言語を数学的表現に変換し、意味を数値のベクトルとしてコンピュータが理解できる形にしています。特に重要なのは、単語の意味だけでなく、単語同士の関係性も数学的に扱うことができる「トランスフォーマーモデル」です。このモデルは、単語を数値のベクトルに変換し、それらを行列として扱い、単語間の関係性と文脈を考慮した翻訳を提供します。このプロセスにはエンコーダーとデコーダーが関与し、大量のデータを学習して正確性を高める必要があります。
🔍 Google Lensの光学文字認識(OCR)と翻訳機能
Googleは2002年から図書館のデジタル化にOCR技術を使用しており、現在ではトランスフォーマーモデルを活用してテキストの認識と翻訳を行っています。Google Lensはテキストの行と方向を特定し、文字と単語を認識します。画像をピクセルの集合、すなわちトークンに分割し、それらを同時処理して文字と単語を予測します。さらに、誤ったスペルやスラング、カジュアルな会話など、文脈を考慮して正しい単語を抽出することができます。翻訳のレイアウトも分析し、自然な見た目に翻訳テキストをオーバーレイしますが、時々は文脈を完全に考慮せずに誤った翻訳が生じることがあります。また、変形された物体に貼られたテキストの抽出には限界があり、さらに言語の追加や翻訳のカスタマイズ性も強化する取り組みが進められています。
Mindmap
Keywords
💡Google Translate
💡ニューラルネットワーク
💡ベクトル
💡トランスフォーマーモデル
💡光学文字認識(OCR)
💡マトリックス
💡エンコーダー
💡デコーダー
💡コンテキストベクトル
💡トークン
💡生成モデル
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
- [Narrator] In a fraction of a second,
Google Translate can make sense of your surroundings.
But this isn't the same Google Translate
from the early 2000s.
Over the past two decades,
the technology has gone through a complete overhaul,
shifting from a basic pattern matching tool
to a sophisticated neural network
that handles more than 130 languages.
It works by turning language
into something computers can understand, math.
- Exciting times for people who like language and math.
- [Narrator] This is the tech behind Google Translate.
- There's very little code left today from the early days
of the phrase based translation.
We have shut down and deleted almost all of it.
- [Narrator] That Google Translate from two decades ago
laid the foundation for what we use today.
When it launched in 2006, it worked
by playing a matching game.
First, the model looked at lots of examples
of professional translations scraped from the internet.
Then when users entered sentences for translation,
the tool would break them into the longest possible chunks
of words it had seen before and combine the chunks.
It now uses a much more sophisticated
machine learning approach.
A so-called transformer model, which is the building block
of all modern AI.
transformers turn language into math
by assigning numbers to words.
- The key insight is that a series
of numbers can represent a meaning.
You can then do math with those vectors
that shows something about the relationships
of the meanings of words to each other.
- For each language Google Translate supports,
every word gets converted into a vector,
which is written like a list of numbers.
This way the computer can do math with them.
For instance, king minus man plus woman equals queen.
The specific numbers assigned
to each word don't really matter,
and they're different in different languages.
But what matters is how each word relates
to every other word.
It's all based on machine learning
from billions of examples.
But most of the time you wanna translate something,
it's not just an individual word.
So the computer also has to figure out
how words work together,
and this is where transformers,
a breakthrough in machine learning come in.
- The next generation of neural translation
is called the transformer architecture,
and this added a level,
so it moved from representing the meaning of one word
by a row of numbers to putting all the meanings
of all the words into a table
and doing math on that whole table.
And that enables you to do math
that talks about not only the meaning of each word,
but the importance of the relationships
of the words to each other.
- Say you're trying to translate
this Italian sign into English.
First, Google Translate would turn each word into a vector,
and those vectors would be put into one giant table
or matrix.
Then the computer tries to figure out
how each word interacts with every other word on this sign.
Mathematically, this is basically a lot of multiplication.
- The most important kind
of magical step is laying them out in a matrix
and doing what's called matrix multiplication.
And if you do enough of that, you can solve this problem.
- All this creates a new list of numbers.
This is what's called a context vector,
and it's something pretty special.
This list of numbers actually represents
what the sentence means, not just the sum of all
of its words, at least if the model
has done its job correctly.
- If you put that together and are very clever,
which the people who invented transformers were,
and you train on a lot of data, which we do,
you can eventually get to a collection of numbers
that meaningfully represents the meaning of the sentence.
So that's called the encoder stage.
Then you have a decoder,
which roughly speaking is the encoder in reverse.
- [Narrator] The computer has to decode this
back to human language.
- The decoder now also goes through lots
and lots of operations,
and finally you start getting vectors out,
which can be mapped back to individual words.
So we hopefully get closed for then holiday.
So this is how language becomes math.
- [Narrator] Getting this math to work
requires a lot of training.
Lots of the numbers in this math problem are chosen randomly
and then refined
as the computer learns from billions of examples.
Before deploying an update with a set of values
and weights, engineers run numerous tests
with their AI evaluator
and then professional human translators who check accuracy.
But since every possible combination of words leads
to a unique equation, it's impossible to test everything.
Since the model has trained on translations going to
or from English, it often requires more steps
to go between two non-English languages.
For example, if you wanna translate something in Japanese
to Zulu, it will go from Japanese to English
and then English to Zulu.
- The first thing that happens
when you use Google AR translate is that we have
to actually extract the text from the image,
and so as you can see here, it detects
that now this is Chinese and it translates to English.
It makes information a lot more accessible
because for many people,
typing script in a foreign language is not an option.
- The key component is a technology
called Optical Character Recognition, or OCR.
Google has been using that since 2002
when it started digitizing libraries for Google Books.
- Initially, it would do something very simple
like pattern matching.
So you can think of it as, is this the same as this?
Yes, so it's an A or B or whatnot.
- [Narrator] But now optical character recognition
also uses transformers.
First, Google Lens identifies lines of text
and text direction.
Then it determines specific characters and words.
Instead of dividing the sentence into words
and assigning numbers to each word, though,
it divides an image into patches of pixels.
These are called tokens.
- The encoder of the transformer is going to process all
of these tokens simultaneously to predict the best character
and the best word eventually.
- [Narrator] This means the Google Lens,
the company's visual search tool can often read things
even when it can't make out every single letter.
- With transformers, they're able to pick up on grammar.
If there is a spelling mistake,
the transformer will also be able to use the context
to disambiguate and still extract the right word.
- After it completes optical character recognition,
Google Lens analyzes the layout of all the text.
That's how a computer would know to translate this sign
as you matter, don't give up
rather than you don't matter, give up.
- When you look at the newspaper,
humans are excellent at just glancing at it
and understanding what is the reading order?
What should you read first?
This is a concept that isn't actually easy
to solve technically, it's very hard.
- [Narrator] The key is for optical character recognition
to understand something about the meaning
of what it's reading.
This is also done through extensive training.
After the chunks of text are sent to the translator,
Google Lens uses painting models
to erase the text off different signs or backgrounds.
That way translated text can be placed on top
of clean surfaces.
- Using generative models, it tries to predict
and create pixels that match the surrounding pixels
so that when we overlay the translated text,
it looks very natural and seamless.
- [Narrator] This doesn't always work seamlessly.
- You know, this one is not picking up the first line.
I'm not sure why.
- [Narrator] Some translations
don't fully account for context,
which is why alto on this Mexican stop sign
might be mistranslated to high.
And while optical character recognition
can frequently identify text in bad lighting
or with complicated perspective, it has its limits.
- One of them is with deformable objects.
Whenever there is text on like a sweater
or cookie wrapper, depending on the pose
and the angle, it might be more challenging
and difficult to extract the right OCR.
- Well-formed grammatically correct, fluent text
we're quite good at.
Where we have challenges is people using slang,
using casual speech in chat and social media.
We don't necessarily see as much of that
because we don't have access to as much data.
- Google is working to add some more features,
like letting users refine their translations
if they want to.
Similar to how you can ask Google Gemini
or ChatGPT to make translation more or less formal,
or in Chilean Spanish rather than European Spanish.
And it's also working to add more languages.
- There are an estimated 6,000
to 7,000 languages in the world.
Our goal is to support all of them.
Ver Más Videos Relacionados
5.0 / 5 (0 votes)