Training Set Reconstruction from Differentially Private Forests: How Effective is DP?

Alice Gorgé, Julien Ferry, Sébastien Gambs, Thibaut Vidal · DOI

Introduction

Machine learning models are often "leaky," inadvertently exposing the sensitive data used during their training phase. Tree-based models, such as Random Forests (RFs), are particularly susceptible because their hierarchical structure inherently reflects the underlying data distribution. To counter this, practitioners employ Differential Privacy (DP), which adds mathematical noise to model parameters—such as leaf counts—to mask individual contributions. However, a critical question remains: does DP truly prevent an adversary from reconstructing the entire training set? This paper investigates a novel reconstruction attack that challenges the perceived security of DP-protected forests, revealing that privacy is often only maintained at the total expense of model utility.

Methodology: Reconstruction via Constraint Programming

The researchers introduced a reconstruction attack based on Constraint Programming (CP), which treats the Random Forest as a complex system of constraints.

  1. The Model as a Puzzle: Each tree's structure (splits and thresholds) defines specific paths that data points must follow. The attacker leverages these paths as constraints in an optimization problem.
  2. Maximum Likelihood Estimation: Unlike previous attacks that assumed perfect data, this method explicitly models DP noise. Since the noise follows a known Laplace distribution, the attack uses CP to find the "most likely" original dataset that, when passed through the DP mechanism, would result in the observed noisy leaf counts.
  3. Handling Unknown Dataset Size: The attack can estimate the total number of training examples ($N$) using the Central Limit Theorem applied to the noisy leaf counts, allowing it to function even when $N$ is not publicly disclosed.
  4. White-Box Access: The attack assumes the adversary has access to the forest's internal structure and noisy leaf counts, a scenario common in model auditing or transparency-focused deployments.

Experimental Setup

The attack's effectiveness was evaluated on three standard tabular datasets frequently used in fairness and privacy research:

  • COMPAS: Criminal offender records used for recidivism prediction.
  • UCI Adult Income: Census data used to predict income levels.
  • Default Credit: Financial records used to predict credit card payment defaults.

Key Results and Analysis

The study's most striking finding is a stark "Utility-Privacy" dichotomy: any Random Forest accurate enough to be practically useful is likely vulnerable to reconstruction.

Reconstruction error as a function of privacy budget $\epsilon$ and ensemble size.

As illustrated in Figure 2, reconstruction error drops significantly as the privacy budget $\epsilon$ increases. Furthermore, the attack is more successful when information can be aggregated across multiple trees. While a single DP tree may remain relatively private, an ensemble of 10 or 20 trees leaks significantly more specific record details, facilitating more accurate reconstructions.

Accuracy heatmap across different $\epsilon$ and ensemble sizes, with the majority classifier threshold highlighted.

Figure 4 demonstrates that DP only provides robust protection against these reconstruction attacks when the model's predictive power is reduced to that of a simple majority-class guesser (indicated by the black line). On the COMPAS dataset with a moderate privacy budget ($\epsilon = 1$), the attack perfectly reconstructed approximately 22% of the individual training examples, despite the problem being NP-hard.

Discussion: The Outlier Paradox and Signal-to-Noise

A counter-intuitive insight from the study is the "Outlier Paradox": outliers are actually harder to reconstruct than typical "inliers." Because DP limits the influence of any single individual, and outliers by definition have high potential influence, the DP mechanism "muffles" them more aggressively.

Additionally, the researchers identified a "Signal-to-Noise Trap." Increasing the number of training examples ($N$) does not necessarily make the data safer. While a larger $N$ increases the complexity of the optimization problem for the attacker, it also improves the signal-to-noise ratio in the leaf counts, potentially making the reconstruction more precise.

Conclusion and Future Work

This research highlights a sobering reality for DP-protected tree ensembles: the privacy guarantees of DP may be insufficient if the model is to remain useful. The developed attack serves as a valuable "vulnerability audit" tool, helping practitioners tune hyperparameters like tree depth and count thresholds to build more resilient models. Future work will explore the resilience of approximate $(\epsilon, \delta)$-DP and the feasibility of extending these attacks to black-box settings or Gradient Boosting Decision Trees (GBDTs).

Summary updated

BibTeX
@misc{gorge2025training,
  author = {Alice Gorgé and Julien Ferry and Sébastien Gambs and Thibaut Vidal},
  title = {{Training Set Reconstruction from Differentially Private Forests: How Effective is DP?}},
  year = {2025},
  eprint = {2502.05307},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.05307},
}
Figure