Skip to main content
QUICK REVIEW

[논문 리뷰] XAI for Transformers: Better Explanations through Conservative Propagation

Ameen Ali, Thomas Schnake|arXiv (Cornell University)|2022. 02. 15.
Explainable Artificial Intelligence (XAI)Computer Science인용 수 26
한 줄 요약

본 논문은 Layer-wise Relevance Propagation(LRP)을 Transformer로 확장하고, 어텐션 헤드와 LayerNorm에 대한 보수적 전파 규칙을 도입하여 gradient 기반 방법의 보존성 실패를 해소하고 NLP, 비전, 그래프 영역 전반에서 최첨단 설명 성능을 달성한다.

ABSTRACT

Transformers have become an important workhorse of machine learning, with numerous applications. This necessitates the development of reliable methods for increasing their transparency. Multiple interpretability methods, often based on gradient information, have been proposed. We show that the gradient in a Transformer reflects the function only locally, and thus fails to reliably identify the contribution of input features to the prediction. We identify Attention Heads and LayerNorm as main reasons for such unreliable explanations and propose a more stable way for propagation through these layers. Our proposal, which can be seen as a proper extension of the well-established LRP method to Transformers, is shown both theoretically and empirically to overcome the deficiency of a simple gradient-based approach, and achieves state-of-the-art explanation performance on a broad range of Transformer models and datasets.

연구 동기 및 목표

  • 복잡성과 잠재적인 공정성 문제로 인해 Transformer 모델에서 설명가능한 AI의 필요성을 동기 부여한다.
  • Transformer에 적용될 때 기울기 기반 설명의 보존성(conservation) 특성을 분석한다.
  • 어텐션 헤드와 LayerNorm에 대한 이론적으로 근거 있는 보수적으로 전파되는 LRP 규칙을 개발한다.
  • 강력한 기준선과 비교하여 NLP, 비전, 그래프 태스크 전반에서 제안된 방법을 실험적으로 검증한다.

제안 방법

  • Transformer 모듈 간의 보존성을 평가하기 위해 Gradient × Input(GI) 설명을 Layer-wise Relevance Propagation(LRP) 형식으로 프레이밍한다.
  • GI 전파에서 보존성 파손의 주요 원천으로 어텐션 헤드와 LayerNorm을 식별한다.
  • 게이팅/리스케일링 항을 상수(detach)로 취급하고 선형 계층 LRP 규칙을 적용하여 어텐션 헤드(AH-rule)와 LayerNorm(LN-rule)에 대한 보수적 LRP 규칙을 도출한다.
  • 간단한 구현 팁을 제시한다: y_j = sum_i x_i [p_ij].detach()이고 y_i = (x_i - E[x]) / [sqrt(epsilon+Var[x])] .detach()로 설명을 계산한 뒤 GI를 실행하여 설명을 얻는다.
  • 이러한 AH 및 LN 규칙이 보존성을 유지하고 다수의 데이터셋에서 GI보다 더 나은 실험적 설명을 산출함을 보인다.

실험 결과

연구 질문

  • RQ1Can gradient-based explanations be made conservative in Transformer architectures to faithfully attribute predictions?
  • RQ2Which Transformer components disrupt conservation for GI, and how can we modify propagation rules to address them?
  • RQ3Do conservative LRP rules for attention heads and LayerNorm improve qualitative and quantitative explanation quality across NLP, vision, and graph tasks?
  • RQ4How does the proposed method compare with state-of-the-art Transformer explainability approaches on standard benchmarks?

주요 결과

  • Conservation of GI is violated in Transformers, especially due to attention heads and LayerNorm.
  • LRP with AH-rule and LN-rule maintains conservation and yields more faithful attributions than GI in experiments.
  • LRP (AH+LN) consistently achieves the best AUAC (activation) and AU-MSE (pruning) across NLP and graph datasets, outperforming GI and several baselines.
  • Qualitative explanations from LRP (AH) and LRP (AH+LN) focus on salient tokens or superpixels and reduce spurious emphasis on entities.
  • The method scales with Transformer and Graphormer models and remains computationally efficient compared to some perturbation-based or attention-only methods.
  • The approach enables bias analysis in Sentiment models (e.g., DistilBERT on SST-2) by attributing relevance to gendered names and entities without generating counterfactuals.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.