HackerPapers

arXiv:2202.05262cs.CL

Locating and Editing Factual Associations in GPT

Kevin Meng, David Bau, Alex Andonian, Yonatan Belinkov

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/

arXiv comments
NeurIPS 2022. 35 pages, 30 figures. Code and data at https://rome.baulab.info/
Journal reference
DOI
Subjects
cs.CLComputation and Language cs.LGMachine Learning

On Hacker News

Linked by 8 identifiable commenters in 9 comments across 9 threads, from Feb 2023 to Jul 2026.

Comments linking this paper, per year.

Discussed in comments9 threads

  1. AI 2040: Plan A 1 comment
    • Sure, here are some citations: https://arxiv.org/abs/2401.03910?utm_source=chatgpt.com https://www.frontiersin.org/journals/psychology/articles/10.... https://arxiv.org/pdf/2408.04666 https://arxiv.org/abs/2402.00901 https://ar5iv.labs.arxiv.org/html/2407.11015…

      stalfieView on HNParent context

    • There's definitely scientific insight and analysis. E.g. "In-context Learning and Induction Heads" is an excellent paper. Another paper ("ROME") https://arxiv.org/abs/2202.05262 formulates hypothesis over how these models store information, and provide experimental evidence. The…

      killerstormView on HNParent context

    • The most likely "real solution" is going to be using various tricks and finetuning on higher context lengths to just extend the context window. However I will say knowledge graphs are becoming more popular. I made a comment the other day with a list of some of the popular…

      filterfiberView on HNParent context

    • This post isn't a scientific investigation. It's someone playing around with a black-box model with few to little controls – which is unfortunately the only thing we can do when experimenting with GPT-4, which does excuse this partially. Unfortunately, though, the author seems…

      numeriView on HNParent context

    • The title made me think this was an approach that used memory editing techniques (e.g. ROME [1]) to allow an LLM's neural memory (not just its context) to change over the course of conversation. Pretty happy to realize that this is just a fancy RAG work—will be building my…

      KhoomeiKView on HNParent context

    • Fyi, Meng et al 2022 [1] is pretty much required reading in order to understand this paper [1] https://arxiv.org/abs/2202.05262

      KhoomeiKView on HNParent context

    • Transformer editing is an active field of research. https://arxiv.org/abs/2202.05262 https://arxiv.org/abs/2210.07229

      bhickeyView on HNParent context

    • > does anyone know of ML directions that could add any kind of factual confidence level to ChatGPT and similar? Yes. It's a very active area of research. For example: Discovering Latent Knowledge in Language Models Without Supervision (https://arxiv.org/abs/2212.03827) shows an…

      nlView on HNParent context

  2. We Found an Neuron in GPT-2 1 comment

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.