Interpreting Key Mechanisms of Factual Recall in Transformer-Based Language Models

要約

この論文では、事実想起タスクにおいて Transformer ベースの言語モデルで採用されているメカニズムを深く調査します。
ゼロショット シナリオでは、「フランスの首都は」のようなプロンプトが与えられると、タスク固有のアテンション ヘッドがコンテキストから「フランス」などのトピック エンティティを抽出し、それを後続の MLP に渡して、次のような必要な回答を呼び出します。
‘パリ。’
MLP の出力を人間が理解できるコンポーネントに分解することを目的とした新しい分析手法を紹介します。
この方法を通じて、これらのタスク固有のヘッドに続く MLP 層の機能を定量化します。
残留ストリームでは、個々のヘッドからの情報が消去または増幅されます。
さらに、残留ストリームを期待される応答の方向にリダイレクトするコンポーネントを生成します。
これらのゼロショット メカニズムは、数ショットのシナリオでも使用されます。
さらに、モデルの最終層に広く存在する、正しい予測を抑制する過信防止メカニズムが存在することも観察しました。
私たちは解釈を活用して事実の再現パフォーマンスを向上させることで、この抑制を軽減します。
私たちの解釈は、GPT-2 ファミリから 1.3B OPT までのさまざまな言語モデルにわたって、また事実知識のさまざまな領域をカバーするタスクにわたって評価されています。

要約(オリジナル)

In this paper, we deeply explore the mechanisms employed by Transformer-based language models in factual recall tasks. In zero-shot scenarios, given a prompt like ‘The capital of France is,’ task-specific attention heads extract the topic entity, such as ‘France,’ from the context and pass it to subsequent MLPs to recall the required answer such as ‘Paris.’ We introduce a novel analysis method aimed at decomposing the outputs of the MLP into components understandable by humans. Through this method, we quantify the function of the MLP layer following these task-specific heads. In the residual stream, it either erases or amplifies the information originating from individual heads. Moreover, it generates a component that redirects the residual stream towards the direction of its expected answer. These zero-shot mechanisms are also employed in few-shot scenarios. Additionally, we observed a widely existent anti-overconfidence mechanism in the final layer of models, which suppresses correct predictions. We mitigate this suppression by leveraging our interpretation to improve factual recall performance. Our interpretations have been evaluated across various language models, from the GPT-2 families to 1.3B OPT, and across tasks covering different domains of factual knowledge.

arxiv情報

著者 Ang Lv,Kaiyi Zhang,Yuhan Chen,Yulong Wang,Lifeng Liu,Ji-Rong Wen,Jian Xie,Rui Yan
発行日 2024-04-09 17:06:56+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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