Skip to main content
QUICK REVIEW

[Paper Review] Interpreting Graph Neural Networks for NLP With Differentiable Edge Masking

Michael Schlichtkrull, Nicola De Cao|arXiv (Cornell University)|Oct 1, 2020
Topic ModelingComputer Science59 citations
TL;DR

GRAPHMASK learns differentiable, amortized edge gates to identify which graph edges can be dropped without changing GNN predictions, enabling faithful interpretation for NLP tasks.

ABSTRACT

Graph neural networks (GNNs) have become a popular approach to integrating structural inductive biases into NLP models. However, there has been little work on interpreting them, and specifically on understanding which parts of the graphs (e.g. syntactic trees or co-reference structures) contribute to a prediction. In this work, we introduce a post-hoc method for interpreting the predictions of GNNs which identifies unnecessary edges. Given a trained GNN model, we learn a simple classifier that, for every edge in every layer, predicts if that edge can be dropped. We demonstrate that such a classifier can be trained in a fully differentiable fashion, employing stochastic gates and encouraging sparsity through the expected $L_0$ norm. We use our technique as an attribution method to analyze GNN models for two tasks -- question answering and semantic role labeling -- providing insights into the information flow in these models. We show that we can drop a large proportion of edges without deteriorating the performance of the model, while we can analyse the remaining edges for interpreting model predictions.

Motivation & Objective

  • Motivate and develop a post-hoc interpretation method for GNNs that identifies which graph edges are necessary for predictions in NLP.
  • Ensure the method is scalable, model-agnostic, and faithful to the original model's reasoning.
  • Demonstrate the approach on NLP tasks (semantic role labeling and multi-hop QA) to reveal information flow in GNNs.

Proposed method

  • Introduce GRAPHMASK: learnable erasure function that assigns a binary-like gate to every edge's message at every layer.
  • Use a simple classifier g to compute gates z(ℓ) from local node representations and messages, and apply binary masking with a learnable baseline.
  • Amortize parameter learning across the dataset to avoid hindsight bias, ensuring gates rely only on information available to the original model (no look-ahead).
  • Model the edge masking as a differentiable sparse relaxation using the Hard Concrete distribution to enable gradient-based optimization.
  • Formulate a constrained objective that minimizes the number of non-masked edges while keeping outputs f(GS,X) close to f(G,X) within a tolerance via a divergence D⋆ and L0 regularization.
  • Provide two variants: amortized (shared gπ across data) and non-amortized (per-edge, prone to hindsight bias).

Experimental results

Research questions

  • RQ1Which edges in a GNN graph are actually necessary for correct predictions across layers in NLP models?
  • RQ2Can we design a scalable, faithful, post-hoc attribution method for GNNs that avoids hindsight bias and is applicable to real NLP tasks?
  • RQ3What do retained edges reveal about information flow and path usage in GNN-based NLP models?
  • RQ4How does the method compare to existing attribution methods in faithfulness and robustness on synthetic and real datasets?

Key findings

  • GRAPHMASK (amortized) faithfully identifies edges crucial for predictions and retains a small subset of edges while preserving accuracy on real NLP models.
  • On a multi-hop QA model, GRAPHMASK retains 27% of edges with accuracy within 0.4% of the original model.
  • On an SRL model, GRAPHMASK shows gates act as indicators of informative messages rather than mere scaling, with limited edge retention causing small performance changes.
  • In a synthetic faithfulness task, amortized GRAPHMASK best replicates the gold-standard edge importance compared to erasure search, integrated gradients, and GNNExplainer.
  • GNNs rely on specific edge types and paths, and retained edges often form multi-step paths that connect predicates to arguments, illustrating how information propagates through the graph.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.