Abadi 2016 - Moments Accountant Theorems and Proofs
Summary
The moments accountant tracks the log moment-generating function of the privacy-loss random variable. These log moments add under adaptive composition (Theorem 2.1) and convert to by Markov’s inequality (Theorem 2.2). For the subsampled Gaussian mechanism, , giving (Theorem 1), saving a factor in and a factor in versus strong composition.
Overview
Strong composition is loose and ignores the noise distribution. The moments accountant keeps more information (higher moments of the privacy loss) so that composition stays tight. Concrete comparison: gives (accountant) versus (strong composition). With strong composition, Algorithm 1 would need , so the accountant saves a factor in the noise scale.
Main Content
Privacy loss and its log moments
For neighboring , mechanism , auxiliary input and outcome , the privacy loss at is
Adaptive composition is modeled by letting for the -th mechanism be the outputs of the previous ones. The -th log moment is
and .
That is -DP is equivalent to a tail bound on its privacy-loss random variable. Composing directly from the tail bound is loose, but the moments compose linearly.
Theorem 2 (composability and tail bound)
Let be as above.
- Composability. If is an adaptive sequence with , then for any , .
- Tail bound. For any , is -DP for .
Proof sketch (Appendix A). (1) The log privacy loss of a composite is a sum . Exponentiating, using independence of noise across mechanisms conditional on past outputs, the expectation factorizes: . In particular the theorem holds when each mechanism is chosen from the public outputs of earlier ones. (2) Markov: let ; for any , , and . The proof gives a tail bound on the privacy loss, which is stronger than DP at that .
Moments of the sampled Gaussian (Eqs. 3-4)
Let be the pdf of , the pdf of , and . For one step of Algorithm 1 (a Gaussian mechanism applied to a lot sampled with probability ),
The implementation integrates numerically. An asymptotic bound is .
Lemma 3 (moments bound for the sampled Gaussian)
Suppose with . Let and a sample from where each is chosen independently with probability . Then for any positive integer , the mechanism satisfies
Proof sketch (Appendix B). Fix and ; WLOG and the other included terms sum to 0, so only the first coordinate differs: a one-dimensional problem with and . One must show and . Expand binomially in , using , , and . The terms contribute 1 and 0, the term gives (using ), and terms with decay geometrically so the expansion is dominated by , which is .
Theorem 1 (main result)
There exist constants such that, given sampling probability and number of steps , for any Algorithm 1 is -differentially private for any if
Proof sketch. By Theorem 2.1 and Lemma 3 the log moment of the algorithm is . By Theorem 2.2 it suffices that and , plus the Lemma 3 requirement . Taking makes the second condition hold with equality; the first then needs . (This explicit is this note’s reconstruction of the proof; the paper states only that suitable constants exist.) The requirement on yields the range .
Lemma C.1 (DP implies a moment bound)
If is -differentially private then for any , .
Proof sketch. Let . DP gives and , so . By convexity of on the bounded range, linear interpolation gives . Together with Theorem 2 this yields a composition theorem for DP mechanisms roughly equivalent to unrolling the strong composition proof; the accountant’s power is that bounding the moments directly is stronger than going through DP and then Lemma C.1.
Numerical check of the paper’s headline numbers
import numpy as np
from scipy.special import gammaln, logsumexp
def log_E2(lam, q, sigma):
"""log E2 = log E_{z~mu}[(mu/mu0)^lam] for integer lam, via
E_{mu0}[((1-q)+q*mu1/mu0)^(lam+1)] and E_{mu0}[(mu1/mu0)^k] = exp(k(k-1)/(2 sigma^2))."""
a = lam + 1
k = np.arange(a + 1)
logC = gammaln(a + 1) - gammaln(k + 1) - gammaln(a - k + 1)
terms = logC + (a - k) * np.log1p(-q) + k * np.log(q) + (k * k - k) / (2 * sigma**2)
return logsumexp(terms)
def eps_moments_accountant(q, sigma, T, delta, max_lambda=64):
best = (np.inf, None)
for lam in range(1, max_lambda + 1):
alpha_total = T * log_E2(lam, q, sigma) # Theorem 2.1: moments add
eps = (alpha_total + np.log(1 / delta)) / lam # Theorem 2.2: delta = exp(alpha - lam*eps)
best = min(best, (eps, lam))
return best
print(eps_moments_accountant(0.01, 4, 10_000, 1e-5)) # about (1.26, 19): matches the paper's 1.26
print(eps_moments_accountant(0.01, 4, 40_000, 1e-5)) # about (2.58, 9) vs the paper's 2.55This script uses only (the paper takes ) and reproduces for 100 epochs; for 400 epochs it returns about 2.58 against the printed 2.55, a small difference whose cause (numerics or grid) was not investigated. The strong-composition numbers and are quoted from the paper, not recomputed.
Examples
Reading Theorem 1 with real numbers
Setup: , , . Solution: the bound’s functional form says . With the implied is of order 1, in line with the computed 1.26. Interpretation: noise must grow like and shrink with the sampling ratio ; training longer or sampling larger lots costs privacy. The constant is not given in the paper, so this is an order-of-magnitude reading.
Connections
- The accountant is the Renyi-divergence curve in disguise: in Mironov’s notation; see Mironov 2017 - Renyi Divergence and the RDP Definition and the conversion Mironov 2017 - From RDP to Approximate DP and Advanced Composition.
- Later work shows the summary loses information: Dong Roth Su 2022 - Noisy SGD Privacy Analysis.
- Moment-generating function intuition: compare with log-moment tools in The ELBO and KL Divergence Minimization (the limit relates to KL).