Fully Inductive Cardinality Estimation

📅 2026-07-30
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work proposes FICE, the first fully inductive cardinality estimator for SPARQL basic graph patterns, addressing the limited generalizability of existing transductive learning-based approaches to unseen knowledge graphs or novel relations. FICE leverages a graph neural network to encode a factor graph representation of the knowledge graph and decodes along the query join topology. Its key innovations include theoretically establishing that cardinality is a local function of the two-hop neighborhood of bound variables, which informs a tailored local message-passing mechanism; decoupling embedding generation from cardinality decoding to achieve sub-millisecond latency; and enabling zero-shot generalization to knowledge graphs containing entirely new entities and relations without retraining. Experiments across ten diverse knowledge graphs demonstrate that FICE reduces the median q-error from 13.54 (best baseline) to 5.34 and significantly outperforms all competing methods in tail error.
📝 Abstract
Query optimization of Basic Graph Patterns (BGP) SPARQL queries over Knowledge Graphs (KG) requires accurate cardinality estimation. Recently published learned estimators outperform statistics- and sampling-based approaches, but share a limitation preventing their adoption in real-world triplestores: they are transductive and require retraining when the underlying graph changes or when applied to new graphs. We present FICE (Fully Inductive Cardinality Estimation), the first learned cardinality estimator for BGP queries over KGs that generalizes to entirely unseen graphs (including unseen relations), without any retraining. FICE is a graph neural network (GNN) with two coupled components. First, an encoder GNN over a factor-graph view of the KG produces entity and relation embeddings. We prove that BGP cardinality is a local function of the 2-hop neighborhood around bound terms in this view, motivating the local message-passing encoder. A decoder GNN then composes these embeddings along the join topology of the query to predict log-cardinality. The encoder and decoder are trained jointly, making the embeddings specialized for cardinality estimation. FICE is trained using neighborhood sampling to scale to KGs with millions of triples, and decouples embedding generation from cardinality decoding to enable estimation latency below a millisecond. Compared to learned and non-learned baselines over 10 KGs, FICE reduces the overall median q-error from 13.54 (for the best competitor) to 5.34 and dominates all approaches in tail behavior.
Problem

Research questions and friction points this paper is trying to address.

cardinality estimation
knowledge graphs
query optimization
inductive learning
SPARQL
Innovation

Methods, ideas, or system contributions that make the work stand out.

Fully Inductive
Cardinality Estimation
Graph Neural Network
Knowledge Graph
Query Optimization
🔎 Similar Papers
No similar papers found.