Gradient Sparsification Can Improve Performance of Differentially-Private Convex Machine Learning

Farhad Farokhi

TL;DR

This paper demonstrates that "less is more" when it comes to training private machine learning models. By zeroing out all but the most significant gradient entries (sparsification) and using compressed sensing, researchers can significantly reduce the amount of noise required to maintain differential privacy, leading to better model performance in high-privacy regimes.

What Problem Does This Paper Address?

Differential Privacy (DP) is the gold standard for protecting individual data during model training, but it comes with a "privacy tax": to hide the influence of any single data point, we must add random noise to the gradients.

The challenge is that this noise magnitude typically scales with the number of parameters in the model. For modern high-dimensional models, the noise becomes so overwhelming that the model fails to converge or loses significant accuracy. While techniques like "moment accountants" help manage the privacy budget over time, they don't solve the fundamental problem of noise scaling with model size. The author investigates whether we can trade off some information (via sparsification) to drastically reduce this noise.

Methods

The paper proposes a three-step pipeline for "Sparsifying Stochastic Gradient Descent":

  1. Greedy Sparsification: At each training iteration, only the $\kappa$ largest entries of the gradient are kept; the rest are set to zero.
  2. Compressed Sensing & DP: Instead of adding noise to the full gradient, the sparse gradient is projected into a much lower-dimensional space using a random sampling matrix. Laplace noise is then added to this compressed representation. Because the dimension is lower, the total noise required to satisfy $\epsilon$-differential privacy is significantly reduced.
  3. Reconstruction: The learner uses the CoSaMP (Compressive Sampling Matching Pursuit) algorithm to reconstruct the $\kappa$-sparse gradient from the noisy, compressed measurements.
  4. Update: The model parameters are updated using this reconstructed, noisy gradient.

The core of the paper is a theoretical analysis of the interplay between two opposing forces: sparsification slows down convergence (bad), but it reduces the magnitude of privacy-preserving noise (good).

Datasets

The author evaluates the approach using the Lending Club dataset, a real-world financial dataset containing approximately 890,000 loan applications.

  • Task: Linear regression to predict interest rates based on borrower attributes (credit rating, age, loan amount, etc.).
  • Preprocessing: Categorical attributes were converted to integers, and unique identifiers were removed to focus on the predictive task.

Key Insights and Ideas

  • The Privacy Budget Threshold: The most critical insight is that the benefit of sparsification depends entirely on your privacy budget ($\epsilon$).
  • In high-privacy regimes (small $\epsilon$), the noise reduction from compressed sensing is massive and outweighs the slower convergence caused by sparsification.
  • In low-privacy regimes (large $\epsilon$), the inherent DP noise is already small, so the "damage" done by sparsification (slower convergence) makes the model perform worse than standard DP-SGD.
  • Dimensionality Reduction: By using compressed sensing, the noise magnitude scales with $O(\kappa^2 \log(n_\theta/\kappa))$ rather than the total number of parameters $n_\theta$. If the sparsity level $\kappa$ is much smaller than the total parameters, the gains are enormous.
  • Analytical Proof: The paper provides a formal convergence bound (Theorem 1) that mathematically captures this trade-off, allowing researchers to "a priori" guess whether compression will help based on their desired privacy level.

Key Results

  • Theoretical Bound: The performance gap is bounded by $O(\sqrt{n_\theta - \kappa}) + O(\kappa^2 \log(n_\theta/\kappa)\epsilon^{-1})$. This explicitly shows how the error decreases as the privacy budget $\epsilon$ increases.
  • Empirical Validation:
    • At $\epsilon = 1$ (strong privacy), the sparsified model achieved a significantly lower relative loss than the non-sparsified version.
  • At $\epsilon = 10$ (weaker privacy), the non-sparsified model performed better, confirming the theoretical "interplay" predicted by the author.
  • Sparsity Level: The experiments showed that choosing a very small $\kappa$ (e.g., keeping only 5-10 entries) can be optimal for high-privacy settings.

Limitations and Future Work

  • Convexity Constraint: The theoretical proofs rely on the assumption that the loss function is convex. While many ML models fit this (like linear/logistic regression and SVMs), modern deep neural networks are non-convex.
  • Computational Overhead: While sparsification reduces communication/noise, the CoSaMP reconstruction algorithm adds computational complexity to each iteration of the training process.
  • Future Directions: The author suggests extending these analytical results to non-convex and non-smooth loss functions, which would make the findings more directly applicable to complex deep learning architectures.

Summary updated

BibTeX
@inproceedings{farokhi2021gradient,
  author = {Farhad Farokhi},
  title = {{Gradient Sparsification Can Improve Performance of Differentially-Private Convex Machine Learning}},
  booktitle = {2021},
  year = {2021},
  doi = {10.1109/cdc45484.2021.9683246},
}
Figure