A Semantic Filter Based on Relations for Knowledge Graph Completion

Zongwei Liang, Junan Yang, Hui Liu, Ke-Ju HuangEMNLP 2021

Introduction

Knowledge Graphs (KGs) such as Freebase and DBpedia are essential for structured information retrieval, yet they are notoriously incomplete. The task of Knowledge Graph Completion (KGC) aims to predict missing links between entities. While existing embedding models represent entities as static high-dimensional vectors, they often fail to account for the fact that different relations focus on different entity attributes. To address this, researchers have introduced the Semantic Filter Based on Relations (SFBR), a lightweight module that dynamically filters entity embeddings based on the specific relation being queried.

The Problem: Irrelevant Attribute Noise

Most standard KGC models match the entire entity vector for every relation. However, an entity possesses numerous attributes, only a subset of which are relevant to a specific triple. For instance, if comparing two objects based on the relation "has_shape," their color should be irrelevant.

Figure 1: Conceptual illustration of attribute-specific matching. While both objects share the same shape, they differ in color. A semantic filter allows the model to focus only on the relevant 'shape' dimension while ignoring 'color' noise.

When models attempt to match the full, unfiltered entity vector, irrelevant dimensions act as "noise," which can obscure the true semantic relationship and lead to incorrect link predictions.

Methodology: The SFBR Architecture

The core innovation of SFBR is the introduction of a relation-conditioned "lens" that processes entity embeddings before they reach the score function. Instead of using raw embeddings, the model passes the head and tail embeddings through a filter that reinforces dimensions associated with the specific relation and suppresses others.

Figure 2: Comparison of a standard KGC architecture (left) versus the SFBR-enhanced architecture (right). The SFBR module acts as a plug-and-play component that filters head and tail embeddings based on the relation embedding.

Evolution of the Filter

The researchers explored several implementations of this filter to balance performance and efficiency:

  1. MLP-based: A Multi-Layer Perceptron approach that, while powerful, proved too parameter-heavy for large-scale graphs.
  2. Linear-2: A regularized version using block-diagonal matrices to reduce computational complexity.
  3. Diag (The Optimized Version): The most efficient iteration, utilizing a simple element-wise (Hadamard) product between the entity vector and a relation-specific filter vector. This version provides significant gains with almost zero memory overhead.

Key Results and Insights

The SFBR module was evaluated on gold-standard benchmarks including WN18RR, FB15k-237, and YAGO3-10. The results demonstrated consistent improvements across various model types:

  • Performance Gains: Adding SFBR to the TransE model increased Hit@10 scores by 3.8% on WN18RR and a substantial 7% on FB15k-237.
  • State-of-the-Art Accuracy: When combined with tensor decomposition models like RESCAL, SFBR achieved state-of-the-art results on multiple benchmarks.
  • Efficiency: The "Diag" version is remarkably lean. On the WN18RR dataset, adding SFBR to the RotatE model increased the parameter count by less than 0.03%, making it highly practical for real-world applications.

Conclusion

SFBR demonstrates that "less is more" in knowledge graph embeddings. By filtering out irrelevant semantic noise and focusing on relation-specific saliency, SFBR significantly enhances the accuracy of link prediction. Its plug-and-play nature allows it to be easily integrated into existing geometric and tensor-based models, providing a scalable path forward for more precise knowledge graph completion.

Summary updated

BibTeX
@inproceedings{liang2021semantic,
  author = {Zongwei Liang and Junan Yang and Hui Liu and Ke-Ju Huang},
  title = {{A Semantic Filter Based on Relations for Knowledge Graph Completion}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.625},
}
Figure