Cardinality Estimation over Knowledge Graphs with Embeddings and Graph Neural Networks

Tim Schwabe, Maribel Acosta
3/2/2023
cs.DBcs.AIcs.LG

No official code found. Best implementation: DE-TUM/GNCE (7 stars, last commit 2026-04-18).

Abstract

Cardinality Estimation over Knowledge Graphs (KG) is crucial for query optimization, yet remains a challenging task due to the semi-structured nature and complex correlations of typical Knowledge Graphs. In this work, we propose GNCE, a novel approach that leverages knowledge graph embeddings and Graph Neural Networks (GNN) to accurately predict the cardinality of conjunctive queries. GNCE first creates semantically meaningful embeddings for all entities in the KG, which are then integrated into the given query, which is processed by a GNN to estimate the cardinality of the query. We evaluate GNCE on several KGs in terms of q-Error and demonstrate that it outperforms state-of-the-art approaches based on sampling, summaries, and (machine) learning in terms of estimation accuracy while also having lower execution time and less parameters. Additionally, we show that GNCE can inductively generalise to unseen entities, making it suitable for use in dynamic query processing scenarios. Our proposed approach has the potential to significantly improve query optimization and related applications that rely on accurate cardinality estimates of conjunctive queries.

View on arXivView PDF

Code Implementations(1)

DE-TUM/GNCECommunity100%

Machine Learning method to predict the cardinality of conjunctive queries over knowledge graphs.

75Python, Jupyter NotebookJan 3, 20246 months ago

Similar Papers

Cite this paper

@article{schwabe2023cardinality,
  title  = {Cardinality Estimation over Knowledge Graphs with Embeddings and Graph Neural Networks},
  author = {Tim Schwabe and Maribel Acosta},
  year   = {2023},
  eprint = {2303.01140},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2303.01140v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.01140.svg)](https://codeofpaper.com/paper/2303.01140)

Discussion