Dynamically Pruned Message Passing Networks for Large-scale Knowledge Graph Reasoning

Xiaoran Xu, Wei Feng, Yunsheng Jiang, Xiaohui Xie, Zhiqing Sun, Zhi-Hong Deng

Introduction

Knowledge Graph (KG) reasoning—predicting a missing entity in a relational triple like (head, relation, ?)—is a foundational task in artificial intelligence. Historically, approaches have fallen into two distinct camps: embedding-based models, which are highly accurate but operate as opaque "black boxes," and path-based models, which offer interpretable step-by-step reasoning but struggle to capture complex, interconnected logic.

Dynamically Pruned Message Passing Networks (DPMPN) bridges this gap. By dynamically constructing and pruning query-dependent subgraphs, DPMPN enables Graph Neural Networks (GNNs) to scale to massive datasets while providing clear, graph-structured explanations for their predictions.

The Challenge of Scale and Interpretability

Standard GNNs struggle with the sheer scale of modern knowledge graphs. In a KG containing millions of nodes and edges, performing message passing across the entire graph for every single query is computationally ruinous. The "small-world" nature of these graphs means that neighborhood sizes explode exponentially with each reasoning step.

This paper tackles the dual challenge of making KG reasoning both interpretable (by extracting explanatory subgraphs rather than simplistic single paths) and scalable (via intelligent, dynamic pruning of the message-passing operations).

Methodology: The Two-GNN Framework

The authors introduce a dual-module framework inspired by the "consciousness prior"—a cognitive science concept where a high-dimensional "unconscious" state is distilled into a low-dimensional "conscious" thought via attention.

The DPMPN architecture featuring the Attentive and Inattentive GNN modules.
  1. Inattentive GNN (IGNN): This module acts as the model’s "unconscious" background knowledge. It runs message passing on the full graph (or a large sampled subset) to compute robust, input-agnostic representations for all entities.
  2. Attentive GNN (AGNN): Representing the "conscious" reasoning process, the AGNN starts at the query's head node and dynamically builds a small, highly relevant subgraph. It restricts message passing exclusively to this tiny fraction of the graph, ensuring computational efficiency.
  3. Dynamic Pruning & Attention: To prevent the subgraph from exploding in size, the model employs a multi-stage attention mechanism. It defines an attending-from horizon (core nodes to expand from), a sampling horizon (neighbors to consider), and an attending-to horizon (the most relevant neighbors to retain).
  4. Flow-style Attention: Rather than evaluating one-hop neighbors in isolation, the model propagates attention scores over $T$ steps. This allows the network to "focus" its reasoning, narrowing down possibilities as it approaches the predicted tail node.

Key Insights

  • Subgraphs > Paths: Reasoning is rarely a straight line. By utilizing subgraphs, DPMPN captures "compositional" patterns where multiple converging facts support a single conclusion.
  • The Diverging-Converging Pattern: Effective reasoning follows a "search then focus" trajectory. Early reasoning steps exhibit high entropy as the model searches many possibilities, while later steps show low entropy as it converges on the correct answer.
  • Input-Dependent Sparsity: The vast majority of a massive KG is irrelevant to any specific query. By learning to prune this noise, the model achieves a massive reduction in computational complexity without sacrificing accuracy.

Results and Interpretability

DPMPN was evaluated on six standard large-scale KG benchmarks, including FB15K-237, WN18RR, NELL995, and the massive YAGO3-10 dataset.

  • State-of-the-Art Performance: The model outperformed strong baselines like RotatE and ConvE on challenging datasets. On FB15K-237, it achieved a HITS@1 of 28.6%, significantly surpassing previous path-based and embedding-based methods.
  • Efficiency: Despite the overhead of dynamic construction, DPMPN remains fast. It successfully scales to the YAGO3-10 dataset because it only processes a minuscule fraction of the graph per query.
  • Interpretability: Because the AGNN explicitly constructs a subgraph to reach its answer, DPMPN provides inherent visual explanations for its predictions.
A dynamically pruned subgraph explaining the reasoning for an AthletePlaysForTeam query.

For example, when tasked with an AthletePlaysForTeam query, the extracted subgraph clearly shows the model traversing through related entities—such as stadiums (e.g., Georgia Dome), sports leagues, and teammates—to logically deduce the correct team.

Limitations and Future Work

The primary limitation of DPMPN lies in hardware optimization. Current deep learning frameworks and GPUs are heavily optimized for dense matrix operations. Because DPMPN relies on dynamic sparse tensor computation that varies wildly from one input to another, the hardware overhead can sometimes offset the theoretical efficiency gains of pruning. Future work may involve developing specialized, efficient kernels for dynamic subgraphs or extending the framework to handle temporal knowledge graphs where facts evolve over time.

Summary updated

BibTeX
@inproceedings{xu2020dynamically,
  author = {Xiaoran Xu and Wei Feng and Yunsheng Jiang and Xiaohui Xie and Zhiqing Sun and Zhi-Hong Deng},
  title = {{Dynamically Pruned Message Passing Networks for Large-scale Knowledge Graph Reasoning}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=25wHCT1VA_},
}
Figure