UniHR: Hierarchical Representation Learning for Unified Knowledge Graph Link Prediction

Zhiqiang Liu, Mingyang Chen, Yin Hua, Zhuo Chen, Ziqi Liu, Lei Liang, Huajun Chen, Wen Zhang

TL;DR

This paper introduces UniHR, a novel framework for knowledge graph link prediction that unifies diverse fact types (hyper-relational, temporal, and nested) into a single representation. By learning hierarchical representations both within and between facts, UniHR achieves state-of-the-art performance across multiple KG types, paving the way for more generalized and powerful knowledge graph models.

What Problem Does This Paper Address?

Knowledge graphs (KGs) are increasingly complex, moving beyond simple (head, relation, tail) triples to include richer fact types. These include:

  • Hyper-relational facts: Facts with auxiliary key-value pairs (e.g., "Oppenheimer educated at Harvard University, degree: bachelor, major: chemistry").
  • Temporal facts: Facts with associated timestamps (e.g., "Oppenheimer honored with Fermi Prize, 1963").
  • Nested facts: Facts that imply relationships between other facts (e.g., "Oppenheimer born in New York, implying Oppenheimer nationality is The United States").

While these richer representations are crucial for modeling real-world complexity, existing link prediction models are typically specialized for only one type of fact. This fragmentation limits their applicability and prevents them from leveraging the full spectrum of information present in modern KGs. Furthermore, effectively modeling the hierarchical relationships within and between these complex facts has been a significant challenge.

Methods

UniHR tackles this problem with a two-module framework:

  1. Hierarchical Data Representation (HiDR) Module: This module acts as a universal translator, converting various beyond-triple fact types (hyper-relational, temporal, nested) into a standardized, triple-based representation. This is achieved by introducing new node types (e.g., fact nodes, relation nodes) and "connected relations" (like "has head entity," "has relation") to explicitly capture the hierarchical structure. This standardization allows UniHR to benefit from advancements in triple-based KG research while preserving all original semantic information.
  2. Hierarchical Structure Learning (HiSL) Module: This module acts as the graph encoder, processing the HiDR-formatted KGs. It employs a two-stage message-passing approach:
  3. Intra-fact Message Passing: Focuses on aggregating information within individual facts, enhancing the semantic understanding of each fact's components.
  4. Inter-fact Message Passing: Aggregates information across different facts, enriching the global structural understanding of the KG.

This hierarchical approach aims to capture both local fact semantics and global graph structure efficiently, without drastically increasing model parameters.

Datasets

The paper evaluates UniHR on a diverse set of datasets across different KG types:

  • Hyper-relational KGs (HKGs): WikiPeople, WD50K
  • Nested Factual KGs (NKGs): FBH, FBHE, DBHE
  • Temporal KGs (TKGs): wikidata12k
  • Hyper-relational Temporal KGs (HTKGs): WiKi-hy, YAGO-hy (newly introduced benchmarks)
  • Hybrid KG: wikimix (constructed by filtering Wikidata subsets)

Key Insights and Ideas

  • The Power of Unification: The core insight is that a unified representation for diverse fact types is not only feasible but also highly beneficial. By treating all facts through a common lens, models can generalize better and leverage complementary information across different fact types.
  • Hierarchical Modeling is Key: Effectively capturing the nested and inter-connected nature of complex facts requires hierarchical modeling. UniHR's intra-fact and inter-fact message passing explicitly addresses this, leading to richer embeddings.
  • Standardization Benefits: Translating complex facts into a triple-like structure (HiDR) allows UniHR to leverage existing KG embedding techniques and infrastructure, accelerating development and adoption.
  • Generalization Beyond Specific Tasks: UniHR's unified nature enables flexible extensions, such as joint learning across different KG types or tasks, demonstrating its potential for building more robust and versatile KG systems.

Key Results

  • State-of-the-Art Performance: UniHR achieves competitive or superior results across 9 datasets and 5 KG types, outperforming KG-specific models. For instance, on WD50K (HKG), UniHR shows significant improvements over StarE.
  • Improved Link Prediction: On HKGs, UniHR demonstrates effective capture of hierarchical fact information. For NKGs, it shows strong performance in capturing global structural information and heterogeneity. For TKGs, it achieves competitive results, highlighting the benefit of incorporating graph structure alongside temporal information.
  • Efficiency: Despite its advanced capabilities, UniHR does not significantly increase model parameters or runtime compared to existing methods, thanks to its efficient HiDR representation and subgraph sampling in HiSL.
  • Joint Learning Benefits: Experiments show that joint training on multiple KG types or tasks leads to performance improvements, reinforcing the value of the unified representation.

Limitations and Future Work

  • Computational Overhead of HiDR: While the paper claims minimal additional storage, the introduction of new nodes and relations in HiDR could potentially increase computational complexity for very large KGs, though HiSL's subgraph sampling mitigates this.
  • Generalization to More Complex Structures: While UniHR handles hyper-relational, temporal, and nested facts, the paper hints at future work in generalizing to even more complex compositional KGs and exploring its potential for transfer learning and pre-trained models across diverse KG types.
  • Decoder Flexibility: The paper explores using a Transformer decoder and ConvE for triple prediction, suggesting that further investigation into optimal decoders for the unified representation could yield even better results.

Summary updated

Abstract

Beyond-triple fact representations including hyper-relational facts with auxiliary key-value pairs, temporal facts with additional timestamps, and nested facts implying relationships between facts, are gaining significant attention. However, existing link prediction models are usually designed for one specific type of facts, making it difficult to generalize to other fact representations. To overcome this limitation, we propose a Unified Hierarchical Representation learning framework (UniHR) for unified knowledge graph link prediction. It consists of a unified Hierarchical Data Representation (HiDR) module and a unified Hierarchical Structure Learning (HiSL) module as graph encoder. The HiDR module unifies hyper-relational KGs, temporal KGs, and nested factual KGs into triple-based representations. Then HiSL incorporates intra-fact and inter-fact message passing, focusing on enhancing the semantic information within individual facts and enriching the structural information between facts. Experimental results across 7 datasets from 3 types of KGs demonstrate that our UniHR outperforms baselines designed for one specific kind of KG, indicating strong generalization capability of HiDR form and the effectiveness of HiSL module. Code and data are available at https://github.com/Lza12a/UniHR.
BibTeX
@misc{liu2024unihr,
  author = {Zhiqiang Liu and Mingyang Chen and Yin Hua and Zhuo Chen and Ziqi Liu and Lei Liang and Huajun Chen and Wen Zhang},
  title = {{UniHR: Hierarchical Representation Learning for Unified Knowledge Graph Link Prediction}},
  year = {2024},
  eprint = {2411.07019},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.07019},
}
Figure