Skip to content

Improving Differentially Private Deep Learning with Gradient Encoding and DenoisingImproving Deep Learning with Differential Privacy using Gradient Encoding and Denoising

arXiv· arXiv:2007.11524· Milad Nasr, Reza Shokri, Amir houmansadrUMass Amherst; National University of SingaporeIndexed by this site · 27 days ago· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose a DP training framework with gradient encoding and denoising; the authors state that on MNIST at 96.1% accuracy, ε=3.2, outperforming DPSGD's ε=6.

Threat modelThe defense target is training data privacy: models leak training set information (membership inference, model inversion attacks). The defense adds DP noise to gradients during training, providing an (ε, δ)-differential privacy guarantee (δ=10^-5); the victim system is the deep neural network training pipeline.

Questions
Deep neural networks leak training data privacy; differential privacy training methods such as DPSGD provide DP guarantees but substantially reduce model accuracy. The authors aim to better preserve model utility under a given privacy budget.
Methods
Proposes a DP training framework: gradients are encoded into a finite vector space, enabling numerical computation of RDP privacy bounds for arbitrary noise distributions; then the post-processing property of DP is used to denoise the noised gradient (scaling it by its KS distance to the noise distribution) without losing the privacy guarantee.
Experiments and results
Compared with DPSGD on MNIST and CIFAR10. The authors state a lower privacy budget at the same accuracy: on MNIST at 96.1%, ε=3.2 versus DPSGD's ε=6; on CIFAR10 at 55.5%, ε=3.6 versus ε=5. Student-t noise performs best, and the denoising component further improves accuracy.
Limitations and future work
The paper does not specifically discuss limitations. The experiments cover only two datasets, MNIST and CIFAR10, and do not report model architecture details, number of repetitions, or variance; the best hyperparameter search experiment (Figure 3) itself affects the privacy bound, and the authors note that it is used only to compare the best performance of each method.
Experimental setupDNN · MNIST、CIFAR10 · (ε, δ)-differential privacy(ε 隐私预算)、模型预测准确率 et al.
Evaluated models
DNN
Benchmarks
MNISTCIFAR10
Metrics
(ε, δ)-differential privacy(ε 隐私预算)模型预测准确率Rényi differential privacy (RDP)
AI summaryThe paper states that its gradient encoding and denoising method preserves accuracy better than DPSGD when training deep learning models under differential privacy. The method encodes gradients into a smaller vector space to provide differential privacy guarantees for different noise distributions, and selects the noise distribution according to the target privacy budget; denoising uses the post-processing property of differential privacy to improve model utility without weakening the guarantee. At 96.1% accuracy on MNIST, the method's privacy bound is ε=3.2, versus ε=6 for DPSGD.

The paper states that its gradient encoding and denoising method preserves accuracy better than DPSGD when training deep learning models under differential privacy. The method encodes gradients into a smaller vector space to provide differential privacy guarantees for different noise distributions, and selects the noise distribution according to the target privacy budget; denoising uses the post-processing property of differential privacy to improve model utility without weakening the guarantee. At 96.1% accuracy on MNIST, the method's privacy bound is ε=3.2, versus ε=6 for DPSGD.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors aim to address the problem that DP training (such as DPSGD) substantially reduces model accuracy, and propose a framework of gradient encoding plus denoising to improve the privacy-utility trade-off.

    Core question: how to train deep neural networks with differential privacy (DP) guarantees while preserving model accuracy better than existing methods (DPSGD).

    • Problem setting and importance: the authors note that the high capacity of deep neural networks makes them prone to leaking training data privacy, and existing work has demonstrated attacks such as membership inference and model inversion. Training with DP (adding noise to gradients) is a promising defense.
    • Shortcomings of existing methods: the authors state that existing DP schemes such as DPSGD (Abadi et al. [2]) substantially reduce the utility (prediction accuracy) of trained models, citing [11] as support.
    • Core observation: DPSGD can only use Gaussian noise, because deriving a DP privacy bound for an arbitrary noise distribution requires computing the distance between two distributions over infinitely many points, which is computationally infeasible; other distributions (such as Student-t, Bun et al. [4] in the trimmed mean setting) may yield better utility.
    • Method proposed in the paper: a DP training framework comprising two techniques: (1) encoding gradients into a finite vector space, thereby enabling numerical computation of RDP privacy bounds for arbitrary noise distributions; (2) a denoising mechanism that uses the DP post-processing property to improve utility without harming the privacy bound.
    • Threat model:
      • Protected object: the privacy of the training dataset, against leakage such as membership inference and model inversion.
      • Defense mechanism: adding DP noise to gradients during training, providing (ε, δ)-DP guarantees (δ=10^-5 in the experiments).
      • Victim system: the deep neural network training pipeline (image classification, MNIST/CIFAR10).
      • The paper does not explicitly state assumptions about attacker capabilities (e.g., white-box/black-box access).
  2. What related research exists?

    Related work falls into three categories: foundations of DP and DP in traditional machine learning, DPSGD and its successors, and other noise distributions and RDP accounting methods; this paper uses DPSGD as the baseline.

    Foundations of differential privacy and DP in traditional machine learning

    • Dwork [7, 8] — proposed and systematized the definition and theoretical foundations of differential privacy.
    • [12, 6, 9, 21, 3] et al. — use DP to protect training data in traditional machine learning algorithms; the paper notes that many of these works ([9, 3, 6]) rely on convexity or smoothness assumptions that do not necessarily hold in deep learning, and are therefore difficult to apply directly in practice.

    DP in deep learning (DPSGD and its successors)

    • Abadi et al. [2] — proposed DPSGD: gradient clipping bounds the sensitivity, then noise proportional to the sensitivity is added, and a momentum accountant is proposed to compute tighter privacy bounds, achieving high accuracy under single-digit privacy budgets. This paper uses it as the baseline and comparison object.
    • McMahan et al. [13] — applied the momentum accountant to language models and demonstrated the feasibility of achieving user-level DP in federated learning.
    • Wang et al. [20] — replaced the momentum accountant with Rényi differential privacy to improve the privacy bound; this paper likewise uses RDP to compute privacy bounds, and for fairness also uses RDP to compute the bound for DPSGD.

    Other noise distributions and RDP tools

    • Bun and Steinke [4] — proved that the Student-t noise distribution can achieve better utility in trimmed mean applications, one of the motivations for this paper's exploration of non-Gaussian noise.
    • Mironov [15] — proposed RDP; Mironov et al. [16] — RDP analysis of the subsampled Gaussian mechanism, whose proof approach is similar to that of Lemma 4 in this paper.

    Privacy leakage attacks (cited as motivation)

    • membership inference [19, 17, 5, 14] and model inversion [10] — demonstrate that DNNs leak information about training data, which is the threat this paper aims to defend against.

    Baseline and benchmarks: the baseline method is DPSGD [2] (for fair comparison, its privacy bound is also computed with RDP); the benchmark datasets are MNIST and CIFAR10.

    The authors position this paper as an extension of the DPSGD framework [2, 13]: the first difference is that it allows arbitrary noise distributions (with a closed-form formula and a well-defined mean), and the second difference is that it uses the DP post-processing property to improve the learning process.

  3. How does the paper address this problem?

    The framework encodes gradients into a finite vector space to support RDP privacy bound computation for arbitrary noise distributions, then uses KS-distance-based denoising as post-processing to improve utility.

    Overall approach: two components are inserted into a DPSGD-style training loop — gradient encoding maps gradients into a finite vector space so that the RDP privacy bound of an arbitrary noise distribution can be computed numerically; denoising uses the DP post-processing property to scale the noised gradient to improve utility. The overall procedure is shown in Algorithm 1.

    Training procedure (Algorithm 1)

    1. Each round, randomly sample a mini-batch (random sampling with replacement), then divide it into several micro-batches (the number is a hyperparameter).
    2. For each micro-batch, compute the gradient of the loss with respect to the parameters and perform encoding (Equation (3)).
    3. Aggregate the encoded gradients of the micro-batches and add noise sampled from that round's noise distribution Zt to obtain the privatized gradient.
    4. Perform error correction (denoising) on the privatized gradient, then update the model parameters.

    Gradient encoding

    • Motivation: computing the DP bound for an arbitrary noise distribution requires computing the Rényi distance over all adjacent datasets, which is infeasible when the input space is infinite; encoding maps gradients into a finite set Ψ, making numerical computation feasible.
    • Pre-selected vectors: independently sample n vectors ψ~i of the same dimension as the model from the empirical distribution of gradients (Figure 1, the gradient distribution at the 5th epoch on CIFAR/MNIST, which the authors say can be fitted by a Gaussian) to form Ψ.
    • Encoding rule: Encode(∇θ) = argminψ̃i ∈ Ψ ||ψ̃i − ∇θ||, i.e., replace the original gradient with the pre-selected vector at the smallest cosine distance.
    • Speedup techniques: gradient values are mostly close to zero, so a sparse representation is used to reduce memory and time; exploiting the shift invariance of RDP, gradients are sorted before computing distances to avoid iterating over all permutations (Algorithm 2).

    Denoising

    • Mechanism: define an oracle O that measures the "usefulness" of the privatized gradient, and the model is updated as θ ← θ − ηO(∇gG)·∇gG. Usefulness is defined as how close the noised gradient is to the original gradient, but using the original gradient directly would touch private data and break privacy.
    • Approximation scheme: instead, scale using the distance between the noised gradient and the noise distribution Zt (rather than a specific noise sample), i.e., ∇dG ← η·KS(∇gG, Zt)·∇gG, where KS is the Kolmogorov-Smirnov distance; the authors say they tried other distance metrics and KS worked best.
    • Privacy justification: by the RDP post-processing property (Lemma 3), as long as O is a randomized process that does not use private data, denoising does not change the privacy bound.

    Privacy analysis

    • Analyze with RDP, then convert to (ε, δ)-DP via Lemma 2. The single-round mechanism is written as M(D) = Σ encoded gradients + Z.
    • Lemma 4: when Ψ contains only one vector ψ~, given sampling rate q and noise pdf z(.; µ), ε is given by the binomial expansion integral in Equation (5) (proof in Appendix A, with an approach similar to the RDP proof for subsampled Gaussian [16, 20]).
    • Lemma 5: when Ψ contains multiple vectors, take the maximum of the bounds over the vectors as the upper bound. Theorem 1: use the RDP composition lemma (Lemma 1) to sum the bounds over T rounds to obtain the total privacy parameters.

    Key parameters (specified in the experimental setup)

    1000 pre-selected vectors, sampled from a standard Gaussian, values smaller than 10^-5 set to zero, norm clipped to 1 (for fair comparison with DPSGD); Gaussian noise variance 0.8–1.4, Student-t with 9 degrees of freedom and variance 0.9–1.5 (non-standard form); δ=10^-5.

  4. What experiments did the paper conduct?

    Compared with DPSGD on MNIST and CIFAR10 for the privacy-utility trade-off; the authors state a lower ε at the same accuracy; training trajectory, denoising contribution, noise distribution, and convergence speed were also tested.

    Experimental setup

    • Datasets: MNIST and CIFAR10, cross-entropy loss; training setup comparable to Abadi et al. [2].
    • Baseline: DPSGD [2], whose privacy bound is likewise computed using RDP to ensure fairness.
    • Method variants compared: the framework in this paper (Algorithm 1) with Gaussian and Student-t noise respectively; Laplace, Cauchy, Variance Gamma (λ=2), and Sech were also tried, and the paper shows only the best-performing first two.
    • Metrics: ε of standard (ε, δ)-DP (δ=10^-5, RDP converted via Lemma 2) and model prediction accuracy.
    • Implementation and pipeline: PyTorch and Tensorflow implementations, multi-GPU parallelism; mini-batch uses random sampling with replacement (the authors note this differs from the shuffling in the official implementation, causing results to be not fully consistent with the official repository).
    • Hyperparameters: fixed-epoch experiments use 100 epochs for CIFAR and 60 epochs for MNIST; Gaussian variance 0.8–1.4, Student-t with 9 degrees of freedom and variance 0.9–1.5; all methods use the same learning rate, model architecture, and hyperparameters. The paper does not report model architecture details, sample size, or number of repetitions.

    Main results

    Figure 2 (fixed epochs) and Figure 3 (searching optimal hyperparameters at each ε) give the accuracy-ε trade-off; the corresponding points given in the paper's main text:

    Swipe horizontally to read the table

    DatasetAccuracyThis framework εDPSGD εSource
    CIFAR1055.5%3.6 (Student-t)5Figure 2
    MNIST96%2.55Figure 2
    CIFAR1055%34.2Figure 3
    MNIST96.1%3.26Figure 3
    • The authors state that the framework outperforms DPSGD on both datasets, for two reasons: first, arbitrary noise distributions can be used, and Student-t outperforms Gaussian; second, even with Gaussian noise, this framework outperforms DPSGD, which the authors attribute to the denoising mechanism.
    • The optimal hyperparameter search in Figure 3 would in practice affect the privacy bound; the authors note that this experiment is only used to compare the best performance of each system.
    • The authors point out that ε grows exponentially with accuracy: on MNIST, going from 94% to 95% requires only an ε increase of 0.6, whereas 96% to 97% requires an increase of 2; CIFAR shows a similar phenomenon.

    Training trajectory and convergence speed

    • Training trajectory (Figure 4): under fixed hyperparameters (Gaussian σ=1.1, Student-t σ=1), the authors state that Algorithm 1 has markedly higher accuracy than DPSGD in the early stage of training (both MNIST and CIFAR), allowing it to spend more privacy budget on later fine-tuning.
    • Convergence speed (Figure 7): under the same fixed hyperparameters, the authors state that Algorithm 1 requires fewer iterations to reach accuracy comparable to DPSGD, resulting in lower training time, privacy budget, and energy consumption; the paper does not report the specific difference in iteration counts.

    Effect of the denoising component and noise distribution

    • Denoising (Figure 5): comparing the same framework with and without denoising, the authors state that denoising substantially improves overall accuracy (by amplifying the privatized gradient with less noise); the main text gives no specific numbers, and the figure shows the two curves separating.
    • Noise distribution (Figure 6): comparing the l1 distance between the noised gradient and the original gradient for different distributions under different Rényi budgets (α=2); the authors state that Student-t has the smallest overall noise, corresponding to higher prediction accuracy.

    Other ablations and analyses

    • Types of noise distribution: Gaussian and Student-t perform best; results for Laplace, Cauchy, Variance Gamma (λ=2), and Sech are not shown (main text).
    • Denoising distance metric: other distance metrics were tried, and KS distance works best (main text, no numbers given).
  5. What are some points that can be further explored?

    The paper does not specifically discuss limitations; the experiments cover only two datasets, MNIST/CIFAR10, and do not report details such as architecture or number of repetitions.

    Limitations and future directions noted by the authors

    The paper does not specifically discuss limitations and has no Limitations or Future Work section. Two points the authors explain related to the interpretation of the experiments:

    • Optimal hyperparameter search (Figure 3) would in practice affect the privacy bound [2]; the authors note that this experiment is only used to compare the best performance of each system (Experimental Results section).
    • The authors note that their mini-batch uses random sampling with replacement, which differs from the shuffling in the official implementation, so results are inconsistent with the official repository (Experimental Results section footnote).

    Scope of experimental coverage

    • The datasets tested are two image classification benchmarks, MNIST and CIFAR10 (Experimental Results section).
    • The only comparison baseline is one method, DPSGD [2], whose privacy bound is recomputed using RDP (Experimental Results section).
    • The noise distributions shown are Gaussian and Student-t; Laplace, Cauchy, Variance Gamma (λ=2), and Sech are only mentioned without showing results (Experimental Results section).
    • The paper does not report the model architecture, the number of micro-batches per round, the specific value of the sampling rate q, the number of repetitions, or the variance of results.
    • The privacy analysis restricts α to integers (RDP order); the proof of Lemma 4 is in Appendix A.
  6. Summarize the main content of the paper

    The authors propose a DP training framework of gradient encoding plus denoising, and the authors claim that on MNIST/CIFAR10 it achieves a lower ε than DPSGD at the same accuracy.

    A defense-type paper on differentially private deep learning training, whose goal is to mitigate the substantial accuracy drop of models trained with DPSGD.

    • Problem: DNNs are prone to leaking training data privacy (membership inference, model inversion); DPSGD provides DP guarantees but incurs a large utility loss; moreover, DPSGD can only use Gaussian noise, because the DP bound for an arbitrary noise distribution is difficult to compute.
    • Method: (1) gradient encoding — replace the gradient with the pre-selected vector at the smallest cosine distance, mapping gradients into a finite set, thereby enabling numerical computation of RDP privacy bounds for arbitrary noise distributions (Lemma 4/5, Theorem 1); (2) denoising — using the DP post-processing property, scale the gradient by the KS distance between the noised gradient and the noise distribution, without harming the privacy bound.
    • Main results (δ=10^-5): on MNIST, ε=3.2 at 96.1% accuracy, versus ε=6 for DPSGD (Figure 3); on CIFAR10, ε=3.6 at 55.5% accuracy (Student-t), versus ε=5 for DPSGD (Figure 2).
    • Other findings: the authors state that Student-t noise has the smallest l1 error and the best performance; the denoising component substantially improves accuracy; under the same hyperparameters, the framework has higher accuracy and converges faster in the early stage of training; ε grows exponentially with accuracy, so the cost is high in the high-accuracy regime.
    • Authors' conclusion: the framework outperforms existing techniques on the privacy-utility trade-off, and given the exponential effect of ε, the above gaps are significant. The experiments cover only MNIST/CIFAR10, and the paper does not specifically discuss limitations.
Read originalarxiv.org