PLM4NDV: Minimizing Data Access for Number of Distinct Values Estimation with Pre-trained Language Models

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Xu, Xianghong, He, Xiao, Zhang, Tieying, Zhang, Lei, Shi, Rui, Chen, Jianjun
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866913769945300992
author Xu, Xianghong
He, Xiao
Zhang, Tieying
Zhang, Lei
Shi, Rui
Chen, Jianjun
author_facet Xu, Xianghong
He, Xiao
Zhang, Tieying
Zhang, Lei
Shi, Rui
Chen, Jianjun
contents Number of Distinct Values (NDV) estimation of a multiset/column is a basis for many data management tasks, especially within databases. Despite decades of research, most existing methods require either a significant amount of samples through uniform random sampling or access to the entire column to produce estimates, leading to substantial data access costs and potentially ineffective estimations in scenarios with limited data access. In this paper, we propose leveraging semantic information, i.e., schema, to address these challenges. The schema contains rich semantic information that can benefit the NDV estimation. To this end, we propose PLM4NDV, a learned method incorporating Pre-trained Language Models (PLMs) to extract semantic schema information for NDV estimation. Specifically, PLM4NDV leverages the semantics of the target column and the corresponding table to gain a comprehensive understanding of the column's meaning. By using the semantics, PLM4NDV reduces data access costs, provides accurate NDV estimation, and can even operate effectively without any data access. Extensive experiments on a large-scale real-world dataset demonstrate the superiority of PLM4NDV over baseline methods. Our code is available at https://github.com/bytedance/plm4ndv.
format Preprint
id arxiv_https___arxiv_org_abs_2504_00608
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle PLM4NDV: Minimizing Data Access for Number of Distinct Values Estimation with Pre-trained Language Models
Xu, Xianghong
He, Xiao
Zhang, Tieying
Zhang, Lei
Shi, Rui
Chen, Jianjun
Databases
Artificial Intelligence
Number of Distinct Values (NDV) estimation of a multiset/column is a basis for many data management tasks, especially within databases. Despite decades of research, most existing methods require either a significant amount of samples through uniform random sampling or access to the entire column to produce estimates, leading to substantial data access costs and potentially ineffective estimations in scenarios with limited data access. In this paper, we propose leveraging semantic information, i.e., schema, to address these challenges. The schema contains rich semantic information that can benefit the NDV estimation. To this end, we propose PLM4NDV, a learned method incorporating Pre-trained Language Models (PLMs) to extract semantic schema information for NDV estimation. Specifically, PLM4NDV leverages the semantics of the target column and the corresponding table to gain a comprehensive understanding of the column's meaning. By using the semantics, PLM4NDV reduces data access costs, provides accurate NDV estimation, and can even operate effectively without any data access. Extensive experiments on a large-scale real-world dataset demonstrate the superiority of PLM4NDV over baseline methods. Our code is available at https://github.com/bytedance/plm4ndv.
title PLM4NDV: Minimizing Data Access for Number of Distinct Values Estimation with Pre-trained Language Models
topic Databases
Artificial Intelligence
url https://arxiv.org/abs/2504.00608