Lune

ACL2026Top-tier venue

PR-XAI: PageRank-Based Feature Attribution for Transformers

Behrooz Azarkhalili, Linyi Li, Maxwell W. Libbrecht

Abstract

We introduce PR-XAI, a feature attribution method for transformer models based on the PageRank algorithm. The proposed PR-XAI models the attention mechanism as a directed graph, with weights derived from attention weights and their gradients. Evaluations across five well-known text classification datasets and three different architectures show that PR-AG, one variant of PR-XAI, outperforms state-of-the-art attribution methods in faithfulness and classification metrics, with significant gains on long-form text.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention Maps cites Attention is Not Only a Weight: Analyzing Transformers with Vector Norms
  • Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention Maps cites Incorporating Residual and Normalization Layers into Analysis of Masked Language Models
  • Incorporating Residual and Normalization Layers into Analysis of Masked Language Models cites Attention is Not Only a Weight: Analyzing Transformers with Vector Norms
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on9

  1. Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and InferenceBenjamin Warner, Antoine Chaffin, Benjamin Clavié, Orion Weller et al.ACL 2025 · 552 citations
  2. Attention is Not Only a Weight: Analyzing Transformers with Vector NormsGoro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro InuiEMNLP 2020 · 138 citations
  3. AttCAT: Explaining Transformers via Attentive Class Activation TokensYao Qiang, Deng Pan, Chengyin Li, Xin Li et al.NeurIPS 2022 · 66 citations
  4. Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention MapsGoro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro InuiICLR 2024 · 35 citations
  5. Incorporating Residual and Normalization Layers into Analysis of Masked Language ModelsGoro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro InuiEMNLP 2021 · 28 citations

Related papers

  1. Generalized Attention Flow: Feature Attribution for Transformer Models via Maximum FlowBehrooz Azarkhalili, Maxwell W. LibbrechtACL 2025
  2. DePass: Unified Feature Attributing by Simple Decomposed Forward PassXiangyu Hong, Che Jiang, Kai Tian, Biqing Qi et al.NeurIPS 2025 · 4 citations
  3. Progressive Inference: Explaining Decoder-Only Sequence Classification Models Using Intermediate PredictionsSanjay Kariyappa, Freddy Lécué, Saumitra Mishra, Christopher Pond et al.ICML 2024 · 8 citations
  4. XAI for Transformers: Better Explanations through Conservative PropagationAmeen Ali, Thomas Schnake, Oliver Eberle, Grégoire Montavon et al.ICML 2022 · 144 citations
  5. Self-Attention Attribution: Interpreting Information Interactions Inside TransformerYaru Hao, Li Dong, Furu Wei, Ke XuAAAI 2021 · 282 citations
Dusk over the sea between two cliffs drawn in fine vertical lines