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

Context-Enhanced Entity and Relation Embedding for Knowledge Graph Completion (Student Abstract)

Ziyue Qiao, Zhiyuan Ning, Yi Du, Yuanchun Zhou

Abstract

Knowledge Graph Completion (KGC) aims to predict missing links in large-scale networks of facts. Traditional embedding models often overlook the rich contextual information surrounding entities and relations. We present AggrE (Aggregation-based Embedding), a novel model that leverages local contexts for both entities and relations through a lightweight multi-hop aggregation strategy. By treating relations as entities with their own neighborhoods, AggrE captures deeper structural information. Experimental results on WN18RR and FB15K-237 benchmarks demonstrate that AggrE significantly outperforms state-of-the-art baselines, particularly on sparse datasets, while maintaining computational efficiency.

Introduction

Knowledge Graphs (KGs) such as Freebase and WordNet represent real-world facts as triplets: (head entity, relation, tail entity). Despite their scale, these graphs are often incomplete. Most existing KGC methods focus on learning embeddings for entities and relations based on individual triplets, failing to fully utilize the contextual neighborhood. While some recent work incorporates entity neighborhoods, the context of relations—defined by the pairs of entities they typically connect—is frequently ignored. This omission leads to a loss of valuable structural information necessary for accurate link prediction.

Methodology

AggrE addresses this gap by treating context as a two-way street between entities and relations. The model follows a structured extraction and aggregation process:

  1. Context Extraction: For any entity $e_1$, its context is the set of all neighboring entities and the specific relations connecting them. Conversely, for any relation $r_1$, its context is defined by the pairs of entities (endpoints) it bridges across the graph.
  2. Multi-hop Aggregation: The model employs multiple layers to pass information between these contexts. In each layer, an entity’s embedding is updated by aggregating the embeddings of its neighbors and their relations. Simultaneously, a relation’s embedding is updated based on the entities it links.
The extraction process for entity and relation contexts from triplets.
  1. Efficient Computation: Unlike standard Graph Neural Networks (GNNs) that rely on complex matrix transformations, AggrE utilizes element-wise products. This allows the embeddings themselves to act as trainable parameters, making the model more efficient and scalable for large-scale graphs.
  2. Scoring: The model uses the DistMult score function to calculate the likelihood of a triplet being correct based on these context-enhanced embeddings.

Experimental Results

AggrE was evaluated on two gold-standard benchmarks: WN18RR (a sparse subset of WordNet) and FB15K-237 (a subset of Freebase with redundant relations removed). The model was compared against five popular baselines: TransE, DistMult, ComplEx, SimplE, and RotatE.

Performance comparison of AggrE against baseline models across WN18RR and FB15K-237 datasets.

As shown in the table above, AggrE outperformed all baselines across both datasets. The improvement was most dramatic on the sparse WN18RR dataset, where AggrE achieved a Mean Reciprocal Rank (MRR) of 0.953, compared to the best baseline (DistMult) at 0.847. On FB15K-237, AggrE achieved a Hit@3 of 0.989, indicating the correct relation was in the top three predictions nearly 99% of the time.

Discussion and Conclusion

The success of AggrE highlights the importance of symmetry of information. By treating relations as entities with their own neighborhoods, the model captures a more holistic view of the graph's structure. Furthermore, by avoiding heavy GNN machinery like dense layers and non-linear activations, the model effectively uses context as a regularizer, preventing overfitting in sparse environments.

Future work will explore more complex aggregation functions and the incorporation of long-range relational paths to further enhance reasoning capabilities on billion-scale graphs.

Summary updated

BibTeX
@inproceedings{qiao2021context,
  author = {Ziyue Qiao and Zhiyuan Ning and Yi Du and Yuanchun Zhou},
  title = {{Context-Enhanced Entity and Relation Embedding for Knowledge Graph Completion (Student Abstract)}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i18.17932},
}
Figure