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.
Glossary
Moment Accountant

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.
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.
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.
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.
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.
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.
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.
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 rateq, compute the RDP guaranteeε_αfor each α. - Compose: Log-sum-exp the
ε_αvalues across allTsteps. - Convert: For a target δ, find the minimal ε using the RDP-to-(ε,δ) conversion.
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 highT. - 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.
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 / Metric | Moment 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) |
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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The moment accountant is a core component of the differential privacy toolkit for iterative algorithms. These related concepts define the mathematical framework and mechanisms it operates within.
Differential Privacy (DP)
Differential privacy is a rigorous mathematical framework for quantifying and limiting the privacy loss incurred by an individual when their data is used in a computation. It provides a strong, statistical guarantee that the presence or absence of any single record in the dataset has a negligible effect on the algorithm's output.
- Formal Guarantee: An algorithm is (ε, δ)-differentially private if for any two adjacent datasets differing by one record, the probability of any output changes by at most a factor of e^ε, plus a small failure probability δ.
- Post-Processing Immunity: A critical property where any analysis performed on the output of a DP mechanism cannot weaken its privacy guarantee.
- The moment accountant is a method for privacy accounting within this framework, specifically designed for iterative processes like DP-SGD.
Privacy Accounting
Privacy accounting is the systematic process of tracking the cumulative privacy loss (ε, δ) across multiple, potentially adaptive, queries or training steps to ensure the total does not exceed a pre-defined privacy budget.
- Composition: The core challenge is understanding how privacy parameters degrade when mechanisms are composed (e.g., over many training epochs).
- Advanced Methods: Basic composition theorems are loose. The moment accountant and Rényi DP (RDP) provide tighter, more practical bounds for complex, iterative algorithms.
- This is essential for deploying DP in production, as it allows practitioners to provably bound total leakage and stop training before the budget is exhausted.
Rényi Differential Privacy (RDP)
Rényi differential privacy is a relaxation of differential privacy defined using the Rényi divergence between the output distributions of an algorithm on adjacent datasets. It is particularly useful for tight privacy loss analysis under composition.
- Parameterization: Defined by an order α > 1 and a parameter ε(α). A smaller ε(α) indicates stronger privacy.
- Tighter Composition: RDP often yields significantly tighter privacy bounds for Gaussian-based mechanisms compared to basic (ε, δ)-DP composition.
- The moment accountant for DP-SGD is fundamentally based on bounding the Rényi divergence at each step, which is then converted to a final (ε, δ) guarantee.
DP-SGD (Differentially Private SGD)
Differentially Private Stochastic Gradient Descent is the primary training algorithm that enables deep learning with differential privacy. It modifies standard SGD by introducing two key steps:
- Per-Example Gradient Clipping: Each training example's gradient is clipped to a maximum L2 norm
Cto bound its sensitivity. - Noisy Gradient Averaging: Calibrated Gaussian noise is added to the average of the clipped batch gradients before the model update.
- The moment accountant was developed specifically to provide tight privacy bounds for the iterative, subsampled Gaussian mechanism at the heart of DP-SGD, tracking privacy loss across thousands of training steps.
Gaussian Mechanism
The Gaussian mechanism is a fundamental algorithm for achieving (ε, δ)-differential privacy. It works by adding noise drawn from a Gaussian (normal) distribution to the true output of a function.
- Noise Scale: The standard deviation σ of the noise is proportional to the function's L2 sensitivity Δ and inversely proportional to the privacy parameters ε and δ (σ = Δ * √(2log(1.25/δ)) / ε).
- Use in DP-SGD: In DP-SGD, the function is the average of clipped gradients in a mini-batch. The moment accountant provides a refined analysis for the repeated, subsampled application of this mechanism.
- It is the mechanism of choice when pure ε-DP (via the Laplace mechanism) is too restrictive or provides poor utility.
Privacy Amplification by Subsampling
Privacy amplification by subsampling is a powerful technique where applying a differentially private mechanism to a randomly chosen subset of the data (e.g., a mini-batch) results in a stronger privacy guarantee than if it were applied to the full dataset.
- Core Principle: An adversary's chance of linking the output to any specific individual is reduced because that individual's data was only included with some probability (the sampling rate).
- Integration with Accounting: The moment accountant inherently and optimally accounts for this amplification effect when analyzing DP-SGD, which uses Poisson sampling or uniform sampling without replacement for mini-batches.
- This is why the privacy cost per step in DP-SGD is often much lower than naive composition would suggest.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us