Generating Graph-Like Logical Rules for Knowledge Graph Reasoning via Diffusion Models

Haoxiang Cheng, Yunfei Wang, Chao Chen, Kewei Cheng, Zhipeng Lin +3 more
5/29/2026
1 citation
cs.AI
diffusion-flowrl

Official code: Haoxiang-Cheng/GRiD (5 stars, Python, last commit 2026-06-03).

Abstract

Logical rules constitute a cornerstone of knowledge graph (KG) reasoning, valued for their interpretability and ability to model relational patterns. However, existing rule mining methods predominantly focus on simple chain-like rules and therefore neglect the richer relational information encoded in graph-like structures, such as cycles and branches.

Show full abstract

This limitation is further exacerbated by computational bottlenecks caused by the combinatorial explosion of the search space, which is especially challenging for graph-like rules. Meanwhile, generative approaches such as diffusion models, despite their success in other domains, cannot be directly applied to rule mining because their training objectives are not aligned with the goal of learning high-quality rules, and non-differentiable KG rule quality metrics cannot directly guide model optimization. To address these limitations, we propose GRiD, a framework that reformulates graph-like rule discovery as a discrete generative process conditioned on the target relation. GRiD employs a two-phase training strategy. First, supervised pre-training enables GRiD to capture structural priors from subgraphs sampled from the KG meta-graph. Subsequently, reinforcement learning is applied to fine-tune GRiD through policy gradient optimization guided directly by non-differentiable rule-quality metrics. Experiments on six benchmark datasets show that GRiD achieves competitive performance on KG completion tasks. Ablation studies confirm the efficiency and robustness of GRiD and further show that graph-like rules complement chain-like rules in KG completion. Our code and datasets are available in https://github.com/Haoxiang-Cheng/GRiD.

View on arXivView PDF

Code Implementations(1)

Code for "Generating Graph-Like Logical Rules for Knowledge Graph Reasoning via Diffusion Models"

50PythonFeb 9, 20266 months ago

Similar Papers

Cite this paper

@article{cheng2026generating,
  title  = {Generating Graph-Like Logical Rules for Knowledge Graph Reasoning via Diffusion Models},
  author = {Haoxiang Cheng and Yunfei Wang and Chao Chen and Kewei Cheng and Zhipeng Lin and Haoxuan Li and Changjun Fan and Shixuan Liu},
  year   = {2026},
  eprint = {2605.30747},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.30747v2}
}

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/2605.30747.svg)](https://codeofpaper.com/paper/2605.30747)

Discussion