Memory Injections: Correcting Multi-Hop Reasoning Failures during Inference in Transformer-Based Language Models

要約

マルチホップ推論の質問に答えるには、さまざまなソースから情報を取得して合成する必要があります。
大規模言語モデル (LLM) は、このような推論を一貫して実行するのに苦労します。
ここでは、LLM アテンション ヘッドへのターゲットを絞ったメモリ注入を通じて、マルチホップ推論の失敗を特定して修正するアプローチを提案します。
まず、シングルホップおよびマルチホップのプロンプトに応じた GPT-2 モデルのレイヤーごとのアクティベーションを分析します。
次に、ユーザーが推論中に重要な LLM の場所に、「メモリ」と呼ぶ関連するプロンプト固有の情報を注入できるメカニズムを提案します。
このように、LLM が推論中に追加の関連情報を組み込めるようにすることで、マルチホップ プロンプト完了の品質が向上します。
私たちは、キー アテンション層へのシンプルで効率的かつ的を絞ったメモリ注入により、マルチホップ タスクで目的の次のトークンが得られる確率が最大 424% 増加することがよくあることを経験的に示しています。

要約(オリジナル)

Answering multi-hop reasoning questions requires retrieving and synthesizing information from diverse sources. Large Language Models (LLMs) struggle to perform such reasoning consistently. Here we propose an approach to pinpoint and rectify multi-hop reasoning failures through targeted memory injections on LLM attention heads. First, we analyze the per-layer activations of GPT-2 models in response to single and multi-hop prompts. We then propose a mechanism that allows users to inject pertinent prompt-specific information, which we refer to as ‘memories,’ at critical LLM locations during inference. By thus enabling the LLM to incorporate additional relevant information during inference, we enhance the quality of multi-hop prompt completions. We show empirically that a simple, efficient, and targeted memory injection into a key attention layer can often increase the probability of the desired next token in multi-hop tasks, by up to 424%.

arxiv情報

著者 Mansi Sakarvadia,Aswathy Ajith,Arham Khan,Daniel Grzenda,Nathaniel Hudson,André Bauer,Kyle Chard,Ian Foster
発行日 2023-09-11 16:39:30+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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