The University of Western Ontario
Relation-Stratified Sampling for Shapley Values Estimation in Relational Databases
Abstract
dc:description.abstractShapley-like values, such as the Shapley and Banzhaf values, offer a principled framework for quantifying the contribution of individual database tuples to query results. While these values provide a rigorous foundation for record-level attribution and explanation, their exact computation is intractable due to the exponential number of permutations or subsets over which marginal contributions must be aggregated. Although sampling-based estimation techniques for Shapley-like values have been extensively studied in cooperative game theory and related fields, their application to database query answering remains largely unexplored. In this work, we investigate how such techniques can be adapted for approximating Shapley-like values in databases. We formalize and analyze standard methods such as Monte Carlo sampling (MCS) and classical Stratified Sampling (SS), and evaluate their behavior across diverse query types and data characteristics. Our main contribution is the introduction of Relation-Stratified sampling (RSS), a novel stratification strategy that partitions the sample space based on the number of tuples selected from each relation involved in the query. This stratification captures structural information from the schema and query, enabling more efficient sample allocation. In particular, many strata may never satisfy query conditions—especially join conditions—making them less informative. We show that combining relation-aware stratification with adaptive sample allocation allows the sampling budget to be focused on informative strata, significantly improving convergence and reducing sample complexity. We also introduce practical optimizations that leverage common join patterns to reduce the number of strata and improve efficiency. Through extensive experiments on benchmark workloads, including the TPC-H dataset, we show that RSS and Adaptive Relation-Stratified sampling (ARSS) ,which applies adaptive sample allocation, consistently outperform existing sampling schemes, achieving higher accuracy with fewer samples and lower variance.
Degree
thesis:*- Name thesis:degree_name
- M Sc
- Discipline thesis:degree_discipline
- Computer Science
- Grantor dc:publisher
- The University of Western Ontario
- Year dc:date.issued
- 2025
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Alizad, Amirhossein
- Advisor dc:contributor.advisor
-
- Milani, Mostafa
Subjects
dc:subject × 9Rights
- Language dc:language.iso
- en
Identifiers
dc:identifier.*- Handle dc:identifier.uri
- https://hdl.handle.net/20.500.14721/38591