Skip to main content
QUICK REVIEW

[論文レビュー] Locating and Editing Factual Associations in GPT

Kevin Meng, David Bau|arXiv (Cornell University)|Feb 10, 2022
Topic Modeling被引用数 175
ひとこと要約

この論文は、GPTの事実関係が中間層のMLPモジュールに格納されていることを示し、中間層の1行を更新するだけで新しい事実を挿入するRank-One Model Editing (ROME) 手法を実演し、良好な一般化と特異性を備えた競争力の編集性能を達成する。

ABSTRACT

We analyze the storage and recall of factual associations in autoregressive transformer language models, finding evidence that these associations correspond to localized, directly-editable computations. We first develop a causal intervention for identifying neuron activations that are decisive in a model's factual predictions. This reveals a distinct set of steps in middle-layer feed-forward modules that mediate factual predictions while processing subject tokens. To test our hypothesis that these computations correspond to factual association recall, we modify feed-forward weights to update specific factual associations using Rank-One Model Editing (ROME). We find that ROME is effective on a standard zero-shot relation extraction (zsRE) model-editing task, comparable to existing methods. To perform a more sensitive evaluation, we also evaluate ROME on a new dataset of counterfactual assertions, on which it simultaneously maintains both specificity and generalization, whereas other methods sacrifice one or another. Our results confirm an important role for mid-layer feed-forward modules in storing factual associations and suggest that direct manipulation of computational mechanisms may be a feasible approach for model editing. The code, dataset, visualizations, and an interactive demo notebook are available at https://rome.baulab.info/

研究の動機と目的

  • GPTライクな自己回帰型トランスフォーマーにおいて、事実関係がどこに格納されているかを特定する。
  • 事実再現に関与する決定的な活性化を特定する因果追跡を開発する。
  • MLPの重みを更新して事実関係を挿入または修正するRank-One Model Editing (ROME) を提案する。
  • ROMEを標準および反実仮想編集ベンチマークで評価し、一般化と特異性を評価する。
  • ROMEを既存のファインチューニングおよびハイパーネットワーク編集アプローチと比較し、頑健性を分析する。

提案手法

  • 隠れ状態が事実予測へ及ぼす間接効果を定量化する因果媒介フレームワークを構築する。
  • 最終主語トークンで再現を仲介する決定的な中間層MLP活性化を特定する。
  • MLPを線形連想記憶としてモデル化し、MLP射影行列への1位更新で新しいキー–値ペアを挿入するRank-One Model Editing (ROME) を定式化する。
  • 最後のトークンで主語のための平均化されたMLP活性化ベースのキーとして k* を計算する。
  • KL制約を介して本質のドリフトを最小化しつつ、望まれるオブジェクトの確率を最大化するベクトルを最適化して v* を計算する。
  • Wproj^(l) に対して rank-one 更新を適用し、Wproj_hat = Wproj + Lambda (C^{-1} k*)^T, ただし C = KK^T。

実験結果

リサーチクエスチョン

  • RQ1GPTの中間層のフィードフォワードモジュールは事実思い出の因果的な locus として特定できるか。
  • RQ2重みをエンドツーエンドで編集するのではなく、内部計算を編集してモデルが保持する事実を直接修正するにはどうすればよいか。
  • RQ3Rank-One Model Editing (ROME) は既存の方法と比較して、事実関係の編集において効果的で、一般化可能で、特異的な変更を提供するか。
  • RQ4編集後の一般化と特異性のバランスを、CounterFact のデータセットで明らかにできるか。
  • RQ5因果追跡の結果は、層とトークンを横断したROMEの成功した編集と一致するか。

主な発見

EditorEfficacyParaphraseSpecificity
GPT-2 XL22.2 ± 0.521.3 ± 0.524.2 ± 0.5
FT99.6 ± 0.182.1 ± 0.623.2 ± 0.5
FT+L92.3 ± 0.447.2 ± 0.723.4 ± 0.5
KE65.5 ± 0.661.4 ± 0.624.9 ± 0.5
KE-zsRE92.4 ± 0.390.0 ± 0.323.8 ± 0.5
MEND75.9 ± 0.565.3 ± 0.624.1 ± 0.5
MEND-zsRE99.4 ± 0.199.3 ± 0.124.1 ± 0.5
ROME99.8 ± 0.088.1 ± 0.524.2 ± 0.5
  • 因果追跡は、遅い層で強い間接効果を、特に最後の主語トークンにおける中間層MLPで示す。
  • 初期部位ではMLPの寄与が優位で、プロンプトの最後のトークンでは注意機構が支配的である。
  • ROME は単一の rank-one 更新で新しい事実的結合を挿入でき、zsRE におけるファインチューニングおよびハイパーネットワークのベースラインと比較して競争力のある効果を示す。
  • ROME は CounterFact で強い一般化と特異性を達成し、FT、FT+L、KE、MEND などのいくつかのベースラインを上回ってこれらの性質のバランスを取る。
  • 編集は最終主語トークンにおける中間層MLPを標的とする場合に最も効果的で、一般化はGPT-2-XLの18層付近でピークとなる。

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

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

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

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