Inferensys

Glossary

Moments Accountant

A privacy accounting method that tracks the moments of the privacy loss random variable to compute a tight bound on the total privacy loss of a composed mechanism, crucial for DP-SGD.
Compute infrastructure aisle representing runtime, scale, and model serving.
PRIVACY ACCOUNTING METHOD

What is Moments Accountant?

The moments accountant is a privacy accounting method that tracks the moments of the privacy loss random variable to compute a tight bound on the total privacy loss of a composed mechanism, crucial for DP-SGD.

The moments accountant is a privacy accounting technique that tracks the log of the moment-generating function of the privacy loss random variable at each step of a composed mechanism. By bounding the moments of the privacy loss rather than the worst-case loss directly, it provides a significantly tighter estimate of the total privacy budget consumed during iterative algorithms like Differentially Private Stochastic Gradient Descent (DP-SGD) compared to standard composition theorems.

Introduced by Abadi et al. in their seminal 2016 paper on deep learning with differential privacy, the moments accountant computes the Rényi divergence of the mechanism's output distribution on neighboring datasets. This approach enables the computation of a much smaller epsilon value for a given delta, allowing models to train for more steps under a fixed privacy budget without sacrificing the formal guarantees of (ε, δ)-differential privacy.

PRIVACY ACCOUNTING

Key Features of the Moments Accountant

The Moments Accountant is the computational engine that made deep learning with differential privacy practical. By tracking the log moments of the privacy loss random variable, it provides a tight bound on the total privacy cost (ε, δ) accumulated during DP-SGD training.

01

Log Moments Tracking

Instead of naively summing ε values, the Moments Accountant computes the log of the moment-generating function of the privacy loss random variable at each training step. This captures the entire distribution of possible privacy losses, not just a single worst-case bound.

  • Tracks moments across all orders λ to find the tightest bound
  • Accounts for the subsampled Gaussian mechanism used in DP-SGD
  • Converts accumulated log moments to a final (ε, δ) guarantee via tail bounds
02

Tight Composition via Rényi Divergence

The accountant leverages the connection between Rényi Differential Privacy (RDP) and the log moments of privacy loss. By computing the Rényi divergence of the subsampled Gaussian mechanism at each order α, it achieves composition bounds that are asymptotically tight.

  • Avoids the looseness of basic composition theorems
  • Provides significantly smaller ε values than the strong composition theorem
  • Enables practical privacy budgets for deep models with hundreds of epochs
03

Subsampling Amplification Integration

A critical innovation is the analytical integration of privacy amplification by subsampling into the moment computation. The accountant computes the exact log moment of the subsampled mechanism, accounting for the random batch selection in DP-SGD.

  • Handles Poisson subsampling and uniform sampling without replacement
  • Amplification factor depends on the sampling rate q = B/N
  • Smaller batch sizes yield stronger amplification and lower privacy cost
04

Numerical Implementation for DP-SGD

The Moments Accountant is implemented as a numerical routine that runs alongside training. It maintains a running computation of the worst-case privacy loss at each step, enabling real-time budget monitoring.

  • Computes the log moment for each integer order λ up to a maximum value
  • Uses binary search to find the optimal δ for a target ε or vice versa
  • Outputs the final (ε, δ) pair after all training steps complete
05

Comparison to Strong Composition

The Moments Accountant provides significantly tighter bounds than the advanced composition theorem of Dwork et al. For a typical DP-SGD run on MNIST with ε = 8, the strong composition theorem would report ε ≈ 150 — a catastrophic overestimate.

  • Reduces reported ε by an order of magnitude or more
  • Makes differential privacy feasible for deep learning in practice
  • The tightness comes from directly analyzing the privacy loss distribution
06

Fourier Accountant Successor

The Moments Accountant has been largely superseded by the Fourier Accountant and Privacy Loss Distribution (PLD) methods, which provide even tighter bounds by working directly with the characteristic function of the privacy loss distribution.

  • PLD accountant uses fast Fourier transform for numerical convolution
  • Provides the tightest known composition bounds for DP-SGD
  • Still conceptually grounded in the moment-tracking framework
PRIVACY ACCOUNTING

Frequently Asked Questions

Answers to common questions about the Moments Accountant, a critical algorithm for tracking privacy loss in differentially private deep learning.

The Moments Accountant is a privacy accounting algorithm that tracks the moments of the privacy loss random variable to compute a tight, high-probability bound on the total privacy loss of a composed mechanism. Unlike the strong composition theorem which provides loose, worst-case bounds, the Moments Accountant numerically computes the log of the moment-generating function of the privacy loss at each step of an iterative algorithm like Differentially Private Stochastic Gradient Descent (DP-SGD). It works by maintaining a running sum of the log-moments for a range of moment orders (lambda), and then converting this accumulated moment profile into an (ε, δ)-differential privacy guarantee using the tail bound via Markov's inequality. This method is the standard privacy accounting technique used in the original DP-SGD paper by Abadi et al. (2016) and remains a foundational tool for training deep learning models with formal privacy guarantees.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.