TransGate: Knowledge Graph Embedding with Shared Gate Structure

Jun Yuan, Neng Gao, Ji XiangAAAI 2019

Introduction

Knowledge Graph Embedding (KGE) is a fundamental task in representation learning, aiming to map entities and relations into continuous vector spaces. These embeddings are used to predict missing links in large-scale knowledge bases, such as completing the triplet (Beijing, CapitalOf, ?). However, existing KGE models often face a trade-off between computational efficiency and representational expressivity. TransGate addresses this by introducing a parameter-sharing mechanism using LSTM-style gates to create relation-specific entity embeddings without the massive memory overhead of traditional models.

The Problem: Efficiency vs. Expressivity

Existing KGE models generally fall into two categories:

  1. Indiscriminate Models (e.g., TransE): These models are simple and highly scalable but treat an entity the same way regardless of the relation involved, which limits their accuracy in complex scenarios.
  2. Discriminate Models (e.g., TransR, TransD): These use relation-specific parameters, such as matrices, to project entities into different spaces. While more accurate, they suffer from "parameter explosion." For instance, applying TransD to a large graph like Freebase can require over 33GB of memory.

Furthermore, most discriminate models assume relations are independent, ignoring the semantic overlap between related predicates (e.g., parent_of and ancestor_of). TransGate addresses these issues by introducing parameter sharing through a gated architecture.

Proposed Method: TransGate

TransGate utilizes a gate structure inspired by Long Short-Term Memory (LSTM) networks to adaptively filter entity information based on the specific relation involved.

The TransGate architecture featuring shared head and tail gates for relation-specific entity filtering.

The Gate Mechanism

Instead of a rigid linear projection, TransGate employs a sigmoid-activated layer and a Hadamard (element-wise) product. The gate takes both the entity and the relation as input, deciding which "aspects" of the entity are relevant to that specific relation. Crucially, the model uses only two gates (one for the head entity, one for the tail) that are shared across all relations. This allows the model to learn common features across different relations, significantly reducing the total parameter count while leveraging statistical strength from frequent relations to help model rarer ones.

Optimization for Speed

The authors developed two versions of the model:

  • TransGate(fc): Uses a standard fully connected layer within the gate.
  • TransGate(wv): Replaces the weight matrix with weight vectors, reducing time complexity from $O(m^2)$ to $O(m)$, making it as computationally efficient as the simplest baseline models like TransE.

Once entities are filtered into relation-specific vectors ($h_r$ and $t_r$), the model uses a translation-based score function: $f_r(h, t) = \|h_r + r - t_r\|$.

Experimental Results

TransGate was evaluated on five standard benchmarks, including WN18RR and FB15K-237, which are designed to eliminate inverse relation leakage.

Comparison of TransGate against baseline and state-of-the-art KGE models on WN18RR, FB15K, and FB15K-237.

Performance and Efficiency

TransGate achieves a superior trade-off between complexity and accuracy:

  • State-of-the-Art Accuracy: On the FB15K-237 dataset, TransGate(fc) achieved a Hits@10 of 58.1%, significantly outperforming deep learning-based models like ConvE (50.1%) and R-GCN (41.7%).
  • Parameter Efficiency: TransGate achieves these results with approximately 6x fewer parameters than ConvE and 17x fewer than R-GCN.
  • Scalability: The TransGate(wv) variant maintains nearly the same time complexity as TransE but improves the Hits@10 score on FB15K-237 by nearly 10% compared to the baseline.

Conclusion

TransGate demonstrates that high performance in knowledge graph completion does not necessarily require deep architectures or massive per-relation parameter sets. By using shared, non-linear gates, the model captures complex entity-relation interactions while remaining efficient enough for large-scale applications. Future work may involve extending this gated approach to multi-layer models or incorporating external data such as entity descriptions and logical rules.

Summary updated

BibTeX
@inproceedings{yuan2019transgate,
  author = {Jun Yuan and Neng Gao and Ji Xiang},
  title = {{TransGate: Knowledge Graph Embedding with Shared Gate Structure}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.1609/aaai.v33i01.33013100},
}
Figure