Inferensys

Glossary

Composition Theorem

A formal result quantifying how the total privacy loss accumulates when multiple differentially private mechanisms are applied to the same dataset, governing the sequential and parallel use of a privacy budget.
Developer demonstrating multi-agent tool use, agent tool selection interface on laptop, casual tech demo moment.
PRIVACY BUDGET ACCOUNTING

What is the Composition Theorem?

The Composition Theorem is a formal mathematical result that quantifies how the total privacy loss accumulates when multiple differentially private mechanisms are applied to the same dataset, governing the sequential and parallel use of a privacy budget.

The Composition Theorem provides the mathematical framework for tracking cumulative privacy loss when a dataset is subjected to multiple queries or analyses. It establishes that if k mechanisms, each satisfying ε-differential privacy, are applied to the same data, the total privacy guarantee degrades in a predictable, bounded manner. Basic composition states that the privacy loss parameters sum linearly, meaning k ε-differentially private queries collectively satisfy kε-differential privacy.

Advanced composition offers a tighter, sub-linear bound, showing that the total privacy loss grows proportionally to the square root of k multiplied by a constant, plus a small failure probability δ. This refined accounting, central to algorithms like DP-SGD, enables the execution of thousands of iterative steps while maintaining a meaningful global privacy guarantee, preventing the privacy budget from being exhausted prematurely.

PRIVACY ACCOUNTING

Core Properties of Composition Theorems

The composition theorem is the mathematical backbone of privacy budget management, defining how the total privacy loss accumulates when multiple differentially private mechanisms are applied to the same dataset. Understanding its core properties is essential for designing iterative algorithms like DP-SGD.

01

Sequential Composition

When multiple differentially private mechanisms are applied sequentially to the same dataset, the total privacy loss is the sum of the individual privacy losses.

  • If mechanism M₁ provides ε₁-DP and M₂ provides ε₂-DP, the combined release provides (ε₁ + ε₂)-DP.
  • This property governs iterative training loops where a model queries the dataset repeatedly.
  • It is the primary reason a privacy budget must be carefully allocated and tracked across all steps of an algorithm.
02

Parallel Composition

When mechanisms are applied to disjoint, independent subsets of a dataset, the total privacy loss is bounded by the maximum of the individual losses, not their sum.

  • If a dataset is partitioned into non-overlapping shards, applying an ε-DP mechanism to each shard yields an overall ε-DP guarantee.
  • This property is the foundation of the Private Aggregation of Teacher Ensembles (PATE) framework, where teacher models train on disjoint data partitions.
  • It enables efficient scaling of private computation across distributed data silos without consuming additional budget.
03

Advanced Composition

The naive sequential bound (summing epsilons) is often loose. Advanced composition theorems provide a tighter, sub-linear bound on total privacy loss for k-fold adaptive compositions.

  • For (ε, δ)-DP mechanisms, the total loss after k iterations is approximately O(√k · ε), not k · ε.
  • This is critical for Differentially Private Stochastic Gradient Descent (DP-SGD), which may require thousands of training iterations.
  • The Moments Accountant and Rényi Differential Privacy (RDP) are modern techniques that achieve even tighter composition bounds by tracking higher-order moments of the privacy loss random variable.
04

Post-Processing Immunity

A fundamental consequence of the composition theorem is that any computation applied to the output of a differentially private mechanism does not degrade the privacy guarantee.

  • An adversary cannot "un-privatize" a noisy statistic by applying arbitrary post-processing functions.
  • This property ensures that model weights trained with DP-SGD remain differentially private with respect to the training data, even if an attacker inspects or transforms the weights.
  • It provides a crucial composability guarantee: private intermediate results can be safely used as inputs to subsequent, non-private computations without additional privacy cost.
05

Privacy Loss Distribution

The composition of mechanisms is fully characterized by the convolution of their privacy loss distributions (PLDs).

  • The PLD is the probability distribution of the privacy loss random variable, which measures the log-ratio of output probabilities on neighboring datasets.
  • Fourier accounting and other numerical methods compute the exact composed PLD, yielding the tightest possible (ε, δ) bounds.
  • This approach underpins modern privacy accounting libraries like Google's TF Privacy and Meta's Opacus, enabling precise budget tracking for complex, adaptive compositions.
06

Adaptive Composition

In practice, mechanisms are chosen adaptively based on the outputs of previous mechanisms. The composition theorem holds even under this worst-case scenario.

  • An adversary can select the next query after observing all previous noisy outputs, and the composition bound still applies.
  • This models the reality of interactive data exploration and iterative model training, where hyperparameters and architectures are tuned based on intermediate results.
  • The guarantee is robust: the privacy loss accumulates independently of the analyst's strategy, preventing privacy budget gaming through adaptive query selection.
COMPOSITION THEOREM

Frequently Asked Questions

The composition theorem is the fundamental accounting principle of differential privacy, quantifying exactly how privacy loss accumulates when multiple analyses are performed on the same dataset. Below are the most common questions engineers and data scientists ask when implementing a privacy budget.

The composition theorem is a formal mathematical result that quantifies the total privacy loss when multiple differentially private mechanisms are applied sequentially to the same neighboring datasets. It provides the rules for how the privacy budget (ε, δ) degrades under repeated queries. Without composition, an adversary could simply run many independent analyses and average out the noise to reconstruct sensitive records. The theorem comes in two primary forms: basic composition, which states that the epsilons and deltas simply add linearly, and advanced composition, which provides a tighter, sub-linear bound on the total privacy loss, enabling significantly more queries under a fixed budget.

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.