KGDM: A Diffusion Model to Capture Multiple Relation Semantics for Knowledge Graph Embedding

Xiao Long, Liansheng Zhuang, Aodi Li, Jiuchang Wei, Houqiang Li, Shafei Wang

Introduction

Knowledge Graph Embedding (KGE) is a fundamental task in link prediction, aiming to complete missing facts in triplets like (Paris, IsCapitalOf, ?). Traditional models such as TransE or RotatE represent entities and relations as fixed vectors in a continuous space. To predict a missing tail entity, these models perform a deterministic calculation to find a single "best" point.

However, real-world knowledge is often ambiguous. A single relation can possess multiple semantics; for instance, the relation LocationContains might link a country to a city, a university, or a company. Deterministic models struggle with these "one-to-many" (1-N) and "many-to-many" (N-N) patterns because they attempt to collapse all possible valid answers into a single geometric location. KGDM (Knowledge Graph Diffusion Model) addresses this by reimagining knowledge graph completion as a conditional generation task rather than a deterministic point-prediction problem.

Methodology

KGDM leverages Denoising Diffusion Probabilistic Models (DDPM) to learn the distribution of possible target entities. Instead of calculating a single vector, the model generates entity embeddings through a reverse diffusion process.

The Diffusion Framework

The model follows a standard DDPM approach:

  1. Forward Process: Gradually adds Gaussian noise to a target entity's embedding until it becomes pure noise.
  2. Reverse Process: Learns to "denoise" this vector step-by-step to recover the original entity embedding, conditioned on the head entity ($h$) and the relation ($r$).

MLP-based Conditional Entity Denoiser (CEDenoiser)

While many diffusion models utilize Transformers or U-Nets, KGDM employs a simpler MLP-based architecture. Since a triplet $(h, r, t)$ is structurally atomic and very short, the long-range dependency modeling of a Transformer is unnecessary and prone to overfitting.

The KGDM architecture and the detailed Conditional Entity Denoiser (CEDenoiser) block.

The Scoring Module

A key innovation is the Scoring Module, which conditions the generation. Rather than simple concatenation, KGDM uses scoring functions inspired by traditional KGE (like $h + r$ or $h \circ r$). This pre-conditioning step allows the model to capture structural patterns between entities and relations before guiding the denoising process.

Key Insights and Results

By framing link prediction as generation, the model naturally handles multi-modal distributions. If a relation has multiple valid tail entities, the diffusion process can theoretically converge on any of them, rather than aiming for a single geometric average that satisfies none.

Comparison of predictions between KGDM and TransE, illustrating KGDM's ability to capture multiple semantic targets.

Performance Benchmarks

KGDM was evaluated on standard benchmarks including FB15k-237, WN18RR, Kinship, and UMLS. It achieved significant gains, particularly in complex relational scenarios:

  • Overall Performance: On FB15k-237, KGDM reached an MRR (Mean Reciprocal Rank) of 0.520, a substantial improvement over the previous state-of-the-art (AnKGE-HAKE at 0.385).
  • Complex Relations: The model's greatest strength lies in 1-N and N-N relations. On FB15k-237's 1-N relations, KGDM improved the MRR from 0.081 (RotatE) to 0.260—a nearly 3x improvement.
  • Comparison with GNNs: KGDM outperformed advanced GNN-based and path-based methods like NBFNet on three out of four datasets.

Limitations

Despite its success, KGDM faces challenges common to diffusion models. The improvement on WN18RR was less dramatic due to its high entity-to-relation ratio, which complicates target distribution modeling. Additionally, the iterative nature of the reverse diffusion process makes inference inherently slower than single-pass deterministic models. Scaling this approach to industrial-sized knowledge graphs remains an area for future research.

Summary updated

BibTeX
@inproceedings{long2024kgdm,
  author = {Xiao Long and Liansheng Zhuang and Aodi Li and Jiuchang Wei and Houqiang Li and Shafei Wang},
  title = {{KGDM: A Diffusion Model to Capture Multiple Relation Semantics for Knowledge Graph Embedding}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i8.28732},
}
Figure