arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.09972cs.CL
收藏

通过凸显重要信息更好地解释Transformer

Better Explain Transformers by Illuminating Important Information

Waseda University(早稻田大学);University of Tokyo(东京大学);Kyoto University(京都大学);INRIA(法国国家信息与自动化研究所);Smartor.me, Inc(Smartor.me公司)

Linxin Song, Yan Cui, Ao Luo, Freddy Lecue, Irene Li

AI总结:

针对现有Transformer解释方法易受无关信息干扰的问题,本研究基于LRP方法优化信息流,聚焦句法与位置重要注意力头的相关性,掩码无关信息,在分类和问答任务的8个基线上实现3%-33%的解释性能提升。

摘要:

基于Transformer的模型在各类自然语言处理(NLP)任务中表现优异,吸引了大量研究致力于解释其内部运作机制。现有方法通过将原始梯度和注意力作为token归因分数来解释Transformer,这类方法在解释计算过程中往往会纳入无关信息,导致结果难以理解。本研究在层级相关性传播(LRP,Layer-wise Relevance Propagation)方法的基础上,通过优化的信息流机制,提出凸显重要信息、剔除无关信息的方案。具体而言,我们将句法头和位置头识别为重要注意力头,并重点关注从这些重要头得到的相关性。实验结果表明,无关信息确实会扭曲输出归因分数,因此在解释计算过程中应当对其进行掩码处理。在分类和问答数据集上与8个基线方法相比,我们的方法在解释指标上始终表现更优,提升幅度超过3%至33%,具备更出色的解释性能。我们的匿名代码仓库位于:https://github.com/LinxinS97/Mask-LRP

英文摘要:

Transformer-based models excel in various natural language processing (NLP) tasks, attracting countless efforts to explain their inner workings. Prior methods explain Transformers by focusing on the raw gradient and attention as token attribution scores, where non-relevant information is often considered during explanation computation, resulting in confusing results. In this work, we propose highlighting the important information and eliminating irrelevant information by a refined information flow on top of the layer-wise relevance propagation (LRP) method. Specifically, we consider identifying syntactic and positional heads as important attention heads and focus on the relevance obtained from these important heads. Experimental results demonstrate that irrelevant information does distort output attribution scores and then should be masked during explanation computation. Compared to eight baselines on both classification and question-answering datasets, our method consistently outperforms with over 3\% to 33\% improvement on explanation metrics, providing superior explanation performance. Our anonymous code repository is available at: https://github.com/LinxinS97/Mask-LRP

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

↑