arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2202.02800cs.LGcs.DB
收藏

学习成为统计学家:不同值个数的学习估计

Learning to be a Statistician: Learned Estimator for Number of Distinct Values

Georgia Institute of Technology(佐治亚理工学院);Alibaba Group(阿里巴巴集团);Renmin University of China(中国人民大学)

Renzhi Wu, Bolin Ding, Xu Chu, Zhewei Wei, Xiening Dai, Tao Guan, Jingren Zhou

摘要:

估计列中的非重复值(NDV)的数量对于数据库系统中的许多任务都很有用,例如列存储压缩和数据分析。在这项工作中,我们专注于如何从随机(在线/离线)样本中获得准确的NDV估计。这种有效的估计对于即使扫描一次数据也是禁止的任务是至关重要的。现有的基于样本的估计器通常依赖于统计学或假设,并且在不同的数据集上没有稳健的性能,因为对数据的假设很容易被打破。另一方面,由于公式的复杂结构,从诸如最大似然估计的原则公式导出估计量是非常具有挑战性的。我们建议在监督学习框架中制定NDV估计任务,并旨在学习模型作为估计器。为此,我们需要回答几个问题:i)如何使学习的模型工作负载不可知; ii)如何获得训练数据; iii)如何执行模型训练。我们推导出学习框架的条件,在该条件下,学习模型是工作负载不可知的,在这个意义上,模型/估计器可以用合成生成的训练数据进行训练,然后简单地部署到任何数据仓库中,例如,用户定义函数(UDF),为不可见的表和工作负载提供高效(在CPU上的微秒内)和准确的NDV估计。我们将学习估计器与最先进的基于样本的估计器在九个真实世界的数据集上进行比较,以证明其优越的估计精度。我们在线发布了用于训练数据生成、模型训练和学习估计器的代码,以实现可重复性。

英文摘要:

Estimating the number of distinct values (NDV) in a column is useful for many tasks in database systems, such as columnstore compression and data profiling. In this work, we focus on how to derive accurate NDV estimations from random (online/offline) samples. Such efficient estimation is critical for tasks where it is prohibitive to scan the data even once. Existing sample-based estimators typically rely on heuristics or assumptions and do not have robust performance across different datasets as the assumptions on data can easily break. On the other hand, deriving an estimator from a principled formulation such as maximum likelihood estimation is very challenging due to the complex structure of the formulation. We propose to formulate the NDV estimation task in a supervised learning framework, and aim to learn a model as the estimator. To this end, we need to answer several questions: i) how to make the learned model workload agnostic; ii) how to obtain training data; iii) how to perform model training. We derive conditions of the learning framework under which the learned model is workload agnostic, in the sense that the model/estimator can be trained with synthetically generated training data, and then deployed into any data warehouse simply as, e.g., user-defined functions (UDFs), to offer efficient (within microseconds on CPU) and accurate NDV estimations for unseen tables and workloads. We compare the learned estimator with the state-of-the-art sample-based estimators on nine real-world datasets to demonstrate its superior estimation accuracy. We publish our code for training data generation, model training, and the learned estimator online for reproducibility.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑