GNCE
GNCE is a graph neural network that estimates the cardinality of conjunctive queries over knowledge graphs.
Graphs and geometry · 63 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Graphs and geometry
- Parameters
- 122.5K
- Operations
- 63
- Framework
- PyTorch
- Recurrent
- No
- Published
- Proceedings of the ACM on Management of Data (SIGMOD 2024)
- Cited by
- 17 (as of 29 October 2026)
- Authors
- Tim Schwabe, Maribel Acosta
- Source
- GitHub: DE-TUM/GNCE
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m16913
- Graph hash
- 833442f47bbfae397db97b7408954b315c71664e53b499e5f94e2d7d700d6787
- Skeleton hash
- fdd68a9a395d13009ff519ab49e320a9b4e06e526d59ff214bd26d70dc5ce851
- Architecture hash
- 22ca7d3ccaecad228cbce6821cd99a65b17695595b65955b1cf79e5a961316cf
- Diagram SHA-256
- bfb5cb3b5ba9b3eed0a324276dbf03795571bac72eebcbcb9e2ed23b0c028763
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
GNCE (Graph Neural Cardinality Estimation) predicts the cardinality of conjunctive queries over knowledge graphs (KGs). Cardinality is the number of answers a query produces, an estimate that query engines use when optimizing execution. The model pairs a graph neural network (GNN), applied to the query graph, with knowledge graph embeddings that give the query's elements semantically meaningful features.
The embeddings come from RDF2Vec and are learned before the cardinality model is trained, after which they stay fixed. For a bound atom of the query, the input feature concatenates its embedding with its calculated occurrence. Two message passing layers follow, using a custom function the authors call TPN Message Passing, a modification of GINECONV. Unlike GINECONV, it distinguishes incoming from outgoing edges, since the direction of an edge can matter for cardinality. The node representations are then summed into one vector, which a final 2-layer MLP maps to a single value. That value is trained against the logarithm of the true cardinality, which the paper says stabilizes training.
The paper found that using more than two message passing layers does not improve performance. Among the learning-based approaches it compares, GNCE has the lowest number of parameters, 18x fewer than LSS.
Key idea. GNCE estimates query cardinality over knowledge graphs by combining knowledge graph embeddings of the query's elements with a graph neural network whose message passing distinguishes edge direction.
- GNCE
- Graph Neural Cardinality Estimation
- cardinality estimation
- knowledge graph
- SPARQL
- conjunctive queries
- query optimization
- graph neural network
- knowledge graph embeddings
- RDF2Vec
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{schwabe2024cardinalityestimationknowledgegraphs,
title={Cardinality Estimation over Knowledge Graphs with Embeddings and Graph Neural Networks},
author={Tim Schwabe and Maribel Acosta},
year={2024},
eprint={2303.01140},
archivePrefix={arXiv},
primaryClass={cs.DB},
doi={https://doi.org/10.1145/3639299},
url={https://arxiv.org/abs/2303.01140},
}