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

一种用于孪生编码器的归因方法

An Attribution Method for Siamese Encoders

Institute for Natural Language Processing, University of Stuttgart(斯图加特大学自然语言处理研究所)

Lucas Möller, Dmitry Nikolaev, Sebastian Padó

AI总结:

本文提出一种面向孪生编码器的局部归因方法,通过推广积分梯度并引入积分雅可比矩阵,将归因表示为特征对或token-token矩阵,实验显示少数名词和动词token对可解释大部分预测,但准确预测需关注更多token与词性。

摘要:

尽管句子变换器(sentence transformers, ST)等孪生编码器模型取得了成功,但人们对它们关注输入的哪些方面知之甚少。一个障碍在于,它们的预测无法归因于单个特征,因为它们比较的是两个输入,而不是处理单个输入。本文通过将积分梯度原理推广到多输入模型,为孪生编码器推导出一种局部归因方法。该解决方案采用特征对归因的形式,并且对于ST可以简化为token-token矩阵。我们的方法引入了积分雅可比矩阵,并继承了积分梯度的优良形式性质:它考虑了模型的完整计算图,并保证收敛到实际预测。一项初步研究表明,在ST中,少数token对通常可以解释很大比例的预测,并且它关注名词和动词。然而,对于准确的预测,它需要关注大多数token和词性。

英文摘要:

Despite the success of Siamese encoder models such as sentence transformers (ST), little is known about the aspects of inputs they pay attention to. A barrier is that their predictions cannot be attributed to individual features, as they compare two inputs rather than processing a single one. This paper derives a local attribution method for Siamese encoders by generalizing the principle of integrated gradients to models with multiple inputs. The solution takes the form of feature-pair attributions, and can be reduced to a token-token matrix for STs. Our method involves the introduction of integrated Jacobians and inherits the advantageous formal properties of integrated gradients: it accounts for the model's full computation graph and is guaranteed to converge to the actual prediction. A pilot study shows that in an ST few token-pairs can often explain large fractions of predictions, and it focuses on nouns and verbs. For accurate predictions, it however needs to attend to the majority of tokens and parts of speech.

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

↑