Skip to main content
QUICK REVIEW

[論文レビュー] In-context Pretraining: Language Modeling Beyond Document Boundaries

Weijia Shi, Sewon Min|arXiv (Cornell University)|Oct 16, 2023
Topic ModelingComputer Science被引用数 3
ひとこと要約

本論文では、文脈的に関連するドキュメントをグループ化することで、事前学習データの順序を再編成するスケーラブルな手法、In-Context Pretrainingを紹介する。この手法により、言語モデルはドキュメント境界を越えて推論を学習できるようになる。近似的な最近傍探索とグラフベースのソーティングを用いることで、既存の事前学習パイプラインを変更せずに、少しだけの変更で、イン・コンテキスト・ラーニング(+8%)、読解(+15%)、忠実性(+16%)のパフォーマンスが向上する。

ABSTRACT

Large language models (LMs) are currently trained to predict tokens given document prefixes, enabling them to directly perform long-form generation and prompting-style tasks which can be reduced to document completion. Existing pretraining pipelines train LMs by concatenating random sets of short documents to create input contexts but the prior documents provide no signal for predicting the next document. We instead present In-Context Pretraining, a new approach where language models are pretrained on a sequence of related documents, thereby explicitly encouraging them to read and reason across document boundaries. We can do In-Context Pretraining by simply changing the document ordering so that each context contains related documents, and directly applying existing pretraining pipelines. However, this document sorting problem is challenging. There are billions of documents and we would like the sort to maximize contextual similarity for every document without repeating any data. To do this, we introduce approximate algorithms for finding related documents with efficient nearest neighbor search and constructing coherent input contexts with a graph traversal algorithm. Our experiments show In-Context Pretraining offers a simple and scalable approach to significantly enhance LMs'performance: we see notable improvements in tasks that require more complex contextual reasoning, including in-context learning (+8%), reading comprehension (+15%), faithfulness to previous contexts (+16%), long-context reasoning (+5%), and retrieval augmentation (+9%).

研究の動機と目的

  • 標準的な事前学習では、ランダムに連結されたドキュメントが相互に信号を提供しないため、ドキュメント間の信号が欠落するという制限に対処するため、意味的に関連するドキュメントをグループ化するように訓練データを再順序付けする。
  • 既存の事前学習パイプラインを変更せずに、事前学習データの単純かつスケーラブルな再順序付けにより、言語モデルが個々のドキュメントの境界を越えて文脈的推論を学習できるようにする。
  • データの繰り返しを避けながら、大規模なドキュメント検索と一貫性のあるコンテキスト構築のための効率的な近似的なアルゴリズムを開発する。
  • 意味的に一貫した複数ドキュメントのコンテキストで学習させることで、複雑な推論を要する下流タスクのパフォーマンスが向上するかどうかを評価する。
  • この手法が、既存の事前学習パイプラインを変更せずに、言語モデリングおよび推論能力を向上させられることを示す。

提案手法

  • 埋め込み空間における近似的な最近傍探索を用いて、意味的に類似したドキュメントをグループ化することで、事前学習データを再順序付けする。
  • ドキュメントのソーティングを巡回セールスマン問題として扱い、類似度を最大化し、繰り返しを避けるためにグラフ走査アルゴリズムを用いて一貫性のある入力コンテキストを構築する。
  • 事前学習パイプラインに既存のものを利用し、データ前処理段階でのドキュメント順序の変更のみを実施することで、他のすべてのトレーニング要因を保持する。
  • 埋め込み類似度に基づいて、最近接するドキュメントを特定するための意味的検索モデルを用い、スケーラブルに関連ドキュメントのシーケンスを構築する。
  • 再順序付けされた一貫性のある入力に対して、同じ事前学習目的(マスク言語モデリング)を適用し、モデルがドキュメントを越えて推論できるように訓練する。
  • 最適化されたインデックス化と近似的な検索を用いて、数十億のドキュメントにスケーリングし、効率性と一貫性を維持する。
Figure 1: Overview of In-Context Pretraining . Different from the standard pretraining strategy that place randomly shuffled documents in the input context, In-Context Pretraining places related documents in the same context, making models learn to reason across prior documents. For example, when pr
Figure 1: Overview of In-Context Pretraining . Different from the standard pretraining strategy that place randomly shuffled documents in the input context, In-Context Pretraining places related documents in the same context, making models learn to reason across prior documents. For example, when pr

実験結果

リサーチクエスチョン

  • RQ1意味的に関連するドキュメントのシーケンスで学習させることで、言語モデルのドキュメント境界を越えた推論能力が向上するか?
  • RQ2数十億のドキュメントにスケーリングする際、文脈的類似度を最大化し、データの繰り返しを避けるために、効率的なドキュメント再順序付けが可能か?
  • RQ3In-Context Pretrainingは、複雑な文脈的理解を要する下流タスクにおいて、測定可能な改善をもたらすか?
  • RQ4In-Context Pretrainingは、イン・コンテキスト・ラーニングや読解といったタスクにおいて、標準的な事前学習と比較して性能が向上するか?
  • RQ5この手法は、アーキテクチャの変更なしに、既存の事前学習パイプラインに統合可能か?

主な発見

  • In-Context Pretrainingは、8つのベンチマークデータセットで平均して8%の向上を示し、イン・コンテキスト・ラーニングのパフォーマンスが向上した。
  • 8つの下流の読解タスクにおいて、平均して15%の読解精度の向上が確認された。
  • モデル出力は、前文脈に基づいて16%忠実性が向上し、幻覚や一貫性の欠如が減少した。
  • 長文コンテキスト推論タスクでは5%のパフォーマンス向上が見られ、拡張されたコンテキスト窓の効果的利用が示された。
  • Wikipediaからの外部知識を活用する検索拡張生成タスクでは、9%の向上が得られた。
  • この手法は、事前学習目的やアーキテクチャを変更せずに、訓練データの順序の再編成のみで、これらの向上を達成した。
Figure 2: Illustration of In-Context Pretraining . In-Context Pretraining first finds related documents at scale to create a document graph (§ 2.1 ) and then builds pretraining input contexts by traversing the document graph (§ 2.2 ). Along the path, documents are concatenated into a sequence and su
Figure 2: Illustration of In-Context Pretraining . In-Context Pretraining first finds related documents at scale to create a document graph (§ 2.1 ) and then builds pretraining input contexts by traversing the document graph (§ 2.2 ). Along the path, documents are concatenated into a sequence and su

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

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

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

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