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

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.
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.
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.
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
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
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
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
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
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
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.
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 Moments Accountant is a critical component within a broader ecosystem of privacy accounting and composition frameworks. These related concepts define the mathematical foundations, alternative accounting methods, and the training algorithms that rely on tight privacy loss bounds.
Rényi Differential Privacy (RDP)
A privacy definition based on the Rényi divergence that provides a natural framework for the Moments Accountant. The accountant tracks the logarithm of the moment-generating function of the privacy loss random variable evaluated at specific orders (α), which directly corresponds to computing the RDP guarantee. This relationship allows for tight composition of the Gaussian mechanism across thousands of DP-SGD iterations.
Gaussian Differential Privacy (GDP)
A privacy framework that characterizes a mechanism by its trade-off function between Type I and Type II errors in a hypothesis testing problem. GDP provides a central limit theorem for privacy composition, showing that the overall privacy loss of many composed mechanisms converges to a Gaussian trade-off function. This offers an alternative, operationally meaningful way to interpret the tight bounds computed by the Moments Accountant.
Privacy Loss Distribution
The probability distribution of the privacy loss random variable, which fully characterizes a mechanism's privacy properties. The Moments Accountant works by computing the moment-generating function of this distribution. Modern numerical accountants, such as Fourier accounting, directly compute the convolution of privacy loss distributions for even tighter composition bounds, representing the state-of-the-art evolution beyond the Moments Accountant.
Composition Theorem
A formal result quantifying how the total privacy loss accumulates when multiple differentially private mechanisms are applied to the same dataset. The Moments Accountant provides a tighter composition bound than the basic or advanced composition theorems by tracking higher-order moments of the privacy loss variable. This allows it to prove that DP-SGD satisfies (ε, δ)-DP with a significantly smaller ε than naive composition would suggest.
Privacy Amplification by Subsampling
A technique where the random selection of a data subset before applying a differentially private mechanism provides a stronger privacy guarantee. The Moments Accountant explicitly models the privacy amplification effect of Poisson subsampling or uniform shuffling used in DP-SGD. By computing the moment-generating function of the subsampled Gaussian mechanism, it achieves the tight bounds that make deep learning with differential privacy practical.

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