DT+GNN: A Fully Explainable Graph Neural Network using Decision Trees

Peter Müller, Lukas Faber, Karolis Martinkus, Roger Wattenhofer

TL;DR

Current Graph Neural Network (GNN) explanation tools can point to what parts of a graph influenced a prediction, but they cannot tell you how or why the model made that choice. To solve this, the authors propose DT+GNN, an intrinsically explainable architecture that restricts node representations to small categorical states and distills GNN layers into compact, pruned decision trees. The resulting model delivers classification accuracy on par with standard GNNs while exposing the exact logical rules operating at every message-passing step.

What Problem Does This Paper Address?

GNNs have excelled across molecular chemistry, social network analysis, and bio-informatics, yet their internal mechanisms remain black boxes. Existing explanation techniques—such as GNNExplainer, Grad-CAM, or Shapley-based subgraph approaches—are post-hoc: they produce importance heatmaps over nodes or edges.

However, highlighting a subgraph doesn't reveal the underlying logic. For instance, if an explainer highlights two oxygen atoms in a molecule, a practitioner still cannot tell whether the GNN cares about their connectivity, their exact count, or their neighboring bonds. DT+GNN tackles this interpretability bottleneck by creating a model whose intermediate steps and message passing can be audited directly by humans.

Methods

DT+GNN replaces continuous message-passing layers with interpretable decision trees through a multi-stage training pipeline:

  1. Stone-Age Distributed Computing Inspiration: Rather than continuous hidden vectors, nodes communicate using a small finite set of discrete states, inspired by the "stone age" distributed computing model.
  2. Differentiable Categorical GNN (Diff-DT+GNN): The architecture adapts the Graph Isomorphism Network (GIN) aggregation rule. Using the Gumbel-Softmax reparameterization trick, node states and aggregated messages are constrained into categorical one-hot vectors. Summing incoming messages simply counts how many neighbors are in each state.
  3. Distillation into Decision Trees: After training Diff-DT+GNN with gradient descent, the authors distill the MLPs into multi-class decision trees. To help trees reason about relative quantities, they introduce pairwise comparison features ($\Delta$ features) that encode whether state $i$ neighbors outnumber state $j$ neighbors.
  4. Joint Reduced Error Pruning: Decision trees are iteratively pruned against a joint validation/training criterion: a node is pruned if doing so does not reduce validation accuracy or cause training accuracy to dip below validation accuracy.
  5. Feature Attribution via Tree-SHAP: To generate standard node-importance heatmaps, the authors combine Tree-SHAP attributions with graph structure, distributing credit across self-states, neighborhood counts, and delta comparisons.

Datasets

The authors evaluated DT+GNN on both synthetic and real-world benchmarks:

  • Synthetic Benchmarks: Infection, Negative Evidence, BA-Shapes, Tree-Cycles, Tree-Grid, and BA-2Motifs.
  • Real-World Benchmarks: Molecular datasets (MUTAG, Mutagenicity, BBBP, PROTEINS) and social networks (IMDB-BINARY, REDDIT-BINARY, COLLAB).
  • High-Feature Citation Networks (Appendix E): Cora, CiteSeer, PubMed, and OGB-ArXiv.

No new datasets were introduced, but the authors critically re-examined the ground truth assumptions of several existing benchmarks.

Key Insights and Ideas

  • Discretization Does Not Inherently Hurt Expressiveness in Practice: Despite compressing embeddings into just 5–10 discrete states, DT+GNN matched the accuracy of continuous GINs across standard benchmarks.
  • Unmasking Deficiencies in Standard Explainability Benchmarks:
  • BA-2Motifs: DT+GNN revealed that the network only learns to identify the "house" motif; it classifies cycles purely via default bias terms (i.e., "not a house"). Post-hoc cycle explanations on this benchmark are essentially artifacts.
  • Tree-Cycles & Tree-Grid: DT+GNN solved these tasks in fewer layers than the diameter of the motif because cycle/grid nodes have unique degree signatures compared to the base binary tree. The model only looked 2 hops away, demonstrating that evaluating explainers against full motif ground truth can penalize models that correctly exploit shortcuts.
  • Debunking Common MUTAG Beliefs: Several prior works assumed $NO_2$ groups are the explanatory feature for mutagenicity in MUTAG. DT+GNN's inspection revealed that every molecule in MUTAG has an $NO_2$ group; instead, the network relies on degree and overall atom count rules.

Key Results

  • Predictive Performance: DT+GNN achieved classification accuracy competitive with GIN across tasks (e.g., 0.71 vs. 0.70 on PROTEINS; 0.83 vs. 0.81 on BBBP; 0.87 vs. 0.87 on REDDIT-B).
  • Pruning Efficiency: The proposed pruning strategy compressed tree sizes (total decision nodes) by an average of 62% on synthetic datasets and 84% on real-world datasets without sacrificing accuracy (e.g., PROTEINS dropped from 206 to 9 nodes).
  • Explanation Accuracy: On synthetic datasets with ground truth, DT+GNN produced feature attribution competitive with specialized explainers (e.g., 0.94 on BA-Shapes vs. 0.925 for GNNExplainer; 1.00 on Saturation vs. 0.32 for GNNExplainer).

Limitations and Future Work

  • High-Dimensional Node Features: DT+GNN struggles on datasets with wide, continuous feature vectors (e.g., citation graphs like Cora and OGB-ArXiv). Converting thousands of text features into small categorical states leads to steep drops in accuracy (e.g., OGB-ArXiv fell from 68% to 28%) and creates trees that are too deep to easily interpret.
  • Pruning Scalability: The reduced-error pruning method scales quadratically with the number of leaves ($O(\text{leaves}^2)$ dataset passes), making it prohibitive on very large graphs.
  • Future Work: The authors suggest prepending interpretable dimensionality reduction techniques (e.g., sparse MLPs, clustering, or PCA) to compress broad input spaces prior to passing features into DT+GNN.

Summary updated

BibTeX
@inproceedings{muller2023dt,
  author = {Peter Müller and Lukas Faber and Karolis Martinkus and Roger Wattenhofer},
  title = {{DT+GNN: A Fully Explainable Graph Neural Network using Decision Trees}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=9IlzJa5cAv},
}
Figure