Skip to main content
QUICK REVIEW

[论文解读] Multi-Attribute Selectivity Estimation Using Deep Learning

Shohedul Hasan, Saravanan Thirumuruganathan|arXiv (Cornell University)|Mar 24, 2019
Data Quality and Management参考文献 43被引用 20
一句话总结

本文提出了两种基于深度学习的多属性选择性估计方法:一种是使用自回归流进行无监督神经密度估计的框架,另一种是利用查询特征和真实选择性标签的监督学习方法。两种方法均在空间开销极低的情况下实现了高精度,显著优于传统直方图和采样技术,尤其在复杂、高选择性或低选择性查询中表现突出。

ABSTRACT

Selectivity estimation - the problem of estimating the result size of queries - is a fundamental problem in databases. Accurate estimation of query selectivity involving multiple correlated attributes is especially challenging. Poor cardinality estimates could result in the selection of bad plans by the query optimizer. We investigate the feasibility of using deep learning based approaches for both point and range queries and propose two complementary approaches. Our first approach considers selectivity as an unsupervised deep density estimation problem. We successfully introduce techniques from neural density estimation for this purpose. The key idea is to decompose the joint distribution into a set of tractable conditional probability distributions such that they satisfy the autoregressive property. Our second approach formulates selectivity estimation as a supervised deep learning problem that predicts the selectivity of a given query. We also introduce and address a number of practical challenges arising when adapting deep learning for relational data. These include query/data featurization, incorporating query workload information in a deep learning framework and the dynamic scenario where both data and workload queries could be updated. Our extensive experiments with a special emphasis on queries with a large number of predicates and/or small result sizes demonstrates that our proposed techniques provide fast and accurate selective estimates with minimal space overhead.

研究动机与目标

  • 解决在涉及多个相关属性时,数据库中准确选择性估计的挑战。
  • 探索深度学习是否能够有效建模关系数据中属性之间的复杂非线性相关性。
  • 设计轻量级、快速且可扩展的深度学习模型,适用于具有增量数据和查询更新的动态数据库工作负载。
  • 将函数依赖等领域知识以及查询工作负载模式集成到深度学习模型中,以提升估计性能。
  • 在具有高维、相关属性和复杂查询工作负载的真实数据集上,评估深度学习模型的性能。

提出的方法

  • 将选择性估计建模为使用自回归流的无监督深度密度估计问题,通过分解联合分布为可处理的条件概率。
  • 使用单一深度神经网络学习每个条件分布的参数,利用自回归特性建模属性之间的依赖关系。
  • 引入多种随机属性排序的混合模型,以降低对排序的敏感性并提升泛化能力。
  • 在监督学习中,构建一个基于查询特征和从查询日志中提取的真实选择性值训练的深度学习模型。
  • 采用查询特征化技术,包括独热编码和二进制编码,实证验证表明二进制编码在高选择性域上表现更优。
  • 将函数依赖等领域知识融入模型,用于过滤和引导属性排序,从而提升模型精度。

实验结果

研究问题

  • RQ1深度学习能否有效建模关系数据中复杂的多属性相关性,以实现选择性估计?
  • RQ2神经密度估计中的自回归结构相比传统直方图或采样方法,在准确率方面有何提升?
  • RQ3基于查询日志训练的监督深度学习模型,在面对具有高维谓词的未见查询时,其泛化能力如何?
  • RQ4不同的数据编码方案(独热编码 vs. 二进制编码)对高选择性属性上的模型性能有何影响?
  • RQ5注入函数依赖等领域知识能否提升基于深度学习的选择性估计器的鲁棒性和准确性?

主要发现

  • 无监督深度密度估计方法通过自回归流建模联合分布,实现了高精度,显著降低了多属性查询中的误差。
  • 监督深度学习模型在选择性低于1%的查询中,中位数q-error仍低于2,表明其在低选择性情况下的强大泛化能力。
  • 在IMDB等高选择性数据集上,属性的二进制编码优于独热编码,尤其当域基数达到数万时表现更优。
  • 在混合模型中使用1至5种随机属性排序可获得最佳性能,更高数量会增加出现较差排序的风险。
  • 通过函数依赖过滤和引导属性排序,显著提升了估计精度,验证了引入领域知识的价值。
  • 使用q-error作为损失函数训练的监督模型,显著优于使用MSE的模型,证实直接优化q-error能带来更优的实际效果。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。