# GPT Understands, Too

GPTも理解する

Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang ほか1名 · arXiv · 2021年3月18日

- **課題** 人が作成した離散プロンプトは、表現が変わるだけで性能が大きく揺れるため、言語モデルの適応が不安定になります。
- **手法** 離散プロンプトトークンに学習可能な連続プロンプト埋め込みを加え、プロンプトエンコーダでその埋め込み同士の依存関係をモデリングし、タスク損失で更新します。
- **結果** LAMAの知識探索では凍結モデルの従来の最高結果を上回り、few-shot SuperGLUEではPETより平均で1点以上高く、手動プロンプト間の標準偏差を減らしています。

## 手動の離散プロンプトの不安定性

言語モデルに自然言語のパターンを付け加えるプロンプト手法は、自然言語理解のタスクで効果が確認されています。しかし、人が作成した離散プロンプトは、単語を一つ変えるだけでも性能が大きく下がることがあります。論文のTable 1では、LAMA P17のタスクでBERT-base-casedを凍結した設定を見ると、同じ関係を尋ねるプロンプトでもP@1が19.8から51.1まで変動します。既存の自動探索手法は探索結果を得ても、離散空間の不安定な性質そのものは変えられない点が課題として残ります。

![Table 1: Discrete prompts suffer from instability (high variance), while P-Tuning stabilizes and improves per- formance. Results are precision@1 on LAMA-TREx P…](https://refivu.com/papers/1bee23a9-1e12-440d-bf82-0263604d14f2/figures/figure-87278aaedba07cfbac1dda6c55a231b8.png?thumb=512)

**Table 1** : Discrete prompts suffer from instability (high variance), while P-Tuning stabilizes and improves per- formance. Results are precision@1 on LAMA-TREx P17 with BERT-base-cased. “PT” refers to P-Tuning, which trains additional continuous prompts in concate- nation with discrete prompts.

[出典](https://arxiv.org/abs/2103.10385v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, Jie Tang · GPT Understands, Too · 論文の図を引用 · 元のPDFの1ページ目から図の部分を抽出しています。

この論文では、この不安定性を減らすために、プロンプトを離散トークンだけで構成せず、学習可能な連続プロンプト埋め込みを離散プロンプトと一緒に入力へ入れる方法を扱っています。

## 連続プロンプト埋め込みとプロンプトエンコーダ

P-Tuningは、離散プロンプトトークンと連続プロンプト埋め込みをつなげて言語モデルに入力します。連続プロンプト埋め込みは、タスク損失の逆伝播で更新されます。論文では、この学習可能性によって離散プロンプトのわずかな変化による影響を打ち消し、学習を安定させられるという直感が提示されています。

![Figure 2: An example of prompt search for “The capital of Britain is \[MASK\]”. Given the context (blue zone, “Britain”) and target (red zone, “\[MASK\]”), the ora…](https://refivu.com/papers/1bee23a9-1e12-440d-bf82-0263604d14f2/figures/figure-b5ef1231205ce1da05d6e9ef218976ae.png?thumb=512)

**Figure 2** : An example of prompt search for “The capital of Britain is \[MASK\]”. Given the context (blue zone, “Britain”) and target (red zone, “\[MASK\]”), the orange zone refer to the prompt. In (a), the prompt generator only receives discrete rewards; on the contrary, in (b) the continuous prompt embeddings and prompt encoder can be optimized in a differentiable way.

[出典](https://arxiv.org/abs/2103.10385v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, Jie Tang · GPT Understands, Too · 論文の図を引用 · 元のPDFの3ページ目から図の部分を抽出しています。

論文のテンプレートは、プロンプトトークンP0からPkまでを入力系列の間に配置する形式です。連続プロンプト\[Pi\]は写像関数fによってhiに変換され、このhiがモデルの入力埋め込みとして入ります。論文ではfをLSTMまたはMLPで実装し、連続プロンプト埋め込み同士の依存関係をモデリングすると説明されています。Section 3のアブレーション実験では、恒等写像であるEMBも併せて比較されています。離散プロンプトと連続プロンプトを併用する設定は、実験全体で採用されたと論文に記録されています。

## LAMA知識探索での検証

LAMA知識探索の実験は、言語モデルを凍結し連続プロンプトのみを学習する設定で行われました。評価にはLAMA-34kとLAMA-29kでPrecision@1を用います。LAMA-29kは、GPTとBERTの語彙の共通部分を使うサブセットで、2つのモデル系列を直接比較するために選ばれました。

結果として、P-tuningは従来の最高結果である43.3%をLAMA-34kで50.6%に、45.2%をLAMA-29kで64.2%に引き上げています。同じサイズのモデルでは、AutoPromptやLPAQAといった離散プロンプト探索手法よりも高いと報告されています。この結果は、凍結した言語モデルとこの設定で得られたものであり、他のモデル系列や他のタスクにそのまま一般化されるわけではありません。

![Table 3: Knowledge probing Precision@1 on LAMA-34k (left) and LAMA-29k (right). P-tuning outperforms all the discrete prompt searching baselines. (MP: Manual p…](https://refivu.com/papers/1bee23a9-1e12-440d-bf82-0263604d14f2/figures/figure-f26be772b1bbb7740f5b40356d73a634.png?thumb=512)

**Table 3** : Knowledge probing Precision@1 on LAMA-34k (left) and LAMA-29k (right). P-tuning outperforms all the discrete prompt searching baselines. (MP: Manual prompt; PT: P-tuning).

[出典](https://arxiv.org/abs/2103.10385v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, Jie Tang · GPT Understands, Too · 論文の図を引用 · 元のPDFの4ページ目から図の部分を抽出しています。

## few-shot SuperGLUEと安定性の評価

few-shot SuperGLUEの実験は、FewGLUE設定でALBERTを基盤モデルとして用い、PETおよびPrompt Tuningと比較しています。論文では評価結果のばらつきが大きいことを考慮し、複数のデータ分割で平均を取ったと述べられています。P-Tuningは、PETと同じ手動プロンプトを基に連続プロンプトトークンを追加する形で構成されています。この設定では、P-Tuningは平均でPETより1点以上、Prompt Tuningより13点以上高くなっています。

![Table 5: The few-shot performance of PET (Schick and Schütze, 2020), Prompt Tuning (Lester et al., 2021) and our P-tuning over seven tasks based on ALBERT. Eac…](https://refivu.com/papers/1bee23a9-1e12-440d-bf82-0263604d14f2/figures/figure-fef1da2078e03f493454ef91c95c34a3.png?thumb=512)

**Table 5** : The few-shot performance of PET (Schick and Schütze, 2020), Prompt Tuning (Lester et al., 2021) and our P-tuning over seven tasks based on ALBERT. Each result is averaged over 4 runs with different data splits. Results show that P-tuning consistently improves average few-shot performance by more than 1 point compared to PET and by more than 13 points compared to Prompt Tuning.

[出典](https://arxiv.org/abs/2103.10385v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, Jie Tang · GPT Understands, Too · 論文の図を引用 · 元のPDFの7ページ目から図の部分を抽出しています。

安定性の面では、LAMA P17の手動プロンプト6つに連続プロンプトを追加したところ、標準偏差が10.1から0.46に減ったという結果が報告されています。同じTable 6のfew-shot部分でも、P-Tuningは最悪パターンの性能を改善し、標準偏差を減らすと報告されています。ただし、この安定性の結果は、LAMA P17の設定とfew-shotの設定がそれぞれ別に測定されたものです。

![Table 6: Upper table: Few-shot learning (FSL) of PET and P-tuning in terms of each pattern on SuperGLUE with ALBERT; Lower table: Manual prompt (MP) and P-tuni…](https://refivu.com/papers/1bee23a9-1e12-440d-bf82-0263604d14f2/figures/figure-9c778278764bbe97500dbae8438a190e.png?thumb=512)

**Table 6** : Upper table: Few-shot learning (FSL) of PET and P-tuning in terms of each pattern on SuperGLUE with ALBERT; Lower table: Manual prompt (MP) and P-tuning performance on LAMA-P17 with BERT-base-cased. For each column, P-tuning and compared methods share the same manual prompts, while P-tuning additionally concatenates continuous prompt tokens. We report the standard deviation over multiple results of different patterns. Results show that P-tuning achieves smaller standard deviation, proving that P-tuning can improve stability w.r.t. the choice of discrete patterns.

[出典](https://arxiv.org/abs/2103.10385v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, Jie Tang · GPT Understands, Too · 論文の図を引用 · 元のPDFの7ページ目から図の部分を抽出しています。

## プロンプトエンコーダとアブレーション実験

プロンプトエンコーダの選択は、few-shot設定のアブレーション実験で検討されています。LSTM、MLP、EMBを比較しており、論文によれば、LSTMとMLPはWiC、CB、BoolQでおおむね良く機能する一方、EMBは一部のタスク、特にWiCとCBで性能が大きく下がるとされています。そのため論文は、新しいタスクではLSTMとMLPを併せて検討することが望ましいと提案しています。

![Table 8: The few-shot performance on WiC, CB and BoolQ tasks with ALBERT using different prompt en- coders. Results show that both LSTM and MLP gener- ally wor…](https://refivu.com/papers/1bee23a9-1e12-440d-bf82-0263604d14f2/figures/figure-45a55cdbeeb4316c96e878bb8e02303d.png?thumb=512)

**Table 8** : The few-shot performance on WiC, CB and BoolQ tasks with ALBERT using different prompt en- coders. Results show that both LSTM and MLP gener- ally work well on these tasks, while EMB is unstable and can substantially under-perform the other two on some tasks (e.g,. WiC and CB). “EMB” means using an identity mapping for the prompt encoder.

[出典](https://arxiv.org/abs/2103.10385v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, Jie Tang · GPT Understands, Too · 論文の図を引用 · 元のPDFの8ページ目から図の部分を抽出しています。

連続プロンプトトークンの位置と個数も、CBタスクのALBERT設定で分析されています。文を分断しない位置に置いたほうが良いという観察と、トークン数が増えても常に良くなるとは限らないという観察が併せて報告されています。

![Table 7: The few-shot performance of P-tuning on the CB task on ALBERT with different prompt patterns. “Seg.” means whether the inserted prompt tokens segment…](https://refivu.com/papers/1bee23a9-1e12-440d-bf82-0263604d14f2/figures/figure-dcacfe18ce408767f7214038ba15313e.png?thumb=512)

**Table 7** : The few-shot performance of P-tuning on the CB task on ALBERT with different prompt patterns. “Seg.” means whether the inserted prompt tokens segment complete sentences. “Pos.” indicates inserting the prompt tokens at the edge or in the middle of the inputs. “\[P\]” is continuous prompt token. “\[M\]” is the mask token.

[出典](https://arxiv.org/abs/2103.10385v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, Jie Tang · GPT Understands, Too · 論文の図を引用 · 元のPDFの8ページ目から図の部分を抽出しています。

## 論文情報

- **著者**: Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, Jie Tang
- **学会・ジャーナル**: arXiv · プレプリント
- **公開日**: 2021年3月18日
- **登録日**: 2026年11月6日
- **更新日**: 2023年10月25日
- **バージョン**: v2
- **arXiv**: 2103.10385
- **カテゴリ**: cs.CL · cs.LG
- **ライセンス**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **掲載内容**: 論文情報・解説・論文の図

[元論文 ↗](https://arxiv.org/abs/2103.10385v2) · [PDF ↗](https://arxiv.org/pdf/2103.10385v2)

この解説は、Refivuの韓国語解説をAIで翻訳したものです。不正確な翻訳や誤りが含まれる可能性があります。論文と図の利用条件は各出典に従います。

## アブストラクト

Prompting a pretrained language model with natural language patterns has been proved effective for natural language understanding (NLU). However, our preliminary study reveals that manual discrete prompts often lead to unstable performance -- e.g., changing a single word in the prompt might result in substantial performance drop. We propose a novel method P-Tuning that employs trainable continuous prompt embeddings in concatenation with discrete prompts. Empirically, P-Tuning not only stabilizes training by minimizing the gap between various discrete prompts, but also improves performance by a sizeable margin on a wide range of NLU tasks including LAMA and SuperGLUE. P-Tuning is generally effective for both frozen and tuned language models, under both the fully-supervised and few-shot settings.

## この論文を引用

Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, Jie Tang (2021). GPT Understands, Too. arXiv:2103.10385v2. https://arxiv.org/abs/2103.10385v2

**BibTeX**

```
@misc{liu2021understands,
  title = {{GPT Understands, Too}},
  author = {Xiao Liu and Yanan Zheng and Zhengxiao Du and Ming Ding and Yujie Qian and Zhilin Yang and Jie Tang},
  year = {2021},
  eprint = {2103.10385},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.10385v2}
}
```

## この論文の用語

- [SuperGLUE](https://refivu.com/ja/terms/e4683d9c222e-superglue)
- [Prompt Tuning](https://refivu.com/ja/terms/f130a9785756-prompt-tuning)
- [LAMA](https://refivu.com/ja/terms/acf6ed8e0c14-lama)
- [PET](https://refivu.com/ja/terms/aac039ea841c-pet)
- [ALBERT](https://refivu.com/ja/terms/9dc5220f7985-albert)
- [AutoPrompt](https://refivu.com/ja/terms/d56b3e8ed652-autoprompt)
- [prompt encoder](https://refivu.com/ja/terms/97d4c34715cd-prompt-encoder)

## ほかの論文解説

- [Opportunities and Challenges for ChatGPT and Large Language Models in Biomedicine and Health](https://refivu.com/ja/papers/fddfbda2-67e8-44ae-b9b3-0a4666afe739-opportunities-and-challenges-for-chatgpt-and-large-language.md)
- [Large Language Models Encode Clinical Knowledge](https://refivu.com/ja/papers/54421651-3211-4d10-8173-bc88802e60f6-large-language-models-encode-clinical-knowledge.md)
- [JARVIS-1: Open-World Multi-task Agents with Memory-Augmented Multimodal Language Models](https://refivu.com/ja/papers/cf00e122-bac5-4b1b-869d-88ddc3860800-jarvis-1-open-world-multi-task-agents-with.md)
- [InstructBLIP: Towards General-purpose Vision-Language Models with Instruction Tuning](https://refivu.com/ja/papers/a16f8bfe-f6f1-4e2b-a409-c76d2ed97fc3-instructblip-towards-general-purpose-vision-language-models.md)
- [PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization](https://refivu.com/ja/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2-pandalm-an-automatic-evaluation-benchmark-for-llm.md)
- [Self-Distilled Reasoner: On-Policy Self-Distillation for Large Language Models](https://refivu.com/ja/papers/733bb47f-1989-4658-a978-6131bad900ad-self-distilled-reasoner-on-policy-self-distillation-for.md)
- [Towards Learning Universal, Regional, and Local Hydrological Behaviors via Machine-Learning Applied to Large-Sample Datasets](https://refivu.com/ja/papers/c1ee1227-dd45-4aef-9943-a760b7a45dbc-towards-learning-universal-regional-and-local-hydrological.md)
- [Contrastive Representation Learning: A Framework and Review](https://refivu.com/ja/papers/8d475c35-65aa-4272-b3a4-00f7350d277d-contrastive-representation-learning-a-framework-and-review.md)
- [YOLOP: You Only Look Once for Panoptic Driving Perception](https://refivu.com/ja/papers/61212604-6561-425b-9de1-178543e2926c-yolop-you-only-look-once-for-panoptic-driving.md)
- [Machine learning-assisted directed protein evolution with combinatorial libraries](https://refivu.com/ja/papers/a4309e01-25f4-4c40-896c-8ee713da1fda-machine-learning-assisted-directed-protein-evolution-with.md)
- [Concealed Object Detection](https://refivu.com/ja/papers/6a17f952-9bf8-4221-9f67-00c90ed3fa01-concealed-object-detection.md)
- [PVT v2: Improved Baselines with Pyramid Vision Transformer](https://refivu.com/ja/papers/8488fb84-a671-4efb-b62f-a19ce6ddfa07-pvt-v2-improved-baselines-with-pyramid-vision-transformer.md)

---

AI解説には誤りが含まれることがあります。 [Refivu](https://refivu.com/ja/papers/1bee23a9-1e12-440d-bf82-0263604d14f2-gpt-understands-too)
