๐ค AI Summary
Efficiently estimating tuple contributions via Shapley values in relational databases is challenging due to the exponential enumeration of permutations or subsets required for exact computation.
Method: This paper proposes Relational Stratified Sampling (RSS) and its adaptive variant (ARSS). RSS constructs a joint-aware hierarchical structure based on tuple-count vectors across relations, integrating adaptive budget allocation and compiled view reuse to jointly reduce estimation variance and query evaluation cost.
Contribution/Results: Experiments on TPC-H multi-table join and aggregation queries show that, under fixed total sample size, RSS and ARSS reduce average estimation error and variance by 30โ50% compared to standard Monte Carlo sampling and size-based stratification, while improving stability. Crucially, this work is the first to explicitly incorporate relational algebraic structure into Shapley value sampling designโenabling simultaneous optimization of accuracy, efficiency, and scalability.
๐ Abstract
Shapley-like values, including the Shapley and Banzhaf values, provide a principled way to quantify how individual tuples contribute to a query result. Their exact computation, however, is intractable because it requires aggregating marginal contributions over exponentially many permutations or subsets. While sampling-based estimators have been studied in cooperative game theory, their direct use for relational query answering remains underexplored and often ignores the structure of schemas and joins.
We study tuple-level attribution for relational queries through sampling and introduce Relation-Stratified Sampling (RSS). Instead of stratifying coalitions only by size, RSS partitions the sample space by a relation-wise count vector that records how many tuples are drawn from each relation. This join-aware stratification concentrates samples on structurally valid and informative coalitions and avoids strata that cannot satisfy query conditions. We further develop an adaptive variant, ARSS, that reallocates budget across strata using variance estimates obtained during sampling, improving estimator efficiency without increasing the total number of samples. We analyze these estimators, describe a practical implementation that reuses compiled views to reduce per-sample query cost, and evaluate them on TPCH workloads.
Across diverse queries with multi-relation joins and aggregates, RSS and ARSS consistently outperform classical Monte Carlo (MCS) and size-based Stratified Sampling (SS), yielding lower error and variance with fewer samples. An ablation shows that relation-aware stratification and adaptive allocation contribute complementary gains, making ARSS a simple, effective, and anytime estimator for database-centric Shapley attribution.