Car-GPT: 大規模言語モデルはついに自動運転車を実現させるか?
The Gradient の記事は、ペニシリンの発見のように既存のモジュラー型自動運転技術の限界を打破する可能性として、LLM(大規模言語モデル)の応用が注目されている現状と、その背景にある「エンドツーエンド学習」への移行について分析している。
キーポイント
ペニシリン発見とのアナロジー
1928 年のペニシリン発見のように、自動運転技術も従来の試行錯誤的なアプローチ(モジュラー型)の壁にぶつかり、LLM が予期せぬ解決策となる可能性が示唆されている。
モジュラーからエンドツーエンドへ
2010 年代の「知覚」「位置特定」「計画」「制御」を分けるモジュラー型アプローチから、単一のニューラルネットワークがステアリングや加速を直接予測するエンドツーエンド学習への移行が進んでいる。
LLM の自動運転への応用可能性
ブラックボックス化という課題はあるものの、世界を再定義している LLM が、複雑な状況判断や推論能力において自動運転の「脳」として期待されている。
学習の難しさと現状認識
著者は LLM 専門家の立場ではなく、初学者が直面する情報過多や迷走の状況を共有しつつ、LLM の本質的な仕組みを解説している。
入力の多様化とトークン化
自動運転への適応では、テキストの代わりに画像やセンサーデータ(LiDAR、RADARなど)を入力とし、これらも「Vision Transformers」などの手法を用いてトークン化することが可能である。
Transformer 構造の汎用性
入力データの種類が変わっても、モデルがトークンを操作する仕組みそのものは変わらないため、既存の Transformer アーキテクチャをそのまま応用できる。
LLM の自律走行タスクへの適用範囲
自律走行には知覚、計画、データ生成、Q&A など多様なタスクがあり、すべてが LLM で解決できるわけではない。
影響分析・編集コメントを表示
影響分析
この記事は、自動運転技術の主流であるモジュラー型アーキテクチャから、LLM を活用した新しいパラダイムへ移行する可能性について示唆しており、業界全体が直面している「ブラックボックス問題」や「安全性の検証難」といった課題に対する新たな視点を提供しています。LLM の推論能力が自動運転の「脳」として機能することで、長年の技術的ボトルネックが突破される可能性があるという期待感が、開発者や投資家の関心を高める重要な示唆となっています。
編集コメント
ペニシリンの偶然の発見という歴史的なエピソードを、現代の AI 技術の転換点に巧みに重ね合わせた構成が印象的です。LLM が単なるチャットボットを超え、物理世界の制御において「予期せぬ解決策」として機能し得るという視点は、自動運転分野の今後の研究動向を理解する上で非常に示唆に富んでいます。
1928年、ロンドンは肺炎、結核、髄膜炎などの細菌性疾患に襲われ、深刻な健康危機の真っ只中にあった。無菌状態の研究室に閉じこもった科学者や医師たちは、複雑な問題を解決するために従来の医学的アプローチを用い、試行錯誤の果てしない循環に陥っていた。
そんな中、1928年9月、ある偶然の出来事が世界の流れを変えた。アレクサンダー・フレミングというスコットランド人医師が、ペトリ皿(理科の授業で使った透明な円形の容器)の蓋を閉め忘れ、それがカビに汚染されてしまったのである。フレミングはそこで奇妙なことに気づいた。湿気の近くにあった細菌はすべて死んでおり、他の細菌は生き残っていたのだ。
「あの湿気は何でできているんだ?」とフレミングは考えた。こうして彼は、カビの主成分であるペニシリンが強力な細菌殺傷剤であることを発見した。これが画期的なペニシリンの発見につながり、今日私たちが使う抗生物質へと発展していった。医師たちが既存のよく研究された手法に頼っていた世界において、ペニシリンは予期せぬ答えだった。
自動運転車も同様の出来事をたどっているのかもしれない。2010年代、自動運転車の大半は「モジュラー」アプローチと呼ばれる手法で構築されていた。ソフトウェアの「自律」部分は、知覚(世界を見るタスク)、位置推定(世界の中で自分自身を正確に位置づけるタスク)、計画(車が辿る軌道を作成し、車の「頭脳」を実装するタスク)など、いくつかのモジュールに分割されていた。そして最終的に、これらすべてが最後のモジュールである「制御」に送られ、「右に20°ハンドルを切る」などのコマンドを生成する。これがよく知られたアプローチだった。
しかし10年後、企業は別の分野を非常に真剣に捉え始めた。エンドツーエンド学習である。核となる考え方は、すべてのモジュールを、ステアリングと加速度を予測する単一のニューラルネットワークに置き換えることだが、ご想像の通り、これはブラックボックス問題を引き起こす。
これらのアプローチは知られているが、まだ自動運転の問題を解決していない。そこで私たちはこう考えずにはいられない。「現在世界に革命を起こしているLLM(大規模言語モデル)が、自動運転に対する予期せぬ答えになるのではないか?」
本記事では、まずLLMとは何かを簡単に説明し、その後、LLMが自動運転にどのように貢献できるのかについて掘り下げていく。
前置き: LLMとは?
この記事を読む前に、一つ知っておいてほしいことがある。私は全くLLMの専門家ではない。つまり、LLMを学ぶ苦労をよく知っている。私は「LLM 学習」とググって、具体的な内容が何も書かれていない電子書籍のダウンロードを促すスポンサー記事を3つ見て、それから20個の究極のロードマップやGitHubリポジトリを見て、その最初のステップ(全54ステップ中)が2時間もの長い動画を見ることだと知る(そして54番目のステップが何かは誰も知らない。あまりにも長すぎるからだ)という経験がどんなものか理解している。
だから、私があなたに同じ苦痛を味わわせる代わりに、LLMが何かを3つのキーアイデアに分解して説明しよう。
言語の処理
ChatGPTでは、あなたがテキストを入力すると、テキストが返ってくる、そうだよね?実際に起こっていることは、あなたのテキストがまずトークンに変換されることだ。
しかしトークンとは何か?あなたはそう尋ねるかもしれない。トークンは単語、文字、あるいは私たちが望むどんなものでも対応できる。考えてみてほしい——もしあなたがニューラルネットワークに文を送るつもりなら、実際の単語を送るつもりはなかっただろう?
ニューラルネットワークへの入力は常に数値なので、テキストを数値に変換する必要がある。これがトークン化だ。
モデル(ChatGPT、LLAMAなど)によって、トークンが意味するものは異なる。単語、サブワード、あるいは文字さえも意味しうる。英語の語彙を取って、それらを単語として定義することもできるし、単語の一部(サブワード)を取り、さらに複雑な入力を扱うこともできる。例えば、単語「a」はトークン1、単語「abracadabra」はトークン121といった具合だ。
さて、文を一連の数値に変換する方法がわかったので、その数列をニューラルネットワークに送ることができる!大まかに言うと、次のような構造になる。
周りを見回すと、エンコーダー-デコーダーアーキテクチャに基づくモデルもあれば、純粋にエンコーダーベースのモデル、GPTのように純粋にデコーダーベースのモデルもあることがわかるだろう。
いずれにせよ、それらはすべてコアとなるTransformerブロックを共有している。マルチヘッドアテンション、レイヤー正規化、加算と連結、ブロック、クロスアテンションなどだ。
これは単に、出力を得るための一連のアテンションブロックに過ぎない。では、この単語予測はどのように機能するのだろうか?
出力 / 次単語予測
エンコーダーは特徴を学習し、文脈を理解する… ではデコーダーは何をするのか?物体検出の場合、デコーダーはバウンディングボックスを予測する。セグメンテーションの場合、デコーダーはセグメンテーションマスクを予測する。ここではどうか?
私たちの場合、デコーダーは一連の単語を生成しようとしている。このタスクを「次単語予測」と呼ぶ。
もちろん、デコーダーも同様に数値やトークンを予測することでこれを行う。これにより、私たちの完全なモデルは以下のように特徴づけられる。
さて、このイントロの上に学ぶべき多くの「概念」がある。Transformerとアテンションに関連するすべてのこと、さらに数ショット学習、事前学習、ファインチューニングなどだ。
なるほど… しかし、これが自動運転車と何の関係があるのだろう?そろそろステージ2に移る時が来たようだ。
自動運転車のためのChat-GPT
実は、あなたはすでに難しい部分を通過した。あとは単に「これを自動運転にどう適応させるか?」ということだ。考えてみてほしい。私たちにはいくつかの修正を加える必要がある。
私たちの入力は、画像、センサーデータ(LiDAR点群、RADAR点群など)、あるいはアルゴリズムデータ(車線、物体など)のいずれかになる。Vision TransformerやVideo Vision Transformerが行うように、これらすべては「トークン化可能」だ。
私たちのTransformerモデルは、トークン上で動作するだけで入力の種類に依存しないため、ほとんど同じままである。
出力は、私たちが行いたい一連のタスクに基づく。画像で何が起こっているかを説明することもできれば、車線変更のような直接的な運転タスクにもなりうる。
では、結論から始めよう。
LLMが解決できる自動運転車のタスクとは?
自動運転には多くのタスクが関わるが、すべてがGPT化できるわけではない。2023年に最も活発な研究領域は以下の通りだった。
知覚: 入力画像に基づき、環境、物体の数などを記述する。
計画: 画像、鳥瞰図、または知覚の出力に基づき、何をすべきか(走行継続、譲歩など)を記述する。
生成: 「拡散」を用いて、トレーニングデータ、代替シナリオなどを生成する。
質問応答: チャットインターフェースを作成し、LLMにシナリオに基づいて質問に答えさせる。
知覚におけるLLM
知覚では、入力は一連の画像であり、出力は通常、物体の集合、車線などである。LLMの場合、3つのコアタスクがある。検出、予測、追跡だ。Chat-GPTに画像を送り、何が起こっているかを説明するよう求める例を以下に示す。
HiLM-DやMTD-GPTなどの他のモデルも同様のことができ、動画に対応する研究もある。PromptTrackのようなモデルは、4D知覚モデルと同様に、一意のID(前方のこの車はID #3)を割り当てる能力も持つ。
このモデルでは、マルチビュー画像がエンコーダー-デコーダーネットワークに送られ、バウンディングボックスやアテンションマップなどの物体のアノテーションを予測するように訓練される。これらのマップは、「右折している車両を見つけて」のようなプロンプトと組み合わされる。次のブロックは、ハンガリアンアルゴリズムのような二部グラフマッチングアルゴリズムを使用して、3Dバウンディングボックスの位置を特定し、IDを割り当てる。
これはクールだが、これまでのところLLMの「最高の」応用とは言えない。
意思決定、ナビゲーション、計画におけるLLM
もしChat-GPTが画像内の物体を見つけられるなら、それらの物体をどう扱うべきか教えられるはずではないか?そう、これが計画のタスク、つまり現在の知覚に基づいてAからBへの経路を定義することだ。このタスクのために開発された数多くのモデルがある中で、私の目を引いたのはTalk2BEVだった。
モデル間の主な違いは、
原文を表示
In 1928, London was in the middle of a terrible health crisis, devastated by bacterial diseases like pneumonia, tuberculosis, and meningitis. Confined in sterile laboratories, scientists and doctors were stuck in a relentless cycle of trial and error, using traditional medical approaches to solve complex problems.
This is when, in September 1928, an accidental event changed the course of the world. A Scottish doctor named Alexander Fleming forgot to close a petri dish (the transparent circular box you used in science class), which got contaminated by mold. This is when Fleming noticed something peculiar: all bacteria close to the moisture were dead, while the others survived.
"What was that moisture made of?" wondered M. Flemming. This was when he discovered that Penicillin, the main component of the mold, was a powerful bacterial killer. This led to the groundbreaking discovery of penicillin, leading to the antibiotics we use today. In a world where doctors were relying on existing well-studied approaches, Penicillin was the unexpected answer.
Self-driving cars may be following a similar event. Back in the 2010s, most of them were built using what we call a « modular » approach. The software « autonomous » part is split into several modules, such as Perception (the task of seeing the world), or Localization (the task of accurately localize yourself in the world), or Planning (the task of creating a trajectory for the car to follow, and implementing the « brain » of the car). Finally, all these go to the last module: Control, that generates commands such as « steer 20° right », etc… So this was the well-known approach.
But a decade later, companies started to take another discipline very seriously: End-To-End learning. The core idea is to replace every module with a single neural network predicting steering and acceleration, but as you can imagine, this introduces a black box problem.
These approaches are known, but don’t solve the self-driving problem yet. So, we could be wondering: "What if LLMs (Large Language Models), currently revolutionizing the world, were the unexpected answer to autonomous driving?"
This is what we're going to see in this article, beginning with a simple explanation of what LLMs are and then diving into how they could benefit autonomous driving.
Preamble: LLMs-what?
Before you read this article, you must know something: I'm not an LLM pro, at all. This means, I know too well the struggle to learn it. I understand what it's like to google "learn LLM"; then see 3 sponsored posts asking you to download e-books (in which nothing concrete appears)... then see 20 ultimate roadmaps and GitHub repos, where step 1/54 is to view a 2-hour long video (and no one knows what step 54 is because it's so looooooooong).
So, instead of putting you through this pain myself, let's just break down what LLMs are in 3 key ideas:
Processing Language
In ChatGPT, you input a piece of text, and it returns text, right? Well, what's actually happening is that your text is first converted into tokens.
But what's a token? You might ask. Well, a token can correspond to a word, a character, or anything we want. Think about it -- if you are to send a sentence to a neural network, you didn't plan on sending actual words, did you?
The input of a neural network is always a number, so you need to convert your text into numbers; this is tokenization.
Depending on the model (ChatGPT, LLAMA, etc...), a token can mean different things: a word, a subword, or even a character. We could take the English vocabulary and define these as words or take parts of words (subwords) and handle even more complex inputs. For example, the word « a » could be token 1, and the word « abracadabra » would be token 121.
Now that we understand how to convert a sentence into a series of numbers, we can send that series into our neural network! At a high level, we have the following structure:
If you start looking around, you will see that some models are based on an encoder-decoder architecture, some others are purely encoder-based, and others, like GPT, are purely decoder-based.
Whatever the case, they all share the core Transformer blocks: multi-head attention, layer normalization, addition and concatenation, blocks, cross-attention, etc...
This is just a series of attention blocks getting you to the output. So how does this word prediction work?
The output/ Next-Word Prediction
The Encoder learns features and understands context... But what does the decoder do? In the case of object detection, the decoder is predicting bounding boxes. In the case of segmentation, the decoder is predicting segmentation masks. What about here?
In our case, the decoder is trying to generate a series of words; we call this task "next-word prediction".
Of course, it does it similarly by predicting numbers or tokens. This characterizes our full model as shown below,
Now, there are many "concepts" that you should learn on top of this intro: everything Transformer and Attention related, but also few-shot learning, pretraining, finetuning, and more...
Ok... but what does it have to do with self-driving cars? I think it's time to move to stage 2.
Chat-GPT for Self-Driving Cars
The thing is, you've already been through the tough part. The rest simply is: "How do I adapt this to autonomous driving?". Think about it; we have a few modifications to make:
Our input now becomes either images, sensor data (LiDAR point clouds, RADAR point clouds, etc...), or even algorithm data (lane lines, objects, etc...). All of it is "tokenizable", as Vision Transformers or Video Vision Transformers do.
Our Transformer model pretty much remains the same since it only operates on tokens and is independent of the kind of input.
The output is based on the set of tasks we want to do. It could be explaining what's happening in the image or could also be a direct driving task like switching lanes.
So, let's begin with the end:
What self-driving car tasks could LLM solve?
There are many tasks involved in autonomous driving, but not all of them are GPT-isable. The most active research areas in 2023 have been:
Perception: Based on an input image, describe the environment, number of objects, etc...
Planning: Based on an image, or a bird-eye view, or the output of perception, describe what we should do (keep driving, yield, etc...)
Generation: Generate training data, alternate scenarios, and more... using "diffusion"
Question & Answers: Create a chat interface and ask the LLM to answer questions based on the scenario.
LLMs in Perception
In Perception, the input is a series of images, and the output is usually a set of objects, lanes, etc... In the case of LLMs, we have 3 core tasks: Detection, Prediction, and Tracking. An example with Chat-GPT, when you send it an image and ask to describe what's going on is shown below:
Other models such as HiLM-D and MTD-GPT can also do this, some work also for videos. Models like PromptTrack, also have the ability to assign unique IDs (this car in front of me is ID #3), similar to a 4D Perception model.
In this model, multi-view images are sent to an Encoder-Decoder network that is trained to predict annotations of objects such as bounding boxes, and attention maps). These maps are then combined with a prompt like 'find the vehicles that are turning right'.The next block then finds the 3D Bounding Box localization and assigns IDs using a bipartite graph matching algorithm like the Hungarian Algorithm.
This is cool, but this isn't the "best" application of LLMs so far:
LLMs in Decision Making, Navigation, and Planning
If Chat-GPT can find objects in an image, it should be able to tell you what to do with these objects, shouldn't it? Well, this is the task of Planning i.e. defining a path from A to B, based on the current perception. While there are numerous models developed for this task, the one that stood out to me was Talk2BEV:
The main difference between models for planning and Perception-only models is that here, we're going to train the model on human behavior to suggest ideal driving decisions. We're also going to change the input from multi-view to Bird Eye View since it is much easier to understand.
This model works both with LLaVA and ChatGPT4, and here is a demo of the architecture:
As you can see, this isn't purely "prompt" based, because the core object detection model stays Bird Eye View Perception, but the LLM is used to "enhance" that output by suggesting to crop some regions, look at specific places, and predict a path. We're talking about "language enhanced BEV Maps".
Other models like DriveGPT are trained to send the output of Perception to Chat-GPT and finetune it to output the driving trajectory directly.
I could go on and on, but I think you get the point. If we summarize, I would say that:
Inputs are either tokenized images or outputs of Perception algorithm (BEV maps, ...)
We fuse existing models (BEV Perception, Bipartite Matching, ...) with language prompts (find the moving cars)
Changing the task is mainly about changing the data, loss function, and careful finetuning.
The Q&A applications are very similar, so let's see the last application of LLMs:
LLMs for Image Generation
Ever tried Midjourney and DALL-E? Isn’t it super cool? Yes, and there is MUCH COOLER than this when it comes to autonomous driving. In fact, have you heard of Wayve's GAIA-1 model? The model takes text and images as input and directly produces videos, like this:
The architecture takes images, actions, and text prompts as input, and then uses a World Model (an understanding of the world and its interactions) to produce a video.
You can find more examples on Wayve's YouTube channel and this dedicated post.
Similarly, you can see MagicDrive, which takes the output of Perception as input and uses that to generate scenes:
Other models, like Driving Into the Future and Driving Diffusion can directly generate future scenarios based on the current ones. You get the point; we can generate scenes in an infinite way, get more data for our models, and have this endless positive loop.
We've just seen 3 prominent families of LLM usage in self-driving cars: Perception, Planning, and Generation. The real question is...
Could we trust LLMs in self-driving cars?
And by this, I mean... What if your model has hallucinations? What if its replies are completely absurd, like ChatGPT sometimes does? I remember, back in my first days in autonomous driving, big groups were already skeptical about Deep Learning, because it wasn't "deterministic" (as they call it).
We don't like Black Boxes, which is one of the main reasons End-To-End will struggle to get adopted. Is ChatGPT any better? I don't think so, and I would even say it's worse in many ways. However, LLMs are becoming more and more transparent, and the black box problem could eventually be solved.
To answer the question "Can we trust them?"... it's very early in the research, and I'm not sure someone has really used them "online" — meaning « live », in a car, on the streets, rather than in a headquarter just for training or image generation purpose. I would definitely picture a Grok model on a Tesla someday just for Q&A purposes. So for now, I will give you my coward and safe answer...
It's too early to tell!
Because it really is. The first wave of papers mentioning LLMs in Self-Driving Cars is from mid-2023, so let's give it some time. In the meantime, you could start with this survey that shows all the evolutions to date.
Alright, time for the best part of the article...
The LLMs 4 AD Summary
A Large Language Model (LLM) works in 3 key steps: inputs, transformer, output. The input is a set of tokenized words, the transformer is a classical transformer, and the output task is "next word prediction".
In a self-driving car, there are 3 key tasks we can solve with LLMs: Perception (detection, tracking, prediction), Planning (decision m
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み