用图注意力机制让文本分类模型决策可解释,不降精度。
GAProtoNet: A Multi-head Graph Attention-based Prototypical Network for Interpretable Text Classification
- 将输入与原型视为图节点,用多头注意力建模选择性连接。
- 在多个数据集上保持原模型精度,且准确率和F1最优。
- 通过注意力权重和原型可视化,清晰解释分类决策过程。
基于预训练变换器的语言模型(LM)在文本分类任务中凭借强大的词嵌入能力取得了显著性能提升,但其黑箱特性导致可解释性不足,成为主要痛点。本文提出GAProtoNet,一种基于多头图注意力的可解释原型网络,用于解析使用LM编码器构建的文本分类模型的决策过程。该方法将输入向量与原型视为图中的节点,利用多头图注意力机制选择性地构建输入节点与原型节点之间的连接,以学习可解释的原型表示。推理时,模型根据各激活原型的注意力权重进行线性组合,从而实现决策的透明化解释,其依据为注意力分数及原型投影到最相近训练样本的映射。在多个公开数据集上的实验表明,该方法在不牺牲原始黑箱模型精度的前提下,取得更优结果;与四种替代原型网络变体相比,其准确率和F1均表现最佳。案例研究与原型聚类可视化进一步验证了其在解释黑箱模型决策方面的有效性。
原文摘要 · Abstract (English)
Pretrained transformer-based Language Models (LMs) are well-known for their ability to achieve significant improvement on text classification tasks with their powerful word embeddings, but their black-box nature, which leads to a lack of interpretability, has been a major concern. In this work, we introduce GAProtoNet, a novel white-box Multi-head Graph Attention-based Prototypical Network designed to explain the decisions of text classification models built with LM encoders. In our approach, the input vector and prototypes are regarded as nodes within a graph, and we utilize multi-head graph attention to selectively construct edges between the input node and prototype nodes to learn an interpretable prototypical representation. During inference, the model makes decisions based on a linear combination of activated prototypes weighted by the attention score assigned for each prototype, allowing its choices to be transparently explained by the attention weights and the prototypes projected into the closest matching training examples. Experiments on multiple public datasets show our approach achieves superior results without sacrificing the accuracy of the original black-box LMs. We also compare with four alternative prototypical network variations and our approach achieves the best accuracy and F1 among all. Our case study and visualization of prototype clusters also demonstrate the efficiency in explaining the decisions of black-box models built with LMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。