On Mechanistic Circuits for Extractive Question-Answering

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Basu, Samyadeep, Morariu, Vlad, Wang, Zichao, Rossi, Ryan, Zhao, Cherry, Feizi, Soheil, Manjunatha, Varun
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912229944721408
author Basu, Samyadeep
Morariu, Vlad
Wang, Zichao
Rossi, Ryan
Zhao, Cherry
Feizi, Soheil
Manjunatha, Varun
author_facet Basu, Samyadeep
Morariu, Vlad
Wang, Zichao
Rossi, Ryan
Zhao, Cherry
Feizi, Soheil
Manjunatha, Varun
contents Large language models are increasingly used to process documents and facilitate question-answering on them. In our paper, we extract mechanistic circuits for this real-world language modeling task: context-augmented language modeling for extractive question-answering (QA) tasks and understand the potential benefits of circuits towards downstream applications such as data attribution to context information. We extract circuits as a function of internal model components (e.g., attention heads, MLPs) using causal mediation analysis techniques. Leveraging the extracted circuits, we first understand the interplay between the model's usage of parametric memory and retrieved context towards a better mechanistic understanding of context-augmented language models. We then identify a small set of attention heads in our circuit which performs reliable data attribution by default, thereby obtaining attribution for free in just the model's forward pass. Using this insight, we then introduce ATTNATTRIB, a fast data attribution algorithm which obtains state-of-the-art attribution results across various extractive QA benchmarks. Finally, we show the possibility to steer the language model towards answering from the context, instead of the parametric memory by using the attribution from ATTNATTRIB as an additional signal during the forward pass. Beyond mechanistic understanding, our paper provides tangible applications of circuits in the form of reliable data attribution and model steering.
format Preprint
id arxiv_https___arxiv_org_abs_2502_08059
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle On Mechanistic Circuits for Extractive Question-Answering
Basu, Samyadeep
Morariu, Vlad
Wang, Zichao
Rossi, Ryan
Zhao, Cherry
Feizi, Soheil
Manjunatha, Varun
Computation and Language
Machine Learning
Large language models are increasingly used to process documents and facilitate question-answering on them. In our paper, we extract mechanistic circuits for this real-world language modeling task: context-augmented language modeling for extractive question-answering (QA) tasks and understand the potential benefits of circuits towards downstream applications such as data attribution to context information. We extract circuits as a function of internal model components (e.g., attention heads, MLPs) using causal mediation analysis techniques. Leveraging the extracted circuits, we first understand the interplay between the model's usage of parametric memory and retrieved context towards a better mechanistic understanding of context-augmented language models. We then identify a small set of attention heads in our circuit which performs reliable data attribution by default, thereby obtaining attribution for free in just the model's forward pass. Using this insight, we then introduce ATTNATTRIB, a fast data attribution algorithm which obtains state-of-the-art attribution results across various extractive QA benchmarks. Finally, we show the possibility to steer the language model towards answering from the context, instead of the parametric memory by using the attribution from ATTNATTRIB as an additional signal during the forward pass. Beyond mechanistic understanding, our paper provides tangible applications of circuits in the form of reliable data attribution and model steering.
title On Mechanistic Circuits for Extractive Question-Answering
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2502.08059