TranSHER: Translating Knowledge Graph Embedding with Hyper-Ellipsoidal Restriction

Yizhi Li, Wei Fan, Chao Liu, Chenghua Lin, Jiang Qian

Abstract

TranSHER addresses the inherent rigidity of hyper-ellipsoidal constraints in Knowledge Graph Embedding (KGE) models like PairRE. By introducing a relation-specific translation term, TranSHER provides an additional degree of freedom during optimization, enabling the model to better capture complex relations and semantic entity categories. Our evaluations across five major benchmarks, including large-scale graphs like ogbl-wikikg2, demonstrate that TranSHER achieves state-of-the-art performance while maintaining superior optimization stability.

Introduction

Knowledge Graph Completion (KGC)—the task of predicting missing links between entities—is fundamental for building robust AI systems. Recent high-performing models, notably PairRE, represent entities on the surfaces of "hyper-ellipsoids." While computationally efficient, this geometric approach imposes a strict restriction: entity embeddings are largely constrained to move along arc paths on these surfaces to find a match. This "stiffness" makes it difficult for the model to distinguish between similar but distinct entities in complex relational patterns, such as N-to-N or 1-to-N relations.

Methodology

TranSHER (Translating Specific Hyper-Ellipsoidal Restriction) builds upon the translational distance principle of TransE and the ellipsoidal mapping of PairRE to provide more flexibility.

Geometric Relaxation

The model first maps head and tail entities ($e_h, e_t$) to relation-specific hyper-ellipsoids using separate projection vectors ($r^H, r^T$). The core innovation of TranSHER is the introduction of a relation-specific translation vector ($B_r$). Unlike PairRE, which calculates distance directly between mapped points, TranSHER allows the cluster of head entities to shift as a group toward the tail entities.

Figure 1: Geometric comparison between PairRE and TranSHER. The addition of the translation vector $B_r$ in TranSHER relaxes the rigid ellipsoidal constraints, allowing for more flexible entity optimization.

The score function is defined as: $$f_r(e_h, e_t) = \gamma - ||G_r^H(e_h) + B_r - G_r^T(e_t)||_1$$ This translation term acts as a "bridge," allowing entity clusters to move closer together without requiring drastic, awkward changes to individual entity embeddings on the ellipsoid surface.

Experimental Results and Analysis

TranSHER was evaluated on five diverse datasets: FB15k-237, DB100K, YAGO37, ogbl-wikikg2, and ogbl-biokg. The model achieved significant improvements across all metrics, notably a 4.6% increase in MRR on YAGO37 and a 3.2% increase on the massive ogbl-wikikg2 dataset.

Handling Relational Complexity

Heatmap analysis of the translation embedding blocks reveals that the $B_r$ term is most "active" (exhibiting higher values) for N-to-N and 1-to-N relations. This confirms that the translation specifically aids the model in tackling the most difficult relational patterns where a single entity must connect to a diverse set of neighbors.

Figure 2: Heatmap analysis showing the magnitude of the translation embedding across different relation types. The translation term is significantly more active for complex N-N and 1-N relations.

Optimization and Semantics

Beyond raw metrics, TranSHER demonstrates improved optimization stability, maintaining a lower standard deviation of gradients for entity embeddings throughout training compared to PairRE. Case studies also suggest enhanced semantic awareness; for instance, the model correctly ranks specific roles like "writer" above related but incorrect categories like "television producer," indicating it captures the nuances of entity types more effectively.

Conclusion

TranSHER demonstrates that a simple, well-motivated relaxation of geometric constraints can lead to substantial gains in KGE performance. By combining the strengths of translational and ellipsoidal models, TranSHER provides a more flexible and stable framework for representing the complex structures found in modern knowledge graphs.

Summary updated

BibTeX
@inproceedings{li2022transher,
  author = {Yizhi Li and Wei Fan and Chao Liu and Chenghua Lin and Jiang Qian},
  title = {{TranSHER: Translating Knowledge Graph Embedding with Hyper-Ellipsoidal Restriction}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.583},
}
Figure