Compose Rényi bounds at matching orders and convert once
Keep divergence domains, Gaussian sensitivity ratios and conversion bounds explicit.
On this page
The question for today
What you’ll understand
- Distinguish an RDP order from an epsilon-delta parameter.
- Compose conditional per-step bounds at a common order.
- Compute a conservative conversion on a declared finite order grid.
An RDP accountant tracks a curve indexed by a Rényi order rather than one epsilon number per step. At a fixed order, valid conditional bounds add under adaptive composition; afterward a conversion supplies an epsilon-delta guarantee. This separation can improve analysis, but only when every bound refers to the same protected adjacency and the actual mechanism. A precise-looking output from a library is not evidence that its input assumptions were correct.
Divergence and Gaussian bounds have domains
For finite order alpha greater than one, Rényi divergence compares two output distributions using a logarithmic moment of their density ratio. The denominator distribution must dominate the numerator for the finite-density expression; otherwise the divergence can be infinite. An RDP guarantee bounds this divergence for every ordered neighboring pair. Alpha is an analysis parameter, not a batch size, probability or privacy unit. Keep each order’s rho value paired with that order throughout accounting.
For equal-covariance Gaussian outputs, divergence is exactly alpha times the squared difference of means divided by twice the noise variance. A query with Euclidean sensitivity at most Delta and Gaussian coordinate SD s therefore has the displayed worst-case RDP bound. Setting s=sigma Delta makes the bound alpha/(2sigma²). Here that is the unsampled mechanism with q=1. A Poisson-sampled Gaussian has a mixture distribution and requires its sampled analysis; do not attach a q² multiplier and call the result exact.
Compose at a common order
For T adaptive releases, each conditional mechanism must satisfy its per-step RDP bound for every allowed prior output history. Then add the rho values at the same alpha. Do not combine a rho at order two with another at order eight and label their sum as one valid order. Changing noise or sampling rates across steps is allowed when each step has the corresponding valid bound. Account for every relevant release, including private tuning or evaluation mechanisms that are not simply another training step.
For any delta strictly between zero and one, the basic conversion adds log(1/delta)/(alpha−1) to the composed rho. Taking the minimum over a finite set of valid orders gives a valid epsilon parameter, though not necessarily the tightest possible one. This is a bound, not the mechanism’s exact smallest epsilon. Tighter conversion theorems and numerical accountants can return different valid values. Preserve theorem and implementation versions rather than treating two nonidentical bounds as evidence that one run changed its underlying randomness.
Audit inputs before trusting numerical precision
Store the adjacency, sensitivity convention, noise schedule, sampling law, q values, logical step count, order grid, target delta and accountant version. A sigma defined relative to C cannot be passed unchanged as sensitivity-relative noise under replacement when the relevant bound is 2C. A resumed run needs prior accountant state. Opacus v1.5.4 implements sampled-Gaussian RDP and a specific conversion; the elementary conversion used here is deliberately stated separately rather than claimed to reproduce every library result.
The function lab illustrates adding public cost terms only. Reset and set both a=0.5 and x=2; predict y=2. Separately Reset and set both a=1 and x=2; predict y=4, the sum of two identical first-run values. This quadratic has no Rényi divergence, sampling or privacy semantics. It cannot compute rho or epsilon. Use it only to check ordinary addition and scaling, while the worked example supplies the explicit Gaussian theorem and analysis domains required for an actual bound.
Work it through
Convert a fully sampled Gaussian bound on two orders
Use ten q=1 Gaussian mechanisms under one declared adjacency, each with sensitivity bound Delta₂=2 and coordinate noise SD s=4, so sigma=2. Assume the per-history conditional bounds hold. Let delta=exp(-6) and restrict the analysis grid to alpha in {2,4}. Use the basic conversion displayed above.
At alpha=2, one step has rho at most 2/(2×2²)=0.25. Ten steps give 2.5. Since log(1/delta)=6, conversion adds 6/(2−1)=6 and yields sufficient epsilon 8.5.
At alpha=4, one step has rho at most 4/8=0.5. Ten steps give five. Conversion adds 6/(4−1)=2, yielding sufficient epsilon seven.
The minimum over the declared two-order grid is seven at order four, with delta=exp(-6)≈0.002479. A richer grid or a tighter theorem can improve this bound; this example neither endorses that delta for deployment nor claims exact optimal epsilon.
The declared calculation certifies a sufficient (7,exp(-6)) pair under its assumptions. It is an unsampled Gaussian composition example, not a generic DP-SGD budget or a result produced by an interactive lab.
The living notebook
Explore the model
Interactive lab · function
Public arithmetic is not an accountant
Reset → set a=0.5 and x=2 → predict y=2. Separate Reset → set a=1 and x=2 → predict y=4, equal to two first-run values.
- y at chosen x
- 0.608
- Tangent slope · 2ax
- 1.35
- Signed area · ax³/3
- 0.182
This lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forThe quadratic only illustrates arithmetic scaling. It does not evaluate Rényi divergence, compose mechanisms or return a privacy budget.
Pause & reason
Check your understanding
Your turn
Try it yourself
Keep q=1, sensitivity two, noise SD four, delta=exp(-6) and grid {2,4}, but use four steps. Compute both basic converted epsilon parameters and their minimum.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
One-step rho bounds remain 0.25 at order two and 0.5 at order four. Only the composed rho changes with T.
Compare with the solution
At order two, composed rho is one and conversion gives 1+6=7. At order four, rho is two and conversion gives 2+2=4. The grid minimum is four, a sufficient epsilon for the stated delta and assumptions. It is a finite-grid bound, not proof that the optimal privacy parameter is exactly four.
Keep the idea
Take it with you
- RDP orders and protected adjacency must stay attached to their bounds.
- Conditional per-step rho values add pointwise at a common order.
- A finite-grid conversion provides a sufficient bound whose scope and theorem should be recorded.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.