NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Improving Knowledge Graph Embedding Using Affine Transformations of Entities Corresponding to Each Relation

Jinfa Yang, Yongjie Shi, Xin Tong, Robin Wang, Taiyan Chen, Xianghua Ying

Abstract

Knowledge Graph Embedding (KGE) models typically represent entities as fixed vectors, which often fails to capture the multi-relational nature of entities that play different roles across various contexts. This paper proposes a simple yet effective enhancement: applying relation-specific affine transformations to entity vectors. By incorporating element-wise scaling and shifting, classic models like TransE and DistMult achieve significant performance gains, often rivaling or surpassing complex state-of-the-art architectures with minimal parameter overhead.

Introduction: The Multi-Identity Problem in Knowledge Graphs

Knowledge Graphs (KGs) store facts as triples $(h, r, t)$, representing a head entity, a relation, and a tail entity. A fundamental challenge in KGE is that a single entity can exhibit different "identities" depending on the relation. For instance, the entity Department of Justice behaves differently in the context of _has_part than it does for _is_located_in.

Standard models often struggle to capture these distinct roles because they assign a single, static vector to each entity. While previous attempts like TransH or TransR introduced relation-specific projections, they frequently incurred high computational costs or lacked generalizability across different model families.

Proposed Method: Affine Transformations (AT)

The authors introduce Affine Transformations (AT) as a lightweight "wrapper" for existing KGE models. An affine transformation consists of a linear transformation followed by a translation.

Conceptual visualization of affine transformations in Knowledge Graph Embeddings. Standard models (a) use fixed positions, while the proposed method (c, d) allows entities to scale and shift based on the specific relation.

Mathematically, before calculating the score of a triple, the head ($h$) and tail ($t$) entity vectors are transformed based on the relation ($r$):

  • $h' = A_r h + b_r$
  • $t' = C_r t + d_r$

To maintain efficiency and prevent overfitting, the authors utilize diagonal matrices for $A_r$ and $C_r$, reducing the operation to element-wise scaling and shifting. This AT wrapper was integrated into four major KGE families: TransE, RotatE, DistMult, and ComplEx.

Experimental Evaluation

The models were evaluated on three benchmark datasets: WN18RR (hierarchical relations), FB15k-237 (world facts), and YAGO3-10 (descriptive attributes). These datasets are standard for link prediction tasks and have inverse relations removed to ensure rigorous testing.

Key Results and Insights

The addition of affine transformations yielded substantial improvements across all base models. Notably, TransE + AT saw a 10.4% average increase in Mean Reciprocal Rank (MRR), enabling it to handle symmetric relations—a task the original TransE model famously could not perform.

Performance comparison of various KGE models across WN18RR, FB15k-237, and YAGO3-10 datasets. The proposed "+ AT" models consistently outperform their base versions and remain competitive with complex SOTA models.

As shown in the results table, ComplEx + AT and DistMult + AT achieved state-of-the-art or near-state-of-the-art performance. For example, ComplEx + AT achieved an MRR of 0.500 on WN18RR, outperforming more complex models like HAKE and QuatE.

Furthermore, the AT-enhanced models are highly parameter-efficient. On WN18RR, TransE + AT uses approximately 8.19M parameters, whereas QuatE requires 32.76M, demonstrating that significant performance gains do not necessitate massive increases in model complexity.

Conclusion

By allowing entity vectors to "stretch" or "move" into relation-specific regions of the embedding space, affine transformations provide a dynamic representation that captures the multi-relational nature of KGs. This simple geometric adjustment revitalizes classic models, making them competitive with modern, high-complexity architectures while preserving interpretability and efficiency.

Summary updated

BibTeX
@inproceedings{yang2021improving,
  author = {Jinfa Yang and Yongjie Shi and Xin Tong and Robin Wang and Taiyan Chen and Xianghua Ying},
  title = {{Improving Knowledge Graph Embedding Using Affine Transformations of Entities Corresponding to Each Relation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.findings-emnlp.46},
}
Figure