Skip to main content
QUICK REVIEW

[論文レビュー] Pre-computed memory or on-the-fly encoding? A hybrid approach to retrieval augmentation makes the most of your compute

Michiel de Jong, Yury Zemlyanskiy|arXiv (Cornell University)|Jan 25, 2023
Topic ModelingComputer Science被引用数 3
ひとこと要約

本稿では、lumenと呼ばれるハイブリッドな検索拡張生成フレームワークを提案する。このフレームワークは、メモリ内に大部分の文書表現を事前に計算する一方で、微調整された質問に依存するライブエンコーダーを用いてそれらをリアルタイムで更新する。計算量を大幅に削減しながらも、完全なFusion-in-Decoder (FiD) に近い性能を達成し、計算リソースの制約下でも、純粋なメモリベースやFiDアプローチを常に上回る。特にスケールが大きくなると顕著である。

ABSTRACT

Retrieval-augmented language models such as Fusion-in-Decoder are powerful, setting the state of the art on a variety of knowledge-intensive tasks. However, they are also expensive, due to the need to encode a large number of retrieved passages. Some work avoids this cost by pre-encoding a text corpus into a memory and retrieving dense representations directly. However, pre-encoding memory incurs a severe quality penalty as the memory representations are not conditioned on the current input. We propose LUMEN, a hybrid between these two extremes, pre-computing the majority of the retrieval representation and completing the encoding on the fly using a live encoder that is conditioned on the question and fine-tuned for the task. We show that LUMEN significantly outperforms pure memory on multiple question-answering tasks while being much cheaper than FiD, and outperforms both for any given compute budget. Moreover, the advantage of LUMEN over FiD increases with model size.

研究の動機と目的

  • 検索拡張型言語モデル(例:Fusion-in-Decoder, FiD)における、取得した文書をエンコードする際の高い計算コストを軽減すること。
  • 入力クエリに依存せずに文書を独立してエンコードする純粋なメモリベースのアプローチが性能を低下させる問題を克服すること。
  • 大部分の表現を事前に計算しつつ、入力クエスチョンに応じて最終的なエンコーディングを条件づけることで、効率性と性能のバランスを図るハイブリッドシステムを設計すること。
  • このハイブリッドアプローチが、特にモデルスケールが大きくなると、性能と計算量のトレードオフにおいて優れた結果を示すことを実証すること。

提案手法

  • lumenはエンコーダーを2つのコンponentに分割する:事前に学習済みモデルから文書表現を事前に計算する固定されたメモリエンコーダーと、リアルタイムでそれらの表現を更新する微調整済みのライブエンコーダー。
  • 推論時には、まずクエスチョンがエンコードされ、その後、各事前に計算された文書表現と連結されてライブエンコーダーに供給される。
  • ライブエンコーダーは、下流タスクにエンドツーエンドで微調整されており、これにより文書表現が特定の入力クエスチョンに適応できる。
  • 最終的に更新された表現は、標準的なFiDアーキテクチャに従ってデコーダーに供給される。
  • ライブレイヤーの割合は調整可能であり、計算コストと性能の滑らかなトレードオフを可能にする。
  • 関連タスク(例:Natural Questions)からの転移学習により、特に小さなライブエンコーダーまたはリソースが限られたデータセットで性能が向上する。
Figure 2 : Overview of the lumen architecture. Before fine-tuning, each passage in the corpus is encoded by a memory encoder. While processing a sample, a question encoder first generates a representation of the question, which is then separately concatenated with each pre-computed passage represent
Figure 2 : Overview of the lumen architecture. Before fine-tuning, each passage in the corpus is encoded by a memory encoder. While processing a sample, a question encoder first generates a representation of the question, which is then separately concatenated with each pre-computed passage represent

実験結果

リサーチクエスチョン

  • RQ1事前に計算された大部分の文書表現に加え、リアルタイムで更新するハイブリッドアプローチは、純粋なメモリベースや完全なFiDに比べ、より優れた性能-計算量トレードオフを達成できるか?
  • RQ2モデルサイズが大きくなるに従い、ハイブリッドアプローチの性能はFiDやメモリオンリーベースのベースラインと比べてどのように変化するか?
  • RQ3関連タスクからの転移学習は、ハイブリッド構成におけるライブエンコーダー部の性能をどの程度向上させられるか?
  • RQ4どの程度のライブレイヤーの割合があれば、FiDに近い性能を達成しつつ、FLOPsを顕著に削減できるか?

主な発見

  • T5-XXLスケールにおいて、lumenはライブレイヤーを1/3に抑えながらも、完全なFiDと同等の性能を達成した。
  • Natural Questionsの開発セットでは、lumenがライブレイヤーをたった10%に抑えた場合でも、正確一致スコア54.5%を達成し、計算量を大幅に削減しながらもFiDの56.2%に近い性能を示した。
  • モデルスケールが大きくなるに従い、lumenとFiDの性能差は縮小し、特に大きなモデルサイズではlumenの優位性が顕著になった。
  • Natural Questionsからの転移学習により、lumenとFiDの性能差の大部分が埋まり、特に小さなライブエンコーダーやTriviaQAで顕著に効果を示した。
  • 計算リソースが制限されたすべての状況下で、lumenは純粋なメモリモデルおよびFiDを上回り、あらゆる計算レジームにおいて最も効率的な選択肢となった。
  • ハイブリッド設計により、計算コストと性能の滑らかな連続的トレードオフが可能となり、ライブレイヤーの割合が低くても精度の損失は最小限に抑えられた。

この論文を読む

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

Nubintでこの論文を読む

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