Interpreting Graph Neural Networks for NLP With Differentiable Edge Masking

Michael Sejr Schlichtkrull, Nicola De Cao, Ivan Titov
10/1/2020
cs.CLcs.LGstat.ML
gnn

Official code: MichSchli/GraphMask (48 stars, Python, MIT, last commit 2021-04-23).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

MIT

Official implementation of GraphMask as presented in our paper Interpreting Graph Neural Networks for NLP With Differentiable Edge Masking.

488Python, PerlFeb 9, 20215 years agoMIT

Similar Papers

Cite this paper

@article{schlichtkrull2020interpreting,
  title  = {Interpreting Graph Neural Networks for NLP With Differentiable Edge Masking},
  author = {Michael Sejr Schlichtkrull and Nicola De Cao and Ivan Titov},
  year   = {2020},
  eprint = {2010.00577},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2010.00577}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2010.00577.svg)](https://codeofpaper.com/paper/2010.00577)

Discussion