Lookback Lens: Detecting and Mitigating Contextual Hallucinations in Large Language Models Using Only Attention Maps

要約

大規模言語モデル (LLM) は、記事を要約するか、一節を与えられた質問に答えるように求められると、詳細を幻覚し、入力されたコンテキストに関して不正確な根拠のない回答を返す可能性があります。
この論文では、そのような状況幻覚を検出するための簡単なアプローチについて説明します。
私たちは、文脈上の幻覚は、LLM が自身の世代と比較して、提供された文脈の情報にどの程度注意を払うかに関連していると仮説を立てます。
この直感に基づいて、入力特徴がコンテキストの注意の重みと新しく生成されたトークン (注意ヘッドごとに) の比率によって与えられる単純な幻覚検出モデルを提案します。
これらのルックバック率の特徴に基づく線形分類器は、LLM またはテキストベースの含意モデルの隠れ状態全体を利用するより豊富な検出器と同じくらい効果的であることがわかりました。
ルックバック比ベースの検出器であるルックバック レンズは、タスク間だけでなくモデル間でも転送できることがわかっており、7B モデルでトレーニングされた検出器を、より大きな 13B モデルに (再トレーニングせずに) 適用できるようになります。
さらに、この検出器を状況依存幻覚を軽減するために適用し、シンプルな分類子ガイドによるデコード手法により、たとえば XSum 要約タスクで幻覚の量を 9.6% 削減できることがわかりました。

要約(オリジナル)

When asked to summarize articles or answer questions given a passage, large language models (LLMs) can hallucinate details and respond with unsubstantiated answers that are inaccurate with respect to the input context. This paper describes a simple approach for detecting such contextual hallucinations. We hypothesize that contextual hallucinations are related to the extent to which an LLM attends to information in the provided context versus its own generations. Based on this intuition, we propose a simple hallucination detection model whose input features are given by the ratio of attention weights on the context versus newly generated tokens (for each attention head). We find that a linear classifier based on these lookback ratio features is as effective as a richer detector that utilizes the entire hidden states of an LLM or a text-based entailment model. The lookback ratio-based detector — Lookback Lens — is found to transfer across tasks and even models, allowing a detector that is trained on a 7B model to be applied (without retraining) to a larger 13B model. We further apply this detector to mitigate contextual hallucinations, and find that a simple classifier-guided decoding approach is able to reduce the amount of hallucination, for example by 9.6% in the XSum summarization task.

arxiv情報

著者 Yung-Sung Chuang,Linlu Qiu,Cheng-Yu Hsieh,Ranjay Krishna,Yoon Kim,James Glass
発行日 2024-07-09 17:44:34+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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