Lune

VLDB2025Top-tier venue

Conformal Prediction for Verifiable Learned Query Optimization

Hanwen Liu, Shashank Giridhara, Ibrahim Sabek

Abstract

Query optimization is critical in relational databases. Recently, numerous Learned Query Optimizers (LQOs) have been proposed, demonstrating superior performance over traditional hand-crafted query optimizers after short training periods. However, the opacity and instability of machine learning models have limited their practical applications. To address this issue, we are the first to formulate the LQO verification as a Conformal Prediction (CP) problem. We first construct CP model and obtain user-controlled bounded ranges for the actual latency of LQO plans before execution. Then, we introduce CP-based runtime verification along with violation handling to ensure performance prior to execution. For both scenarios, we further extend our framework to handle distribution shifts in the dynamic environment using adaptive CP approaches. Finally, we present CP-guided plan search, which uses actual latency upper bounds from CP to heuristically guide query plan construction. We integrate our verification framework into three LQOs (Balsa, Lero, and RTOS) and conducted evaluations on the JOB and TPC-H workloads. Experimental results demonstrate that our method is both accurate and efficient. Our CP-based approaches achieve tight upper bounds, reliably detect and handle violations. Adaptive 𝐶𝑃 maintains accurate confidence levels even in the presence of distribution shifts, and the CP-guided plan search improves both query plan quality (up to 9.84x) and planning time, with a reduction of up to 74.4% for a single query and 9.96% across all test queries from trained LQOs.

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.

1 top-tier paper has 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

  • ConRAD: Conformal Risk-Aware Neural Databases cites Adaptive Conformal Inference Under Distribution Shift
  • Bao: Making Learned Query Optimization Practical cites An End-to-End Learning-based Cost Estimator
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. ConRAD: Conformal Risk-Aware Neural DatabasesSonia Horchidan, Fabian Zeiher, Xiangyu Shi, Vasiliki Kalavri et al.VLDB 2026

Builds on18

  1. Adaptive Conformal Inference Under Distribution ShiftIsaac Gibbs, Emmanuel J. CandèsNeurIPS 2021 · 665 citations
  2. Simple and Principled Uncertainty Estimation with Deterministic Deep Learning via Distance AwarenessJeremiah Z. Liu, Zi Lin, Shreyas Padhy, Dustin Tran et al.NeurIPS 2020 · 604 citations
  3. An End-to-End Learning-based Cost EstimatorJi Sun, Guoliang LiVLDB 2020 · 251 citations
  4. Bao: Making Learned Query Optimization PracticalRyan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul et al.SIGMOD 2021 · 242 citations
  5. Conformal Time-series ForecastingKamile Stankeviciute, Ahmed M. Alaa, Mihaela van der SchaarNeurIPS 2021 · 233 citations

Related papers

  1. Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan SelectionXiang Yu, Chengliang Chai, Guoliang Li, Jiabin LiuVLDB 2022 · 82 citations
  2. Lero: A Learning-to-Rank Query OptimizerRong Zhu, Wei Chen, Bolin Ding, Xingguang Chen et al.VLDB 2023 · 102 citations
  3. APQO: An Adaptive Framework for Parametric Query OptimizationSijia Li, Peng Cai, Zhifan Zhang, Huiqi Hu et al.SIGMOD 2026 · 2 citations
  4. Divo: Learning a Stable and Effective Query Optimizer with a Diverse WorkloadTianyi Chen, Jun Gao, Yaofeng Tu, Yang Lin et al.SIGMOD 2026 · 1 citation
  5. How Good are Learned Cost Models, Really? Insights from Query Optimization TasksRoman Heinrich, Manisha Luthra, Johannes Wehrstein, Harald Kornmayer et al.SIGMOD 2025 · 13 citations
Dusk over the sea between two cliffs drawn in fine vertical lines