mlsanityData to 14 Oct 2026

LIG: Layer-wise Integrated Gradients for Within-Layer Flow Analysis in Transformers

arXiv 2606.21564 ↗First posted 19 Jun 2026cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

Transformers achieve strong performance, but their internal computations remain opaque. We view each Transformer layer as a dynamic graph whose nodes are token representations and per-head attention outputs, with Multi-Head Attention (ATT) and MLP as module boundaries. On this graph we use LIG (Layer-wise Integrated Gradients), which applies set-to-set Integrated Gradients (IG) at nonlinear module boundaries. Set-to-set IG applies IG to a map from a set of input token representations to a set of output representations, evaluating token-to-token contributions, which is not standard in prior IG applications. This extends IG from the usual scalar-objective setting to set-to-set maps via an L2 scalarization, and composes within-layer contributions in the spirit of Layer-wise Relevance Propagation (LRP), with IG completeness playing the role of LRP-style conservation at each boundary. We use LIG to analyze (i) the agreement between module-wise composition and layer-whole attribution under an L2 criterion, and (ii) within-layer information flow by tracing separated ATT and MLP contributions. On BERT-base and PTB, configurations that best preserved within-layer consistency used the target token's embedding as the ATT baseline and either the ATT output at a=0 or Zero as the MLP baseline. We therefore present LIG as a diagnostic XAI tool at module-boundary granularity, without model-specific retraining or per-operation interpreter design. Code is available at https://github.com/eightsuzuki/layer-wise-integrated-gradients.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 12 of its 19 references that are in the map. First posted on arXiv 19 Jun 2026.

Builds on

12 of 19 references.

References · 12

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2017Axiomatic Attribution for Deep Networkscited by 3,384
  5. 2019Explainable Artificial Intelligence (XAI): Concepts, Taxonomies, Opportunities and Challenges toward Responsible AIcited by 1,552
  6. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 1,003
  7. 2019Attention is not Explanationcited by 929
  8. 2020Quantifying Attention Flow in Transformerscited by 775
  9. 2019A Multiscale Visualization of Attention in the Transformer Modelcited by 292
  10. 2024AttnLRP: Attention-Aware Layer-Wise Relevance Propagation for Transformerscited by 120
  11. 2021The Out-of-Distribution Problem in Explainability and Search Methods for Feature Importance Explanationscited by 87
  12. 2021Discretized Integrated Gradients for Explaining Language Modelscited by 46

Built on by

Not cited yet.