arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2106.01269cs.CL
收藏

一种更易识别但性能相同的文本分类Transformers

More Identifiable yet Equally Performant Transformers for Text Classification

Singapore University of Technology and Design(新加坡科技设计大学);Carnegie Mellon University(卡内基梅隆大学)

Rishabh Bhardwaj, Navonil Majumder, Soujanya Poria, Eduard Hovy

摘要:

可解释性是模型预测可信度的一个重要方面。Transformer的预测被广泛地解释为注意力权重,即,在其自我注意单元(头部)处生成的概率分布。目前的实证研究提供了一些证据,证明注意力权重不是唯一的。最近的一项研究通过证明注意力权重的不可识别性,从理论上证明了这一观察结果。对于给定的头部输入及其输出,如果其中产生的注意力权重是唯一的,我们称之为可识别的权重。在这项工作中,我们提供了更深入的理论分析和经验观察的可识别性的注意权重。在以前的作品中被忽略,我们发现注意力权重比我们目前认为的更可识别,通过揭示关键向量的隐藏作用。然而,权重仍然倾向于是非唯一的注意,使他们不适合解释。为了解决这个问题,我们提供了一个编码器层的变体,它将键和值向量之间的关系叠加起来,并提供可识别的权重,直到输入的期望长度。我们证明了这种变化的适用性,提供不同的文本分类任务的经验证明。这些实现可在https://github.com/declare-lab/identifiable-transformers上获得。

英文摘要:

Interpretability is an important aspect of the trustworthiness of a model's predictions. Transformer's predictions are widely explained by the attention weights, i.e., a probability distribution generated at its self-attention unit (head). Current empirical studies provide shreds of evidence that attention weights are not explanations by proving that they are not unique. A recent study showed theoretical justifications to this observation by proving the non-identifiability of attention weights. For a given input to a head and its output, if the attention weights generated in it are unique, we call the weights identifiable. In this work, we provide deeper theoretical analysis and empirical observations on the identifiability of attention weights. Ignored in the previous works, we find the attention weights are more identifiable than we currently perceive by uncovering the hidden role of the key vector. However, the weights are still prone to be non-unique attentions that make them unfit for interpretation. To tackle this issue, we provide a variant of the encoder layer that decouples the relationship between key and value vector and provides identifiable weights up to the desired length of the input. We prove the applicability of such variations by providing empirical justifications on varied text classification tasks. The implementations are available at https://github.com/declare-lab/identifiable-transformers.

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

↑