アーカイブ / LLM
少数の例を文章で示し、追加学習せずに言語課題を解く
GPT-3 few-shot learning
GPT-3 few-shot learningの原論文から掲載した図です。細部はクリックして拡大できます。
原論文の図の説明を読む
Figure 1.1: Language model meta-learning. During unsupervised pre-training, a language model develops a broad set of skills and pattern recognition abilities. It then uses these abilities at inference time to rapidly adapt to or recognize the desired task. We use the term “in-context learning” to describe the inner loop of this process, which occurs within the forward-pass upon each sequence. The sequences in this diagram are not intended to be representative of the data a model would see during pre-training, but are intended to show that there are sometimes repeated sub-tasks embedded within a single sequence.
概要
- GPT-3は1750億パラメータの言語モデルで、論文は少数例による課題への対応を調べた。
- 評価時には課題ごとの追加学習を行わず、指示と例を文章で与える。
- 著者らは複数の課題で強い結果と、苦手なデータセットの両方を報告した。
補足:編集した模式図で仕組みを確認する
VISUAL EXPLAINER
図でつかむ、GPT-3 few-shot learningの仕組み
- 01指示と少数の例
- 02未知の入力を追加
- 03続く文章を予測
- 04課題の回答
原論文の説明をもとにした模式図です。処理の細部は省略しています。
研究の背景
多くの言語モデルは大量の文章で事前学習した後、翻訳や質問応答など個別の課題に合わせて追加学習する。そのため、課題ごとに多数の正解例を集める必要がある。
現場では新しい文書形式や依頼が次々に現れ、十分な例をすぐに用意できないこともある。少数の例や短い指示を文章で渡すだけで対応できれば、試行の初期段階を軽くできる。
手法
GPT-3は、前に続く語を予測する形で学習した言語モデルである。課題を解く際には、例えば「問い合わせ文:……/担当部署:……」という入出力例をいくつか文章に並べ、最後に未分類の問い合わせを置く。モデルはその続きとして担当部署名を生成する。
この使い方を少数例学習と呼ぶ。例は入力文の中に示し、課題ごとにモデルの重みを更新しない。論文では翻訳、質問応答、空欄補完、語の並べ替えや計算などに同じ考え方を適用している。
新規性
著者らは、1750億個のパラメータを持つ自己回帰型言語モデルGPT-3を学習し、課題ごとの重みの更新なしで少数例から対応できるかを調べた。自己回帰型とは、直前までの文章を手掛かりに次の語を順に予測する方式である。
翻訳や質問応答に加え、その場で規則を読み取る課題も文章だけで指定した。研究の焦点は、モデルを大きくしたときに少数例での対応力がどう変わるかにある。
従来手法との違い
一般的な事前学習後の追加学習では、課題ごとに数千から数万の例を用意し、モデルの内部の重みを更新する。GPT-3の論文が扱う少数例の設定では、指示といくつかの入出力例を文章に含め、評価時に重みを変えない。
著者らは、モデルの大規模化によって複数の言語課題で性能が向上し、従来の追加学習方式に競合する場合があると述べる。一方、課題によって苦手な結果もあり、一律に置き換えられるという主張ではない。
実験結果
著者らは1750億パラメータのGPT-3を、翻訳、質問応答、空欄補完、推論を要する課題などで評価した。すべての課題で、評価時に勾配による更新や追加学習を行わず、指示と少数の例を文章で与えている。
著者らは多くのデータセットで強い成績を報告する一方、苦手なデータセットも挙げる。確認できた本文の範囲では、課題別の正解率、例の個数、比較表の詳細は示されていないため、特定業務の精度を数値で見積もる根拠にはできない。
応用の可能性
編集上の応用案 · 論文が実証した用途とは区別しています。
編集上の応用案:社内の問い合わせ文を、担当部署へ振り分けるための分類候補を作る。入力は部署名の定義、少数の問い合わせと正しい部署の例、新しい問い合わせ文である。出力は部署名の候補とする。
担当者が新しい問い合わせの候補を確認し、誤っていれば修正する。修正した例は評価用に蓄積し、部署ごとに誤りが偏るかを見る。モデルが示す候補だけで正式な受付先を確定する運用は、検証結果を見て判断する。
導入時の検証
導入時の検証案 · 対象データでの再評価が必要です。
導入時の検証案:過去の問い合わせから、部署ごとの正解付き事例を評価用に取り分ける。まず部署名の定義だけを渡す方式を基準に、少数の入出力例を加えた方式と同じ評価事例で比べる。
部署別の正解率、誤った部署へ振り分けた件数、担当者の修正時間を記録する。例の選び方を変えたときの結果も確かめ、どの種類の問い合わせで人の確認が特に必要かを決める。
限界と課題
著者らは、少数例での性能が伸びても苦手なデータセットがあること、大規模なウェブ文章で学習したため評価方法上の問題が生じるデータセットがあることを報告する。人間によるニュース記事の識別が難しかったという結果にも、社会的影響が伴うと述べている。
編集上の確認事項は、導入先の問い合わせで分類が安定するか、例の選び方で結果が変わるか、回答に根拠のない内容が混ざるかである。
出典
元のタイトル・要旨を確認する(英語)
Language Models are Few-Shot Learners
Recent work has demonstrated substantial gains on many NLP tasks and benchmarks by pre-training on a large corpus of text followed by fine-tuning on a specific task. While typically task-agnostic in architecture, this method still requires task-specific fine-tuning datasets of thousands or tens of thousands of examples. By contrast, humans can generally perform a new language task from only a few examples or from simple instructions - something which current NLP systems still largely struggle to do. Here we show that scaling up language models greatly improves task-agnostic, few-shot performance, sometimes even reaching competitiveness with prior state-of-the-art fine-tuning approaches. Specifically, we train GPT-3, an autoregressive language model with 175 billion parameters, 10x more than any previous non-sparse language model, and test its performance in the few-shot setting. For all tasks, GPT-3 is applied without any gradient updates or fine-tuning, with tasks and few-shot demonstrations specified purely via text interaction with the model. GPT-3 achieves strong performance on many NLP datasets, including translation, question-answering, and cloze tasks, as well as several tasks that require on-the-fly reasoning or domain adaptation, such as unscrambling words, using a novel word in a sentence, or performing 3-digit arithmetic. At the same time, we also identify some datasets where GPT-3's few-shot learning still struggles, as well as some datasets where GPT-3 faces methodological issues related to training on large web corpora. Finally, we find that GPT-3 can generate samples of news articles which human evaluators have difficulty distinguishing from articles written by humans. We discuss broader societal impacts of this finding and of GPT-3 in general.
論文本体の取得範囲に基づく解説。AIが作成した未校閲の記事です。性能の数値は著者の評価条件に依存します。応用例と検証計画は編集上の提案です。解説更新:2026-09-29




