Distance-Adaptive Quaternion Knowledge Graph Embedding with Bidirectional Rotation

Weihua Wang, Qiuyu Liang, Feilong Bao, Guanglai Gao

Introduction

Knowledge Graphs (KGs) serve as a foundational component for modern AI applications, including search engines and recommendation systems. Despite their utility, KGs are often incomplete. Knowledge Graph Embedding (KGE) models address this by representing entities and relations in a continuous vector space to predict missing links.

Existing KGE models generally fall into two categories: semantic matching models (e.g., QuatE), which excel at capturing semantic interactions via inner products but often lack query separability, and geometric distance models (e.g., TransE, TransERR), which treat relations as translations or rotations to improve separability at the cost of semantic richness. This paper introduces DaBR (Distance-Adaptive Bidirectional Rotation), a model that bridges this gap by combining semantic matching and geometric distance in a 4D quaternion space.

Methodology: Bidirectional Rotation and Distance Adaptation

DaBR utilizes quaternions—hypercomplex numbers with one real and three imaginary parts—to provide a highly expressive 4D embedding space. The model introduces two primary innovations to enhance representation learning:

  1. Bidirectional Rotation: Unlike traditional models that only rotate the head entity toward the tail, DaBR performs a "right rotation" on the head entity and a "reverse rotation" on the tail entity. This dual-action mechanism allows the model to capture more complex semantic features.
  2. Distance-Adaptation: To improve geometric accuracy, DaBR incorporates a learnable translation vector ($r_d$). The model calculates the $\ell_1$ distance between the head and tail entities after this adaptive translation.
Geometric comparison of QuatE, QuatRE, and the proposed DaBR model.

The final scoring function is a weighted fusion of the semantic matching score and the geometric distance score, controlled by a learnable parameter $\lambda$. This allows DaBR to dynamically balance both approaches during training.

Experimental Evaluation

The model was evaluated on four standard benchmarks: WN18RR, FB15k-237, WN18, and FB15k. WN18RR and FB15k-237 are particularly significant as they exclude simple inverse relations, preventing models from relying on data leakage.

Key Insights

  • Separability: DaBR achieves high intra-cluster separability (tightly clustering entities for the same query) and high inter-cluster separability (keeping different queries distinct).
  • Logical Expressiveness: The authors provide formal proofs that DaBR can model complex logical patterns, including symmetry, antisymmetry, inversion, and composition.
  • Efficiency and Convergence: DaBR maintains a competitive parameter count compared to predecessors like QuatRE and TransERR while demonstrating significantly faster convergence.

Results and Discussion

DaBR established new state-of-the-art (SOTA) performance across multiple metrics. On WN18RR, it achieved a Mean Reciprocal Rank (MRR) of 0.510, and on FB15k-237, an MRR of 0.373. Notably, the Mean Rank (MR) on WN18RR dropped to 899 (from TransERR's 1167), indicating that DaBR's predictions are consistently closer to the ground truth even when the top rank is missed.

Performance comparison (MRR) across different relation types (1-to-N, N-to-1, N-to-N) over training epochs.

As shown in the training curves, DaBR consistently outperforms QuatE and QuatRE across various relation types, particularly in 1-to-N and N-to-1 scenarios, where it reaches higher MRR values much earlier in the training process.

Conclusion

The DaBR model successfully integrates semantic matching and geometric distance within a quaternion framework. By employing bidirectional rotation and adaptive translation, it achieves superior entity separability and sets new benchmarks for Knowledge Graph Completion. Future work may explore higher-dimensional hypercomplex spaces or the integration of DaBR with Large Language Models (LLMs) to address out-of-vocabulary challenges.

Summary updated

BibTeX
@inproceedings{wang2025distance,
  author = {Weihua Wang and Qiuyu Liang and Feilong Bao and Guanglai Gao},
  title = {{Distance-Adaptive Quaternion Knowledge Graph Embedding with Bidirectional Rotation}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2025},
}
Figure