Built independently by an author, for readers. Read the story and support ChapterPal

keyword

gradient-based feature attribution

Gradient-based feature attribution is an interpretability technique in machine learning that quantifies the importance of individual input features or internal representations to a model prediction by calculating the mathematical gradients of the output with respect to those features. By leveraging backpropagation to measure how sensitive the final prediction is to small changes in each input component, such as a word token or an image pixel, this approach assigns attribution scores that indicate which elements most strongly drove the decision. Because standard gradients can suffer from noise or saturation, advanced variants such as integrated gradients, smooth gradients, and input-times-gradient formulations aggregate gradient information across multiple points or baselines. These methods are widely applied to differentiable architectures, including deep neural networks and transformer language models, to evaluate feature relevance, debug decision processes, and trace how internal information flows from input components to final outputs.

1 item

Dissecting Recall of Factual Associations in Auto-Regressive Language Models

Dissecting Recall of Factual Associations in Auto-Regressive Language Models

Mor Geva, Jasmijn Bastings, Katja Filippova, Amir Globerson

OrganizationsGoogleTel Aviv University

Why you should read this

Reveals the step-by-step internal mechanism auto-regressive language models use to recall facts, demonstrating that early feed-forward layers enrich subject representations while upper attention heads directly extract the correct attributes.

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.¹

Added

2026-09-28