Skip to main content

Module selection

Expand description

Differentially private selection of hyperparameter configurations.

§The defect this replaces

HyperparameterNoiseMechanism was stored on PrivateHPOConfig and never matched on anywhere in the crate: no exponential mechanism, no report-noisy-max, no noise on the choice at any point. PrivateResultsAggregator::aggregate_results sorted the evaluations exactly and returned the exact top five, and optimize() tracked the exact argmax.

Private hyperparameter optimization is entirely about privatising the selection step (Liu & Talwar, STOC 2019; Chaudhuri, Monteleoni & Sarwate, JMLR 2011), so an exact argmax over utilities computed from private data leaks the selection and provides no guarantee for the chosen configuration.

§What is implemented

  • The exponential mechanism (McSherry & Talwar, FOCS 2007): index i is returned with probability proportional to exp(epsilon * u_i / (2 * Delta_u)). The weighting itself is delegated to the crate’s audited crate::privacy::noise_mechanisms::ExponentialMechanism rather than reimplemented here.
  • Report-noisy-max with Gumbel noise, which is equivalent in distribution to the exponential mechanism – asserted by a test in this module – and with Laplace noise at scale 2 Delta_u / epsilon.
  • A Gaussian argmax at scale sqrt(2 ln(1.25/delta)) * 2 Delta_u / epsilon, which requires a delta and errors when none is configured.
  • SparseVector selection is refused: the sparse vector technique answers a stream of threshold queries and is not a one-shot selection primitive. Use crate::privacy::noise_mechanisms::SparseVectorMechanism.

Every selection reports the epsilon it consumed so the caller can charge it.

Structs§

NoisySummary
A differentially private summary, together with what it actually cost.
SelectionOutcome
Outcome of one private selection.

Constants§

OBJECTIVE_SENSITIVITY_KEY
Key under which the objective’s global sensitivity is looked up in SensitivityBounds::global_sensitivity.
SUMMARY_QUANTILES
Quantiles released by noisy_summary_statistics, in order.

Functions§

exponential_mechanism_index
Select an index with the exponential mechanism.
exponential_mechanism_probabilities
The exponential mechanism’s selection probabilities, in closed form.
gaussian_sample
One Gaussian sample with standard deviation sigma, by Box-Muller.
gaussian_sigma
Analytic Gaussian-mechanism standard deviation for (epsilon, delta).
gumbel_sample
One standard Gumbel sample.
laplace_sample
One Laplace sample with scale b.
mechanism_name
Human-readable mechanism name.
noisy_summary_statistics
Differentially private summary statistics of the observed objectives.
report_noisy_max_gaussian
Argmax after adding Gaussian noise calibrated for (epsilon, delta).
report_noisy_max_gumbel
Report-noisy-max with Gumbel noise.
report_noisy_max_laplace
Report-noisy-max with Laplace noise at scale 2 Delta / epsilon.
summary_mean_noise_scale
The Laplace scale noisy_summary_statistics uses for the mean release.