Lune

VLDB2025Top-tier venue

A Practical Theory of Generalization in Selectivity Learning

Peizhi Wu, Haoshu Xu, Ryan Marcus, Zack Ives

Abstract

Query-driven machine learning models have emerged as a promising estimation technique for query selectivities. Yet, surprisingly little is known about the efficacy of these techniques from a theoretical perspective, as there exist substantial gaps between practical solutions and state-of-the-art (SOTA) theory based on the Probably Approximately Correct (PAC) learning framework. In this paper, we aim to bridge the gaps between theory and practice. First, we demonstrate that selectivity predictors induced by signed measures are learnable, which relaxes the reliance on probability measures in SOTA theory. More importantly, beyond the PAC learning framework (which only allows us to characterize how the model behaves when both training and test workloads are drawn from the same distribution), we establish, under mild assumptions, that selectivity predictors from this class exhibit favorable out-of-distribution (OOD) generalization error bounds.

These theoretical advances provide us with a better understanding of both the in-distribution and OOD generalization capabilities of query-driven selectivity learning, and facilitate the design of two general strategies to improve OOD generalization for existing query-driven selectivity models. We empirically verify that our techniques help query-driven selectivity models generalize significantly better to OOD queries both in terms of prediction accuracy and query latency performance, while maintaining their superior in-distribution generalization performance.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • BaCon: Efficient Batch Processing of Counting Queries cites Flow-Loss: Learning Cardinality Estimates That Matter
  • BaCon: Efficient Batch Processing of Counting Queries cites Data-Agnostic Cardinality Learning from Imperfect Workloads
  • DeepDB: Learn from Data, not from Queries! cites An End-to-End Learning-based Cost Estimator
  • Flow-Loss: Learning Cardinality Estimates That Matter cites An End-to-End Learning-based Cost Estimator
  • Flow-Loss: Learning Cardinality Estimates That Matter cites NeuroCard: One Cardinality Estimator for All Tables
  • NeuroCard: One Cardinality Estimator for All Tables cites An End-to-End Learning-based Cost Estimator
  • TATA: An Efficient Framework for Task Transfer in Query Plan Representation cites An End-to-End Learning-based Cost Estimator
  • TATA: An Efficient Framework for Task Transfer in Query Plan Representation cites Flow-Loss: Learning Cardinality Estimates That Matter
  • Data-Agnostic Cardinality Learning from Imperfect Workloads cites DeepDB: Learn from Data, not from Queries!
  • Data-Agnostic Cardinality Learning from Imperfect Workloads cites Flow-Loss: Learning Cardinality Estimates That Matter
  • Data-Agnostic Cardinality Learning from Imperfect Workloads cites NeuroCard: One Cardinality Estimator for All Tables
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Data-Agnostic Cardinality Learning from Imperfect WorkloadsPeizhi Wu, Rong Kang, Tieying Zhang, Jianjun Chen et al.VLDB 2025 · 1 citation
  2. BaCon: Efficient Batch Processing of Counting QueriesYuxi Liu, Xiao Hu, Pankaj K. Agarwal, Jun YangVLDB 2026
  3. TATA: An Efficient Framework for Task Transfer in Query Plan RepresentationYue Zhao, Songsong Mo, Gao CongVLDB 2026

Builds on23

  1. An End-to-End Learning-based Cost EstimatorJi Sun, Guoliang LiVLDB 2020 · 251 citations
  2. DeepDB: Learn from Data, not from Queries!Benjamin Hilprecht, Andreas Schmidt, Moritz Kulessa, Alejandro Molina et al.VLDB 2020 · 154 citations
  3. NeuroCard: One Cardinality Estimator for All TablesZongheng Yang, Amog Kamsetty, Sifei Luan, Eric Liang et al.VLDB 2021 · 138 citations
  4. Certified Monotonic Neural NetworksXingchao Liu, Xing Han, Na Zhang, Qiang LiuNeurIPS 2020 · 116 citations
  5. Flow-Loss: Learning Cardinality Estimates That MatterParimarjan Negi, Ryan Marcus, Andreas Kipf, Hongzi Mao et al.VLDB 2021 · 102 citations

Related papers

  1. QuickSel: Quick Selectivity Learning with Mixture ModelsYongjoo Park, Shucheng Zhong, Barzan MozafariSIGMOD 2020 · 66 citations
  2. Efficiently Approximating Selectivity Functions using Low Overhead Regression ModelsAnshuman Dutt, Chi Wang, Vivek R. Narasayya, Surajit ChaudhuriVLDB 2020 · 45 citations
  3. Selectivity Functions of Range Queries are LearnableXiao Hu, Yuxi Liu, Haibo Xiu, Pankaj K. Agarwal et al.SIGMOD 2022 · 11 citations
  4. Theoretical Analysis of Learned Database Operations under Distribution Shift through Distribution LearnabilitySepanta Zeighami, Cyrus ShahabiICML 2024 · 5 citations
  5. Leveraging Query Logs and Machine Learning for Parametric Query OptimizationKapil Vaidya, Anshuman Dutt, Vivek R. Narasayya, Surajit ChaudhuriVLDB 2022 · 20 citations
Dusk over the sea between two cliffs drawn in fine vertical lines