Inferensys

Glossary

Moment Accountant

The moment accountant is an advanced privacy accounting method used in DP-SGD that tracks a bound on the moments of the privacy loss random variable to compute tight overall (ε, δ) guarantees under composition.
Compute infrastructure aisle representing runtime, scale, and model serving.
PRIVACY ACCOUNTING

What is Moment Accountant?

The moment accountant is an advanced privacy accounting method used in differentially private machine learning to tightly track cumulative privacy loss across many training iterations.

The moment accountant is a privacy accounting technique that provides tight, composable bounds on the total privacy loss (ε, δ) for iterative algorithms like Differentially Private Stochastic Gradient Descent (DP-SGD). Instead of using generic composition theorems, it tracks a bound on the moments of the privacy loss random variable (the log ratio of output probabilities) at each training step. This method, formalized using Rényi differential privacy (RDP), allows for a much more precise accumulation of privacy cost compared to naive sequential composition, enabling longer training runs within a fixed privacy budget.

By converting the Rényi divergence bounds back to a final (ε, δ)-guarantee, the moment accountant delivers stronger utility for the same privacy level. It is particularly effective when combined with privacy amplification by subsampling, where analyzing a random mini-batch of data further tightens the bound. This makes it the de facto standard for privacy accounting in large-scale, iterative differentially private training workflows, including federated learning with DP-FedAvg.

PRIVACY ACCOUNTING

Key Features of the Moment Accountant

The moment accountant is an advanced method for tracking cumulative privacy loss in iterative algorithms like DP-SGD. It provides tighter, more practical (ε, δ) bounds than basic composition theorems by analyzing the moments of the privacy loss random variable.

01

Tracks Moments of Privacy Loss

Instead of tracking the final privacy parameters (ε, δ) directly, the moment accountant tracks a bound on the moment generating function of the privacy loss random variable. For each step t, it computes an upper bound on the α-th moment (or Rényi divergence of order α) of the privacy loss. This provides a more detailed statistical profile of the privacy loss distribution, enabling tighter composition.

02

Enables Tighter Composition Bounds

By working with Rényi differential privacy (RDP) as an intermediate representation, the moment accountant provides significantly tighter composition than advanced composition theorems for (ε, δ)-DP. For a fixed number of iterations T and noise scale σ, it yields a smaller final ε for the same δ, or allows for more iterations within the same privacy budget. This is critical for making DP-SGD practical for deep learning.

03

Native Support for Subsampling Amplification

The method naturally incorporates privacy amplification by subsampling. When DP-SGD uses Poisson sampling (each example included in a batch independently with probability q), the moment accountant can precisely compute the amplified RDP guarantee for each step. This formalizes the intuitive privacy benefit of stochastic gradient descent and is a key reason for its superior performance over non-iterative methods.

04

Outputs a Privacy Curve (ε vs. δ)

The final output is not a single (ε, δ) pair, but a privacy curve—a function mapping δ to ε. This provides a complete characterization of the trade-off between the two parameters. Practitioners can then select an operating point (e.g., ε for δ = 1e-5) that meets their requirements. The curve is derived by converting the accumulated RDP bounds back to (ε, δ)-DP using a standard conversion formula.

05

Core of Practical DP-SGD Implementations

The moment accountant is the standard privacy accounting method in major DP deep learning libraries like TensorFlow Privacy and Opacus. Its algorithmic steps are:

  • Initialize: Set moment orders α to a list of values (e.g., range(1, 65)).
  • Per-Iteration: For each training step with noise σ and sampling rate q, compute the RDP guarantee ε_α for each α.
  • Compose: Log-sum-exp the ε_α values across all T steps.
  • Convert: For a target δ, find the minimal ε using the RDP-to-(ε,δ) conversion.
06

Contrast with Basic Composition

The moment accountant is fundamentally more efficient than naive or advanced composition.

  • Naive (Sequential) Composition: Simply adds the ε of each step. Highly conservative, wastes budget.
  • Advanced Composition: Provides an O(sqrt(T)) bound on ε growth, but still loose for high T.
  • Moment Accountant: Provides an O(T) bound for fixed α, but the constant is much smaller due to the moment analysis and subsampling amplification, leading to orders of magnitude better privacy-utility trade-offs in practice.
PRIVACY ACCOUNTING COMPARISON

Moment Accountant vs. Other Privacy Accounting Methods

A technical comparison of advanced methods for tracking cumulative privacy loss (ε, δ) under composition in differentially private machine learning.

Feature / MetricMoment Accountant (RDP/zCDP)Basic Composition (Advanced)Rényi Differential Privacy (RDP)

Theoretical Foundation

Bounds moments of privacy loss RV; converts to (ε, δ) via tail bound

Direct sequential application of composition theorems

Defines privacy via Rényi divergence of order α

Primary Use Case

Tight accounting for iterative algorithms (e.g., DP-SGD, DP-FedAvg)

Simple, worst-case analysis for a small, fixed number of queries

Intermediate analysis; often used to derive zCDP or Moment Accountant bounds

Composition Tightness

Very tight for Gaussian mechanisms and subsampling

Loose, linear growth of ε with number of compositions k

Tighter than basic, but final (ε, δ) conversion can be loose

Handles Subsampling Amplification

Output Privacy Guarantee

(ε, δ)-Differential Privacy

(ε, δ)-Differential Privacy

(α, ε_α)-Rényi Differential Privacy

Noise Distribution Assumption

Optimized for Gaussian; adaptable to others

Agonistic to mechanism

Agonistic to mechanism

Computational Overhead

Moderate (requires numerical integration or pre-computed tables)

Low (simple arithmetic)

Low to Moderate (depends on α optimization)

Typical Effective ε (for 1000 DP-SGD steps, δ=1e-5)

1.2 - 2.5

8.0 - 15.0

N/A (outputs RDP curve)

MOMENT ACCOUNTANT

Frequently Asked Questions

The moment accountant is an advanced privacy accounting method used in differentially private machine learning. It provides tight, formal guarantees on cumulative privacy loss, which is critical for iterative algorithms like DP-SGD in federated learning.

The moment accountant is a privacy accounting technique that tracks a bound on the moments (mathematical expectations) of the privacy loss random variable to compute a tight overall (ε, δ) guarantee for a composition of many differentially private mechanisms. It is the state-of-the-art method for analyzing the privacy cost of iterative algorithms like Differentially Private Stochastic Gradient Descent (DP-SGD). Unlike basic composition theorems that can overestimate privacy loss, the moment accountant provides a much tighter bound, allowing for more training steps (and thus better model utility) within a fixed privacy budget. It works by converting bounds on the moment generating function of the privacy loss into tail bounds, which yield the final (ε, δ)-DP guarantee.

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.