Explainable AI (XAI) has become critical as transformer-based models are deployed in high-stakes applications including healthcare, legal systems, and financial services, where opacity hinders trust and accountability. Transformers self-attention mechanisms have proven valuable for model interpretability, with attention weights successfully used to understand model focus and behavior (Xu et al., 2015); (Wiegreffe and Pinter, 2019). However, existing attention-based explanation methods rely on manually defined aggregation strategies and fixed attribution rules (Abnar and Zuidema, 2020a); (Chefer et al., 2021), while model-agnostic approaches (LIME, SHAP) treat the model as a black box and incur significant computational costs through input perturbation. We introduce Explanation Network (ExpNet), a lightweight neural network that learns an explicit mapping from transformer attention patterns to token-level importance scores. Unlike prior methods, ExpNet discovers optimal attention feature combinations automatically rather than relying on predetermined rules. We evaluate ExpNet in a challenging cross-task setting and benchmark it against a broad spectrum of model-agnostic methods and attention-based techniques spanning four methodological families.
翻译:随着基于Transformer的模型被部署于医疗、司法系统和金融服务等高风险应用领域,可解释人工智能(XAI)已变得至关重要——模型的不透明性会阻碍信任建立与责任追溯。Transformer的自注意力机制已被证明对模型可解释性具有重要价值,注意力权重已成功用于理解模型的关注焦点与行为特征(Xu等人,2015;Wiegreffe与Pinter,2019)。然而,现有基于注意力的解释方法依赖于人工定义的聚合策略与固定归因规则(Abnar与Zuidema,2020a;Chefer等人,2021),而模型无关方法(如LIME、SHAP)将模型视为黑箱,并通过输入扰动产生高昂计算成本。本文提出解释网络(ExpNet),这是一种轻量级神经网络,可学习从Transformer注意力模式到词元级重要性评分的显式映射。与先前方法不同,ExpNet能自动发现最优的注意力特征组合,而非依赖预设规则。我们在具有挑战性的跨任务场景中评估ExpNet,并将其与涵盖四大方法体系的模型无关方法及基于注意力的技术进行基准比较。