Locating and Editing Factual Associations in GPT

Kevin Meng, David Bau, Alex Andonian, Yonatan Belinkov · NeurIPS 2022 · arXiv v5, Jan 2023
arXiv:2202.05262 Interactive page

The model as a grid Structure

Columns = token positions, rows = layers. Pick a run to see what is broken and restored.

Effects in the tracing runs Reported, GPT-2 XL avg over 1,000 statements

Causal-trace heatmap Illustrative

Schematic of the two hot regions, not measured data. Toggle the module type; slide to inspect a layer.

Module split at the early site Reported (points of probability)

Severing test Illustrative diagram of reported outcome

ROME: rank-one edit of the second MLP matrix Illustrative matrices

Step through the method. Grid values are made up to show structure only.

Three CounterFact criteria 21,919 counterfactuals

Editor comparison on GPT-2 XL Reported

Human evaluation 15 raters, 50 facts, no significance test

Stored here, or just a good place to write?

Claims ledger

Direction matters Conceptual

References

  1. Locating and Editing Factual Associations in GPT — Meng, Bau, Andonian, Belinkov, 2022
  2. Direct and Indirect Effects — Pearl, 2001
  3. Gender Bias via Causal Mediation Analysis — Vig et al., 2020
  4. Feed-Forward Layers Are Key-Value Memories — Geva et al., 2021
  5. Does Localization Inform Editing? — Hase et al., 2023
  6. MEMIT — Meng et al., 2023
  7. MEND — Mitchell et al., 2021
  8. Ripple Effects of Knowledge Editing — Cohen et al., 2023
  9. Editing Factual Knowledge (KE) — De Cao et al., 2021
  10. Knowledge Neurons — Dai et al., 2022
  11. Rewriting a Deep Generative Model — Bau et al., 2020
  12. Do Language Models Have Beliefs? — Hase et al., 2021
  13. Circuit for Indirect Object Identification — Wang et al., 2022
  14. Language Models as Knowledge Bases? — Petroni et al., 2019