Introduction
Knowledge Graphs (KGs) such as Freebase and WordNet serve as critical backbones for modern AI, storing vast amounts of factual information in the form of triples: (subject, relation, object). Despite their scale, these graphs are inherently incomplete. Traditional approaches to knowledge graph completion typically focus on link prediction—guessing a missing entity given a subject and a relation. However, these models often struggle with rigid input requirements and fail to distinguish between the distinct roles that entities and relations play within a sequence.
This paper introduces DSKG (Deep Sequential model for Knowledge Graphs), a novel architecture that treats triples as short sequences processed by specialized multi-layer Recurrent Neural Networks (RNNs). By reimagining KGs through the lens of sequential modeling, DSKG enables more flexible prediction tasks, such as generating entire facts from a single starting entity.
Problem Statement
The authors identify two primary limitations in existing KG completion research:
- Rigid Inputs: Most current models are "incompetent" without a pre-specified relation. They cannot answer open-ended queries like "What facts are associated with the USA?" because they require both a subject and a relation to function.
- Homogeneous Treatment: Many embedding-based models treat entities and relations as identical mathematical objects in a vector space. This ignores the fundamental structural differences between an entity (a node) and a relation (an edge).
Methodology: Sequential Modeling for KGs
The core innovation of DSKG is the application of RNNs to the structured data of KGs. The model treats a triple $(s, r, o)$ as a sequence of length three.
Heterogeneous RNN Cells
Unlike standard RNNs that use a uniform cell for every step, DSKG employs a heterogeneous architecture. As shown in the architectural comparison below, DSKG utilizes different multi-layer RNN cells for entities ($c_1, c_2$) and relations ($c_3, c_4$). This design choice acknowledges that the "language" and semantic constraints of entities differ significantly from those of relations.
Training and Inference Innovations
- Type-based Sampling: To improve training efficiency and accuracy, the authors use a sampled softmax where negative samples are kept type-consistent. When predicting an entity, the model only compares the candidate against other entities, preventing semantic noise from relation embeddings.
- Relation Enhancement: DSKG leverages the bidirectional nature of graphs. By calculating the probability of a "reverse" relation (e.g., $o \xrightarrow{r^-} s$), the model can filter out unlikely entity candidates during the inference phase.
- Triple Prediction via Beam Search: By using beam search, DSKG can take a single subject $s$ and "hallucinate" the most likely $(r, o)$ pairs, effectively predicting complete new facts rather than just missing links.
Experimental Results
The researchers evaluated DSKG against several state-of-the-art models, including TransE, DistMult, and ConvE, across three standard benchmarks: FB15K, WN18, and the more rigorous FB15K-237 (which removes inverse relations to prevent simple pattern matching).
DSKG demonstrated superior performance, particularly on the challenging FB15K-237 dataset. As shown in the table below, DSKG achieved a Hits@1 of 24.9%, significantly outperforming established models like DistMult (15.5%) and ConvE (23.9%).
Beyond standard metrics, DSKG proved highly effective at the new task of triple prediction. On the FB15K dataset, the model correctly predicted over 34,000 new triples with an impressive 87% precision. Furthermore, the model is computationally efficient; a 2-layer DSKG can be trained in approximately one hour on a single consumer-grade GPU (GTX 1080Ti).
Conclusion and Future Work
DSKG demonstrates that treating knowledge graph triples as sequences allows for more flexible and accurate completion. The use of heterogeneous RNN cells is a key architectural advancement that respects the different roles of entities and relations.
Future research directions include extending the model to process longer paths within the graph to capture broader context, integrating attention mechanisms to focus on specific structural dependencies, and incorporating external textual data (such as Wikipedia) to better handle rare or ambiguous entities.
Summary updated