Knowledge Graph Representation with Jointly Structural and Textual Encoding

Jiacheng Xu, Xipeng Qiu, Kan Chen, Xuanjing Huang

Abstract

Knowledge Graphs (KGs) are essential for many AI tasks but often suffer from incompleteness and sparsity. This paper presents a novel deep learning architecture that enhances KG embeddings by jointly encoding structural triplets and textual descriptions. By employing a gating mechanism to balance these information sources and an attention mechanism to select relevant text based on specific relations, the proposed model significantly improves performance in link prediction and triplet classification, particularly for entities with limited structural data.

Introduction: The Sparsity Challenge

Knowledge Graphs like Freebase and WordNet provide structured representations of world knowledge. However, they are notoriously incomplete. Standard embedding models, such as TransE, represent entities and relations as vectors based solely on graph topology. This approach often fails for "sparse" entities—those with few connections—as the model cannot learn meaningful representations from limited structural context.

Previous attempts to incorporate textual descriptions faced three main challenges:

  1. Suboptimal Integration: Simple alignment of word and KG embeddings often misses the synergy between the two.
  2. Context Blindness: Entity descriptions contain diverse facts; not all are relevant to a specific relation (e.g., "education" is irrelevant to a "place of birth" query).
  3. Fixed Weighting: The relative importance of text versus structure should vary; rare entities need text more than well-connected ones.

Proposed Methodology

The authors propose a Joint Structure and Text Encoder designed to address these limitations through three core components.

Joint Structure and Text Encoder Architecture

1. Structural Encoding

The model uses TransE as its foundation, aiming to satisfy the translation principle: $head + relation \approx tail$.

2. Textual Encoding

Three architectures were evaluated for converting entity descriptions into vectors:

  • NBOW (Neural Bag-of-Words): A simple summation of word embeddings.
  • LSTM: A bidirectional Long Short-Term Memory network capturing sequential dependencies.
  • Attentive LSTM (A-LSTM): The most advanced variant, which uses the specific relation as a query to "attend" to relevant words in the description, filtering out noise.

3. Gating Mechanism

To merge the structural vector ($e_s$) and textual vector ($e_d$), a learned gate ($g_e$) is introduced. The final representation is a linear interpolation: $e = g_e \odot e_s + (1 - g_e) \odot e_d$. This allows the model to dynamically determine the optimal balance for each entity.

Experimental Setup

The model was evaluated on two benchmark datasets:

  • WN18: A WordNet subset with 18 relations and ~40,000 entities.
  • FB15K: A Freebase subset with 1,345 relations and ~15,000 entities. Textual descriptions were sourced from WordNet definitions and Wikipedia summaries linked via Freebase.

Key Insights: The "Volume Knob" for Information

A critical finding was the behavior of the gating mechanism. It acts as an automated weight, adjusting based on entity frequency.

Gating Mechanism Behavior across Entity Frequencies

As shown in the heatmap above, for low-frequency entities (right side), the model naturally relies more heavily on textual information. Conversely, for high-frequency entities (left side), it favors the well-established graph structure. This "relation-aware reading" via attention ensures that only pertinent textual details are used to justify specific links, while joint training ensures that text representations are optimized specifically for KG completion.

Results

The joint models, particularly the Jointly(A-LSTM) version, significantly outperformed the TransE baseline and other state-of-the-art methods:

  • Link Prediction (FB15K): Achieved a Mean Rank of 77 (vs. 125 for TransE) and a Hits@10 of 75.5% (vs. 47.1% for TransE).
  • Triplet Classification (WN18): Reached 97.8% accuracy, surpassing models like TransD and TranSparse.
  • Handling Sparsity: The most dramatic gains occurred in "N-to-1" and "1-to-N" relations, where structural ambiguity is typically highest.

Conclusion and Future Work

While the current model demonstrates the power of joint encoding, several avenues for improvement remain. Swapping the TransE base for more sophisticated structural models (e.g., TransR) could further boost performance. Additionally, moving from a static per-entity gate to a dynamic gating strategy—where the weight changes based on the specific relation context—and incorporating textual descriptions for relations themselves are promising next steps.

Summary updated

BibTeX
@inproceedings{xu2017knowledge,
  author = {Jiacheng Xu and Xipeng Qiu and Kan Chen and Xuanjing Huang},
  title = {{Knowledge Graph Representation with Jointly Structural and Textual Encoding}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2017},
  doi = {10.24963/ijcai.2017/183},
}
Figure