Skip to main content
QUICK REVIEW

[論文レビュー] In-Context Learning with Many Demonstration Examples

Mukai Li, Shansan Gong|arXiv (Cornell University)|Feb 9, 2023
Topic Modeling被引用数 5
ひとこと要約

この論文では、円形位置埋め込みと段階的符号化を用いて最大256kのコンテキスト長をサポートする、効率的なトランスフォーマー・アーキテクチャに基づく長距離言語モデル、EvaLMを紹介する。これは多数の例を含むコンテキスト内学習を高効率で実行でき、同等のモデルと比較して平均的に4.1%高い精度を達成するが、効率的な推論と外挿技術のおかげで計算コストは最小限に抑えられる。

ABSTRACT

Large pre-training language models (PLMs) have shown promising in-context learning abilities. However, due to the backbone transformer architecture, existing PLMs are bottlenecked by the memory and computational cost when scaling up to a large context size, leaving instruction tuning and in-context learning of many demonstration examples, as well as long-range language modeling under-explored. In this study, we propose a long-range language model EVALM based on an efficient transformer mechanism. EVALM is trained with 8k tokens per batch line and can test up to 256k-lengthed contexts with extrapolation, 128 times to the limit of existing PLMs (e.g. GPT3). Based on EVALM, we scale up the size of examples efficiently in both instruction tuning and in-context learning to explore the boundary of the benefits from more annotated data. Experimental results on a diverse set of tasks show that EVALM achieves 4.1% higher accuracy on average, and the average length of achieving the best accuracy score over tasks is around 12k. We find that in-context learning can achieve higher performance with more demonstrations under many-shot instruction tuning (8k), and further extending the length of instructions (16k) can further improve the upper bound of scaling in-context learning.

研究の動機と目的

  • 標準的なトランスフォーマー・アーキテクチャによる長距離コンテキスト内学習(ICL)における計算およびメモリのボトル neck を解消すること。
  • 提示例の数を増やすことで、コンテキスト内学習の性能限界を調査すること。
  • 軽量でスケーラブルな言語モデルを用いて、指示微調整およびICLのための効率的で外挿可能な長距離コンテキストモデリングを可能にすること。
  • 長距離コンテキスト環境下で、ショット数と指示長を増加させることでICL性能が向上するかどうかを調査すること。

提案手法

  • EvaLMは、位置埋め込みの外挿を可能にするために変更を加えた効率的トランスフォーマー機構(EVA)を用いて事前学習される。
  • 円形位置埋め込みが導入され、学習時のシーケンス長を超える長距離のコンテキスト長への一般化が可能になる。
  • 段階的符号化が採用され、提示例の符号化表現をキャッシュして再利用することで、推論時の重複計算が削減される。
  • 推論性能を向上させるために、最大8kショットの提示例を用いた多数の例による指示微調整(MSIT)がモデルに適用される。
  • スケーラビリティと有効性を評価するために、さまざまなプロンプティング戦略を用いて10の多様なNLPタスクで実験が実施される。
  • 効率性は、トレーニング時のFLOPsと推論時間によって測定され、EvaLMはOPTおよび他のベースラインと比較される。
Figure 1: The illustration of EvaLM scaling up in-context learning. The pre-training stage empowers the language modeling capacity of EvaLM , and the instruction tuning explicitly aligns EvaLM with instructions from different tasks. For different downstream tasks, EvaLM can in-context learn from the
Figure 1: The illustration of EvaLM scaling up in-context learning. The pre-training stage empowers the language modeling capacity of EvaLM , and the instruction tuning explicitly aligns EvaLM with instructions from different tasks. For different downstream tasks, EvaLM can in-context learn from the

実験結果

リサーチクエスチョン

  • RQ1少々の例(few-shot)設定を超えて提示例の数を増やすことで、コンテキスト内学習の性能を顕著に向上させることができるか?
  • RQ2長距離コンテキスト環境下で、指示長を延ばすと、多数の例による指示微調整による性能向上にどのような影響を与えるか?
  • RQ3効率的なアテンション機構と外挿技術が、事前学習済み言語モデルにおける長距離コンテキストモデリングをどの程度可能にするか?
  • RQ4多数の例によるコンテキスト内学習をスケーリングする際の計算コストは何か?そして、それを効率的にできるか?

主な発見

  • EvaLMは、OPTのような同等のモデルと比較して、多数の例による指示微調整を用いた場合、10の多様なNLPタスクで平均的に4.1%高い精度を達成する。
  • タスク全体でピーク精度に到達するのに必要な平均入力長は約12kトークンであり、性能向上がスケールに伴って顕著に現れることを示している。
  • 多数の例による指示微調整は、特に長めの指示(最大16kトークン)と組み合わせると、コンテキスト内学習性能を顕著に向上させる。
  • 段階的符号化とキャッシュを用いることで、少々の例から多数の例へのスケーリングに伴う計算コストの増加は最小限に抑えられ、長距離推論に実用的である。
  • EvaLMは円形位置埋め込みを用いて256k長のコンテキストに成功して外挿し、GPT-3(2048トークン)と比較して128倍の長さのコンテキストを扱える。
  • ショット数を増やすことで得られる性能向上は無限ではないことが示され、限界に達すると限界効果が小さくなる傾向がある。
Figure 2: The ICL accuracy curve along with demonstration length on Trec dataset using the Top- $k$ approach, for EvaLM -350M models with different instruction tuning strategies.
Figure 2: The ICL accuracy curve along with demonstration length on Trec dataset using the Top- $k$ approach, for EvaLM -350M models with different instruction tuning strategies.

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。