Skip to main content
QUICK REVIEW

[論文レビュー] Retrieval-Pretrained Transformer: Long-range Language Modeling with Self-retrieval

Ohad Rubin, Jonathan Berant|arXiv (Cornell University)|Jun 23, 2023
Topic ModelingComputer Science被引用数 3
ひとこと要約

Retrieval-Pretrained Transformer (RPT) は、自己検索を用いて意味的に関連する過去のチャンクを取得する共同最適化されたリトリーバーを備えた、スクラッチから訓練されたリトリーブ拡張言語モデルである。RPT は、参照言語モデルを用いて次トークン予測の尤度を最大化する意味的目的関数によりリトリーバーを訓練することで、長文タスク4つ(書籍、コード、数学的記述)において最先端のパープレキシティを達成し、強力なベースラインを上回っている。

ABSTRACT

Retrieval-augmented language models (LMs) have received much attention recently. However, typically the retriever is not trained jointly as a native component of the LM, but added post-hoc to an already-pretrained LM, which limits the ability of the LM and the retriever to adapt to one another. In this work, we propose the Retrieval-Pretrained Transformer (RPT), an architecture and training procedure for jointly training a retrieval-augmented LM from scratch and apply it to the task of modeling long texts. Given a recently generated text chunk in a long document, the LM computes query representations, which are then used to retrieve earlier chunks in the document, located potentially tens of thousands of tokens before. Information from retrieved chunks is fused into the LM representations to predict the next target chunk. We train the retriever component with a semantic objective, where the goal is to retrieve chunks that increase the probability of the next chunk, according to a reference LM. We evaluate RPT on four long-range language modeling tasks, spanning books, code, and mathematical writing, and demonstrate that RPT improves retrieval quality and subsequently perplexity across the board compared to strong baselines.

研究の動機と目的

  • 既存のリトリーブ拡張言語モデル(RALMs)がリトリーバーを外部的または固定されたコンponentとして扱うという制限に対処すること。
  • スクラッチからリトリーバーと言語モデルを共同で訓練し、相互適応を可能にすることで、長距離モデリングを向上させること。
  • モデル自身の隠れ状態から得られるクエリ表現を用いて、自己検索(self-retrieval)により意味的に関連する過去のテキストチャンクを検索することで、長距離言語モデリングを改善すること。
  • リトリーバーを、参照スコアリング言語モデルを監視として用いて、検索されたコンテキストに基づく次ターゲットチャンクの尤度を最大化する意味的目的関数で訓練すること。
  • エンドツーエンドの訓練により意味的リトリーブを実現した場合、語彙的または固定リトリーバーのベースラインを上回る性能と、より高品質なリトリーブが達成されることを示すこと。

提案手法

  • RPT は自己検索(self-retrieval)を用いる:リトリーブ用のクエリ表現は、最新に生成されたテキストチャンクのデコーダー隠れ状態から直接得られる。
  • リトリーバーは、密度ベクトル類似度メカニズムを用いて、文書内の意味的に関連する過去のチャンク(数万トークンも前になる可能性がある)を検索する。
  • 検索された表現はチャンク単位のクロスアテンションによりデコーダーに統合され、長距離情報の文脈適合統合が可能になる。
  • リトリーバーは、参照言語モデルをスコア関数として用いて、検索済みコンテキストと現在のコンテキストに基づく次ターゲットチャンクの尤度を最大化する補助損失関数で訓練される。
  • 訓練目的は、標準的な言語モデリング損失と、リトリーブが下流の生成性能と整合するようにするリトリーブ固有の損失を組み合わせる。
  • 全アーキテクチャは外部データでの事前学習なしにスクラッチから訓練され、リトリーバーインデックスは順伝播によって計算され、テスト時のインデックス更新を回避する。
Figure 1: Retrieval-Pretrained Transformer (RPT) is a language model for long texts (e.g., books) trained from scratch with a native retrieval ability. RPT takes a chunk of text as input, retrieves semantically-relevant chunks from the past to better predict the next chunk, and fuses these retrieved
Figure 1: Retrieval-Pretrained Transformer (RPT) is a language model for long texts (e.g., books) trained from scratch with a native retrieval ability. RPT takes a chunk of text as input, retrieves semantically-relevant chunks from the past to better predict the next chunk, and fuses these retrieved

実験結果

リサーチクエスチョン

  • RQ1リトリーブ拡張言語モデルが、事前学習後に追加されるのではなく、スクラッチから言語モデルと共同でリトリーバーを訓練した場合、長距離性能が向上するか?
  • RQ2モデル自身の表現を用いて過去のコンテンツをクエリする自己検索(self-retrieval)は、リトリーブ品質と生成性能を向上させるか?
  • RQ3次トークンの尤度を最大化する意味的リトリーブ目的関数(参照言語モデルを監視として用いる)は、語彙的または固定リトリーバーのベースラインを上回るか?
  • RQ4CCA や TRIME や RETRO といった強力なベースラインと比較して、RPT は多様な長文タスクにおいてパープレキシティとリトリーブ品質の両面で優れているか?
  • RQ5語彙的リトリーブ手法(例:BM25)に比べ、事前学習なしに意味的目的関数で訓練されたリトリーバーは、性能を上回れるか?

主な発見

  • RPT は、書籍、コード、数学的記述、対話の4つの長距離言語モデリングタスクにおいて、CCA や TRIME といった強力なベースラインを上回る最先端のパープレキシティを達成した。
  • BM25 などの語彙的ベースラインと比較して、RPT のリトリーバーはより高品質で意味的に関連するチャンクを検索しており、次トークン予測の尤度が向上していることから裏付けられている。
  • スクラッチからの共同訓練により、リトリーバーと言語モデルが互いに適応し合い、固定または別個に事前学習されたリトリーバーを備えたモデルよりも優れた性能が得られた。
  • 参照言語モデルを用いて次トークン尤度を最適化する意味的リトリーブ目的関数は、語彙的またはヒューリスティックな監視よりも、より効果的なリトリーブをもたらした。
  • エンドツーエンドの訓練により自己検索と意味的監視を統合した RPT は、事前学習済みリトリーバーに依存するモデルやテスト時のみのリトリーブに依存するモデルを上回ることを示した。
  • 多様なドメインにわたり、パープレキシティとリトリーブ品質の両方で一貫した改善が見られ、長文生成タスクへの広範な適用可能性を示唆している。
Figure 2: The architecture of the Retrieval-Pretrained Transformer , where an input of 45 tokens is shown, consisting of 9 chunks, and causal self-attention is applied over 15 tokens. The left side shows the decoder stack, where the bottom $\frac{n_{\text{layers}}}{2}$ are standard Transformer decod
Figure 2: The architecture of the Retrieval-Pretrained Transformer , where an input of 45 tokens is shown, consisting of 9 chunks, and causal self-attention is applied over 15 tokens. The left side shows the decoder stack, where the bottom $\frac{n_{\text{layers}}}{2}$ are standard Transformer decod

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。