This is the official code repository for Unifying Deductive and Abductive Reasoning in Knowledge Graphs with Masked Diffusion Model (WWW 2026).
conda create -n dark python=3.9
conda activate dark
pip install -r requirements.txt You can run the code in the following steps:
- Sampling
- Supervised training
- Reinforcement learning
bash scripts/sample/sample_full.shFor the first-stage pretraining, set --training_mode unify.
For the second-stage supervised training for a single reasoning type, set --training_mode sft.
bash scripts/train/db.shor training with multi-gpu:
bash scripts/train/db-multi.shExample scripts:
bash scripts/optim/db.shWelcome to cite our work!
@article{gao2025unifying, title={Unifying Deductive and Abductive Reasoning in Knowledge Graphs with Masked Diffusion Model}, author={Gao, Yisen and Bai, Jiaxin and Huang, Yi and Fu, Xingcheng and Sun, Qingyun and Song, Yangqiu}, journal={arXiv preprint arXiv:2510.11462}, year={2025} }