Prediction and Calibration: Complex Reasoning over Knowledge Graph with Bi-directional Directed Acyclic Graph Neural Network

Yao Xu, Shizhu He, Li Cai, Kang Liu, Jun ZhaoACL 2023

Abstract

Answering complex logical queries on Knowledge Graphs (KGs) often involves multi-step reasoning over incomplete data. Traditional Query Embedding (QE) models typically employ unidirectional reasoning, where node representations are calculated solely from predecessors. This paper introduces BiDAG (Bi-directional Directed Acyclic Graph neural network), which treats reasoning as a two-stage process: Prediction and Calibration. By extending the query graph into a bidirectional structure, BiDAG allows information to flow both forward and backward, enabling successor nodes to constrain and refine predecessor representations. Experimental results on FB15k-237 and NELL995 demonstrate that BiDAG effectively mitigates error cascading in multi-hop queries, setting new state-of-the-art benchmarks.

Introduction

Knowledge Graphs (KGs) serve as foundational structures for representing interlinked facts. However, their inherent incompleteness poses a challenge for answering complex logical queries, such as "Which Nobel Prize winners are from an Asian country?". Such queries require reasoning across multiple steps and logical operators (e.g., AND, OR, EXISTS).

Current QE models encode these queries into vector spaces but often follow a "one-way street" approach. By calculating representations based only on predecessors, they ignore the joint probability of all nodes. For instance, the fact that a person won a Nobel Prize should logically constrain the search for their nationality. Ignoring this backward flow leads to fuzzy results and compounded errors over deep reasoning chains.

Methodology

The proposed BiDAG framework addresses these limitations through a two-stage process:

  1. Prediction Module: Similar to traditional QE models, this module traverses the query's Directed Acyclic Graph (DAG) to generate initial node representations. It utilizes Gated Recurrent Units (GRUs) for relational projections and an attention mechanism for logical intersections.
  2. Calibration Module: This core innovation extends the unidirectional graph into a bidirectional one. Multiple layers of a Graph Neural Network (GNN) are applied to this structure, allowing information to flow forward and backward. This module uses a modified multi-head attention mechanism for context aggregation and a GRU-based update logic to refine representations. Residual connections are employed to maintain the original logical intent.
The two-stage framework: (A) Prediction generates initial representations, and (B) Calibration refines them using bidirectional information flow.

Experimental Setup

The model was evaluated on three standard KG benchmarks: FB15k, FB15k-237 (a more challenging version without redundant relations), and NELL995. The evaluation covered nine types of Existential Positive First-Order (EPFO) queries, ranging from simple 1-hop paths (1p) to complex intersections and unions (e.g., 3i, up).

Results and Discussion

BiDAG consistently outperformed existing models like GQE, BetaE, and MLPMix across all datasets.

Performance comparison (MRR) of BiDAG against baseline models on FB15k-237, FB15k, and NELL benchmarks.

Key findings include:

  • Holistic Reasoning: Successor nodes provide valuable constraints. Calibration acts as a global "sanity check," particularly effective in multi-hop queries (2p, 3p) where uncertainty typically grows at each step.
  • Performance Gains: BiDAG achieved an average relative improvement in Mean Reciprocal Rank (MRR) of 3.2% on FB15k, 3.9% on FB15k-237, and 5.4% on NELL995.
  • Calibration Impact: Ablation studies showed a significant performance drop without calibration, confirming that bidirectional information flow is the primary driver of success. Interestingly, calibration is most impactful early in training when initial predictions are weakest.

Conclusion

BiDAG demonstrates that treating logical reasoning as a global optimization problem significantly improves query answering accuracy. While highly effective, the current framework does not support logical negation (NOT) and relies on relatively simple neural operators. Future work may explore more sophisticated operators and address parallelization bottlenecks to enhance scalability for extremely large-scale queries.

Summary updated

BibTeX
@inproceedings{xu2023prediction,
  author = {Yao Xu and Shizhu He and Li Cai and Kang Liu and Jun Zhao},
  title = {{Prediction and Calibration: Complex Reasoning over Knowledge Graph with Bi-directional Directed Acyclic Graph Neural Network}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.450},
}
Figure