Learned Cardinality Estimation for Similarity Queries
Ji Sun, Guoliang Li, Nan Tang
Abstract
In this paper, we study the problem of using deep neural networks (DNNs) for estimating the cardinality of similarity queries. Intuitively, DNNs can capture the distribution of data points, and learn to predict the number of data points that are similar to one data point (a similarity search) or a set of data points (a similarity join). However, DNNs are data hungry; directly training a DNN often results in poor performance. We propose two strategies to improve the accuracy and reduce the size of training data: query segmentation and data segmentation. Query segmentation divides a query into query segments, trains a neural network for each query segment, and combines their outputs with subsequent DNNs to get the query embedding. Data segmentation groups similar data into data segments, train a local-model for each data segment, and learn a global-model to decide which local-models should be used for a given query. The estimates from selected local-models will be summed up as the final estimate.We also extend our model to support similarity joins, which trains a DNN to directly estimate the cumulative sum of objects that are similar to a set of queries. Experiments show that our methods can efficiently (i.e., with small training data) learn to estimate the cardinality of similarity searches/joins, and yield effective estimates (i.e., close to real cardinalities).
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 653d5d0a-ef96-4075-8765-1b5bc9581667Cited by top-tier papers16
- A Learned Query Rewrite System using Monte Carlo Tree SearchXuanhe Zhou, Guoliang Li, Chengliang Chai, Jianhua FengVLDB 2022 · 85 citations
- CARMI: A Cache-Aware Learned Index with a Cost-based Construction AlgorithmJiaoyi Zhang, Yihan GaoVLDB 2022 · 42 citations
- Fine-Grained Modeling and Optimization for Intelligent Resource Management in Big Data ProcessingChenghao Lyu, Qi Fan, Fei Song, Arnab Sinha et al.VLDB 2022 · 14 citations
- Selectivity Functions of Range Queries are LearnableXiao Hu, Yuxi Liu, Haibo Xiu, Pankaj K. Agarwal et al.SIGMOD 2022 · 11 citations
- PerfGuard: Deploying ML-for-Systems without Performance Regressions, Almost!H. M. Sajjad Hossain, Marc T. Friedman, Hiren Patel, Shi Qiao et al.VLDB 2021 · 10 citations
Related papers
- Cardinality Estimation of Approximate Substring Queries using Deep LearningSuyong Kwon, Woohwan Jung, Kyuseok ShimVLDB 2022 · 10 citations
- Monotonic Cardinality Estimation of Similarity Selection: A Deep Learning ApproachYaoshu Wang, Chuan Xiao, Jianbin Qin, Xin Cao et al.SIGMOD 2020 · 19 citations
- Sample-Efficient Cardinality Estimation Using Geometric Deep LearningSilvan Reiner, Michael GrossniklausVLDB 2024 · 20 citations
- Cardinality Estimation of LIKE Predicate Queries using Deep LearningSuyong Kwon, Kyuseok Shim, Woohwan JungSIGMOD 2025 · 3 citations
- Deep Learning Models for Selectivity Estimation of Multi-Attribute QueriesShohedul Hasan, Saravanan Thirumuruganathan, Jees Augustine, Nick Koudas et al.SIGMOD 2020 · 101 citations
