In-Context Pretraining: Language Modeling Beyond Document Boundaries

要約

現在、大規模言語モデル (LM) は、ドキュメントのプレフィックスが与えられたトークンを予測するようにトレーニングされており、長文の生成や、ドキュメントの完成まで簡略化できるプロンプト形式のタスクを直接実行できるようになります。
既存の事前トレーニング パイプラインは、短いドキュメントのランダムなセットを連結して入力コンテキストを作成することによって LM をトレーニングしますが、前のドキュメントは次のドキュメントを予測するためのシグナルを提供しません。
代わりに、言語モデルが一連の関連ドキュメントで事前トレーニングされる新しいアプローチであるインコンテキスト事前トレーニングを紹介します。これにより、言語モデルがドキュメントの境界を越えて読んで推論することを明示的に奨励します。
各コンテキストに関連ドキュメントが含まれるようにドキュメントの順序を変更し、既存の事前トレーニング パイプラインを直接適用するだけで、インコンテキスト事前トレーニングを実行できます。
ただし、この文書の仕分けの問題は困難です。
数十億のドキュメントがあり、データを繰り返さずにすべてのドキュメントの文脈上の類似性を最大化する並べ替えが必要です。
これを行うために、効率的な最近傍検索で関連ドキュメントを検索し、グラフ トラバーサル アルゴリズムで一貫した入力コンテキストを構築するための近似アルゴリズムを導入します。
私たちの実験では、インコンテキスト事前トレーニングが、LM のパフォーマンスを大幅に向上させるシンプルでスケーラブルなアプローチを提供することを示しています。インコンテキスト学習 (+8%)、読解 (+15%) など、より複雑なコンテキスト推論を必要とするタスクで顕著な改善が見られます。
)、以前のコンテキストへの忠実性 (+16%)、長いコンテキスト推論 (+5%)、および検索の拡張 (+9%)。

要約(オリジナル)

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%).

arxiv情報

著者 Weijia Shi,Sewon Min,Maria Lomeli,Chunting Zhou,Margaret Li,Victoria Lin,Noah A. Smith,Luke Zettlemoyer,Scott Yih,Mike Lewis
発行日 2023-10-16 17:57:12+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.LG パーマリンク