PACE: Poisoning Attacks on Learned Cardinality Estimation
Jintao Zhang, Chao Zhang, Guoliang Li, Chengliang Chai
Abstract
Cardinality estimation (CE) plays a crucial role in database optimizer. We have witnessed the emergence of numerous learned CE models recently which can outperform traditional methods such as histograms and samplings. However, learned models also bring many security risks. For example, a query-driven learned CE model learns a query-to-cardinality mapping based on the historical workload. Such a learned model could be attacked by poisoning queries, which are crafted by malicious attackers and woven into the historical workload, leading to performance degradation of CE.
In this paper, we explore the potential security risks in learned CE and study a new problem of poisoning attacks on learned CE in a black-box setting. There are three challenges. First, the interior details of the CE model are hidden in the black-box setting, making it difficult to attack the model. Second, the attacked CE model's parameters will be updated with the poisoning queries, i.e., a variable varying with the optimization variable, so the problem cannot be modeled as a univariate optimization problem and thus is hard to solve by an efficient algorithm. Third, to make an imperceptible attack, it requires to generate poisoning queries that follow a similar distribution to historical workload. We propose a poisoning attack system, PACE, to address these challenges. To tackle the first challenge, we propose a method of speculating and training a surrogate model, which transforms the black-box attack into a near-white-box attack. To address the second challenge, we model the poisoning problem as a bivariate optimization problem, and design an effective and efficient algorithm to solve it. To overcome the third challenge, we propose an adversarial approach to train a poisoning query generator alongside an anomaly detector, ensuring that the poisoning queries follow similar distribution to historical workload. Experiments show that PACE reduces the accuracy of the learned CE models by 178×, leading to a 10× decrease in the end-to-end performance of the target database.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
7 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- AutoCE: An Accurate and Efficient Model Advisor for Learned Cardinality Estimation cites Learned Cardinality Estimation: A Design Space Exploration and A Comparative Evaluation
- AutoCE: An Accurate and Efficient Model Advisor for Learned Cardinality Estimation cites Are We Ready For Learned Cardinality Estimation?
- AutoCE: An Accurate and Efficient Model Advisor for Learned Cardinality Estimation cites Deep Unsupervised Cardinality Estimation
- AutoCE: An Accurate and Efficient Model Advisor for Learned Cardinality Estimation cites Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation
- AutoCE: An Accurate and Efficient Model Advisor for Learned Cardinality Estimation cites NeuroCard: One Cardinality Estimator for All Tables
- Learned Cardinality Estimation: A Design Space Exploration and A Comparative Evaluation cites Are We Ready For Learned Cardinality Estimation?
- Learned Cardinality Estimation: A Design Space Exploration and A Comparative Evaluation cites Deep Unsupervised Cardinality Estimation
- Learned Cardinality Estimation: A Design Space Exploration and A Comparative Evaluation cites NeuroCard: One Cardinality Estimator for All Tables
- Graph Transformers for Query Plan Representation: Potentials and Challenges cites Deep Unsupervised Cardinality Estimation
- Graph Transformers for Query Plan Representation: Potentials and Challenges cites NeuroCard: One Cardinality Estimator for All Tables
- Are We Ready For Learned Cardinality Estimation? cites Deep Unsupervised Cardinality Estimation
- Are We Ready For Learned Cardinality Estimation? cites NeuroCard: One Cardinality Estimator for All Tables
- SAGE: A Framework of Precise Retrieval for RAG cites AutoCE: An Accurate and Efficient Model Advisor for Learned Cardinality Estimation
- SAGE: A Framework of Precise Retrieval for RAG cites Learned Cardinality Estimation: A Design Space Exploration and A Comparative Evaluation
- Understanding Robustness Issues of Updatable Learned Indexes: [Experiments & Analysis] cites Are We Ready For Learned Cardinality Estimation?
- Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation cites Are We Ready For Learned Cardinality Estimation?
- Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation cites NeuroCard: One Cardinality Estimator for All Tables
- NeuroCard: One Cardinality Estimator for All Tables cites Deep Unsupervised Cardinality Estimation
Cited by top-tier papers7
- AutoCE: An Accurate and Efficient Model Advisor for Learned Cardinality EstimationJintao Zhang, Chao Zhang, Guoliang Li, Chengliang ChaiICDE 2023 · 13 citations
- SAGE: A Framework of Precise Retrieval for RAGJintao Zhang, Guoliang Li, Jinyang SuICDE 2025 · 9 citations
- Understanding Robustness Issues of Updatable Learned Indexes: [Experiments & Analysis]Yuanhui Luo, Minhui Xie, Yiheng Tong, Shichao Jiang et al.SIGMOD 2026 · 1 citation
- VisPoison: An Effective Backdoor Attack Framework for Tabular Data Visualization ModelsShuaimin Li, Chen Jason Zhang, Xuanang Chen, Anni Peng et al.ICDE 2026
- Graph Transformers for Query Plan Representation: Potentials and ChallengesChenghao Lyu, Guillaume Lachaud, Gabriel Lozano, Yanlei DiaoVLDB 2025
Builds on16
- Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu et al.VLDB 2020 · 206 citations
- Cardinality Estimation in DBMS: A Comprehensive Benchmark EvaluationYuxing Han, Ziniu Wu, Peizhi Wu, Rong Zhu et al.VLDB 2022 · 169 citations
- Are We Ready For Learned Cardinality Estimation?Xiaoying Wang, Changbo Qu, Weiyuan Wu, Jiannan Wang et al.VLDB 2021 · 156 citations
- NeuroCard: One Cardinality Estimator for All TablesZongheng Yang, Amog Kamsetty, Sifei Luan, Eric Liang et al.VLDB 2021 · 138 citations
- Learned Cardinality Estimation: A Design Space Exploration and A Comparative EvaluationJi Sun, Jintao Zhang, Zhaoyan Sun, Guoliang Li et al.VLDB 2022 · 90 citations
Related papers
- Warper: Efficiently Adapting Learned Cardinality Estimators to Data and Workload DriftsBeibin Li, Yao Lu, Srikanth KandulaSIGMOD 2022 · 29 citations
- Learned Cardinality Estimation: An In-depth StudyKyoungmin Kim, Jisung Jung, In Seo, Wook-Shin Han et al.SIGMOD 2022 · 51 citations
- Prediction Intervals for Learned Cardinality Estimation: An Experimental EvaluationSaravanan Thirumuruganathan, Suraj Shetiya, Nick Koudas, Gautam DasICDE 2022 · 7 citations
- The Price of Tailoring the Index to Your Data: Poisoning Attacks on Learned Index StructuresEvgenios M. Kornaropoulos, Silei Ren, Roberto TamassiaSIGMOD 2022 · 13 citations
- Data-Agnostic Cardinality Learning from Imperfect WorkloadsPeizhi Wu, Rong Kang, Tieying Zhang, Jianjun Chen et al.VLDB 2025 · 1 citation
