A Closer Look at the Calibration of Differentially Private Learners

Hanlin Zhang, Xuechen Li, Prithviraj Sen, Salim Roukos, Tatsunori Hashimoto

TL;DR

Classifiers fine-tuned with differentially private stochastic gradient descent (DP-SGD) consistently output overconfident, polarized predictions—even when leveraging large pre-trained backbones like RoBERTa and Vision Transformers. The authors demonstrate that per-example gradient clipping is the primary culprit behind this miscalibration and show that simple, differentially private variants of post-hoc temperature and Platt scaling fix the issue at virtually zero extra privacy cost or accuracy penalty.

What Problem Does This Paper Address?

Differential privacy (DP), usually enforced via DP-SGD, ensures an algorithm's output does not reveal whether a specific individual's data was in the training set. While prior work has shown that DP degrades accuracy and worsens subgroup fairness, this paper investigates another critical trustworthiness property: model calibration.

A model is calibrated when its predicted confidence reflects true empirical frequency (e.g., predictions with 80% confidence are correct 80% of the time). In high-stakes domains such as medicine and law, reliable uncertainty estimates are vital. Theoretically, DP-SGD adds regularization and prevents memorization, which might intuitively suggest improved calibration. However, the authors find the opposite: DP-SGD fine-tuned models severely over-estimate their confidence, leading to extreme miscalibration.

Methods

The paper analyzes the causes of DP miscalibration and evaluates both training-time and post-hoc mitigations:

  • Root Cause Ablations: Disentangles the two main components of DP-SGD—per-example gradient clipping and Gaussian noise injection—alongside regularizers like dropout, weight decay, and early stopping.
  • DP Post-Hoc Recalibration (DP-TS & DP-PS):
  • The training set is partitioned into a training split $\mathcal{X}_{\text{train}}$ (e.g., 90%) and a calibration split $\mathcal{X}_{\text{recal}}$ (e.g., 10%).
  • The base model $h_\theta$ is trained with DP-SGD on $\mathcal{X}_{\text{train}}$.
  • A lightweight recalibrator $g_\phi$—either Temperature Scaling (DP-TS) ($g_\phi(x) = x/T$) or Platt Scaling (DP-PS) ($g_\phi(x) = Wx + b$)—is trained with DP-SGD on $\mathcal{X}_{\text{recal}}$ minimizing negative log-likelihood.
  • Privacy Accounting for Independent Releases: By establishing that $\mathcal{X}_{\text{train}}$ and $\mathcal{X}_{\text{recal}}$ are disjoint subsets of the private data, the authors prove via Proposition A.1 that running both steps at target $(\epsilon, \delta)$-DP bounds guarantees that the joint release remains $(\epsilon, \delta)$-DP without requiring additional privacy composition penalties.

Datasets

The authors evaluate across both vision and NLP transfer-learning benchmarks:

  • Vision: CIFAR-10 (ResNet-50 linear probe), SUN397, and Food101 (ViT linear probes).
  • Text (In-Domain): MNLI, QNLI, QQP, and SST-2 (fine-tuning RoBERTa-base).
  • Text (Out-of-Domain Zero-Shot Transfer): Evaluated on Scitail, HANS, RTE, WNLI, and MRPC.
  • Synthetic: A 2D non-separable mixture of Gaussians with logistic regression.
  • Note: No newly introduced datasets or benchmarks were created; established public datasets were used.

Key Insights and Ideas

  • Gradient Clipping Is the Culprit: Noise injection alone actually retains high calibration and accuracy. The miscalibration is primarily driven by per-example gradient clipping ($L_2$ norm bounding), which truncates influential updates and pushes logits toward overconfident extremes.
  • Overconfidence Persists Under Label Noise: Even when artificial label noise is introduced (where the Bayes-optimal confidence cannot exceed 60%), DP-SGD produces confidences clustered near 100%.
  • Different Mechanism from Non-Private Miscalibration: In standard deep networks, miscalibration typically arises from test-time generalization gaps (models are well-calibrated on training data but overconfident on test data due to overfitting). In contrast, DP models generalize tightly (train and test metrics match), but they are severely miscalibrated on both training and test distributions.
  • Miscalibration Is Not an Accuracy Artifact: Even when early stopping non-private models to artificially match the lower accuracy of DP models, the non-private models maintain significantly lower calibration error.

Key Results

  • Severe DP Miscalibration: At $\epsilon = 8$, Expected Calibration Error (ECE) explodes under DP-SGD. For example:
  • Food101: ECE jumps from 0.0349 (non-private) to 0.1540 (DP-SGD)—over a 4× increase—despite only a ~7% drop in accuracy.
  • QNLI: ECE jumps from 0.0280 (non-private) to 0.1490 (DP-SGD)—over a 5× increase.
  • Post-Hoc Recalibration Outperforms Alternatives:
  • Across 7 tasks, DP-TS and DP-PS achieve an average 3.1-fold reduction in in-domain ECE (relative reduction of 58%) with negligible impact on accuracy.
  • On CIFAR-10, DP-PS slashes ECE from 0.0903 to 0.0120 (beating the non-private baseline's 0.0794).
  • Outperforms prior DP calibration proposals like Global Clipping and DP-SGLD (Langevin dynamics), which often severely degrade accuracy (e.g., DP-SGLD accuracy drops ~11% on MNLI) while offering smaller calibration gains.

Limitations and Future Work

  • Data Splitting Requirement: DP-TS and DP-PS rely on sample splitting, holding out a portion of private training data for calibration, which slightly reduces effective training set size.
  • Out-of-Domain Accuracy Floors: While DP-TS and DP-PS improve calibration in zero-shot out-of-domain transfer, overall accuracy remains low across all methods under severe domain shift.
  • Future Direction: The authors leave open whether internal architectural modifications or algorithmic adjustments to DP-SGD can naturally promote calibrated models during training without requiring post-hoc data splitting and recalibration.

Summary updated

BibTeX
@inproceedings{zhang2023closer,
  author = {Hanlin Zhang and Xuechen Li and Prithviraj Sen and Salim Roukos and Tatsunori Hashimoto},
  title = {{A Closer Look at the Calibration of Differentially Private Learners}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=fGm87trHel_},
}

Loading related content...

Figure