Dissecting Recall of Factual Associations in Auto-Regressive Language Models

By Mor Geva, Jasmijn Bastings, Katja Filippova, Amir Globerson. Conference on Empirical Methods in Natural Language Processing, 2023

547 citations recorded by the source corpus.

Transformer-based language models (LMs) are known to capture factual knowledge in their parameters. While previous work looked into where factual associations are stored, only little is known about how they are retrieved internally during inference. We investigate this question through the lens of information flow. Given a subject-relation query, we study how the model aggregates information about the subject and relation to predict the correct attribute. With interventions on attention edges, we first identify two critical points where information propagates to the prediction: one from the relation positions followed by another from the subject positions. Next, by analyzing the information at these points, we unveil a three-step internal mechanism for attribute extraction. First, the representation at the last-subject position goes through an enrichment process, driven by the early MLP sublayers, to encode many subject-related attributes. Second, information from the relation propagates to the prediction. Third, the prediction representation"queries"the enriched subject to extract the attribute. Perhaps surprisingly, this extraction is typically done via attention heads, which often encode subject-attribute mappings in their parameters. Overall, our findings introduce a comprehensive view of how factual associations are stored and extracted internally in LMs, facilitating future research on knowledge localization and editing.

Subfields: Artificial Intelligence, General Social Sciences

View Paper: https://www.semanticscholar.org/paper/133b97e40017a9bbbadd10bcd7f13088a97ca3cc

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Meg Tong
  2. Wes Gurnee
  3. Tomasz Korbak
  4. Max Kaufmann
  5. Mikita Balesni
  6. Lukas Berglund
  7. Max Tegmark
  8. Efstratios Gavves

In General Social Sciences

  1. Tomasz Korbak
  2. Max Kaufmann
  3. Mikita Balesni
  4. Meg Tong
  5. Lukas Berglund
  6. Max Tegmark
  7. Owain Evans
  8. Asa Cooper Stickland

Citations in the corpus