NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Online Sensitivity Optimization in Differentially Private Learning

Filippo Galli, Catuscia Palamidessi, Tommaso Cucinotta

Introduction

Training machine learning models with Differential Privacy (DP) typically involves Differentially Private Stochastic Gradient Descent (DP-SGD). A critical component of this process is the "clipping threshold" ($C$), which limits the influence of any single data point to ensure privacy. However, selecting an optimal $C$ presents a significant challenge: a threshold that is too low introduces excessive bias by aggressively truncating gradients, while a threshold that is too high necessitates adding massive amounts of Gaussian noise, which can stall the learning process.

Traditionally, researchers find the "perfect" $C$ using a grid search. However, in a DP context, every evaluation of the data consumes a portion of the privacy budget ($\epsilon$). Running a grid search with multiple values of $C$ effectively "spends" the budget multiple times. This paper introduces Online Sensitivity Optimization (OSO), an algorithm that treats the clipping threshold as a learnable parameter, optimizing it dynamically during a single training run to save both computation time and privacy budget.

The clipping threshold $C$ significantly impacts the cosine similarity between true and clipped gradients, illustrating the delicate balance between bias and noise.

Methodology: Online Sensitivity Optimization (OSO)

The authors propose OSO-DPSGD, which treats $C$ as a learnable parameter rather than a static hyperparameter.

The Update Rule

Using the chain rule, the authors derive a gradient for the cost function with respect to $C$. The resulting update rule depends on whether gradients in the previous batch were clipped. If the model "wants" to move in the same direction as the previous step, but those previous gradients were heavily clipped, the algorithm realizes $C$ is too small and increases it. An exponential update rule is employed to ensure robustness across the various orders of magnitude that gradient norms can span.

Privacy and Efficiency

A key technical advantage of OSO is unitary sensitivity. The query used to update $C$ has a bounded norm (0 or 1), meaning the additional noise required to protect the threshold update is minimal. The algorithm performs joint optimization, updating model weights ($\theta$), the clipping threshold ($C$), and the learning rate ($\rho$) in a single pass. Formal privacy analysis shows that these parallel queries can be integrated into a single Gaussian mechanism with only a tiny increase in the noise multiplier.

Experimental Evaluation

The authors evaluated OSO-DPSGD on three benchmarks: MNIST (digit classification), Fashion-MNIST (autoencoder reconstruction), and AG News (text classification). These choices represent a variety of tasks and data modalities.

Performance and Robustness

OSO-DPSGD consistently performs as well as, or better than, the best-tuned fixed thresholds and other adaptive strategies like FixedQuantile.

Accuracy comparison on the MNIST dataset across various privacy budgets ($\epsilon$). The "Online" (OSO) method remains competitive with optimally tuned fixed thresholds without requiring a separate hyperparameter search.

The method is particularly effective in high-privacy regimes (low $\epsilon$). For example, on Fashion-MNIST at $\epsilon=1$, competing adaptive methods often fail to converge, while OSO-DPSGD maintains stability and low error. By eliminating the need for an "oracle" or a privacy-consuming grid search, OSO makes DP deployments more realistic and efficient.

Discussion and Limitations

While OSO-DPSGD offers a powerful automated solution for sensitivity control, some limitations remain. The current derivation is optimized for standard SGD; extending this to optimizers like Adam is more complex due to the difficulty of maintaining unitary sensitivity for the threshold update. Additionally, while the method tunes $C$ and $\rho$ automatically, initial values ($C_0, \rho_0$) still play a role, particularly in short training runs. Finally, the experiments focused on centralized settings, leaving the extension to Federated Learning as an area for future exploration.

Summary updated

BibTeX
@inproceedings{galli2024online,
  author = {Filippo Galli and Catuscia Palamidessi and Tommaso Cucinotta},
  title = {{Online Sensitivity Optimization in Differentially Private Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i11.29099},
}
Figure