KGNN: Distributed Framework for Graph Neural Knowledge Representation

Binbin Hu, Zhiyang Hu, Zhiqiang Zhang, Jun Zhou, Chuan ShiarXiv 2022 · DOI · arXiv

Abstract

Knowledge Graphs (KGs) are essential for modern AI applications but face challenges in capturing high-order structures, handling unseen entities (inductive learning), and scaling to industrial-sized datasets. This paper presents KGNN, a distributed framework that integrates Graph Neural Networks (GNNs) with KG representation learning. KGNN utilizes an attention-based GNN encoder to aggregate neighborhood information and a knowledge-aware decoder to preserve relational logic. Experimental results on WN18, FB15K, and a large-scale AliPay dataset demonstrate superior performance in link prediction and triplet classification, while maintaining linear scalability across distributed workers.

Introduction

Traditional Knowledge Graph Embedding (KGE) methods, such as TransE or DistMult, often treat triplets as independent units. This approach fails to capture the complex "high-order" structures—the paths and neighborhoods beyond a single link—and typically ignores rich node attributes. Furthermore, these models are often transductive, meaning they cannot generalize to new entities without retraining. Finally, scaling these models to industrial graphs with hundreds of millions of nodes remains a significant bottleneck.

To address these issues, researchers from Ant Financial and Beijing University of Posts and Telecommunications introduced KGNN, a scalable, distributed framework designed to bridge the gap between deep graph learning and relational knowledge.

Methodology

The KGNN framework is composed of two primary modules designed to learn robust entity representations:

  1. GNN-based Encoder: This module employs a Graph Neural Network to aggregate information from an entity's local neighborhood. It uses an attention mechanism to weigh the importance of different neighbors and relations. To mitigate "over-smoothing," where node representations become indistinguishable, the encoder incorporates an LSTM-based update function inspired by Jumping Knowledge Networks.
  2. Knowledge-aware Decoder: This module ensures that the learned representations adhere to the logical constraints of a knowledge graph, such as symmetry or inversion. It utilizes scoring functions like TransH to evaluate triplet likelihood.
The KGNN architecture featuring a GNN-based encoder for neighborhood aggregation and a knowledge-aware decoder for relation prediction.

Distributed Architecture

To achieve industrial scalability, KGNN implements a distributed system consisting of:

  • Graph Storage System: Utilizes data compression to manage massive graphs.
  • Sampler: Dynamically samples sub-graphs and negative examples to feed the training process.
  • Trainer: Employs a "Coordinator" to manage multiple "Workers" and "Parameter Servers," enabling parallel training across a cluster.

Experiments and Key Insights

The framework was evaluated on three datasets: WN18 (lexical relations), FB15K (general knowledge), and a massive AliPay dataset containing 260,000 entities and 504 distinct attributes per entity.

Performance and Scalability

KGNN demonstrated superior accuracy, achieving a 98.8% Hit Ratio @ 10 on WN18, compared to 94.9% for TransH. On the AliPay dataset, KGNN’s ability to utilize entity attributes led to an AUC of 84.9%, significantly outperforming the 74.9% achieved by TransR.

A critical feature of KGNN is its scalability. The framework shows nearly linear speedup as the number of workers increases. As shown in the experimental results, increasing from 2 to 16 workers drastically reduces training time per epoch while maintaining stable predictive performance.

Scalability results on the FB15K dataset, showing linear reduction in training time as worker count increases without sacrificing performance.

Structural Insights

The researchers found that the optimal number of "hops" (neighborhood depth) is task-dependent, peaking at 2 hops for WN18 and 3 hops for FB15K. Excessive hops lead to over-smoothing, where unique node identities are lost. Additionally, the inductive nature of KGNN allows it to handle unseen entities by learning aggregation functions rather than static ID embeddings.

Conclusion

KGNN represents a significant step forward in making GNNs practical for large-scale knowledge representation. By combining neighborhood-aware encoding with relational decoding in a distributed framework, it overcomes the limitations of traditional KGE methods. Future work may explore more complex architectures like Graph Transformers and further optimizations in distributed sampling to handle even denser graph structures.

Summary updated

Abstract

Knowledge representation learning has been commonly adopted to incorporate knowledge graph (KG) into various online services. Although existing knowledge representation learning methods have achieved considerable performance improvement, they ignore high-order structure and abundant attribute information, resulting unsatisfactory performance on semantics-rich KGs. Moreover, they fail to make prediction in an inductive manner and cannot scale to large industrial graphs. To address these issues, we develop a novel framework called KGNN to take full advantage of knowledge data for representation learning in the distributed learning system. KGNN is equipped with GNN based encoder and knowledge aware decoder, which aim to jointly explore high-order structure and attribute information together in a fine-grained fashion and preserve the relation patterns in KGs, respectively. Extensive experiments on three datasets for link prediction and triplet classification task demonstrate the effectiveness and scalability of KGNN framework.
BibTeX
@misc{hu2022kgnn,
  author = {Binbin Hu and Zhiyang Hu and Zhiqiang Zhang and Jun Zhou and Chuan Shi},
  title = {{KGNN: Distributed Framework for Graph Neural Knowledge Representation}},
  year = {2022},
  eprint = {2205.08285},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.08285},
}
Figure