Value or Attention: Investigating Layer-wise Relevance Propagation for Graph Attention Networks
Organizations: Department of Artificial Intelligence, Fraunhofer Heinrich Hertz Institute, Berlin, Germany · Centre of eXplainable Artificial Intelligence, Technological University Dublin, Ireland · Department of Electrical Engineering, Technische Universität Berlin, Germany · BIFOLD – Berlin Institute for the Foundations of Learning and Data, Berlin, Germany
Abstract
Graph Attention Networks (GATs) are increasingly used in domains where scientists need to read a model's reasoning, from medicine to materials science, yet the routing they learn remains opaque to most explainers. Layer-wise Relevance Propagation (LRP) follows the model's computation, but in an attention layer the relevance reaching a node is the sum of two mechanically different quantities: its content relevance through the value path and its routing relevance through the attention path. Existing rules either drop one or add them into a single number. We write a single product rule with free weights on the two factors that recovers current approaches as special cases. The value path measures what content a node supplied against a zero baseline; the attention path measures how the node shaped what was passed relative to its neighborhood, and its sign records whether the node's features moved the gating the way the prediction demanded. On a ground-truth classification task, we show that the same node receives negative, positive and near-zero relevance under three settings of the rule. The separated relevance maps yield a hypothesis about the model: it gains by not reading that node. We give reading rules for both paths and argue that they should be interpreted separately.
Figures & tables
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| value path | attention path | ||||
| as source | as destination | ||||
| node map | |||||
| edge term | |||||
| reference | baseline | neighborhoods reading | , contrasted twice | ||
| scales with | content | contrast in demand | contrast in demand and in supply | ||
| supply (below) | — | ||||
| value path | attention path | ||||
|---|---|---|---|---|---|
| as source | as destination | ||||
| edge term | |||||
| supply (below) | — | ||||
| pushes logit up | pushes logit down | rates above | rates below | ||
| demand (above) | — | ||||
| score edge down | score edge up | shift away from | shift toward | ||
| QKV-BA | BA-House | ESOL | |
|---|---|---|---|
| graphs | BA , | pos.: BA , HouseMotif ; neg.: BA , ; balanced | Delaney molecules ( before de-duplication) |
| node feat. | , , iid | one-hot true degree, bins (loops excluded from the degree) | -dim one-hot (element, degree, charge, H, hybrid., aromaticity, ring) |
| edge feat. | — | — | -dim one-hot bond |
| task | regress one Transformer head (below), MSE | graph classification, cross-entropy | graph regression on standardized , MSE |
| model | GATv2 , , par. | GATv2 , , par. | GATv2 , , par. |
| training | Adam, lr , cosine, epochs, batch | Adam, lr , cosine, epochs, batch | AdamW, lr , cosine, epochs, batch , best-validation weights restored |
| Model | Value path (q/k/v) | Attention path (q/k/v) | |
|---|---|---|---|
| TransformerConv h=5 | 1.000 | 0.000 / 0.000 / 1.000 | 0.323 / 0.677 / 0.000 |
| GATv2 h=5 | 0.413 | 0.019 / 0.043 / 0.939 | 0.168 / 0.166 / 0.666 |
| GATv2 h=10 | 0.780 | 0.008 / 0.019 / 0.974 | 0.303 / 0.611 / 0.087 |
| GATv2 h=16 | 0.950 | 0.005 / 0.003 / 0.992 | 0.326 / 0.610 / 0.064 |
GNN Explainability
Graph neural network explainability studies how to identify and communicate the features, nodes, edges, and subgraphs behind graph-model predictions.
See all 86 papers