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

ReAGent:一种用于生成式语言模型的模型无关特征归因方法

ReAGent: A Model-agnostic Feature Attribution Method for Generative Language Models

University of Sheffield(谢菲尔德大学)

Zhixue Zhao, Boxuan Shan

AI总结:

针对现有特征归因方法在生成式语言模型上不忠实且计算昂贵的问题,提出模型无关的递归归因生成器(ReAGent),通过递归更新令牌重要性分布,在六个解码器模型上优于七种基线方法。

摘要:

特征归因方法(FAs),如梯度和注意力,是广泛采用的方法,用于推导所有输入特征对模型预测的重要性。自然语言处理领域的现有工作主要集中在开发并测试用于编码器专用语言模型(LMs)在分类任务中的特征归因方法。然而,由于模型架构和任务设置之间固有的差异,目前尚不清楚将这些特征归因方法用于解码器专用模型进行文本生成时是否忠实可靠。此外,先前的工作已经证明,在模型和任务之间不存在“万能”的特征归因方法。这使得对于大型语言模型而言,特征归因方法的选择在计算上代价高昂,因为输入重要性的推导通常需要多次前向和反向传播,包括梯度计算,即使拥有大量计算资源,这些计算也可能难以承受。为了解决这些问题,我们提出了一种用于生成式语言模型的模型无关特征归因方法,称为递归归因生成器(ReAGent)。我们的方法以递归方式更新令牌重要性分布。在每次更新中,我们计算使用原始输入与使用修改版本(其中输入的一部分被替换为RoBERTa预测)时,预测下一个令牌的词汇表上概率分布之间的差异。我们的直觉是,替换上下文中的一个重要令牌应该比替换一个不重要的令牌导致模型在预测该令牌时的置信度发生更大的变化。我们的方法可以普遍应用于任何生成式语言模型,而无需访问内部模型权重或进行额外的训练和微调,而大多数其他特征归因方法则需要这些。我们广泛比较了ReAGent与七种流行的特征归因方法在六个不同规模的解码器专用语言模型上的忠实性。结果表明,我们的方法始终提供更忠实的令牌重要性分布。

英文摘要:

Feature attribution methods (FAs), such as gradients and attention, are widely employed approaches to derive the importance of all input features to the model predictions. Existing work in natural language processing has mostly focused on developing and testing FAs for encoder-only language models (LMs) in classification tasks. However, it is unknown if it is faithful to use these FAs for decoder-only models on text generation, due to the inherent differences between model architectures and task settings respectively. Moreover, previous work has demonstrated that there is no `one-wins-all' FA across models and tasks. This makes the selection of a FA computationally expensive for large LMs since input importance derivation often requires multiple forward and backward passes including gradient computations that might be prohibitive even with access to large compute. To address these issues, we present a model-agnostic FA for generative LMs called Recursive Attribution Generator (ReAGent). Our method updates the token importance distribution in a recursive manner. For each update, we compute the difference in the probability distribution over the vocabulary for predicting the next token between using the original input and using a modified version where a part of the input is replaced with RoBERTa predictions. Our intuition is that replacing an important token in the context should have resulted in a larger change in the model's confidence in predicting the token than replacing an unimportant token. Our method can be universally applied to any generative LM without accessing internal model weights or additional training and fine-tuning, as most other FAs require. We extensively compare the faithfulness of ReAGent with seven popular FAs across six decoder-only LMs of various sizes. The results show that our method consistently provides more faithful token importance distributions.

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

↑