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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext b9e6a2f3-bec8-4417-94e5-dfa096f018e2Cited 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
