Table of Contents
Fetching ...

Forgetting by Pruning: Data Deletion in Join Cardinality Estimation

Chaowei He, Yuanjun Liu, Qingzhi Ma, Shenyuan Ren, Xizhao Luo, Lei Zhao, An Liu

TL;DR

This work addresses the challenge of unlearning in multi-table learned cardinality estimation by introducing Cardinality Estimation Pruning (CEP). CEP combines Distribution Sensitivity Pruning, which uses distributional shifts and a diagonal Fisher Information approximation to identify and prune sensitive parameters, with Domain Pruning, which removes erased value domains from the input space. Evaluated on NeuroCard and FACE with IMDB and TPC-H data, CEP consistently achieves the lowest Q-error under varying deletion ratios and scales effectively to large multi-table joins, often outperforming full retraining while incurring only a small overhead. The results demonstrate CEP as a practical, lightweight unlearning solution for dynamic database systems that require frequent data deletions, with avenues for extending to insertions, updates, and integration into query optimizers.

Abstract

Machine unlearning in learned cardinality estimation (CE) systems presents unique challenges due to the complex distributional dependencies in multi-table relational data. Specifically, data deletion, a core component of machine unlearning, faces three critical challenges in learned CE models: attribute-level sensitivity, inter-table propagation and domain disappearance leading to severe overestimation in multi-way joins. We propose Cardinality Estimation Pruning (CEP), the first unlearning framework specifically designed for multi-table learned CE systems. CEP introduces Distribution Sensitivity Pruning, which constructs semi-join deletion results and computes sensitivity scores to guide parameter pruning, and Domain Pruning, which removes support for value domains entirely eliminated by deletion. We evaluate CEP on state-of-the-art architectures NeuroCard and FACE across IMDB and TPC-H datasets. Results demonstrate CEP consistently achieves the lowest Q-error in multi-table scenarios, particularly under high deletion ratios, often outperforming full retraining. Furthermore, CEP significantly reduces convergence iterations, incurring negligible computational overhead of 0.3%-2.5% of fine-tuning time.

Forgetting by Pruning: Data Deletion in Join Cardinality Estimation

TL;DR

This work addresses the challenge of unlearning in multi-table learned cardinality estimation by introducing Cardinality Estimation Pruning (CEP). CEP combines Distribution Sensitivity Pruning, which uses distributional shifts and a diagonal Fisher Information approximation to identify and prune sensitive parameters, with Domain Pruning, which removes erased value domains from the input space. Evaluated on NeuroCard and FACE with IMDB and TPC-H data, CEP consistently achieves the lowest Q-error under varying deletion ratios and scales effectively to large multi-table joins, often outperforming full retraining while incurring only a small overhead. The results demonstrate CEP as a practical, lightweight unlearning solution for dynamic database systems that require frequent data deletions, with avenues for extending to insertions, updates, and integration into query optimizers.

Abstract

Machine unlearning in learned cardinality estimation (CE) systems presents unique challenges due to the complex distributional dependencies in multi-table relational data. Specifically, data deletion, a core component of machine unlearning, faces three critical challenges in learned CE models: attribute-level sensitivity, inter-table propagation and domain disappearance leading to severe overestimation in multi-way joins. We propose Cardinality Estimation Pruning (CEP), the first unlearning framework specifically designed for multi-table learned CE systems. CEP introduces Distribution Sensitivity Pruning, which constructs semi-join deletion results and computes sensitivity scores to guide parameter pruning, and Domain Pruning, which removes support for value domains entirely eliminated by deletion. We evaluate CEP on state-of-the-art architectures NeuroCard and FACE across IMDB and TPC-H datasets. Results demonstrate CEP consistently achieves the lowest Q-error in multi-table scenarios, particularly under high deletion ratios, often outperforming full retraining. Furthermore, CEP significantly reduces convergence iterations, incurring negligible computational overhead of 0.3%-2.5% of fine-tuning time.

Paper Structure

This paper contains 23 sections, 7 equations, 5 figures, 5 tables, 1 algorithm.

Figures (5)

  • Figure 1: Overview of our proposed method Cardinality Estimation Pruning (CEP), (a) Distribution Sensitivity Pruning: constructs semi-join deletion results and computes sensitivity scores from distributional shifts between the full and retained join results. These weights are used to identify and prune highly sensitive parameters. (b) Domain Pruning: removes support for value domains entirely erased by the deletion. Pruned models are then fine-tuned on the retained dataset to restore performance.
  • Figure 2: Training time comparison between FT and CEP on FACE and NeuroCard under 1 and 6 tables deletion. Each bar shows the total training time. For CEP, the upper bar represents the combined time of fine-tune and pruning, with the pruning time shown in parentheses.
  • Figure 3: Training convergence curves of FT and CEP across different Q-error on A-6-0.5 task. The x-axis is normalized to training progress (0-100%) to enable aligned comparison between FACE and NeuroCard models.
  • Figure 4: Ablation on pruning thresholds (A-1-0.5, JOB-light).
  • Figure 5: Ablation on sampling iterations $N_s$ (A-1-0.5, JOB-light).