Deep Learning (DL) has achieved great success in many real applications. Despite its success, there are some main problems when deploying advanced DL models in database systems, such as hyper-parameters tuning, the risk of overfitting, and lack of prediction uncertainty. In this paper, we study cardinality estimation for SQL queries with a focus on uncertainty, which we believe is important in database systems when dealing with a large number of user queries on various applications. With uncertainty ensured, instead of trusting an estimator learned as it is, a query optimizer can explore other options when the estimator learned has a large variance, and it also becomes possible to update the estimator to improve its prediction in areas with high uncertainty. The approach we explore is different from the direction of deploying sophisticated DL models in database systems to build cardinality estimators. We employ Bayesian deep learning (BDL), which serves as a bridge between Bayesian inference and deep learning.The prediction distribution by BDL provides principled uncertainty calibration for the prediction. In addition, when the network width of a BDL model goes to infinity, the model performs equivalent to Gaussian Process (GP). This special class of BDL, known as Neural Network Gaussian Process (NNGP), inherits the advantages of Bayesian approach while keeping universal approximation of neural network, and can utilize a much larger model space to model distribution-free data as a nonparametric model. We show that our uncertainty-aware NNGP estimator achieves high accuracy, can be built very fast, and is robust to query workload shift, in our extensive performance studies by comparing with the existing approaches.
翻译:深奥( DL) 在许多真实应用中取得了巨大的成功。 尽管它取得了成功, 在数据库系统中部署先进的 DL 模型时, 在使用高参数调、 超装风险、 缺乏预测不确定性等数据库系统中存在一些主要问题。 在本文件中, 我们研究SQL 查询的基度估计, 重点是不确定性, 我们认为, 在数据库系统中处理大量用户对各种应用的询问时, 这一点在数据库系统中很重要。 不确定性得到了确保, 而不是信任一个自由的估算器, 一个查询优化器可以在估算器学习到的准确性差异很大时探索其他选项, 并且还有可能更新估算器, 以在高度不确定性的地区改进预测。 我们探索的方法不同于在数据库系统中部署精密的 DL 模型, 以建立基本性估测器。 我们使用贝氏深度的深度学习( Bayesian 模型推理和深度学习之间的桥梁) 。 BDL 预测方法的分布为预测提供了有原则性的不确定性的深度校正校准。 此外, 当网络宽度变的 NGPL 模型与我们所 的模型显示的精确性, 我们所认识的运行的模型, 可以进行这样的模型 。