Wasserman Zhou 2010 - Histogram Release Mechanisms
Summary
Two ways to release a private database drawn from a histogram. Smoothed histogram: mix the histogram with a uniform floor and sample points; it is -DP iff (Thm. 4.1) and gets rate and KS rate , both slower than minimax. Perturbed histogram: add noise to each bin count, clip at zero and renormalise; it attains the minimax rate for any (Thm. 4.4).
Overview
The histogram is used “for its familiarity and simplicity and because it is used in applications of differential privacy”. The histogram “has to be carefully constructed to ensure differential privacy”. Both schemes draw a random sample from a histogram-like density and differ in how privacy is obtained. Accuracy depends on both the construction and the distance used.
Main Content
Histogram set-up (pp. 9-10)
Let and suppose where
is the class of Lipschitz functions. Minimax rate for density estimators in squared over : (Scott 1992). Take a bin width with an integer and partition into cubes of side . Let , and
is consistent if and ; the optimal gives .
Mechanism 1: sampling from a smoothed histogram (Sec. 4.1)
Smoothed histogram (p. 10)
Fix a constant and define (a mixture of the histogram with the uniform density on ). The mechanism releases , i.i.d. draws from .
Theorem 4.1 (p. 10)
If
then -differential privacy holds.
For and , , so (6) is approximately
This shows the trade-off among , and . “We note that sampling from the usual histogram corresponding to does not preserve differential privacy.”
Proof (Sec. 9.4, pp. 21-22)
Let differ in one observation, with histograms and and cell proportions ; . The maximum density ratio for a single draw occurs in one bin ; since the draws are i.i.d. the joint ratio is the -th power. If the worst case is , giving per-draw ratio . Otherwise (cell proportions are multiples of ) and ; the ratio (or its reverse) is maximised, for fixed , when and (or the roles swapped). In all cases the ratio is at most , hence the theorem.
Theorem 4.2 - KS accuracy of the smoothed histogram (p. 11)
Suppose (4) holds and is the KS distance. Choose , and . These minimise subject to (6), giving
Theorem 4.3 - accuracy of the smoothed histogram (p. 11)
Assume the same setup with the squared distance (8), with and . Choosing
minimises subject to (6), and .
(The statement of Thm. 4.3 prints , while its proof in Sec. 9.6 and the constraint give : so exactly when . The version above is the internally consistent one. Both rates are slower than the minimax rates, KS and .)
Proofs of Thm. 4.2 and 4.3 (Sec. 9.5-9.6, pp. 22-25)
Thm. 4.2. Use the VC bound for orthants (VC dimension ): , so ; similarly given , and . Decompose , and ( uniform cdf) so the second term is at most . Bound by sampling error plus the histogram bias , where : for not a grid point the difference comes from , a set intersecting at most cubes with maximum density discrepancy (Lipschitz) and volume per cube, giving . Altogether ; with , , the terms balance at . Thm. 4.3. The pointwise inequality gives , where is the usual histogram risk, and conditional on , is unbiased for with integrated variance . So the risk is . Minimising subject to gives , , and risk .
Mechanism 2: sampling from a perturbed histogram (Sec. 4.2, due to Dwork et al. 2006)
Perturbed histogram (p. 12)
With the count in bin , release where are i.i.d. Laplace with mean and variance , i.e. density . (Scale is the -sensitivity of the count vector under Hamming neighbours, since replacing one record changes two bin counts by , divided by .) Releasing is -DP. To release a database, set , , and draw i.i.d. from . By Lemma 2.6 (postprocessing and i.i.d. resampling) is -DP for any .
Theorem 4.4 (p. 12)
Let be drawn from . Assume there exists such that .
- . Let be the () distance (8) and , . Then , the minimax rate.
- KS. With , : for the rate is and for it is .
“Hence this method achieves the minimax rate of convergence in while the first data release method does not. This suggests that the perturbation method is preferable for the distance.” It does not achieve the minimax rate in KS distance.
Proof (Sec. 9.7, pp. 25-28)
(1) Write ; the second term is , negligible for . Split ; the first term has the usual risk . For the second, show almost surely: the clipped noisy count satisfies , with ; since (Laplace tail, ), Borel-Cantelli gives eventually. The normaliser satisfies , so . A Bernstein bound with (since ) gives almost surely, so for . Therefore the risk is the usual one, , minimised at to give . (2) and . With the total is ; for the last term dominates, .
Comparison with the Dirichlet-posterior method (p. 12-13)
Machanavajjhala et al. (2008) put a Dirichlet prior on cell probabilities ; the posterior is Dirichlet. Draw from the posterior, then new counts . The distribution of given is (up to the multinomial coefficient and prior normalisation as printed in the paper). They show DP requires for all . With this resembles the smoothed histogram (a pseudocount floor), and they also suggest a weakened version of DP.
Examples
How many points can the smoothed histogram release? (own computation). , , bins. The maximum satisfying (6) versus the approximation (7) ():
| max from (6) | approximation (7) | |
|---|---|---|
| 0.05 | 5.7 | 5 |
| 0.1 | 11.6 | 10 |
| 0.3 | 43.4 | 30 |
| 0.5 | 100.5 | 50 |
| 0.9 | 900.5 | 90 |
Only about 11 synthetic points can be released at , and a large requires close to 1, at which the released data is nearly uniform noise. This is the “choosing is delicate” point (too large breaks privacy, too small breaks accuracy) that motivates preferring the perturbed histogram.
import numpy as np, math
rng = np.random.default_rng(0)
def smoothed_histogram_k_max(alpha, n, m, delta):
return alpha / math.log((1 - delta) * m / (n * delta) + 1) # Theorem 4.1, eq. (6)
def perturbed_histogram_release(x, m, alpha, k, rng=rng):
"""Theorem 4.4 mechanism for r=1: Lap(2/alpha) on bin counts, clip at 0, renormalise, sample k points."""
counts = np.histogram(x, bins=m, range=(0, 1))[0]
d = np.maximum(counts + rng.laplace(0, 2 / alpha, m), 0)
q = d / d.sum() if d.sum() > 0 else np.full(m, 1 / m)
bins = rng.choice(m, size=k, p=q)
return (bins + rng.random(k)) / m # uniform within the chosen bin
x = rng.beta(10, 10, 1000)
z = perturbed_histogram_release(x, m=15, alpha=0.1, k=1000)
print(smoothed_histogram_k_max(1.0, 1000, 10, 0.1), x.mean(), z.mean())Connections
- Marketing measurement. A “perturbed histogram” is exactly how aggregate privacy-preserving reports behave: per-bucket counts plus Laplace noise, with negative values clipped. Clipping at zero introduces a bias for small cells that downstream models should handle (treat the clipped value as censored, or work with the unclipped noisy counts, which are unbiased). The bin-count trade-off ( for the non-private optimum, but private error grows with ) argues for coarser buckets than a non-private analysis would choose.
- Compare with the DP histogram view of Laplace noise in Dwork Roth 2014 - Laplace Mechanism (histogram queries, sensitivity 1 under add/remove neighbours, versus 2 under replace-one neighbours here).