Skip to main content
QUICK REVIEW

[論文レビュー] REPLUG: Retrieval-Augmented Black-Box Language Models

Weijia Shi, Sewon Min|arXiv (Cornell University)|Jan 30, 2023
Topic Modeling被引用数 68
ひとこと要約

RePlugは言語モデルをブラックボックスとして扱い、取得した文書を先頭に付ける可調整可能なリトリーバを追加し(アンサンブル付き)、LM監督を用いて取得品質を改善できるようにする。大規模LMの言語モデリングと下流タスクの性能を向上させる。

ABSTRACT

We introduce REPLUG, a retrieval-augmented language modeling framework that treats the language model (LM) as a black box and augments it with a tuneable retrieval model. Unlike prior retrieval-augmented LMs that train language models with special cross attention mechanisms to encode the retrieved text, REPLUG simply prepends retrieved documents to the input for the frozen black-box LM. This simple design can be easily applied to any existing retrieval and language models. Furthermore, we show that the LM can be used to supervise the retrieval model, which can then find documents that help the LM make better predictions. Our experiments demonstrate that REPLUG with the tuned retriever significantly improves the performance of GPT-3 (175B) on language modeling by 6.3%, as well as the performance of Codex on five-shot MMLU by 5.1%.

研究の動機と目的

  • ファインチューニングや内部表現へのアクセスが不可能な非常に大規模なブラックボックスLMに対して、取得拡張を動機づける。
  • LMを変更せずに、取得した文書を先頭に付け、アンサンブルを用いて予測を改善するプラグアンドプレイの取得モジュールを提案する。
  • LMが提供する監督信号を用いてリトリーバを適応させ、困惑度を低減するためのRePlug LSRを導入する。
  • 言語モデリング、MMLU、open-domain QAを含む多様なブラックボックスLMとタスクにおいて改善を実証する。

提案手法

  • 与えられた入力 x に対して、コサイン類似度を用いた密なリトリーバーであるデュアルエンコーダーを用いて、コーパスから上位k件の文書を取得する。
  • 取得した各文書を x の先頭に付け、(d, x) の各ペアを別々に凍結されたブラックボックスLMに通し、出力確率をアンサンブルする。
  • LMのパラメータ更新を増やすことなく、複数の取得文書からの予測を組み合わせるアンサンブル方式を提案する。
  • LM perplexityを監督信号として用い、取得尤度とLMガイド付き尤度の間のKL発散を最小化することでリトリーバを訓練するRePlug LSRを導入し、LMを凍結したままにする。
  • 非同期的なデータストア更新により文書埋め込みを再利用し、TステップごとにFAISSインデックスを再構築して、取得とリトリーバの更新を整合させる。
  • GPT-3、Codex、OPT、BLOOMを含む様々なLMおよびリトリーバルモデルへの適用性を示す。
Figure 1: Different from previous retrieval-augmented approaches (Borgeaud et al., 2022 ) that enhance a language model with retrieval by updating the LM’s parameters, RePlug treats the language model as a black box and augments it with a frozen or tunable retriever. This black-box assumption makes
Figure 1: Different from previous retrieval-augmented approaches (Borgeaud et al., 2022 ) that enhance a language model with retrieval by updating the LM’s parameters, RePlug treats the language model as a black box and augments it with a frozen or tunable retriever. This black-box assumption makes

実験結果

リサーチクエスチョン

  • RQ1微調整や内部アクセスなしで、取得拡張手法は真のブラックボックスLMを改善できるか?
  • RQ2取得した文書をアンサンブルで先頭付けして付ける方法は、すべての取得文書を連結するよりも次トークン予測を効率的に改善するか?
  • RQ3取得モデルはLM監督(LSR)を通じてLMに効果的に適応させ、取得品質をさらに向上させることができるか?
  • RQ4非常に大規模なLMに対して、取得拡張手法は言語モデリングとMMLUやopen-domain QAの双方に有益か?
  • RQ5RePlug は多様なモデルファミリとサイズでどのように機能するか?

主な発見

  • RePlugは、言語モデリングと下流タスクの範囲にわたって、一貫してブラックボックスLMの性能を向上させる。
  • GPT-3 175Bの言語モデリングはRePlugで最大6.3%の向上を獲得; Codexの5ショットMMLUでは4.5%(RePlug)および5.1%(RePlug LSR)の向上。
  • RePlug LSRはRePlug単独より大きな向上をもたらす(例:GPT-3 175Bで最大6.3%、表1のモデル全体での平均改善は7.7% vs 4.7%)。
  • MMLUでは Codex + RePlug が人文学・社会・STEMなどのカテゴリを改善し、Codexに対して4.5%(RePlug)および5.1%(RePlug LSR)の向上を達成。
  • open-domain QAでは、Codex + RePlug LSR が few-shot 設定で Natural Questions の12.0%向上を達成し、Atlasなどを上回る。
  • RePlugはGPT-2、OPT、BLOOMなどのさまざまなモデルファミリとサイズで改善を示し、困惑度の低下(例:OPT-125Mで6.9%向上)を示し、適用範囲が広いことを示している。
Figure 2: RePlug at inference (§ 3 ). Given an input context, RePlug first retrieves a small set of relevant documents from an external corpus using a retriever (§ 3.1 Document Retrieval ). Then it prepends each document separately to the input context and ensembles output probabilities from differe
Figure 2: RePlug at inference (§ 3 ). Given an input context, RePlug first retrieves a small set of relevant documents from an external corpus using a retriever (§ 3.1 Document Retrieval ). Then it prepends each document separately to the input context and ensembles output probabilities from differe

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

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

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

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