arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.08059cs.CLcs.LG
收藏

论抽取式问答的机制电路

On Mechanistic Circuits for Extractive Question-Answering

Adobe Research(奥多比研究院);University of Maryland, College Park(马里兰大学帕克分校)

Samyadeep Basu, Vlad Morariu, Zichao Wang, Ryan Rossi, Cherry Zhao, Soheil Feizi, Varun Manjunatha

AI总结:

该研究针对抽取式问答任务的上下文增强语言建模,通过因果中介分析提取机制电路,揭示模型参数记忆与检索上下文的交互,提出ATTNATTRIB算法实现高效数据归因并引导模型基于上下文回答,为下游应用提供机制理解与技术支持。

摘要:

大型语言模型越来越多地用于处理文档并辅助其上的问答任务。在本文中,我们针对这一真实世界语言建模任务——即用于抽取式问答(QA)任务的上下文增强语言建模——提取机制电路,以理解电路对下游应用(如上下文信息的数据归因)的潜在益处。我们使用因果中介分析技术,将电路提取为内部模型组件(如注意力头、MLP)的函数。利用提取的电路,我们首先理解模型对参数记忆与检索到的上下文的使用之间的相互作用,以更好地从机制上理解上下文增强语言模型。随后,我们在电路中识别出一小部分默认执行可靠数据归因的注意力头,从而在模型前向传递中免费获得归因结果。基于这一洞见,我们引入ATTNATTRIB算法,这是一种快速数据归因算法,在多种抽取式QA基准上取得了最先进的归因结果。最后,我们展示了通过将ATTNATTRIB的归因结果作为前向传递中的附加信号,引导语言模型基于上下文而非参数记忆回答问题的可能性。除机制理解外,本文还以可靠数据归因和模型引导的形式提供了电路的实际应用。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑