Introduction
We consider privacy accounting for random allocation, a sampling scheme in which the data of each user is used in k k k steps chosen randomly and uniformly from a sequence of t t t steps (independently of the other users). This ensures that each user contributes a fixed number of times while still benefiting from the privacy amplification due to sampling. For k = 1 k=1 k = 1 , this is the balls-and-bins sampling scheme used to define the batches in DP-SGD [CGHLKKMSZ24 , CCGHST25 ]. More generally, the scheme can be used to enforce a communication constraint in distributed aggregation by limiting the number of coordinate blocks that each user sends [AFKRT26 ]. In both of these applications random allocation has been shown to have utility advantages over Poisson sampling [CGHLKKMSZ24 , CCGHST25 , AFKRT26 ]. These applications have also motivated increasingly accurate analyses of its privacy guarantees [FS25ra , DCO25 , FS26pld ]. For the Gaussian mechanism, the most accurate of these analyses shows that the privacy guarantees of random allocation are slightly better than those of Poisson sampling with the same noise scale and expected batch size in nearly all parameter regimes [FS26pld ]. Thus in these applications random allocation achieves a better privacy-utility trade-off than Poisson sampling.
As shown in [FS26pld ] (FS26 below), the privacy of random allocation can be analyzed using privacy loss distributions (PLDs). Given a PLD of a dominating pair of distributions of the per-step algorithm, their accountant computes a PLD that dominates random allocation applied to that algorithm (an allocation PLD). They reduce the allocation PLD to the distribution of a sum of t t t independent likelihood ratios (that is, exponentiated privacy losses), and compute this distribution by repeated squaring. Each pairwise sum is computed by a direct convolution on a geometric grid and is rounded to the grid in the direction that preserves stochastic domination. We refer to this algorithm as direct convolution. Its running time is quadratic in the inverse of α \alpha α the accuracy parameter in ε \varepsilon ε that bounds the error in the privacy loss. While direct convolution is efficient for a moderate level of accuracy, this dependence leads to a high running time in the high-accuracy regime. A highly accurate PLD is needed for the approximation error to remain small after a large number of compositions. For example, the analysis of DP-SGD with PREAMBLE in FS26 includes thousands of inner compositions and more than ten thousand training updates. In this regime, computing a PLD for which the final ε \varepsilon ε is accurate to within 0.05 0.05 0.05 typically takes more than an hour on a single Apple M4 core. Finding the noise scale that achieves a target ε \varepsilon ε requires multiple such computations, and a careful choice of the accuracy parameters of direct convolution.
The standard FFT-based approach to the composition of PLDs [KJH20 , GLW21 ] does not resolve this problem. Composition adds privacy losses, whereas random allocation adds their exponentials, that is, likelihood ratios. A uniform grid over likelihood ratios needs to resolve small ratios over a range that can be very large. As a result, ensuring accuracy α \alpha α using FFT requires an impractically large grid, and smaller grids have been demonstrated to have a poor trade-off between accuracy and running time [FS26pld Appendix D]. Thus, given the practical benefits of random allocation, we address the question of whether there is a more efficient approach to privacy accounting for random allocation.
Our Contribution
Our main contribution is a multiscale FFT algorithm with connect-the-dots projections. This algorithm computes a dominating allocation PLD in time that is nearly linear in the inverse of the accuracy parameter. Our algorithm approximates the PLD of the same dominating pair of distributions as in FS26, accepts a general PLD as its input and outputs a PLD. In particular, the output PLD supports additional accounting operations such as subsampling and composition.
Multiscale FFT.
We replace the geometric grid of FS26 by a grid with m m m uniformly spaced points in each dyadic interval [ 2 j , 2 j + 1 ) [2^j,2^{j+1}) [ 2 j , 2 j + 1 ) for j ∈ Z j \in \mathbb{Z} j ∈ Z , and compute every pairwise sum by multiscale FFT (§ 3 ). Its output is identical to rounding the exact sum onto the grid. For the same accuracy, the dyadic grid has a comparable number of points. Its main advantage is for computation of each merge: direct convolution’s runtime is quadratic in grid size since it sums all pairs of grid points, whereas multiscale FFT takes time nearly linear in the number of grid points. As in FS26, the input PLD is only approximated between its β / 2 t \beta/2t β /2 t and 1 − β / 2 t 1-\beta/2t 1 − β /2 t quantiles, where β \beta β bounds the probability of the tails (translating to an increase in δ \delta δ ). Let Δ \Delta Δ be the length of the smallest interval that contains these quantiles of the log-likelihood ratio ln ( P ( ω ) / Q ( ω ) ) \ln(P(\omega)/Q(\omega)) ln ( P ( ω ) / Q ( ω )) (where ( P , Q ) (P,Q) ( P , Q ) is the dominating pair that defines the input PLD) both for ω ∼ P \omega\sim P ω ∼ P and for ω ∼ Q \omega\sim Q ω ∼ Q , that is, of the input PLD and of the negation of its dual. Then for t t t steps the running time of our algorithm (up to reading the input; Corollary 4.5 and Remark 4.6 ) is
O ( ( Δ + log ( t ) ) log 2 ( t ) α log ( log ( t ) α ) ) . \begin{equation}
O\!\left(\frac{(\Delta+\log(t))\log^2(t)}{\alpha}\log\!\left(\frac{\log(t)}{\alpha}\right)\right). \tag*{(1)}
\end{equation} O ( α ( Δ + log ( t )) log 2 ( t ) log ( α log ( t ) ) ) . (1)
For example, for the Gaussian mechanism with noise scale σ \sigma σ , Δ = O ( 1 / σ 2 + log ( t / β ) / σ ) \Delta=O(1/\sigma^2+\sqrt{\log(t/\beta)}/\sigma) Δ = O ( 1/ σ 2 + log ( t / β ) / σ ) . Thus, for a fixed number of steps, the running time is linear in Δ / α \Delta/\alpha Δ/ α up to a logarithmic factor, whereas the running time of direct convolution is quadratic in the analogous ratio [FS26pld Theorem 4.6].
Connect-the-dots projections.
Conservative rounding in FS26 moves every value in the same direction, and thus increases the expected privacy loss and the χ 2 \chi^2 χ 2 divergence of the computed pair by amounts of the order of α \alpha α . We refer to the increase in the expected privacy loss as the bias. We replace it by the connect-the-dots (CtD) projection of [DGKKM22 ], which splits the mass of each value between its two neighboring grid points so as to preserve its mean. We demonstrate that the bias of our algorithm and its error measured as the increase in the χ 2 \chi^2 χ 2 divergence of the computed pair both drop to O ( α 2 / log ( t ) ) O(\alpha^2/\log(t)) O ( α 2 / log ( t )) , with the same running time and the same ( α , β ) (\alpha,\beta) ( α , β ) guarantee (§ 4 ). Our focus on measuring the increase in χ 2 \chi^2 χ 2 relies on recent work showing that χ 2 \chi^2 χ 2 of the dominating pair tightly controls the privacy loss for (subsampled) composition and for random allocation [FS26clt ]. Our algorithm applies CtD projection at multiple levels and, as we argue briefly in Remark 4.4 , the results in [FS26clt ] apply to all but a small number of the highest-level projections.
CtD projection gives valid upper bounds only when it is applied to likelihood ratios under Q Q Q . Therefore we compute only the add direction and obtain the remove direction as its dual.
Numerical results.
Numerical evaluation using an implementation that can be found at [PLD_acc_msfft ] shows that our algorithm is faster than direct convolution of FS26 by several orders of magnitude in the regimes that require high accuracy. As a quick numerical example, in the setting of DP-SGD with PREAMBLE above, multiscale FFT computes the allocation PLD in 0.012 0.012 0.012 seconds and, for the same noise scale, improves the upper bound on ε \varepsilon ε at δ = 10 − 6 \delta=10^{-6} δ = 1 0 − 6 from 0.985 0.985 0.985 to 0.92 0.92 0.92 (§ 5.0.0.3 ). Naturally, the speedups are smaller when the input PLD is concentrated, since direct convolution is already fast on the resulting small grid. We report the full range of these comparisons in § 5 , together with improved privacy bounds for DP-SGD with PREAMBLE after Poisson subsampling and composition.
We also examine the effect of the CtD projection on the accuracy of the final bound and compare it with the error resulting from the rounding approach in FS26. Our evaluation suggests that the CtD improves the dependence of the running time on the accuracy from about 1 / α 1/\alpha 1/ α to about 1 / α \sqrt{1/\alpha} 1/ α (§ 5 ). This suggests that the accuracy of the final bound behaves essentially like the bias and χ 2 \chi^2 χ 2 error.
Technical Overview
We represent distributions of likelihood ratios on a grid that is uniform within each dyadic interval [ 2 j , 2 j + 1 ) [2^j,2^{j+1}) [ 2 j , 2 j + 1 ) (or band) and whose spacing doubles between consecutive bands (Figure 1 ). Such a grid gives a relative approximation at every scale while allowing the use of FFT-based convolutions within a band. The main step of our algorithm computes the distribution of the sum of two independent random variables supported on this grid and projects it back onto the same grid using the CtD projection (we refer to this step as a merge).
Computing a merge by direct convolution requires going over all pairs of grid points, whereas FFT requires both values to lie on the same uniform grid. The obvious issue with using FFT on the dyadic grid is that two values from different bands lie on grids with different spacings.
However, the sum of such values does not require the finer resolution of the lower band. Specifically, for a value x x x in band j j j and a value y y y in a lower band, the sum x + y x+y x + y lies in bands j j j or j + 1 j+1 j + 1 , and the spacing of the grid above 2 j 2^j 2 j is at least the spacing of band j j j . We therefore project y y y onto the uniform grid with the spacing of band j j j (extended down to zero), on which x x x also lies. A crucial question is whether this can be done without increasing the approximation error. We show that the answer is yes as long as the uniform grids of different bands are nested, which holds for the dyadic grid (every grid point in band j j j or above is a multiple of the spacing of band j j j ). In fact, in this case the result is identical to the projection of x + y x+y x + y itself onto the grid.
Thus for every band j j j we apply this projection to all the mass of each distribution below band j j j . The resulting projected prefix occupies only m + 1 m+1 m + 1 grid points, regardless of the number of lower bands. All the pairs of values in which the larger value is in band j j j then lie on the same uniform grid. Their contribution to the sum is given by three convolutions on this grid (band j j j of both distributions with each other, and band j j j of each distribution with the projected prefix of the other), which we compute using FFTs of length 4 m 4m 4 m . Pairs in which both values lie below band j j j are accounted for, at a finer resolution, in a lower band. Overall, every pair of values is accounted for exactly once. Therefore a merge computes the projection of the exact sum in time that is nearly linear in the size of the grid (Theorem 3.1 ).
[x=0.8cm,y=0.72cm,
knot/.style={circle,fill,inner sep=0pt,minimum size=3.4pt},
latt/.style={circle,draw,fill=white,inner sep=0pt,minimum size=4.2pt},
pref/.style={circle,draw,fill=black!40,inner sep=0pt,minimum size=4.2pt},
lab/.style={font=\scriptsize},
side/.style={font=\scriptsize,anchor=east}]
\draw[->] (-0.3,1.7) -- (16.7,1.7);
\foreach \x in {0,0.5,0.625,0.75,0.875,1,1.25,1.5,1.75,2,2.5,3,3.5,4,5,6,7,8,10,12,14,16}
\node[knot] at (\x,1.7) {};
\foreach \x in {0,1,2,4,8,16} \node[lab,below=2pt] at (\x,1.7) {$\x$};
\foreach \a/\b/\j in {0.5/1/-1,1/2/0,2/4/1,4/8/2,8/16/3}{
\draw[decorate,decoration={brace,amplitude=2.5pt}] (\a,1.88) -- (\b,1.88);
\node[lab] at ({(\a+\b)/2},2.3) {$\j$};}
\node[side] at (-0.45,2.3) {band};
\node[side] at (-0.45,1.7) {grid $\gridOf{4}$};
\draw[->,thin,shorten <=2pt,shorten >=3pt] (2.5,1.7) -- (2,0);
\draw[->,thin,shorten <=2pt,shorten >=3pt] (2.5,1.7) -- (3,0);
\node[lab] at (2.95,1.0) {$y$};
\foreach \x in {4,5,6,7,8,10,12,14} \draw[densely dashed,gray] (\x,1.12) -- (\x,0.14);
\draw[->] (-0.3,0) -- (16.7,0);
\foreach \x in {0,...,15} \node[latt] at (\x,0) {};
\foreach \x in {0,...,4} \node[pref] at (\x,0) {};
\node[side] at (-0.45,0) {grid $h_2\mathbb Z_{\ge0}$};
\draw[decorate,decoration={brace,mirror,amplitude=3pt,raise=5pt}] (0,0) -- (4,0)
node[lab,midway,below=8pt,align=center] {mass below band $2$\\ (projected prefixes)};
\draw[decorate,decoration={brace,mirror,amplitude=3pt,raise=5pt}] (4.1,0) -- (14,0)
node[lab,midway,below=8pt,align=center] {support of the three convolutions at band $2$};Figure 1. The dyadic grid and the merge step for m = 4 m=4 m = 4 . Top: the grid G 4 \mathcal G_{4} G 4 and its bands B j = [ 2 j , 2 j + 1 ) B_{j}=[2^j,2^{j+1}) B j = [ 2 j , 2 j + 1 ) (bands − 2 , − 3 , … -2,-3,\ldots − 2 , − 3 , … accumulate at zero), where band 2 2 2 is [ 4 , 8 ) [4,8) [ 4 , 8 ) with spacing h 2 = 1 h_{2}=1 h 2 = 1 . Bottom: the uniform grid of band 2 2 2 extended down to zero. A value y y y below band 2 2 2 is projected onto this grid (arrows), after which the mass below band 2 2 2 occupies m + 1 m+1 m + 1 points. The knots of G 4 \mathcal G_{4} G 4 in [ 4 , 16 ) [4,16) [ 4 , 16 ) (dashed, in bands 2 2 2 and 3 3 3 ) are a subset of this grid, and [ 4 , 16 ) [4,16) [ 4 , 16 ) contains the support of the three convolutions at band 2 2 2 (band 2 2 2 of both inputs with each other, and band 2 2 2 of each input with the projected prefix of the other). Thus projecting the sums onto G 4 \mathcal G_{4} G 4 gives the same measure as projecting the exact sums (Theorem 3.1 ).
As in FS26, we compute the distribution of the sum of t t t identically distributed likelihood ratios by repeated squaring, which requires only logarithmically many merges. Each projection changes a value by a factor of at most 1 + 1 / m 1+1/m 1 + 1/ m , resulting in an error of at most 1 / m 1/m 1/ m in the log space. Adding nonnegative values preserves a common bound on their multiplicative error. Thus the error of the computed sum grows with the number of merges that a summand passes through (at most ⌈ log 2 ( t ) ⌉ \lceil\log_2(t)\rceil ⌈ log 2 ( t )⌉ ) and not with the number of summands. In particular, m = O ( log ( t ) / α ) m=O(\log(t)/\alpha) m = O ( log ( t ) / α ) points per band suffice for accuracy α \alpha α . Every distribution in the computation has O ( Δ + log ( t ) ) O(\Delta+\log(t)) O ( Δ + log ( t )) bands (a merge adds at most one band at the top), and each band is merged in O ( m log ( m ) ) O(m\log(m)) O ( m log ( m )) time, which gives the running time in (1) .
Viewed as a random map, the CtD projection preserves the conditional mean of the likelihood ratio, E [ Y ~ ∣ Y ] = Y \underset{}{\mathbb E}\left[\widetilde Y\mid Y\right]=Y E [ Y ∣ Y ] = Y , where Y ~ \widetilde Y Y is the projection of a random variable Y Y Y . This makes the increase of the χ 2 \chi^2 χ 2 divergence caused by a projection quadratic in the spacing of the grid, due to the cancellation of the first-order errors (§ 4.0.0.4 ), as for the mean and the variance of the privacy loss [FS26clt Section 6]. With a spacing of the order of α / log ( t ) \alpha/\log(t) α / log ( t ) and O ( log ( t ) ) O(\log(t)) O ( log ( t )) levels of projections, this gives the bound O ( α 2 / log ( t ) ) O(\alpha^2/\log(t)) O ( α 2 / log ( t )) on the χ 2 \chi^2 χ 2 error and on the bias stated above. This is in contrast to the rounding of FS26, which moves every value in the same direction and shifts the expected privacy loss by O ( α ) O(\alpha) O ( α ) .
At the same time, the CtD projection moves some of the mass down and need not give stochastic domination. Instead, preservation of the conditional mean increases Y Y Y in the convex order, which is preserved under sums of independent random variables. Under Q Q Q , both privacy profiles of random allocation are expectations of convex functions of the average likelihood ratio, which gives the validity of both directions (Lemma 4.3 ).
As discussed, we obtain the remove direction as the dual of the add direction. For tightness we show that in both directions the exact and the computed losses can be coupled so that their finite values differ by at most γ = ( ⌈ log 2 ( t ) ⌉ + 1 ) ln ( 1 + 1 / m ) \gamma=(\lceil\log_2(t)\rceil+1)\ln(1+1/m) γ = (⌈ log 2 ( t )⌉ + 1 ) ln ( 1 + 1/ m ) . To construct the coupling, we implement each projection as a random map that moves a value to one of its two neighboring grid points with the probabilities that preserve its mean (§ 4.0.0.3 ). For an input with an unbounded range of likelihood ratios (such as the Gaussian mechanism) we first truncate its tails, at a negligible cost in the tail parameter, and then project it onto the grid by one more CtD projection (Remark 4.6 ).
The dominating pair of distributions for random allocation with k = 1 k=1 k = 1 and Gaussian noise was given in the analyses of balls-and-bins sampling for DP-SGD [CGHLKKMSZ24 ] and for the matrix mechanism [CCGHST25 ]. It was extended in [FS25ra ] to algorithms whose steps are dominated by an arbitrary pair of distributions, and [DCO25 ] derived it independently for Gaussian noise. [CGHLKKMSZ24 ] and [CCGHST25 ] estimate the privacy parameters of this pair using Monte Carlo simulations, and [DG26 ] base Monte Carlo accounting for b b b -min-sep subsampling (a generalization of balls-and-bins sampling) in banded matrix factorization via dynamic programming. These simulations provide strong evidence that the privacy guarantees of 1 1 1 -out-of-t t t allocation for Gaussian noise are similar to those of t t t compositions of Poisson sampling with rate 1 / t 1/t 1/ t . The primary issue with Monte Carlo estimation is its computational cost when δ \delta δ is small and a high confidence level is required. In addition, it estimates the privacy parameters of the pair rather than its full privacy profile or PLD, and thus does not support subsequent accounting operations such as subsampling and composition.
The analysis in [FS25ra ] gives provable bounds on the privacy parameters of k k k -out-of-t t t allocation via a reduction to a k k k -fold composition of 1 1 1 -out-of-t / k t/k t / k allocation (Lemma A.1 ), including bounds on the Rényi divergence of the dominating pair. [DCO25 ] and [SK26 ] give bounds on the Rényi divergence for Gaussian noise and for matrix mechanisms, respectively, the latter computed by dynamic programming. The primary disadvantage of bounds on Rényi divergence is that their conversion to ( ε , δ ) (\varepsilon,\delta) ( ε , δ ) bounds is known to be somewhat lossy. Additionally their bounds apply only to Rényi orders of at least 2 2 2 and therefore provide a loose bound on the expected privacy loss.
Our work builds on the PLD accountant of FS26, which computes the PLD of the dominating pair numerically and thus supports subsequent accounting operations. Specifically, we use its representation of the allocation PLD via sums of likelihood ratios, its repeated squaring schedule (which gives logarithmic dependence on the number of steps), and its accounting operations on PLDs. We improve the cost of each merge at the resolution needed for an accurate PLD, reduce the χ 2 \chi^2 χ 2 error and the bias by replacing the rounding with the CtD projection, and obtain the remove direction as the dual of the add direction. In the remove direction, FS26 also merge a likelihood ratio under P P P and thus discretize both the input PLD and its dual. Since stochastic domination is not preserved by the dual, they discretize the dual separately and compute it from the exact input [FS26pld Section 4 and Remark C.2].
Numerical composition of PLDs was introduced by [MM18 ] and [SMM19 ], who quantize the PLD into privacy buckets and compose them by direct convolution, using exponentiation by squaring for a logarithmic dependence of the running time on the number of compositions. [KJH20 , KJPH21 , KH21 ] compose discretized PLDs using FFT, and [GLW21 ] give a tight analysis of the dependence of the running time on the accuracy. This approach is now the standard for the analysis of DP-SGD and is supported by several libraries [Google20 , Microsoft21 , Meta21 ]. [GKKM22 ] give a faster self-composition algorithm in which the grid spacing and the truncation interval grow with the number of composed copies, so that each of its stages uses only polylogarithmically many grid points. These algorithms compute the distribution of a sum of privacy losses. In contrast, random allocation requires adding likelihood ratios, and the dyadic grid is designed to address their large dynamic range.
The mean-preserving projection we use is the pessimistic CtD approximation of [DGKKM22 ], expressed in terms of likelihood ratios (Claim C.2 ). Viewed as a random map, it is the one-dimensional case of the dual quantization of [PW12 ], which preserves the conditional mean and therefore gives upper bounds on the expectations of convex functions and preserves the convex order. [PW09 ] apply dual quantization recursively to the partial sums of a random walk and bound the resulting error for smooth functions.
The closest technique to our multiscale FFT merge is the fast projected convolution of [Hac07 ], which computes the exact L 2 L^2 L 2 -orthogonal projection of the convolution of two piecewise-polynomial functions onto a locally refined grid (for example, one refined towards zero) in nearly linear time, under certain conditions on the grids. As in our algorithm, the grids are decomposed into levels of uniform grids, and the projection is incorporated before the discrete convolutions on each level, which are computed by FFT. Our merge applies this principle to the CtD projection of atomic measures, for which the nesting of the uniform grids of the bands makes the projection of the lower bands exact (Theorem 3.1 ).
Preliminaries
We follow the notation of FS26. The statements that we use, with the proof of the new identity (4) , appear in Appendix § 7 . For a random variable Y Y Y we denote its distribution by f Y f_Y f Y and its complementary CDF by F ‾ Y ( x ) ≔ P ( Y > x ) \overline F_Y(x)\coloneqq\underset{}{\mathbb P}\left(Y>x\right) F Y ( x ) : = P ( Y > x ) . Random variables take values in [ − ∞ , ∞ ] [-\infty,\infty] [ − ∞ , ∞ ] . We denote by ln \ln ln and log 2 \log_2 log 2 the natural and binary logarithms, and write log \log log inside O ( ⋅ ) O(\cdot) O ( ⋅ ) , where the base is immaterial.
Random allocation and adjacency.
We consider t t t -step algorithms, which apply an algorithm M M M to t t t subsets of the dataset in sequence, where each step also receives the outputs of the previous steps (its view). In the k k k -out-of-t t t random allocation scheme, each element of the dataset is added to k k k of the t t t subsets, chosen uniformly at random and independently of the other elements. We denote the resulting algorithm by A t , k ( M ) \mathcal A_{t,k}\left(M\right) A t , k ( M ) , and by A t ( M ) \mathcal A_{t}\left(M\right) A t ( M ) when k = 1 k=1 k = 1 . To define adjacency for sampling schemes that operate on a fixed number of elements, the domain X \mathcal X X of the elements is augmented with a null element ⊥ \bot ⊥ , which M M M treats as absent, that is, M ( ( s , ⊥ ) , v ) = M ( s , v ) M((\boldsymbol s,\bot),\boldsymbol v)=M(\boldsymbol s,\boldsymbol v) M (( s , ⊥ ) , v ) = M ( s , v ) for every dataset s \boldsymbol s s and view v \boldsymbol v v . Two datasets are adjacent if one of them is obtained from the other by replacing a single element by ⊥ \bot ⊥ . Thus replacing an element by ⊥ \bot ⊥ has the same effect on the output as removing it, while the number of elements, and thus the sampling scheme, remain unchanged.
Privacy loss distributions and privacy profiles.
For distributions P P P and Q Q Q over a domain Ω \Omega Ω , the privacy loss random variable L P , Q L_{P,Q} L P , Q is ln ( P ( ω ) / Q ( ω ) ) \ln(P(\omega)/Q(\omega)) ln ( P ( ω ) / Q ( ω )) for ω ∼ P \omega\sim P ω ∼ P , and its distribution is the privacy loss distribution (PLD) [DR16 ]. For κ ≥ 0 \kappa\ge0 κ ≥ 0 , the κ \kappa κ -hockey-stick divergence between P P P and Q Q Q is H κ ( P ∥ Q ) ≔ E [ ( 1 − κ e − L P , Q ) + ] \boldsymbol H_{\kappa}\left(P\,\Vert\,Q\right)\coloneqq\underset{}{\mathbb E}\left[(1-\kappa e^{-L_{P,Q}})_+\right] H κ ( P ∥ Q ) : = E [ ( 1 − κ e − L P , Q ) + ] , where ( x ) + ≔ max { 0 , x } (x)_+\coloneqq\max\{0,x\} ( x ) + : = max { 0 , x } [BKOZB12 ]. For a random variable L L L we refer to H κ ( L ) ≔ E [ ( 1 − κ e − L ) + ] \boldsymbol H_{\kappa}\left(L\right)\coloneqq\underset{}{\mathbb E}\left[(1-\kappa e^{-L})_+\right] H κ ( L ) : = E [ ( 1 − κ e − L ) + ] as its hockey-stick functional. The privacy profile δ M ( ε ) \delta_{M}(\varepsilon) δ M ( ε ) of an algorithm M M M is the largest e ε e^\varepsilon e ε -hockey-stick divergence between its output distributions on two adjacent datasets with the same view [BBG18 ]. Since the hockey-stick divergence is asymmetric, we denote by δ ⃗ M \vec{\delta}_{M} δ M the privacy profile in the remove direction, in which the second dataset is obtained from the first by replacing an element by ⊥ \bot ⊥ , and by \reflectbox{$\vec{\reflectbox{$\delta$}}$}_{M} the one in the add direction, in which the first dataset is obtained from the second in this way. The algorithm is ( ε , δ ) (\varepsilon,\delta) ( ε , δ ) -differentially private if \delta_{M}(\varepsilon)=\max\{\vec{\delta}_{M}(\varepsilon),\reflectbox{$\vec{\reflectbox{$\delta$}}$}_{M}(\varepsilon)\}\le\delta [DKMMN06 ].
Dominating pairs.
We say that a PLD L P 1 , Q 1 L_{P_1,Q_1} L P 1 , Q 1 dominates a PLD L P 2 , Q 2 L_{P_2,Q_2} L P 2 , Q 2 if H κ ( P 2 ∥ Q 2 ) ≤ H κ ( P 1 ∥ Q 1 ) \boldsymbol H_{\kappa}\left(P_2\,\Vert\,Q_2\right)\le\boldsymbol H_{\kappa}\left(P_1\,\Vert\,Q_1\right) H κ ( P 2 ∥ Q 2 ) ≤ H κ ( P 1 ∥ Q 1 ) for all κ ≥ 0 \kappa\ge0 κ ≥ 0 . A pair ( P , Q ) (P,Q) ( P , Q ) is a dominating pair for M M M in the remove (add) direction if δ ⃗ M ( ε ) ≤ H e ε ( P ∥ Q ) \vec{\delta}_{M}(\varepsilon)\le\boldsymbol H_{e^\varepsilon}\left(P\,\Vert\,Q\right) δ M ( ε ) ≤ H e ε ( P ∥ Q ) (respectively, \reflectbox{$\vec{\reflectbox{$\delta$}}$}_{M}(\varepsilon)\le\boldsymbol H_{e^\varepsilon}\left(P\,\Vert\,Q\right) ) for all ε \varepsilon ε [ZDW22 ]. Domination is transitive, and it is preserved under composition, whose PLD is the sum of the PLDs of the components [ZDW22 Theorem 10]. If every step of a t t t -step algorithm M M M is dominated by ( P , Q ) (P,Q) ( P , Q ) in the remove direction, then A t ( M ) \mathcal A_{t}\left(M\right) A t ( M ) is dominated by ( P ˉ t , Q t ) (\bar P_t,Q^t) ( P ˉ t , Q t ) in the remove direction and by ( Q t , P ˉ t ) (Q^t,\bar P_t) ( Q t , P ˉ t ) in the add direction, where
P ˉ t ≔ 1 t ∑ i = 1 t Q i − 1 × P × Q t − i , \bar P_t\coloneqq\frac1t\sum_{i=1}^tQ^{i-1}\times P\times Q^{t-i}, P ˉ t : = t 1 i = 1 ∑ t Q i − 1 × P × Q t − i ,
and the k k k -out-of-t t t allocation reduces to compositions of such allocations (Lemma A.1 ). We refer to the PLDs L P ˉ t , Q t L_{\bar P_t,Q^t} L P ˉ t , Q t and L Q t , P ˉ t L_{Q^t,\bar P_t} L Q t , P ˉ t as the allocation PLDs.
PLD realizations.
A random variable L L L is a PLD realization if E [ e − L ] ≤ 1 \underset{}{\mathbb E}\left[e^{-L}\right]\le1 E [ e − L ] ≤ 1 and P ( L = − ∞ ) = 0 \underset{}{\mathbb P}\left(L=-\infty\right)=0 P ( L = − ∞ ) = 0 [FS26pld Definition 3.1]. Every PLD is a PLD realization, and conversely, every PLD realization is the PLD of some pair of distributions. The dual D ( L ) \mathcal D\left(L\right) D ( L ) of a PLD realization L L L is the PLD of the reversed pair, so that D ( L P , Q ) = L Q , P \mathcal D\left(L_{P,Q}\right)=L_{Q,P} D ( L P , Q ) = L Q , P (A.2 ). Its distribution is that of − L -L − L with probabilities weighted by e − L e^{-L} e − L , with mass 1 − E [ e − L ] 1-\underset{}{\mathbb E}\left[e^{-L}\right] 1 − E [ e − L ] at + ∞ +\infty + ∞ [FS26pld Definition 3.1]. A PLD realization U U U dominates a PLD realization L L L if H κ ( L ) ≤ H κ ( U ) \boldsymbol H_{\kappa}\left(L\right)\le\boldsymbol H_{\kappa}\left(U\right) H κ ( L ) ≤ H κ ( U ) for all κ ≥ 0 \kappa\ge0 κ ≥ 0 , and in this case D ( U ) \mathcal D\left(U\right) D ( U ) dominates D ( L ) \mathcal D\left(L\right) D ( L ) (A.3 ). The privacy profiles of L L L and of D ( L ) \mathcal D\left(L\right) D ( L ) are both expectations of functions of e − L e^{-L} e − L :
H e ε ( L ) = E [ ( 1 − e ε − L ) + ] , H e ε ( D ( L ) ) = 1 − E [ e − L ] + E [ ( e − L − e ε ) + ] . \begin{equation}
\boldsymbol H_{e^\varepsilon}\left(L\right)=\underset{}{\mathbb E}\left[(1-e^{\varepsilon-L})_+\right],
\qquad
\boldsymbol H_{e^\varepsilon}\left(\mathcal D\left(L\right)\right)=1-\underset{}{\mathbb E}\left[e^{-L}\right]+\underset{}{\mathbb E}\left[(e^{-L}-e^\varepsilon)_+\right]. \tag*{(2)}
\end{equation} H e ε ( L ) = E [ ( 1 − e ε − L ) + ] , H e ε ( D ( L ) ) = 1 − E [ e − L ] + E [ ( e − L − e ε ) + ] . (2)
The first formula is the definition, and the second one holds since the mass of D ( L ) \mathcal D\left(L\right) D ( L ) at + ∞ +\infty + ∞ contributes 1 − E [ e − L ] 1-\underset{}{\mathbb E}\left[e^{-L}\right] 1 − E [ e − L ] and its finite part contributes E [ e − L ( 1 − e ε e L ) + ] = E [ ( e − L − e ε ) + ] \underset{}{\mathbb E}\left[e^{-L}(1-e^\varepsilon e^{L})_+\right]=\underset{}{\mathbb E}\left[(e^{-L}-e^\varepsilon)_+\right] E [ e − L ( 1 − e ε e L ) + ] = E [ ( e − L − e ε ) + ] . Both functions are convex in e − L e^{-L} e − L . For the PLD L = L Q , P L=L_{Q,P} L = L Q , P in the add direction, e − L = P ( ω ) / Q ( ω ) e^{-L}=P(\omega)/Q(\omega) e − L = P ( ω ) / Q ( ω ) for ω ∼ Q \omega\sim Q ω ∼ Q is the likelihood ratio under Q Q Q .
The allocation PLDs.
For a PLD realization L L L let
\begin{equation}
\vec{\psi}_{t}(L)\coloneqq\ln\biggl(\frac1t\Bigl(e^{L^{(0)}}+\sum_{i=1}^{t-1}e^{-\mathcal D\left(L\right)^{(i)}}\Bigr)\biggr),
\qquad
\reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L)\coloneqq-\ln\Bigl(\frac1t\sum_{i=1}^te^{-L^{(i)}}\Bigr), \tag*{(3)}
\end{equation}
where the superscripts denote independent copies. FS26 show that L P ˉ t , Q t = ψ ⃗ t ( L P , Q ) L_{\bar P_t,Q^t}=\vec{\psi}_{t}(L_{P,Q}) L P ˉ t , Q t = ψ t ( L P , Q ) and L_{Q^t,\bar P_t}=\reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L_{Q,P}) , and that these transformations preserve domination (Theorem A.5 and [FS26pld Section 4]). In ψ ⃗ t \vec{\psi}_{t} ψ t , the factor e L ( 0 ) e^{L^{(0)}} e L ( 0 ) is the likelihood ratio under P P P and the other factors are likelihood ratios under Q Q Q . Thus FS26 compute the remove direction from both the input PLD and its dual. However, the two allocation PLDs are the PLDs of the same pair in the two directions. Therefore, for every PLD realization L L L (A.7 ),
\begin{equation}
\vec{\psi}_{t}(\mathcal D\left(L\right))=\mathcal D\left(\reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L)\right). \tag*{(4)}
\end{equation}
Thus both allocation PLDs are determined by the average R t ≔ 1 t ∑ i = 1 t e − L ( i ) R_{t}\coloneqq\frac1t\sum_{i=1}^te^{-L^{(i)}} R t : = t 1 ∑ i = 1 t e − L ( i ) of t t t likelihood ratios under Q Q Q , since \reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L)=-\ln(R_{t}) . By (2) , both privacy profiles of random allocation are expectations of convex functions of R t R_{t} R t .
Stochastic domination and tightness.
For any two random variables V , U V, U V , U , we write V ⪯ U V\preceq U V ⪯ U if F ‾ V ≤ F ‾ U \overline F_V\le\overline F_U F V ≤ F U , and V ⪯ ( α , β ) U V\preceq_{(\alpha,\beta)}U V ⪯ ( α , β ) U if F ‾ V ( x ) ≤ F ‾ U ( x − α ) + β \overline F_V(x)\le\overline F_U(x-\alpha)+\beta F V ( x ) ≤ F U ( x − α ) + β for all x x x . Following FS26 we say that U U U ( α , β ) (\alpha,\beta) ( α , β ) -tightly stochastically dominates V V V if V ⪯ U ⪯ ( α , β ) V V\preceq U\preceq_{(\alpha,\beta)}V V ⪯ U ⪯ ( α , β ) V . Stochastic domination implies domination, and V ⪯ ( α , β ) U V\preceq_{(\alpha,\beta)}U V ⪯ ( α , β ) U implies H e ε ( V ) ≤ H e ε − α ( U ) + β \boldsymbol H_{e^\varepsilon}\left(V\right)\le\boldsymbol H_{e^{\varepsilon-\alpha}}\left(U\right)+\beta H e ε ( V ) ≤ H e ε − α ( U ) + β (A.4 ). The output of our accountant dominates the exact PLD but need not stochastically dominate it. Therefore we state its guarantees directly in terms of privacy profiles.
Definition 2.1 (Tight domination). Given α ≥ 0 \alpha\ge0 α ≥ 0 and β ∈ [ 0 , 1 ] \beta\in[0,1] β ∈ [ 0 , 1 ] , a PLD realization U U U ( α , β ) (\alpha,\beta) ( α , β ) -tightly dominates a PLD realization L L L if for every ε ∈ R \varepsilon\in\mathbb R ε ∈ R ,
H e ε ( L ) ≤ H e ε ( U ) ≤ H e ε − α ( L ) + β . \boldsymbol H_{e^\varepsilon}\left(L\right)\le\boldsymbol H_{e^\varepsilon}\left(U\right)\le\boldsymbol H_{e^{\varepsilon-\alpha}}\left(L\right)+\beta. H e ε ( L ) ≤ H e ε ( U ) ≤ H e ε − α ( L ) + β .
That is, U U U dominates L L L , and the privacy profile of U U U is at most that of L L L shifted by α \alpha α , plus β \beta β . By the implication above, if U U U dominates L L L and U ⪯ ( α , β ) L U\preceq_{(\alpha,\beta)}L U ⪯ ( α , β ) L then U U U ( α , β ) (\alpha,\beta) ( α , β ) -tightly dominates L L L , and in particular tight stochastic domination implies tight domination with the same parameters (A.4 ).
Definition 2.2 (χ 2 \chi^2 χ 2 error and bias). For a PLD realization L L L we denote χ 2 ( L ) ≔ E [ e L ] − 1 ∈ [ 0 , ∞ ] \chi^2(L)\coloneqq\underset{}{\mathbb E}\left[e^{L}\right]-1\in[0,\infty] χ 2 ( L ) : = E [ e L ] − 1 ∈ [ 0 , ∞ ] . For PLD realizations U U U and L L L with χ 2 ( L ) < ∞ \chi^2(L)<\infty χ 2 ( L ) < ∞ , the χ 2 \chi^2 χ 2 error of U U U relative to L L L is χ 2 ( U ) − χ 2 ( L ) \chi^2(U)-\chi^2(L) χ 2 ( U ) − χ 2 ( L ) . The bias of U U U relative to L L L is the increase E [ U 1 { U < ∞ } ] − E [ L 1 { L < ∞ } ] \underset{}{\mathbb E}\left[U\mathbf 1_{\{U<\infty\}}\right]-\underset{}{\mathbb E}\left[L\mathbf 1_{\{L<\infty\}}\right] E [ U 1 { U < ∞ } ] − E [ L 1 { L < ∞ } ] in the expectation of the finite part of the loss.
Note that χ 2 ( L ) ≥ 0 \chi^2(L)\ge0 χ 2 ( L ) ≥ 0 , since E [ e L ] ≥ 1 / E [ e − L ] ≥ 1 \underset{}{\mathbb E}\left[e^{L}\right]\ge1/\underset{}{\mathbb E}\left[e^{-L}\right]\ge1 E [ e L ] ≥ 1/ E [ e − L ] ≥ 1 by Jensen’s inequality, and that χ 2 ( L ) = ∞ \chi^2(L)=\infty χ 2 ( L ) = ∞ if L L L has mass at + ∞ +\infty + ∞ . For a pair ( P , Q ) (P,Q) ( P , Q ) with P ≪ Q P\ll Q P ≪ Q , χ 2 ( L P , Q ) = E ω ∼ Q [ ( P ( ω ) / Q ( ω ) ) 2 ] − 1 \chi^2(L_{P,Q})=\underset{\omega\sim Q}{\mathbb E}\left[(P(\omega)/Q(\omega))^2\right]-1 χ 2 ( L P , Q ) = ω ∼ Q E [ ( P ( ω ) / Q ( ω ) ) 2 ] − 1 is the χ 2 \chi^2 χ 2 divergence of P P P from Q Q Q . The χ 2 \chi^2 χ 2 divergence of a single step controls the Gaussian approximation of the privacy losses of random allocation [FS26clt Section 5].
Multiscale FFT
In this section we describe our accountant (Algorithm alg:ctd-alloc ) and the multiscale FFT merge that it relies on. The accountant computes the add direction from the distribution of the sum of t t t independent likelihood ratios under Q Q Q , and it obtains the remove direction as the dual of the result (by (4) ). After projecting the likelihood ratio of its input onto a grid that is uniform within each dyadic interval, it then computes the distribution of the sum by repeated squaring, in which every convolution is followed by the projection onto the grid (a merge). We define the grid and the projection in § 3.1 and describe the accountant in § 3.2 . In § 3.3 we show that the multiscale FFT merge computes every merge exactly in time nearly linear in the size of the grid (Theorem 3.1 ). We analyze the accountant in § 4 .
The Grid and the Projection
For an integer m ≥ 2 m\ge2 m ≥ 2 , let
G m ≔ { 0 } ∪ { 2 j ( 1 + i − 1 m ) : j ∈ Z , i ∈ [ m ] } . \mathcal G_{m}\coloneqq\{0\}\cup\biggl\{2^j\left(1+\frac {i-1}{m}\right):j\in\mathbb Z,\, i\in[m]\biggr\}. G m : = { 0 } ∪ { 2 j ( 1 + m i − 1 ) : j ∈ Z , i ∈ [ m ] } .
We refer to its points as knots, to B j ≔ [ 2 j , 2 j + 1 ) B_{j}\coloneqq[2^j,2^{j+1}) B j : = [ 2 j , 2 j + 1 ) as band j j j , to h j ≔ 2 j / m h_{j}\coloneqq 2^j/m h j : = 2 j / m as the spacing of band j j j , and to h j Z ≥ 0 h_{j}\mathbb Z_{\ge0} h j Z ≥ 0 as the lattice of band j j j . The knots in band j j j are m m m consecutive points of its lattice (Figure 1 ). The analysis uses two properties of the grid (Claim B.2 ):
Resolution: Every x > 0 x>0 x > 0 satisfies u ≤ x ≤ v u\le x\le v u ≤ x ≤ v for two consecutive knots 0 < u < v ≤ ( 1 + 1 / m ) u 0<u<v\le(1+1/m)u 0 < u < v ≤ ( 1 + 1/ m ) u .
Dyadic scaling: For every j ∈ Z j\in\mathbb Z j ∈ Z , every knot in band j j j or above is an integer multiple of h j h_{j} h j .
The multiscale FFT merge relies on the scaling, and the analysis of the accuracy in § 4 on the resolution.
Our algorithm relies on CtD projections [DGKKM22 ] onto G m \mathcal G_{m} G m , which split the mass of each value between its two neighboring knots so as to preserve its mean. Formally, for a set of knots S ⊆ [ 0 , ∞ ) S\subseteq[0,\infty) S ⊆ [ 0 , ∞ ) that contains 0 0 0 and a value x x x between adjacent knots u < v u<v u < v of S S S , let
Π S ( δ x ) ≔ v − x v − u δ u + x − u v − u δ v , \Pi_S(\delta_x)\coloneqq\frac{v-x}{v-u}\,\delta_u+\frac{x-u}{v-u}\,\delta_v, Π S ( δ x ) : = v − u v − x δ u + v − u x − u δ v ,
and let Π S ( δ x ) ≔ δ x \Pi_S(\delta_x)\coloneqq\delta_x Π S ( δ x ) : = δ x for x ∈ S ∪ { ∞ } x\in S\cup\{\infty\} x ∈ S ∪ { ∞ } . We extend Π S \Pi_S Π S linearly to finite measures and abbreviate Π ≔ Π G m \Pi\coloneqq\Pi_{\mathcal G_{m}} Π : = Π G m and Π h ≔ Π h Z ≥ 0 \Pi_h\coloneqq\Pi_{h\mathbb Z_{\ge0}} Π h : = Π h Z ≥ 0 for h > 0 h>0 h > 0 (Definition B.1 ).
Properties of the projections.
Our analysis uses only the following properties of the projections. We state them, and Theorem 3.1 , for general projections, since it is possible to use the multiscale FFT merge with rounding to get lower bounds (Remark 3.2 ). A projection onto a set of knots S S S is a map from finite measures on [ 0 , ∞ ] [0,\infty] [ 0 , ∞ ] to finite measures on S ∪ { ∞ } S\cup\{\infty\} S ∪ { ∞ } that fixes every measure supported on S ∪ { ∞ } S\cup\{\infty\} S ∪ { ∞ } . Let ξ \xi ξ and ζ \zeta ζ be finite measures on [ 0 , ∞ ] [0,\infty] [ 0 , ∞ ] , h > 0 h>0 h > 0 and j ∈ Z j\in\mathbb Z j ∈ Z .
Locality: Π S ( δ x ) \Pi_S(\delta_x) Π S ( δ x ) is supported on { u , v } \{u,v\} { u , v } for every x x x between adjacent knots u < v u<v u < v of S S S .
Linearity: Π S ( ξ + ζ ) = Π S ( ξ ) + Π S ( ζ ) \Pi_S(\xi+\zeta)=\Pi_S(\xi)+\Pi_S(\zeta) Π S ( ξ + ζ ) = Π S ( ξ ) + Π S ( ζ ) .
Commutativity: Π h ( ξ ∗ ζ ) = Π h ( ξ ) ∗ ζ \Pi_h(\xi*\zeta)=\Pi_h(\xi)*\zeta Π h ( ξ ∗ ζ ) = Π h ( ξ ) ∗ ζ if ζ \zeta ζ is supported on h Z ≥ 0 h\mathbb Z_{\ge0} h Z ≥ 0 .
Projection hierarchy: Π 2 h ( Π h ( ξ ) ) = Π 2 h ( ξ ) \Pi_{2h}(\Pi_h(\xi))=\Pi_{2h}(\xi) Π 2 h ( Π h ( ξ )) = Π 2 h ( ξ ) , and Π ( Π h j ( ξ ) ) = Π ( ξ ) \Pi(\Pi_{h_{j}}(\xi))=\Pi(\xi) Π ( Π h j ( ξ )) = Π ( ξ ) if ξ \xi ξ is supported on [ 2 j , ∞ ) [2^j,\infty) [ 2 j , ∞ ) .
Mean preservation: Π S ( δ x ) \Pi_S(\delta_x) Π S ( δ x ) has mean x x x for every x ≥ 0 x\ge0 x ≥ 0 .
The multiscale FFT merge relies on (P1) –(P4) , and the analysis of the accountant in § 4 on (P1) and (P5) . The CtD projections satisfy all five properties (Lemma B.3 ). The second part of the projection hierarchy is specific to the dyadic grid and relies on its scaling and the fact 2 j ∈ G m 2^j\in\mathcal G_{m} 2 j ∈ G m .
The Accountant
Algorithm alg:ctd-alloc receives a PLD realization L L L in the add direction. (For a PLD realization L ⃗ \vec{L} L in the remove direction we use L = D ( L ⃗ ) L=\mathcal D\left(\vec{L}\right) L = D ( L ) , which only reweights its atoms.) It chooses the number m m m of points per band from the accuracy parameter (line 1; see Corollary 4.5 ) and projects e − L e^{-L} e − L onto G m \mathcal G_{m} G m , which gives a PLD realization L ′ L' L ′ for which e − L ′ e^{-L'} e − L ′ is supported on G m \mathcal G_{m} G m (lines 2–3). It then computes by repeated squaring the distribution f S ^ f_{\widehat S} f S of the computed sum S ^ \widehat S S , which approximates the sum of t t t independent copies of e − L e^{-L} e − L (line 4). Finally, it returns \reflectbox{$\vec{\reflectbox{$L$}}$}_t\coloneqq-\ln(\widehat S/t) and its dual \vec{L}_t\coloneqq\mathcal D\left(\reflectbox{$\vec{\reflectbox{$L$}}$}_t\right) (line 5). That is, \reflectbox{$\vec{\reflectbox{$L$}}$}_t has mass f S ^ ( z ) f_{\widehat S}(z) f S ( z ) at − ln ( z / t ) -\ln(z/t) − ln ( z / t ) , and L ⃗ t \vec{L}_t L t has mass z t f S ^ ( z ) \frac zt f_{\widehat S}(z) t z f S ( z ) at ln ( z / t ) \ln(z/t) ln ( z / t ) for every z > 0 z>0 z > 0 and the remaining mass 1 − E [ S ^ / t ] 1-\underset{}{\mathbb E}\left[\widehat S/t\right] 1 − E [ S / t ] at + ∞ +\infty + ∞ .
\caption{CtD accountant \textbf{rand-alloc-ctd}$(L,t,\alpha)$}\label{alg:ctd-alloc}
\begin{algorithmic}[1]
\REQUIRE $L$ a PLD realization (add direction) with bounded finite values; $t\in\mathbb N$, $t\ge2$; $\alpha\in(0,1]$
\ENSURE $\reflectbox{$\vec{\reflectbox{$L$}}$}_t$ and $\vec{L}_t$ that $(\alpha,0)$-tightly dominate $\reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L)$ and $\vec{\psi}_{t}(\mathcal D\left(L\right))$
\STATE $m\gets\lceil(\lceil\log_2(t)\rceil+1)/\alpha\rceil$
\STATE $j_-\gets\lfloor\ell_-/\ln(2)\rfloor$; $j_+\gets\lfloor\ell_+/\ln(2)\rfloor$
\STATE $L'\gets\textbf{dyadic-projection}(L;j_-,j_+,m)$ \COMMENT{$\mathop{\mathrm{supp}}(e^{-L'})\subseteq\mathcal G_{m}$}
\STATE $f_{\widehat S}\gets\textbf{self-conv}(f_{e^{-L'}},t)$
\STATE $\reflectbox{$\vec{\reflectbox{$L$}}$}_t\gets-\ln(\widehat S/t)$; $\vec{L}_t\gets\mathcal D\left(\reflectbox{$\vec{\reflectbox{$L$}}$}_t\right)$
\RETURN $\reflectbox{$\vec{\reflectbox{$L$}}$}_t$, $\vec{L}_t$
\end{algorithmic}
In line 2 of Algorithm alg:ctd-alloc , ℓ − \ell_- ℓ − and ℓ + \ell_+ ℓ + are the infimum and the supremum of the finite values of − L -L − L (an input with unbounded losses is first truncated, as described in Remark 4.6 ). Since band j j j contains e x e^x e x for j = ⌊ x / ln ( 2 ) ⌋ j=\lfloor x/\ln(2)\rfloor j = ⌊ x / ln ( 2 )⌋ , the indices j − j_- j − and j + j_+ j + are the bands that contain e ℓ − e^{\ell_-} e ℓ − and e ℓ + e^{\ell_+} e ℓ + , the infimum and the supremum of the positive values of the likelihood ratio e − L e^{-L} e − L , and j + − j − ≤ ( ℓ + − ℓ − ) / ln ( 2 ) + 1 j_+-j_-\le(\ell_+-\ell_-)/\ln(2)+1 j + − j − ≤ ( ℓ + − ℓ − ) / ln ( 2 ) + 1 . The range [ 2 j − , 2 j + + 1 ] [2^{j_-},2^{j_++1}] [ 2 j − , 2 j + + 1 ] , from the start of band j − j_- j − to the end of band j + j_+ j + , contains every positive value of e − L e^{-L} e − L , and the discretization dyadic-projection( L ; j − , j + , m ) (L;j_-,j_+,m) ( L ; j − , j + , m ) returns the PLD realization L ′ L' L ′ for which f e − L ′ = Π ( f e − L ) f_{e^{-L'}}=\Pi(f_{e^{-L}}) f e − L ′ = Π ( f e − L ) , that is, the CtD projection of the likelihood ratio onto G m \mathcal G_{m} G m . It applies to discrete and continuous inputs alike and needs only the probability and the first moment of e − L e^{-L} e − L on each cell between adjacent knots.
Repeated squaring.
As in FS26, we compute the n n n -fold self-convolution of a distribution μ \mu μ by repeated squaring, and replace every convolution by a merge, which we compute by the multiscale FFT merge ms-fft-merge (Algorithm alg:ms-conv ). Let n = ∑ k = 1 s 2 b k n=\sum_{k=1}^s2^{b_k} n = ∑ k = 1 s 2 b k with b 1 < ⋯ < b s b_1<\cdots<b_s b 1 < ⋯ < b s , let μ ( 0 ) ≔ μ \mu^{(0)}\coloneqq\mu μ ( 0 ) : = μ and μ ( b ) ≔ ms-fft-merge ( μ ( b − 1 ) , μ ( b − 1 ) ) \mu^{(b)}\coloneqq\textbf{ms-fft-merge}(\mu^{(b-1)},\mu^{(b-1)}) μ ( b ) : = ms-fft-merge ( μ ( b − 1 ) , μ ( b − 1 ) ) for 1 ≤ b ≤ b s 1\le b\le b_s 1 ≤ b ≤ b s , and let ξ 1 ≔ μ ( b 1 ) \xi_1\coloneqq\mu^{(b_1)} ξ 1 : = μ ( b 1 ) and ξ k ≔ ms-fft-merge ( ξ k − 1 , μ ( b k ) ) \xi_k\coloneqq\textbf{ms-fft-merge}(\xi_{k-1},\mu^{(b_k)}) ξ k : = ms-fft-merge ( ξ k − 1 , μ ( b k ) ) for 2 ≤ k ≤ s 2\le k\le s 2 ≤ k ≤ s . We denote the output ξ s \xi_s ξ s by self-conv ( μ , n ) \textbf{self-conv}(\mu,n) self-conv ( μ , n ) . Repeated squaring uses b s + s − 1 ≤ 2 ⌈ log 2 ( n ) ⌉ b_s+s-1\le2\lceil\log_2(n)\rceil b s + s − 1 ≤ 2 ⌈ log 2 ( n )⌉ merges. Since a convolution is the distribution of a sum of independent random variables, the computation corresponds to a binary tree with n n n leaves, which we refer to as the unfolded tree. Its leaves are independent random variables with distribution μ \mu μ , and every internal node is a merge applied to the values computed at its two children (a merge of μ ( b − 1 ) \mu^{(b-1)} μ ( b − 1 ) with itself is a node whose children are two independent copies of the subtree of μ ( b − 1 ) \mu^{(b-1)} μ ( b − 1 ) ). The depth of this tree is ⌈ log 2 ( n ) ⌉ \lceil\log_2(n)\rceil ⌈ log 2 ( n )⌉ (Claim B.4 ). Unlike FS26, we do not truncate the tails between merges, since a merge adds at most one band (Theorem 3.1 ).
The Multiscale FFT Merge
We now describe the multiscale FFT merge (Algorithm alg:ms-conv ) and show that it is exact, that is, that it computes the projection onto G m \mathcal G_{m} G m of the exact convolution of its inputs. It accounts for every pair of values in the band of the larger value, and it replaces the mass of each input below that band by its projection onto the lattice of the band. This projection does not change the result (Theorem 3.1 ), and it reduces the contribution of each band to three convolutions on its lattice, which we compute by FFTs.
For a probability distribution μ \mu μ on G m ∪ { ∞ } \mathcal G_{m}\cup\{\infty\} G m ∪ { ∞ } , let μ j \mu_j μ j be its restriction to B j B_{j} B j , μ < j \mu_{<j} μ < j its restriction to ( 0 , 2 j ) (0,2^j) ( 0 , 2 j ) , μ + \mu_+ μ + its positive finite part, and μ ( 0 ) \mu(0) μ ( 0 ) and μ ( ∞ ) \mu(\infty) μ ( ∞ ) its masses at 0 0 0 and at ∞ \infty ∞ . We refer to μ ^ < j ≔ Π h j ( μ < j ) \hat{\mu}_{<j}\coloneqq\Pi_{h_{j}}(\mu_{<j}) μ ^ < j : = Π h j ( μ < j ) as its projected prefix. By locality (P1) , μ ^ < j \hat{\mu}_{<j} μ ^ < j is supported on { 0 , h j , … , m h j } \{0,h_{j},\ldots,mh_{j}\} { 0 , h j , … , m h j } , regardless of the number of bands below j j j , since it moves every value in ( 0 , 2 j ) = ( 0 , m h j ) (0,2^j)=(0,mh_{j}) ( 0 , 2 j ) = ( 0 , m h j ) to the neighboring knots of h j Z ≥ 0 h_{j}\mathbb Z_{\ge0} h j Z ≥ 0 . Algorithm alg:ms-conv computes the projection of the convolution μ ∗ ν \mu*\nu μ ∗ ν of two such distributions band by band, and it maintains the projected prefixes of the current band in μ ^ \hat\mu μ ^ and ν ^ \hat\nu ν ^ (line 5).
\caption{Multiscale FFT merge \textbf{ms-fft-merge}$(\mu,\nu)$}\label{alg:ms-conv}
\begin{algorithmic}[1]
\REQUIRE $\mu,\nu$ probability distributions on $\mathcal G_{m}\cup\{\infty\}$, with $\mu_+,\nu_+$ supported on $\bigcup_{j=j_{\min}}^{j_{\max}}B_{j}$
\ENSURE $\Pi(\mu*\nu)$
\STATE $\xi\gets0$; $\hat\mu\gets0$; $\hat\nu\gets0$
\FOR{$j=j_{\min},\ldots,j_{\max}$}
\STATE $C\gets \text{FFTconv}(\mu_j,\nu_j)+\text{FFTconv}(\mu_j,\hat\nu)+\text{FFTconv}(\hat\mu,\nu_j)$ \COMMENT{FFTs of length $4m$}
\STATE $\xi\gets\xi+\Pi(C)$
\STATE $\hat\mu\gets\Pi_{h_{j+1}}(\hat\mu+\mu_j)$; $\hat\nu\gets\Pi_{h_{j+1}}(\hat\nu+\nu_j)$
\ENDFOR
\RETURN $\xi+\mu(0)\,\nu_++\nu(0)\,\mu_++\mu(0)\nu(0)\,\delta_0 +\bigl(1-(1-\mu(\infty))(1-\nu(\infty))\bigr)\delta_\infty$
\end{algorithmic}
Theorem 3.1 (Multiscale FFT merge). Let Π \Pi Π and Π h \Pi_h Π h for h > 0 h>0 h > 0 be projections onto G m \mathcal G_{m} G m and onto h Z ≥ 0 h\mathbb Z_{\ge0} h Z ≥ 0 that satisfy properties (P1) –(P4) , let μ \mu μ and ν \nu ν be probability distributions on G m ∪ { ∞ } \mathcal G_{m}\cup\{\infty\} G m ∪ { ∞ } whose positive finite parts are supported on the bands j min , … , j max j_{\min},\ldots,j_{\max} j m i n , … , j m a x , and let J ≔ j max − j min + 1 J\coloneqq j_{\max}-j_{\min}+1 J : = j m a x − j m i n + 1 . Then Algorithm alg:ms-conv returns Π ( μ ∗ ν ) \Pi(\mu*\nu) Π ( μ ∗ ν ) , uses O ( J m log ( m ) ) O(Jm\log(m)) O ( J m log ( m )) arithmetic operations and O ( J m ) O(Jm) O ( J m ) space, and the positive finite part of its output is supported on the bands j min , … , j max + 1 j_{\min},\ldots,j_{\max}+1 j m i n , … , j m a x + 1 .
Proof outline. The full proof appears in Appendix § 8.2 . Every pair of positive finite values is counted in exactly one term of
μ + ∗ ν + = ∑ j = j min j max ( μ j ∗ ν j + μ j ∗ ν < j + μ < j ∗ ν j ) , \mu_+*\nu_+=\sum_{j=j_{\min}}^{j_{\max}}\bigl(\mu_j*\nu_j+\mu_j*\nu_{<j}+\mu_{<j}*\nu_j\bigr), μ + ∗ ν + = j = j m i n ∑ j m a x ( μ j ∗ ν j + μ j ∗ ν < j + μ < j ∗ ν j ) , namely, in the term of the larger of their bands. Since μ j ∗ ν < j \mu_j*\nu_{<j} μ j ∗ ν < j is supported on [ 2 j , ∞ ) [2^j,\infty) [ 2 j , ∞ ) and μ j \mu_j μ j on h j Z ≥ 0 h_{j}\mathbb Z_{\ge0} h j Z ≥ 0 , by the dyadic scaling,
\Pi(\mu_j*\nu_{<j})\overset{\text{\hyperlink{tag:P4}{(P4)}}}{=}\Pi\bigl(\Pi_{h_{j}}(\mu_j*\nu_{<j})\bigr)\overset{\text{\hyperlink{tag:P3}{(P3)}}}{=}\Pi(\mu_j*\hat{\nu}_{<j}),
and similarly for μ < j ∗ ν j \mu_{<j}*\nu_j μ < j ∗ ν j . By the linearity of the projection, this gives
Π ( μ ∗ ν ) = ∑ j = j min j max Π ( μ j ∗ ν j + μ j ∗ ν ^ < j + μ ^ < j ∗ ν j ) + μ ( 0 ) ν + + ν ( 0 ) μ + + μ ( 0 ) ν ( 0 ) δ 0 + ( 1 − ( 1 − μ ( ∞ ) ) ( 1 − ν ( ∞ ) ) ) δ ∞ . \begin{equation}
\begin{aligned}
\Pi(\mu*\nu)={}&\sum_{j=j_{\min}}^{j_{\max}}\Pi\bigl(\mu_j*\nu_j+\mu_j*\hat{\nu}_{<j}+\hat{\mu}_{<j}*\nu_j\bigr)\\
&+\mu(0)\,\nu_++\nu(0)\,\mu_++\mu(0)\nu(0)\,\delta_0+\bigl(1-(1-\mu(\infty))(1-\nu(\infty))\bigr)\delta_\infty.
\end{aligned} \tag*{(5)}
\end{equation} Π ( μ ∗ ν ) = j = j m i n ∑ j m a x Π ( μ j ∗ ν j + μ j ∗ ν ^ < j + μ ^ < j ∗ ν j ) + μ ( 0 ) ν + + ν ( 0 ) μ + + μ ( 0 ) ν ( 0 ) δ 0 + ( 1 − ( 1 − μ ( ∞ )) ( 1 − ν ( ∞ )) ) δ ∞ . (5) Its second line collects the terms with the atoms at 0 0 0 and at ∞ \infty ∞ .
By linearity and the projection hierarchy, μ ^ < j + 1 = Π h j + 1 ( μ ^ < j + μ j ) \hat{\mu}_{<j+1}=\Pi_{h_{j+1}}(\hat{\mu}_{<j}+\mu_j) μ ^ < j + 1 = Π h j + 1 ( μ ^ < j + μ j ) , which line 5 computes. Finally, since the projected prefixes are supported on { 0 , h j , … , m h j } \{0,h_{j},\ldots,mh_{j}\} { 0 , h j , … , m h j } , in units of h j h_{j} h j the convolutions in line 3 are supported on the indices m , … , 4 m − 2 m,\ldots,4m-2 m , … , 4 m − 2 , and thus FFTs of length 4 m 4m 4 m compute them exactly. Together with locality for the projections in lines 4 and 5, this gives the bounds on the running time, the space and the support of the output. ◻
Analysis
We now state the guarantees of Algorithm alg:ctd-alloc .
Theorem 4.1 (CtD accountant). Let \reflectbox{$\vec{\reflectbox{$L$}}$}_t and L ⃗ t \vec{L}_t L t be the outputs of Algorithm alg:ctd-alloc on an input L L L , let m m m , j − j_- j − and j + j_+ j + be the resolution and the lowest and the highest bands that it computes, let J ≔ j + − j − + 1 J\coloneqq j_+-j_-+1 J : = j + − j − + 1 , and let γ ≔ ( ⌈ log 2 ( t ) ⌉ + 1 ) ln ( 1 + 1 / m ) \gamma\coloneqq(\lceil\log_2(t)\rceil+1)\ln(1+1/m) γ : = (⌈ log 2 ( t )⌉ + 1 ) ln ( 1 + 1/ m ) . Then \reflectbox{$\vec{\reflectbox{$L$}}$}_t and L ⃗ t \vec{L}_t L t are PLD realizations such that:
Validity: \reflectbox{$\vec{\reflectbox{$L$}}$}_t dominates \reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L) , and L ⃗ t \vec{L}_t L t dominates ψ ⃗ t ( D ( L ) ) \vec{\psi}_{t}(\mathcal D\left(L\right)) ψ t ( D ( L ) ) .
Tightness: These dominations are ( γ , 0 ) (\gamma,0) ( γ , 0 ) -tight.
χ 2 \chi^2 χ 2 error and bias: If m ≥ ⌈ log 2 ( t ) ⌉ + 1 m\ge\lceil\log_2(t)\rceil+1 m ≥ ⌈ log 2 ( t )⌉ + 1 , then in each direction in which the allocation PLD Ψ \Psi Ψ that the output dominates satisfies χ 2 ( Ψ ) < ∞ \chi^2(\Psi)<\infty χ 2 ( Ψ ) < ∞ , the χ 2 \chi^2 χ 2 error of the output relative to Ψ \Psi Ψ is between 0 0 0 and ( ⌈ log 2 ( t ) ⌉ + 1 ) ( 1 + χ 2 ( Ψ ) ) / ( 4 m 2 ) (\lceil\log_2(t)\rceil+1)(1+\chi^2(\Psi))/(4m^2) (⌈ log 2 ( t )⌉ + 1 ) ( 1 + χ 2 ( Ψ )) / ( 4 m 2 ) . In each direction, the output and the allocation PLD that it dominates have the same mass at infinity, and the bias of the output relative to this PLD is between 0 0 0 and ( ⌈ log 2 ( t ) ⌉ + 1 ) ln 2 ( 1 + 1 / m ) / 8 (\lceil\log_2(t)\rceil+1)\ln^2(1+1/m)/8 (⌈ log 2 ( t )⌉ + 1 ) ln 2 ( 1 + 1/ m ) /8 .
Computational complexity: The running time is O ( ( J + log ( t ) ) m log ( m ) log ( t ) ) O((J+\log(t))\,m\log(m)\,\log(t)) O (( J + log ( t )) m log ( m ) log ( t )) , apart from lines 2 and 3, whose cost depends on the representation of the input, and the space is O ( ( J + log ( t ) ) m ) O((J+\log(t))\,m) O (( J + log ( t )) m ) .
We outline the proofs of the first three parts below and give the full proof in Appendix § 9.2 . The bounds on the running time and the space follow from Theorem 3.1 , since the positive finite part of every distribution in the computation is supported on at most J + ⌈ log 2 ( t ) ⌉ + 1 J+\lceil\log_2(t)\rceil+1 J + ⌈ log 2 ( t )⌉ + 1 bands (Claim C.5 ). The proofs do not use the choice of m m m in line 1. Thus the theorem holds for every m ≥ 2 m\ge2 m ≥ 2 .
The projection as a random map.
In the analysis we view the CtD projection Π \Pi Π onto G m \mathcal G_{m} G m as a random map that is applied independently of everything else and maps a value x x x to a random knot x ~ \tilde x x ~ with the distribution Π ( δ x ) \Pi(\delta_x) Π ( δ x ) . The image Y ~ \widetilde Y Y of a random variable Y Y Y then has the distribution Π ( f Y ) \Pi(f_Y) Π ( f Y ) . The proofs of validity, tightness, and the bounds on the χ 2 \chi^2 χ 2 error and the bias use only the fact that the merges are exact (Theorem 3.1 ), the grid resolution, and the locality (P1) and the mean preservation (P5) of the projection. For the random map they give x ~ ∈ { u , v } \tilde x\in\{u,v\} x ~ ∈ { u , v } for every value x x x between adjacent knots u < v u<v u < v , and E [ x ~ ] = x \underset{}{\mathbb E}\left[\tilde x\right]=x E [ x ~ ] = x for every x ≥ 0 x\ge0 x ≥ 0 .
Validity.
Validity follows from the convex order, where Y ≤ c x Y ′ Y\le_{\mathrm{cx}}Y' Y ≤ cx Y ′ if E [ φ ( Y ) ] ≤ E [ φ ( Y ′ ) ] \underset{}{\mathbb E}\left[\varphi(Y)\right]\le\underset{}{\mathbb E}\left[\varphi(Y')\right] E [ φ ( Y ) ] ≤ E [ φ ( Y ′ ) ] for every convex function φ \varphi φ [SS07 ]. By Jensen’s inequality, Y ≤ c x Y ′ Y\le_{\mathrm{cx}}Y' Y ≤ cx Y ′ whenever E [ Y ′ ∣ Y ] = Y \underset{}{\mathbb E}\left[Y'\mid Y\right]=Y E [ Y ′ ∣ Y ] = Y , and two random variables that are ordered in the convex order have the same mean, since x ↦ x x\mapsto x x ↦ x and x ↦ − x x\mapsto-x x ↦ − x are convex.
Lemma 4.3 (Validity). Let L L L be a PLD realization for which e − L e^{-L} e − L is bounded, let R t ≔ 1 t ∑ i = 1 t e − L ( i ) R_{t}\coloneqq\frac1t\sum_{i=1}^te^{-L^{(i)}} R t : = t 1 ∑ i = 1 t e − L ( i ) , and let R ^ \widehat R R be a bounded nonnegative random variable such that R t ≤ c x R ^ R_{t}\le_{\mathrm{cx}}\widehat R R t ≤ cx R . Then − ln ( R ^ ) -\ln(\widehat R) − ln ( R ) is a PLD realization that dominates \reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L) , and its dual dominates ψ ⃗ t ( D ( L ) ) \vec{\psi}_{t}(\mathcal D\left(L\right)) ψ t ( D ( L ) ) .
Proof. Since R t ≤ c x R ^ R_{t}\le_{\mathrm{cx}}\widehat R R t ≤ cx R , they have the same mean E [ e − L ] ≤ 1 \underset{}{\mathbb E}\left[e^{-L}\right]\le1 E [ e − L ] ≤ 1 , and since R ^ \widehat R R is bounded, − ln ( R ^ ) -\ln(\widehat R) − ln ( R ) is a PLD realization. By (2) , both privacy profiles are expectations of convex functions of the likelihood ratio, and thus the convex order between R t R_{t} R t and R ^ \widehat R R gives domination in the add direction. Domination in the remove direction follows by (4) , since the dual preserves domination (Claim A.3 ). ◻
We apply Lemma 4.3 to the input L L L . We view the projection of the input in line 3 as projections at the leaves of the unfolded tree, and every projection as an independent random map (by Claim B.5 , this gives the distributions that repeated squaring computes). By the mean preservation of every projection, induction over the unfolded tree shows that the computed average R ^ ≔ S ^ / t \widehat R\coloneqq\widehat S/t R : = S / t satisfies E [ R ^ ∣ R t ] = R t \underset{}{\mathbb E}\left[\widehat R\mid R_{t}\right]=R_{t} E [ R ∣ R t ] = R t for the exact average R t ≔ 1 t ∑ i = 1 t e − L ( i ) R_{t}\coloneqq\frac1t\sum_{i=1}^te^{-L^{(i)}} R t : = t 1 ∑ i = 1 t e − L ( i ) (Lemma C.3 ). Thus R t ≤ c x R ^ R_{t}\le_{\mathrm{cx}}\widehat R R t ≤ cx R , and since \reflectbox{$\vec{\reflectbox{$L$}}$}_t=-\ln(\widehat R) and \vec{L}_t=\mathcal D\left(\reflectbox{$\vec{\reflectbox{$L$}}$}_t\right) , Lemma 4.3 gives the first part of Theorem 4.1 .
This argument does not apply to the likelihood ratio under P P P . In the remove direction of FS26, the likelihood ratio x x x under P P P enters the privacy profile through the function x ↦ ( 1 − e ε t / ( x + s ) ) + x\mapsto(1-e^\varepsilon t/(x+s))_+ x ↦ ( 1 − e ε t / ( x + s ) ) + , where s s s is the sum of the other factors. This function is strictly concave where it is positive, since its second derivative there is − 2 e ε t / ( x + s ) 3 -2e^\varepsilon t/(x+s)^3 − 2 e ε t / ( x + s ) 3 . Thus a mean-preserving projection of a value x x x between two adjacent knots in this region strictly decreases the privacy profile.
Tightness.
Tightness bounds the privacy profiles of the output from above, and we obtain it from the same coupling. By locality of the projection and the grid resolution, every projection, including those at the leaves, changes a value by a factor of at most 1 + 1 / m 1+1/m 1 + 1/ m , and thus e − γ R t ≤ R ^ ≤ e γ R t e^{-\gamma}R_{t}\le\widehat R\le e^{\gamma}R_{t} e − γ R t ≤ R ≤ e γ R t , since the depth of the tree is ⌈ log 2 ( t ) ⌉ \lceil\log_2(t)\rceil ⌈ log 2 ( t )⌉ (Claim B.4 and Lemma C.3 ). In the add direction, the coupled losses \reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L)=-\ln(R_{t}) and \reflectbox{$\vec{\reflectbox{$L$}}$}_t=-\ln(\widehat R) are either both infinite or both finite, and in the latter case they differ by at most γ \gamma γ (Lemma C.4 ). The tightness of the add direction does not necessarily imply the tightness of its dual. In the remove direction, we weight this coupling by R ^ \widehat R R and add the remaining mass 1 − E [ R t ] 1-\underset{}{\mathbb E}\left[R_{t}\right] 1 − E [ R t ] at ( + ∞ , + ∞ ) (+\infty,+\infty) ( + ∞ , + ∞ ) . Since E [ R ^ ∣ R t ] = R t \underset{}{\mathbb E}\left[\widehat R\mid R_{t}\right]=R_{t} E [ R ∣ R t ] = R t , this gives a coupling of the remove losses, whose finite values again differ by at most γ \gamma γ (Lemma C.4 ). These couplings give \reflectbox{$\vec{\reflectbox{$L$}}$}_t\preceq_{(\gamma,0)}\reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L) and L ⃗ t ⪯ ( γ , 0 ) ψ ⃗ t ( D ( L ) ) \vec{L}_t\preceq_{(\gamma,0)}\vec{\psi}_{t}(\mathcal D\left(L\right)) L t ⪯ ( γ , 0 ) ψ t ( D ( L ) ) . Together with validity, Claim A.4 gives the second part of Theorem 4.1 .
χ 2 \chi^2 χ 2 error and bias.
Rounding moves every value in the same direction, and thus increases the χ 2 \chi^2 χ 2 divergence (Claim C.6 ) and the expected privacy loss by amounts of the first order in the spacing of the grid. In contrast, by locality of the projection and the grid resolution, a CtD projection changes a positive value by a factor of at most 1 + 1 / m 1+1/m 1 + 1/ m , and together with mean preservation, for every nonnegative random variable Y Y Y we get E [ Y ~ ∣ Y ] = Y \underset{}{\mathbb E}\left[\widetilde Y\mid Y\right]=Y E [ Y ∣ Y ] = Y and ( 1 + 1 / m ) − 1 Y ≤ Y ~ ≤ ( 1 + 1 / m ) Y (1+1/m)^{-1}Y\le\widetilde Y\le(1+1/m)Y ( 1 + 1/ m ) − 1 Y ≤ Y ≤ ( 1 + 1/ m ) Y (Claim C.1 ). Thus the first-order effects of a projection cancel, and its χ 2 \chi^2 χ 2 error and bias are of the second order in the spacing, as are its effects on the mean and the variance of the privacy loss [FS26clt Section 6]. In Appendices § 9.4 and § 9.5 we show that these errors add up over the at most ⌈ log 2 ( t ) ⌉ + 1 \lceil\log_2(t)\rceil+1 ⌈ log 2 ( t )⌉ + 1 projections on a path from a leaf to the root of the unfolded tree, which gives the bounds in the third part of Theorem 4.1 .
Guarantees for a given accuracy.
Substituting the resolution chosen in line 1 of Algorithm alg:ctd-alloc into Theorem 4.1 gives the following guarantees in terms of α \alpha α (Appendix § 9.6 ).
Corollary 4.5 (CtD accountant for a given accuracy). Let α ∈ ( 0 , 1 ] \alpha\in(0,1] α ∈ ( 0 , 1 ] and let t ≥ 2 t\ge2 t ≥ 2 be an integer. Let L ⃗ \vec{L} L and \reflectbox{$\vec{\reflectbox{$L$}}$} be PLD realizations with a total of S S S atoms, and let Δ \Delta Δ be the width of the smallest interval that contains the finite values of L ⃗ \vec{L} L and of -\reflectbox{$\vec{\reflectbox{$L$}}$} . There exists an algorithm that receives α \alpha α , t t t , L ⃗ \vec{L} L and \reflectbox{$\vec{\reflectbox{$L$}}$} , and returns PLD realizations L ⃗ t \vec{L}_t L t and \reflectbox{$\vec{\reflectbox{$L$}}$}_t that ( α , 0 ) (\alpha,0) ( α , 0 ) -tightly dominate ψ ⃗ t ( L ⃗ ) \vec{\psi}_{t}(\vec{L}) ψ t ( L ) and \reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(\reflectbox{$\vec{\reflectbox{$L$}}$}) , in time O ( S + ( Δ + log ( t ) ) log 2 ( t ) α log ( log ( t ) α ) ) , O\!\left(S+\frac{(\Delta+\log(t))\log^2(t)}{\alpha}\log\!\left(\frac{\log(t)}{\alpha}\right)\right), O ( S + α ( Δ + l o g ( t )) l o g 2 ( t ) log ( α l o g ( t ) ) ) , and with space O ( S + ( Δ + log ( t ) ) log ( t ) / α ) O(S+(\Delta+\log(t))\log(t)/\alpha) O ( S + ( Δ + log ( t )) log ( t ) / α ) . Moreover, in each direction the bias of the output relative to the allocation PLD Ψ \Psi Ψ that it dominates is at most α 2 / ( 8 ( ⌈ log 2 ( t ) ⌉ + 1 ) ) \alpha^2/(8(\lceil\log_2(t)\rceil+1)) α 2 / ( 8 (⌈ log 2 ( t )⌉ + 1 )) , and if χ 2 ( Ψ ) < ∞ \chi^2(\Psi)<\infty χ 2 ( Ψ ) < ∞ , then the χ 2 \chi^2 χ 2 error of the output relative to Ψ \Psi Ψ is at most α 2 ( 1 + χ 2 ( Ψ ) ) / ( 4 ( ⌈ log 2 ( t ) ⌉ + 1 ) ) \alpha^2(1+\chi^2(\Psi))/(4(\lceil\log_2(t)\rceil+1)) α 2 ( 1 + χ 2 ( Ψ )) / ( 4 (⌈ log 2 ( t )⌉ + 1 )) .
Numerical Results
We evaluate our accountant (Algorithm alg:ctd-alloc ), referred to as multiscale FFT, using an implementation in the PLD accounting library [PLD_acc_msfft ], which also contains the implementation of FS26. All the running times are of single-threaded runs on one core of a MacBook Pro M4 Max, and include the composition, when applicable.
Figure 2. Running time against the discrepancy ε − ε r e f \varepsilon-\varepsilon_{\mathrm{ref}} ε − ε ref of the computed upper bound ε \varepsilon ε at δ = 10 − 6 \delta=10^{-6} δ = 1 0 − 6 from a reference ε r e f \varepsilon_{\mathrm{ref}} ε ref , for direct convolution with rounding and multiscale FFT with CtD projections, for t ∈ { 10 , 1000 } t\in\{10,1000\} t ∈ { 10 , 1000 } , a single allocation (left) and its 100 100 100 -fold composition (right), with σ = 1 \sigma=1 σ = 1 (top) and σ = 4 \sigma=4 σ = 4 (bottom). Here ε r e f \varepsilon_{\mathrm{ref}} ε ref is the bound of multiscale FFT with at least twice the largest m m m used in the same setting. The vertical lines mark the resolution of ε r e f \varepsilon_{\mathrm{ref}} ε ref for each t t t , its difference from the bound with half its m m m . Each curve ends once its bound comes within twice this resolution of ε r e f \varepsilon_{\mathrm{ref}} ε ref . A bound within this resolution of ε r e f \varepsilon_{\mathrm{ref}} ε ref , or below it, is drawn on the line.
Running time and accuracy.
The two algorithms use their accuracy parameters differently, and CtD projections give only upper bounds. Therefore we compare the algorithms by the discrepancy of their upper bounds from a reference computed by multiscale FFT on a finer grid (Figure 2 ). The regimes in the figure cover a wide range of resulting ε \varepsilon ε values at δ = 10 − 6 \delta=10^{-6} δ = 1 0 − 6 , from ≈ 0.027 \approx0.027 ≈ 0.027 (when σ = 4 \sigma=4 σ = 4 and t = 1000 t=1000 t = 1000 , for a single allocation) to ≈ 26 \approx26 ≈ 26 (when σ = 1 \sigma=1 σ = 1 and t = 10 t=10 t = 10 , for the 100 100 100 -fold composition). At the finest accuracy of direct convolution, where a run takes about 1,000 1{,}000 1 , 000 seconds, multiscale FFT reaches the same discrepancy in at most 0.03 0.03 0.03 seconds, that is, it is faster by a factor of 10 4 10^4 1 0 4 to 10 5 10^5 1 0 5 . The running time grows roughly as the square of the inverse discrepancy for direct convolution and as its square root for multiscale FFT. Fitting T = c + a x k T=c+a\,x^k T = c + a x k , where T T T is the running time and x x x the inverse of the discrepancy, by least squares on ln ( T ) \ln(T) ln ( T ) gives exponents k k k between 1.96 1.96 1.96 and 2.02 2.02 2.02 for direct convolution and between 0.44 0.44 0.44 and 0.55 0.55 0.55 for multiscale FFT, over the points of the eight settings in Figure 2 .
Figure 3. The comparison of Figure 2 at t = 1000 t=1000 t = 1000 for the four combinations of the convolution method (direct convolution on the geometric grid or multiscale FFT on the dyadic grid) and the projection (rounding or CtD). The discrepancy ε − ε r e f \varepsilon-\varepsilon_{\mathrm{ref}} ε − ε ref is as in Figure 2 , and the dotted line marks the resolution of ε r e f \varepsilon_{\mathrm{ref}} ε ref , its difference from the bound with half its m m m .
Grid and projection.
These speedups correspond to the complete accountant, which changes both the grid and the projection. Figure 3 separates the two changes at t = 1000 t=1000 t = 1000 by combining each convolution method (direct on a geometric grid or multiscale-FFT on the dyadic) with each projection (stochastic domination rounding or hockey-stick domination via connect-the-dots). For each projection, the dyadic grid with multiscale FFT merges reaches the same or better accuracy faster than the geometric grid with direct convolution: at the finest accuracy of the geometric grid that the dyadic grid reaches, it is faster by two to three orders of magnitude. For each grid, CtD projections reduce the discrepancy by orders of magnitude compared with rounding with the same accuracy parameters, and the difference grows with the number of compositions, which is consistent with the χ 2 \chi^2 χ 2 error of rounding accumulating over the compositions. Thus the grid and the merge determine the running time, and the projection determines the χ 2 \chi^2 χ 2 error. These routes also differ in other implementation choices, so this comparison indicates, but does not isolate, the contribution of each change.
Figure 4. The ratio between the noise scales required for ( 1 , 10 − 6 ) (1,10^{-6}) ( 1 , 1 0 − 6 ) -DP by DP-SGD with PREAMBLE and by DP-SGD with Gaussian noise addition, as a function of the block size B B B , in the four settings of FS26. The results for RDP [FS25ra ] and for direct convolution are from FS26.
DP-SGD with PREAMBLE.
We follow the setting of FS26 for DP-SGD with Poisson subsampling of the users and PREAMBLE aggregation [AFKRT26 ], with n = 6 ⋅ 10 5 n=6\cdot10^5 n = 6 ⋅ 1 0 5 users, dimension d = 2 20 d=2^{20} d = 2 20 , communication budget C = 2 15 C=2^{15} C = 2 15 and 10 10 10 epochs. Each selected user sends k = C / B k=C/B k = C / B out of t = d / B t=d/B t = d / B blocks of size B B B . The analysis reduces to 1 1 1 -out-of-32 32 32 allocation composed k k k times (up to 8192 8192 8192 times for B = 4 B=4 B = 4 ), followed by Poisson subsampling and composition over the updates. Since the allocation PLD is composed thousands of times, it has to be computed to a high accuracy. For B = 4 B=4 B = 4 and expected batch size 1024 1024 1024 , the complete analysis at a fixed noise scale takes 0.06 0.06 0.06 seconds with multiscale FFT and about an hour with direct convolution. Accordingly, finding the noise scale that ensures ( 1 , 10 − 6 ) (1,10^{-6}) ( 1 , 1 0 − 6 ) -DP takes at most a few minutes with multiscale FFT, instead of several hours with direct convolution. Figure 4 shows these noise scales, relative to that of DP-SGD in which each user sends the entire gradient, for the expected batch sizes 512 512 512 , 1024 1024 1024 , 4096 4096 4096 and 600000 600000 600000 and each B B B . The resulting bounds are also slightly tighter: multiscale FFT never requires a larger noise scale than direct convolution, and requires a smaller one in 35 35 35 of the 40 40 40 settings, mostly for small B B B , where the number of inner compositions is large. The example in the introduction uses B = 4 B=4 B = 4 , expected batch size 1024 1024 1024 , the noise scale that direct convolution finds for ( 1 , 10 − 6 ) (1,10^{-6}) ( 1 , 1 0 − 6 ) -DP and multiscale FFT with m = 1024 m=1024 m = 1024 . Multiscale FFT then computes the allocation PLD in 0.012 0.012 0.012 seconds and gives the upper bound 0.92094 0.92094 0.92094 on ε \varepsilon ε at δ = 10 − 6 \delta=10^{-6} δ = 1 0 − 6 , compared with 0.985 0.985 0.985 for direct convolution.
The direct-convolution column is the run of FS26, with accuracy parameter 0.005 0.005 0.005 , tail parameter 10 − 8 10^{-8} 1 0 − 8 and at most 10 6 10^6 1 0 6 grid points. FS26 used the expected batch size 1028 1028 1028 instead of 1024 1024 1024 , so for batch size 1024 1024 1024 we ran their implementation with the same configuration. Multiscale FFT was run with accuracy parameter 0.01 0.01 0.01 , tail parameter 10 − 8 10^{-8} 1 0 − 8 and at most 10 8 10^8 1 0 8 points in the output grid. After the division of the accuracy parameter among the compositions, the cap m ≤ 2 18 m\le2^{18} m ≤ 2 18 binds for B ≤ 512 B\le512 B ≤ 512 , that is, in 32 32 32 of the 40 40 40 settings. In our runs, the allocation PLD is composed k k k times by FFT, subsampled by the PLD subsampling of FS26, and composed over the updates by dp_accounting. The noise scale is found by a bisection that accepts any noise scale for which the bound on ε \varepsilon ε lies in [ 0.98 , 1 ] [0.98,1] [ 0.98 , 1 ] . The running times at a fixed noise scale above were measured in the same way for both algorithms, whereas the search times are indicative only: the searches of multiscale FFT ran four at a time, and those of direct convolution are from its batch-1024 1024 1024 run.
Discussion
Multiscale FFT makes the running time of computing the allocation PLD nearly linear in the inverse accuracy, with the same ( α , β ) (\alpha,\beta) ( α , β ) bound on the error of the privacy profiles as FS26. Empirically, the accuracy is even better: the error of the final bound on ε \varepsilon ε behaves essentially like the bias and the χ 2 \chi^2 χ 2 error, which are of the second order in the spacing of the grid (§ 5.0.0.1 ). As we argue in Remark 4.4 , the projections at all but the several highest levels of the unfolded tree affect ε \varepsilon ε essentially only through the relative increase in the χ 2 \chi^2 χ 2 divergence. A natural question is whether this also holds for the highest levels, at which few independent sums are projected.
AI Usage
The authors formulated the problem and proposed the two key elements of the algorithm. The development of these ideas and writing were performed through an iterative process in which AI (Claude Opus 5.5 and ChatGPT Astra 6) generated the implementation, details of proofs and wrote parts of the prose based on author-provided guidance and structure. The resulting text was also extensively edited and proofread by the authors. The implementation of the algorithm and evaluation code was written by AI under close supervision and auditing by the authors. The authors take full responsibility for the content of this paper.
Acknowledgments
Shenfeld’s work was supported in part by ERC grant 101125913, Simons Foundation Collaboration 733792, Israel Science Foundation (ISF) grant 2861/20, and Apple. Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.
Preliminary Statements
In this section we give the statements from FS26 and ZDW22 that we use, following their notation, together with the proof of (4) .
Domination
The pair ( N ( 1 , σ 2 ) , N ( 0 , σ 2 ) ) (\mathcal N(1,\sigma^2),\mathcal N(0,\sigma^2)) ( N ( 1 , σ 2 ) , N ( 0 , σ 2 )) dominates the Gaussian mechanism with sensitivity one and noise scale σ \sigma σ in both directions, and its PLD is N ( 1 / ( 2 σ 2 ) , 1 / σ 2 ) \mathcal N(1/(2\sigma^2),1/\sigma^2) N ( 1/ ( 2 σ 2 ) , 1/ σ 2 ) [ZDW22 ]. We say that a pair ( P , Q ) (P,Q) ( P , Q ) dominates a t t t -step algorithm M M M if it is a dominating pair in the remove direction for every step of M M M and every view (in the terms of [FS26pld Definition 2.6], M M M is dominated by a randomizer with output distributions P P P and Q Q Q ).
Lemma A.1 ([FS26pld Lemmas 2.7 and 2.8 and Claim 2.9]). Let ( P , Q ) (P,Q) ( P , Q ) dominate a t t t -step algorithm M M M . Then A t ( M ) \mathcal A_{t}\left(M\right) A t ( M ) is dominated by ( P ˉ t , Q t ) (\bar P_t,Q^t) ( P ˉ t , Q t ) in the remove direction and by ( Q t , P ˉ t ) (Q^t,\bar P_t) ( Q t , P ˉ t ) in the add direction. Moreover, A t , k ( M ) \mathcal A_{t,k}\left(M\right) A t , k ( M ) is dominated by ( P ˉ ⌊ t / k ⌋ m f × P ˉ ⌈ t / k ⌉ m c , Q t ) (\bar P_{\lfloor t/k\rfloor}^{\,m_f}\times\bar P_{\lceil t/k\rceil}^{\,m_c},Q^t) ( P ˉ ⌊ t / k ⌋ m f × P ˉ ⌈ t / k ⌉ m c , Q t ) in the remove direction and by the reversed pair in the add direction, where m f + m c = k m_f+m_c=k m f + m c = k , m f ⌊ t / k ⌋ + m c ⌈ t / k ⌉ = t m_f\lfloor t/k\rfloor+m_c\lceil t/k\rceil=t m f ⌊ t / k ⌋ + m c ⌈ t / k ⌉ = t , and powers denote product distributions.
Claim A.2 ([FS26pld Section 3 and Claims A.1 and A.2]). Every PLD L P , Q L_{P,Q} L P , Q is a PLD realization, and its dual is L Q , P L_{Q,P} L Q , P . Conversely, a PLD realization L L L is the PLD of the pair consisting of the distribution of L L L and the distribution of − D ( L ) -\mathcal D\left(L\right) − D ( L ) , and D ( L ) \mathcal D\left(L\right) D ( L ) is a PLD realization and the PLD of the reversed pair.
Claim A.3 ([ZDW22 Lemma 28]). If a PLD realization U U U dominates a PLD realization L L L , then D ( U ) \mathcal D\left(U\right) D ( U ) dominates D ( L ) \mathcal D\left(L\right) D ( L ) .
Claim A.4 ([FS26pld Claim 4.2]). If V ⪯ ( α , β ) U V\preceq_{(\alpha,\beta)}U V ⪯ ( α , β ) U then H e ε ( V ) ≤ H e ε − α ( U ) + β \boldsymbol H_{e^\varepsilon}\left(V\right)\le\boldsymbol H_{e^{\varepsilon-\alpha}}\left(U\right)+\beta H e ε ( V ) ≤ H e ε − α ( U ) + β for every ε \varepsilon ε . In particular, stochastic domination implies domination.
Random Allocation and Duality
Theorem A.5 ([FS26pld Theorem 4.4]). For a PLD realization L L L , let ψ ⃗ t ( L ) \vec{\psi}_{t}(L) ψ t ( L ) and \reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L) be as in (3) . Then for any two distributions P P P and Q Q Q , L P ˉ t , Q t = ψ ⃗ t ( L P , Q ) L_{\bar P_t,Q^t}=\vec{\psi}_{t}(L_{P,Q}) L P ˉ t , Q t = ψ t ( L P , Q ) and L_{Q^t,\bar P_t}=\reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L_{Q,P}) .
Lemma A.6 ([FS26pld Lemma 4.5]). Let V 1 , … , V n V_1,\ldots,V_n V 1 , … , V n be independent, let U 1 , … , U n U_1,\ldots,U_n U 1 , … , U n be independent, and let V i ⪯ ( α , β i ) U i V_i\preceq_{(\alpha,\beta_i)}U_i V i ⪯ ( α , β i ) U i for every i i i . Then ln ( ∑ i e V i ) ⪯ ( α , ∑ i β i ) ln ( ∑ i e U i ) \ln(\sum_ie^{V_i})\preceq_{(\alpha,\sum_i\beta_i)}\ln(\sum_ie^{U_i}) ln ( ∑ i e V i ) ⪯ ( α , ∑ i β i ) ln ( ∑ i e U i ) .
FS26 state this lemma for two summands, and the general case follows by induction. The same proof applies when α = 0 \alpha=0 α = 0 or β i = 0 \beta_i=0 β i = 0 . For α = β i = 0 \alpha=\beta_i=0 α = β i = 0 it states that stochastic domination is preserved by ln ( ∑ i e V i ) \ln(\sum_ie^{V_i}) ln ( ∑ i e V i ) . The normalization by t t t in (3) is a common shift.
Claim A.7. For every PLD realization L L L and integer t ≥ 1 t\ge1 t ≥ 1 , \vec{\psi}_{t}(\mathcal D\left(L\right))=\mathcal D\left(\reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L)\right) .
Proof. By Claim A.2 , L L L is the PLD of a pair of distributions, that is, L = L Q , P L=L_{Q,P} L = L Q , P for some P P P and Q Q Q , and then D ( L ) = L P , Q \mathcal D\left(L\right)=L_{P,Q} D ( L ) = L P , Q . By Theorem A.5 , \reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L)=L_{Q^t,\bar P_t} and ψ ⃗ t ( D ( L ) ) = L P ˉ t , Q t \vec{\psi}_{t}(\mathcal D\left(L\right))=L_{\bar P_t,Q^t} ψ t ( D ( L ) ) = L P ˉ t , Q t , which is the dual of L Q t , P ˉ t L_{Q^t,\bar P_t} L Q t , P ˉ t . ◻
Missing Details from § 3
Projections and Their Lattice Identities
Definition B.1 (Projections). Let S ⊆ [ 0 , ∞ ) S\subseteq[0,\infty) S ⊆ [ 0 , ∞ ) be a set of knots that contains 0 0 0 and has no accumulation point in ( 0 , ∞ ) (0,\infty) ( 0 , ∞ ) , such as G m \mathcal G_{m} G m or the lattice h Z ≥ 0 h\mathbb Z_{\ge0} h Z ≥ 0 for h > 0 h>0 h > 0 . For x ∈ [ 0 , sup S ] x\in[0,\sup S] x ∈ [ 0 , sup S ] , let u ≤ x ≤ v u\le x\le v u ≤ x ≤ v be the largest knot that is at most x x x and the smallest knot that is at least x x x (so that u = v = x u=v=x u = v = x if x ∈ S x\in S x ∈ S ). For u < v u<v u < v we define
Π S ↑ ( δ x ) ≔ δ v , Π S ↓ ( δ x ) ≔ δ u , Π S c t d ( δ x ) ≔ v − x v − u δ u + x − u v − u δ v , \Pi^\uparrow_S(\delta_x)\coloneqq\delta_v,
\qquad
\Pi^\downarrow_S(\delta_x)\coloneqq\delta_u,
\qquad
\Pi^\mathrm{ctd}_S(\delta_x)\coloneqq\frac{v-x}{v-u}\,\delta_u+\frac{x-u}{v-u}\,\delta_v, Π S ↑ ( δ x ) : = δ v , Π S ↓ ( δ x ) : = δ u , Π S ctd ( δ x ) : = v − u v − x δ u + v − u x − u δ v , and for x ∈ S x\in S x ∈ S all three are equal to δ x \delta_x δ x . We extend each projection linearly to finite measures on [ 0 , sup S ] [0,\sup S] [ 0 , sup S ] , and to measures with an atom at + ∞ +\infty + ∞ by leaving that atom unchanged.
Claim B.2. For every integer m ≥ 2 m\ge2 m ≥ 2 , the grid G m \mathcal G_{m} G m satisfies (G1) and (G2) .
Proof. Let x > 0 x>0 x > 0 and let j ∈ Z j\in\mathbb Z j ∈ Z be such that x ∈ B j x\in B_{j} x ∈ B j . Then u ≤ x ≤ v u\le x\le v u ≤ x ≤ v for two consecutive knots u < v u<v u < v with u ∈ B j u\in B_{j} u ∈ B j and v = u + h j v=u+h_{j} v = u + h j , also when v = 2 j + 1 v=2^{j+1} v = 2 j + 1 . Since u ≥ 2 j = m h j u\ge2^j=mh_{j} u ≥ 2 j = m h j , we have v / u = 1 + h j / u ≤ 1 + 1 / m v/u=1+h_{j}/u\le1+1/m v / u = 1 + h j / u ≤ 1 + 1/ m , which proves (G1) . For (G2) , every knot that is at least 2 j 2^j 2 j is of the form 2 j ′ ( 1 + i / m ) 2^{j'}(1+i/m) 2 j ′ ( 1 + i / m ) with j ′ ≥ j j'\ge j j ′ ≥ j and 0 ≤ i ≤ m − 1 0\le i\le m-1 0 ≤ i ≤ m − 1 , and it is equal to 2 j ′ − j ( m + i ) h j 2^{j'-j}(m+i)h_{j} 2 j ′ − j ( m + i ) h j . ◻
Lemma B.3. Given ρ ∈ { ↑ , ↓ , c t d } \rho\in\{\uparrow,\downarrow,\mathrm{ctd}\} ρ ∈ { ↑ , ↓ , ctd } , the maps Π ≔ Π G m ρ \Pi\coloneqq\Pi^\rho_{\mathcal G_{m}} Π : = Π G m ρ and Π h ≔ Π h Z ≥ 0 ρ \Pi_h\coloneqq\Pi^\rho_{h\mathbb Z_{\ge0}} Π h : = Π h Z ≥ 0 ρ for h > 0 h>0 h > 0 are projections in the sense of § 3.1 , and for every h > 0 h>0 h > 0 , j ∈ Z j\in\mathbb Z j ∈ Z and all finite measures ξ \xi ξ and ζ \zeta ζ , each of these projections Π S \Pi_S Π S satisfies: Π S ( δ x ) \Pi_S(\delta_x) Π S ( δ x ) is supported on { u , v } \{u,v\} { u , v } for every x x x between adjacent knots u < v u<v u < v of S S S (P1) , Π S ( ξ + ζ ) = Π S ( ξ ) + Π S ( ζ ) \Pi_S(\xi+\zeta)=\Pi_S(\xi)+\Pi_S(\zeta) Π S ( ξ + ζ ) = Π S ( ξ ) + Π S ( ζ ) (P2) , Π h ( ξ ∗ ζ ) = Π h ( ξ ) ∗ ζ \Pi_h(\xi*\zeta)=\Pi_h(\xi)*\zeta Π h ( ξ ∗ ζ ) = Π h ( ξ ) ∗ ζ if ζ \zeta ζ is supported on h Z ≥ 0 h\mathbb Z_{\ge0} h Z ≥ 0 (P3) , and Π 2 h ( Π h ( ξ ) ) = Π 2 h ( ξ ) \Pi_{2h}(\Pi_h(\xi))=\Pi_{2h}(\xi) Π 2 h ( Π h ( ξ )) = Π 2 h ( ξ ) and Π ( Π h j ( ξ ) ) = Π ( ξ ) \Pi(\Pi_{h_{j}}(\xi))=\Pi(\xi) Π ( Π h j ( ξ )) = Π ( ξ ) if ξ \xi ξ is supported on [ 2 j , ∞ ) [2^j,\infty) [ 2 j , ∞ ) (P4) . Moreover, for ρ = c t d \rho=\mathrm{ctd} ρ = ctd , Π S ( δ x ) \Pi_S(\delta_x) Π S ( δ x ) has mean x x x for every x ≥ 0 x\ge0 x ≥ 0 (P5) .
The second part of (P4) does not hold for measures that are not supported on [ 2 j , ∞ ) [2^j,\infty) [ 2 j , ∞ ) , since below 2 j 2^j 2 j the knots of G m \mathcal G_{m} G m are finer than the lattice h j Z h_{j}\mathbb Z h j Z .
Proof. Each map Π S ρ \Pi^\rho_S Π S ρ sends a finite measure to a measure on S ∪ { ∞ } S\cup\{\infty\} S ∪ { ∞ } and fixes the knots and + ∞ +\infty + ∞ . Since it is extended linearly, it satisfies (P2) and fixes every measure supported on S ∪ { ∞ } S\cup\{\infty\} S ∪ { ∞ } , that is, it is a projection. By definition, it satisfies (P1) . For ρ = c t d \rho=\mathrm{ctd} ρ = ctd and x x x between adjacent knots u < v u<v u < v of S S S , the mean of Π S ( δ x ) \Pi_S(\delta_x) Π S ( δ x ) is u ( v − x ) / ( v − u ) + v ( x − u ) / ( v − u ) = x u(v-x)/(v-u)+v(x-u)/(v-u)=x u ( v − x ) / ( v − u ) + v ( x − u ) / ( v − u ) = x , which is (P5) . For a set of knots S S S , a knot r ∈ S r\in S r ∈ S and a projection ρ \rho ρ , let k S ρ ( x , r ) ≔ Π S ρ ( δ x ) ( { r } ) k^\rho_S(x,r)\coloneqq\Pi^\rho_S(\delta_x)(\{r\}) k S ρ ( x , r ) : = Π S ρ ( δ x ) ({ r }) denote the mass that the projection of x x x assigns to r r r . As a function of x x x , k S c t d ( ⋅ , r ) k^\mathrm{ctd}_S(\cdot,r) k S ctd ( ⋅ , r ) is affine between every two adjacent knots of S S S , k S ↑ ( ⋅ , r ) k^\uparrow_S(\cdot,r) k S ↑ ( ⋅ , r ) is constant on every interval ( s , s ′ ] (s,s'] ( s , s ′ ] between adjacent knots, and k S ↓ ( ⋅ , r ) k^\downarrow_S(\cdot,r) k S ↓ ( ⋅ , r ) is constant on every interval [ s , s ′ ) [s,s') [ s , s ′ ) between adjacent knots.
We first show that if T ⊆ S T\subseteq S T ⊆ S are two sets of knots then Π T ( Π S ( ξ ) ) = Π T ( ξ ) \Pi_T(\Pi_S(\xi))=\Pi_T(\xi) Π T ( Π S ( ξ )) = Π T ( ξ ) for every finite measure ξ \xi ξ on which both projections are defined. By (P2) it suffices to consider ξ = δ x \xi=\delta_x ξ = δ x . If x ∈ S x\in S x ∈ S the claim is trivial. Otherwise, let x x x lie between adjacent knots u < v u<v u < v of S S S . Since T ⊆ S T\subseteq S T ⊆ S , the interval [ u , v ] [u,v] [ u , v ] is contained in an interval between adjacent knots of T T T . For ρ = c t d \rho=\mathrm{ctd} ρ = ctd and r ∈ T r\in T r ∈ T ,
Π T ( Π S ( δ x ) ) ( { r } ) = v − x v − u k T ( u , r ) + x − u v − u k T ( v , r ) = k T ( x , r ) , \Pi_T(\Pi_S(\delta_x))(\{r\})=\frac{v-x}{v-u}k_T(u,r)+\frac{x-u}{v-u}k_T(v,r)=k_T(x,r), Π T ( Π S ( δ x )) ({ r }) = v − u v − x k T ( u , r ) + v − u x − u k T ( v , r ) = k T ( x , r ) , since k T ( ⋅ , r ) k_T(\cdot,r) k T ( ⋅ , r ) is affine on [ u , v ] [u,v] [ u , v ] . For ρ = ↑ \rho={\uparrow} ρ = ↑ we have Π S ( δ x ) = δ v \Pi_S(\delta_x)=\delta_v Π S ( δ x ) = δ v with x ∈ ( u , v ] x\in(u,v] x ∈ ( u , v ] , and k T ( v , r ) = k T ( x , r ) k_T(v,r)=k_T(x,r) k T ( v , r ) = k T ( x , r ) since k T ( ⋅ , r ) k_T(\cdot,r) k T ( ⋅ , r ) is constant on an interval that contains ( u , v ] (u,v] ( u , v ] . The case ρ = ↓ \rho={\downarrow} ρ = ↓ is symmetric.
The first part of (P4) follows by taking T = 2 h Z ≥ 0 ⊆ S = h Z ≥ 0 T=2h\mathbb Z_{\ge0}\subseteq S=h\mathbb Z_{\ge0} T = 2 h Z ≥ 0 ⊆ S = h Z ≥ 0 . For its second part, let T ≔ G m ∩ [ 2 j , ∞ ) T\coloneqq\mathcal G_{m}\cap[2^j,\infty) T : = G m ∩ [ 2 j , ∞ ) and S ≔ h j Z ∩ [ 2 j , ∞ ) S\coloneqq h_{j}\mathbb Z\cap[2^j,\infty) S : = h j Z ∩ [ 2 j , ∞ ) , so that T ⊆ S T\subseteq S T ⊆ S by (G2) . Since 2 j ∈ h j Z 2^j\in h_{j}\mathbb Z 2 j ∈ h j Z , the projection onto h j Z ≥ 0 h_{j}\mathbb Z_{\ge0} h j Z ≥ 0 of a value that is at least 2 j 2^j 2 j is supported on [ 2 j , ∞ ) [2^j,\infty) [ 2 j , ∞ ) and is equal to its projection onto S S S . Similarly, since 2 j ∈ G m 2^j\in\mathcal G_{m} 2 j ∈ G m , the projection onto G m \mathcal G_{m} G m of a measure supported on [ 2 j , ∞ ) [2^j,\infty) [ 2 j , ∞ ) is equal to its projection onto T T T . Thus Π ( Π h j ( ξ ) ) = Π T ( Π S ( ξ ) ) = Π T ( ξ ) = Π ( ξ ) \Pi(\Pi_{h_{j}}(\xi))=\Pi_T(\Pi_S(\xi))=\Pi_T(\xi)=\Pi(\xi) Π ( Π h j ( ξ )) = Π T ( Π S ( ξ )) = Π T ( ξ ) = Π ( ξ ) . For (P3) , for y ∈ h Z ≥ 0 y\in h\mathbb Z_{\ge0} y ∈ h Z ≥ 0 the adjacent knots of h Z ≥ 0 h\mathbb Z_{\ge0} h Z ≥ 0 around x + y x+y x + y are the adjacent knots around x x x translated by y y y , and the weights (for CtD) or the choice of the knot (for rounding) are the same. Thus Π h ( δ x + y ) = Π h ( δ x ) ∗ δ y \Pi_h(\delta_{x+y})=\Pi_h(\delta_x)*\delta_y Π h ( δ x + y ) = Π h ( δ x ) ∗ δ y , and integrating over ξ ( d x ) ζ ( d y ) \xi(dx)\,\zeta(dy) ξ ( d x ) ζ ( d y ) gives the claim. Atoms at + ∞ +\infty + ∞ are not affected by any of the operations. ◻
The Multiscale FFT Merge
Proof of Theorem 3.1 . The identity. Writing μ = μ ( 0 ) δ 0 + μ + + μ ( ∞ ) δ ∞ \mu=\mu(0)\,\delta_0+\mu_++\mu(\infty)\,\delta_\infty μ = μ ( 0 ) δ 0 + μ + + μ ( ∞ ) δ ∞ and similarly for ν \nu ν , we get μ ∗ ν = μ + ∗ ν + + ρ \mu*\nu=\mu_+*\nu_++\rho μ ∗ ν = μ + ∗ ν + + ρ , where ρ \rho ρ denotes the second line of (5) . Since μ + \mu_+ μ + and ν + \nu_+ ν + are supported on G m \mathcal G_{m} G m , the measure ρ \rho ρ is supported on G m ∪ { ∞ } \mathcal G_{m}\cup\{\infty\} G m ∪ { ∞ } , and thus Π ( ρ ) = ρ \Pi(\rho)=\rho Π ( ρ ) = ρ . Every pair of values from the positive bands i i i and k k k is counted in exactly one term of
μ + ∗ ν + = ∑ j = j min j max ( μ j ∗ ν j + μ j ∗ ν < j + μ < j ∗ ν j ) , \begin{equation}
\mu_+*\nu_+=\sum_{j=j_{\min}}^{j_{\max}}\bigl(\mu_j*\nu_j+\mu_j*\nu_{<j}+\mu_{<j}*\nu_j\bigr), \tag*{(6)}
\end{equation} μ + ∗ ν + = j = j m i n ∑ j m a x ( μ j ∗ ν j + μ j ∗ ν < j + μ < j ∗ ν j ) , (6) namely, in the term with j = max { i , k } j=\max\{i,k\} j = max { i , k } . For every j j j , the measure μ j ∗ ν < j \mu_j*\nu_{<j} μ j ∗ ν < j is supported on [ 2 j , ∞ ) [2^j,\infty) [ 2 j , ∞ ) , and μ j \mu_j μ j is supported on h j Z ≥ 0 h_{j}\mathbb Z_{\ge0} h j Z ≥ 0 by (G2) . Thus (P4) and (P3) with ζ = μ j \zeta=\mu_j ζ = μ j give
\Pi(\mu_j*\nu_{<j})
\overset{\text{\hyperlink{tag:P4}{(P4)}}}{=}\Pi\bigl(\Pi_{h_{j}}(\mu_j*\nu_{<j})\bigr)
\overset{\text{\hyperlink{tag:P3}{(P3)}}}{=}\Pi\bigl(\mu_j*\Pi_{h_{j}}(\nu_{<j})\bigr)
=\Pi(\mu_j*\hat{\nu}_{<j}),
and similarly Π ( μ < j ∗ ν j ) = Π ( μ ^ < j ∗ ν j ) \Pi(\mu_{<j}*\nu_j)=\Pi(\hat{\mu}_{<j}*\nu_j) Π ( μ < j ∗ ν j ) = Π ( μ ^ < j ∗ ν j ) . Therefore
\begin{align*}
\Pi(\mu*\nu)
&\overset{\text{\hyperlink{tag:P2}{(P2)}}}{=}\Pi(\mu_+*\nu_+)+\Pi(\rho)\\
&\overset{(a)}{=}\sum_{j=j_{\min}}^{j_{\max}}\bigl(\Pi(\mu_j*\nu_j)+\Pi(\mu_j*\nu_{<j})+\Pi(\mu_{<j}*\nu_j)\bigr)+\rho\\
&\overset{(b)}{=}\sum_{j=j_{\min}}^{j_{\max}}\bigl(\Pi(\mu_j*\nu_j)+\Pi(\mu_j*\hat{\nu}_{<j})+\Pi(\hat{\mu}_{<j}*\nu_j)\bigr)+\rho\\
&\overset{\text{\hyperlink{tag:P2}{(P2)}}}{=}\sum_{j=j_{\min}}^{j_{\max}}\Pi\bigl(\mu_j*\nu_j+\mu_j*\hat{\nu}_{<j}+\hat{\mu}_{<j}*\nu_j\bigr)+\rho,
\end{align*}
where (a) follows from (6) , (P2) and Π ( ρ ) = ρ \Pi(\rho)=\rho Π ( ρ ) = ρ , and (b) from the two identities above. This proves (5) .
The algorithm. We show by induction on j j j that μ ^ = μ ^ < j \hat\mu=\hat{\mu}_{<j} μ ^ = μ ^ < j and ν ^ = ν ^ < j \hat\nu=\hat{\nu}_{<j} ν ^ = ν ^ < j at the beginning of iteration j j j of Algorithm alg:ms-conv . For j = j min j=j_{\min} j = j m i n we have μ < j = 0 \mu_{<j}=0 μ < j = 0 , and thus μ ^ < j = Π h j ( 0 ) = 0 = μ ^ \hat{\mu}_{<j}=\Pi_{h_{j}}(0)=0=\hat\mu μ ^ < j = Π h j ( 0 ) = 0 = μ ^ , since a projection fixes the zero measure. If μ ^ = μ ^ < j \hat\mu=\hat{\mu}_{<j} μ ^ = μ ^ < j at the beginning of iteration j j j , then line 5 sets μ ^ \hat\mu μ ^ to
\begin{align*}
\Pi_{h_{j+1}}(\hat{\mu}_{<j}+\mu_j)
&\overset{\text{\hyperlink{tag:P2}{(P2)}}}{=}\Pi_{h_{j+1}}\bigl(\Pi_{h_{j}}(\mu_{<j})\bigr)+\Pi_{h_{j+1}}(\mu_j)\\
&\overset{\text{\hyperlink{tag:P4}{(P4)}}}{=}\Pi_{h_{j+1}}(\mu_{<j})+\Pi_{h_{j+1}}(\mu_j)
\overset{\text{\hyperlink{tag:P2}{(P2)}}}{=}\Pi_{h_{j+1}}(\mu_{<j+1})
=\hat{\mu}_{<j+1},
\end{align*}
where (P4) applies since h j + 1 = 2 h j h_{j+1}=2h_{j} h j + 1 = 2 h j , and the last two steps use μ < j + 1 = μ < j + μ j \mu_{<j+1}=\mu_{<j}+\mu_j μ < j + 1 = μ < j + μ j . The same holds for ν ^ \hat\nu ν ^ . Thus in iteration j j j , line 3 computes the argument of the j j j th projection in (5) , and line 4 adds this projection to ξ \xi ξ . Therefore Algorithm alg:ms-conv returns the right-hand side of (5) , which is equal to Π ( μ ∗ ν ) \Pi(\mu*\nu) Π ( μ ∗ ν ) by the identity.
Running time, space and support. By (P1) , each projection moves a value between adjacent knots to one or both of these knots. In iteration j j j we represent measures supported on h j Z ∩ [ 0 , 4 m h j ) h_{j}\mathbb Z\cap[0,4mh_{j}) h j Z ∩ [ 0 , 4 m h j ) by the arrays of their masses at the indices 0 , … , 4 m − 1 0,\ldots,4m-1 0 , … , 4 m − 1 in units of h j h_{j} h j . By the definition of G m \mathcal G_{m} G m , the knots in band j j j are the indices m , … , 2 m − 1 m,\ldots,2m-1 m , … , 2 m − 1 , and those in band j + 1 j+1 j + 1 are the even indices 2 m , … , 4 m − 2 2m,\ldots,4m-2 2 m , … , 4 m − 2 , since h j + 1 = 2 h j h_{j+1}=2h_{j} h j + 1 = 2 h j . Since m h j = 2 j mh_{j}=2^j m h j = 2 j is a knot of h j Z ≥ 0 h_{j}\mathbb Z_{\ge0} h j Z ≥ 0 , the projection μ ^ < j \hat{\mu}_{<j} μ ^ < j of the values of μ \mu μ in ( 0 , 2 j ) (0,2^j) ( 0 , 2 j ) is supported on the indices 0 , … , m 0,\ldots,m 0 , … , m , and so is ν ^ < j \hat{\nu}_{<j} ν ^ < j . By the previous part, these are the values of μ ^ \hat\mu μ ^ and ν ^ \hat\nu ν ^ in iteration j j j . Thus the measure C C C in line 3 is supported on the indices m , … , 4 m − 2 m,\ldots,4m-2 m , … , 4 m − 2 : the term μ j ∗ ν j \mu_j*\nu_j μ j ∗ ν j on the indices 2 m , … , 4 m − 2 2m,\ldots,4m-2 2 m , … , 4 m − 2 , and the other two terms on the indices m , … , 3 m − 1 m,\ldots,3m-1 m , … , 3 m − 1 . Since 4 m − 2 < 4 m 4m-2<4m 4 m − 2 < 4 m , the cyclic convolutions of length 4 m 4m 4 m of the zero-padded arrays are equal to the linear ones, and thus C C C is computed by a constant number of FFTs of length 4 m 4m 4 m , that is, in O ( m log ( m ) ) O(m\log(m)) O ( m log ( m )) operations. The masses of C C C at the indices m , … , 2 m − 1 m,\ldots,2m-1 m , … , 2 m − 1 and at the even indices 2 m , … , 4 m − 2 2m,\ldots,4m-2 2 m , … , 4 m − 2 lie on knots of G m \mathcal G_{m} G m and are fixed by Π \Pi Π , and every odd index i i i with 2 m < i < 4 m − 2 2m<i<4m-2 2 m < i < 4 m − 2 lies between the adjacent knots i − 1 i-1 i − 1 and i + 1 i+1 i + 1 . Thus line 4 obtains Π ( C ) \Pi(C) Π ( C ) by moving (for rounding) or splitting (for CtD) the mass at each such index to these two indices, in O ( m ) O(m) O ( m ) operations, and Π ( C ) \Pi(C) Π ( C ) is supported on the bands j j j and j + 1 j+1 j + 1 . Similarly, μ ^ + μ j \hat\mu+\mu_j μ ^ + μ j is supported on the indices 0 , … , 2 m − 1 0,\ldots,2m-1 0 , … , 2 m − 1 , and line 5 obtains its projection onto h j + 1 Z ≥ 0 h_{j+1}\mathbb Z_{\ge0} h j + 1 Z ≥ 0 , that is, onto the even indices, by moving or splitting the mass at each odd index to its two neighbors, in O ( m ) O(m) O ( m ) operations. The result is supported on the indices 0 , … , m 0,\ldots,m 0 , … , m in units of h j + 1 h_{j+1} h j + 1 , as needed for the next iteration. Line 7 takes O ( J m ) O(Jm) O ( J m ) operations, since μ + \mu_+ μ + and ν + \nu_+ ν + are supported on the J m Jm J m knots of J J J bands. Summing over the J J J iterations, Algorithm alg:ms-conv uses O ( J m log ( m ) ) O(Jm\log(m)) O ( J m log ( m )) operations. The positive finite part of its output is the sum of the measures Π ( C ) \Pi(C) Π ( C ) over the J J J iterations and of μ ( 0 ) ν + + ν ( 0 ) μ + \mu(0)\,\nu_++\nu(0)\,\mu_+ μ ( 0 ) ν + + ν ( 0 ) μ + , and thus it is supported on the bands j min , … , j max + 1 j_{\min},\ldots,j_{\max}+1 j m i n , … , j m a x + 1 . Finally, the inputs, ξ \xi ξ and the output are supported on at most ( J + 1 ) m + 2 (J+1)m+2 ( J + 1 ) m + 2 points, and the prefixes and the buffers of the FFT take O ( m ) O(m) O ( m ) space, which gives the space bound O ( J m ) O(Jm) O ( J m ) . ◻
The Unfolded Tree of Repeated Squaring
By Lemma A.6 , the loss parameter of a sum is the larger of the loss parameters of its summands. Thus the errors of the merges accumulate along the depth of the unfolded tree (§ 3.2 ) rather than over all of its merges. The same observation applies to the accountant of FS26, whose analysis charges its spacing α ′ \alpha' α ′ for the discretization of the input and for every merge. Its remove direction merges the sum of t − 1 t-1 t − 1 copies with one more factor, so its unfolded tree has depth ⌈ log 2 ( t − 1 ) ⌉ + 1 ≤ ⌈ log 2 ( t ) ⌉ + 1 \lceil\log_2(t-1)\rceil+1\le\lceil\log_2(t)\rceil+1 ⌈ log 2 ( t − 1 )⌉ + 1 ≤ ⌈ log 2 ( t )⌉ + 1 , and its guarantees also hold with α ′ = α / ( ⌈ log 2 ( t ) ⌉ + 2 ) \alpha'=\alpha/(\lceil\log_2(t)\rceil+2) α ′ = α / (⌈ log 2 ( t )⌉ + 2 ) in place of α / ( 2 ⌈ log 2 ( t ) ⌉ + 1 ) \alpha/(2\lceil\log_2(t)\rceil+1) α / ( 2 ⌈ log 2 ( t )⌉ + 1 ) .
Claim B.4. For n ≥ 1 n\ge1 n ≥ 1 , repeated squaring for the sum of n n n copies uses at most 2 ⌈ log 2 ( n ) ⌉ 2\lceil\log_2(n)\rceil 2 ⌈ log 2 ( n )⌉ merges, and its unfolded tree has depth ⌈ log 2 ( n ) ⌉ \lceil\log_2(n)\rceil ⌈ log 2 ( n )⌉ .
Proof. The case n = 1 n=1 n = 1 is trivial, so let n ≥ 2 n\ge2 n ≥ 2 and let n = ∑ k = 1 s 2 b k n=\sum_{k=1}^s2^{b_k} n = ∑ k = 1 s 2 b k with b 1 < ⋯ < b s b_1<\cdots<b_s b 1 < ⋯ < b s , so that b s = ⌊ log 2 ( n ) ⌋ b_s=\lfloor\log_2(n)\rfloor b s = ⌊ log 2 ( n )⌋ . Repeated squaring performs b s b_s b s squarings and s − 1 s-1 s − 1 further merges. Since b 1 , … , b s b_1,\ldots,b_s b 1 , … , b s are distinct integers in { 0 , … , b s } \{0,\ldots,b_s\} { 0 , … , b s } , we have s ≤ b s + 1 s\le b_s+1 s ≤ b s + 1 , and thus b s + s − 1 ≤ 2 ⌊ log 2 ( n ) ⌋ ≤ 2 ⌈ log 2 ( n ) ⌉ b_s+s-1\le2\lfloor\log_2(n)\rfloor\le2\lceil\log_2(n)\rceil b s + s − 1 ≤ 2 ⌊ log 2 ( n )⌋ ≤ 2 ⌈ log 2 ( n )⌉ . Repeated squaring computes the sum of 2 b 2^b 2 b copies for b ≤ b s b\le b_s b ≤ b s by successive merges of a sum with itself. Thus the unfolded tree of the sum of 2 b 2^b 2 b copies is a complete binary tree of depth b b b . The accumulated sum is initialized to the sum of 2 b 1 2^{b_1} 2 b 1 copies (of depth b 1 b_1 b 1 ) and, for k = 2 , … , s k=2,\ldots,s k = 2 , … , s , it is merged with the sum of 2 b k 2^{b_k} 2 b k copies. After this merge its depth is max { D k − 1 , b k } + 1 = b k + 1 \max\{D_{k-1},b_k\}+1=b_k+1 max { D k − 1 , b k } + 1 = b k + 1 , where D k − 1 ≤ b k − 1 + 1 ≤ b k D_{k-1}\le b_{k-1}+1\le b_k D k − 1 ≤ b k − 1 + 1 ≤ b k is its depth before the merge. Thus the depth of the result is b s = log 2 ( n ) b_s=\log_2(n) b s = log 2 ( n ) if s = 1 s=1 s = 1 and b s + 1 = ⌊ log 2 ( n ) ⌋ + 1 b_s+1=\lfloor\log_2(n)\rfloor+1 b s + 1 = ⌊ log 2 ( n )⌋ + 1 otherwise, which is ⌈ log 2 ( n ) ⌉ \lceil\log_2(n)\rceil ⌈ log 2 ( n )⌉ in both cases. ◻
The next claim justifies viewing every projection in the unfolded tree as an independent random map, as the analysis in § 4 does.
Claim B.5. Let μ \mu μ be a probability distribution on G m \mathcal G_{m} G m whose positive values lie in finitely many bands, and let n ≥ 1 n\ge1 n ≥ 1 . Consider the unfolded tree of repeated squaring for the sum of n n n copies, whose leaves are independent random variables with distribution μ \mu μ , and in which every internal node applies the CtD projection onto G m \mathcal G_{m} G m , as an independent random map, to the sum of the values of its children. Then the value at every node has the distribution that repeated squaring computes at the corresponding merge, and in particular the value at the root has the distribution self-conv ( μ , n ) \textbf{self-conv}(\mu,n) self-conv ( μ , n ) .
Proof. We use induction on the height of the node. A leaf has the distribution μ = μ ( 0 ) \mu=\mu^{(0)} μ = μ ( 0 ) . Consider an internal node whose children have, by the induction hypothesis, the distributions ξ 1 \xi_1 ξ 1 and ξ 2 \xi_2 ξ 2 computed by repeated squaring. The subtrees of the two children have disjoint sets of leaves and of projections. Thus the values at the children are independent, and their sum has the distribution ξ 1 ∗ ξ 2 \xi_1*\xi_2 ξ 1 ∗ ξ 2 . The image of an independent random variable with distribution f f f under the random map has the distribution Π ( f ) \Pi(f) Π ( f ) (Claim C.1 ). Therefore the value at the node has the distribution Π ( ξ 1 ∗ ξ 2 ) \Pi(\xi_1*\xi_2) Π ( ξ 1 ∗ ξ 2 ) , which is equal to ms-fft-merge ( ξ 1 , ξ 2 ) \textbf{ms-fft-merge}(\xi_1,\xi_2) ms-fft-merge ( ξ 1 , ξ 2 ) by Theorem 3.1 and Lemma B.3 , that is, to the distribution computed at the corresponding merge. ◻
Missing Details from § 4
The CtD Projection and the Pessimistic CtD Approximation
We first prove the properties of the CtD projection as a random map that Section sec:guarantees states.
Claim C.1. Let x ~ \tilde x x ~ denote the image of a value x ≥ 0 x\ge0 x ≥ 0 under the CtD projection onto G m \mathcal G_{m} G m , viewed as a random map. Then x ~ \tilde x x ~ has the distribution Π ( δ x ) \Pi(\delta_x) Π ( δ x ) , and the image of a random variable with distribution f f f under an independent random map has the distribution Π ( f ) \Pi(f) Π ( f ) . Moreover, for every nonnegative random variable Y Y Y and its image Y ~ \widetilde Y Y under an independent random map, E [ Y ~ ∣ Y ] = Y , ( 1 + 1 m ) − 1 Y ≤ Y ~ ≤ ( 1 + 1 m ) Y ,
\underset{}{\mathbb E}\left[\widetilde Y\mid Y\right]=Y,
\qquad
\Bigl(1+\frac1m\Bigr)^{-1}Y\le\widetilde Y\le\Bigl(1+\frac1m\Bigr)Y,
E [ Y ∣ Y ] = Y , ( 1 + m 1 ) − 1 Y ≤ Y ≤ ( 1 + m 1 ) Y , and in particular P ( Y ~ = 0 ) = P ( Y = 0 ) \underset{}{\mathbb P}\left(\widetilde Y=0\right)=\underset{}{\mathbb P}\left(Y=0\right) P ( Y = 0 ) = P ( Y = 0 ) and E [ Y ~ ] = E [ Y ] \underset{}{\mathbb E}\left[\widetilde Y\right]=\underset{}{\mathbb E}\left[Y\right] E [ Y ] = E [ Y ] .
Proof. If x x x is a knot then x ~ = x \tilde x=x x ~ = x . Otherwise, let u < x < v u<x<v u < x < v be the adjacent knots around x x x . The map moves x x x to v v v with probability ( x − u ) / ( v − u ) (x-u)/(v-u) ( x − u ) / ( v − u ) and to u u u otherwise, which gives the distribution Π ( δ x ) \Pi(\delta_x) Π ( δ x ) . The distribution of the image of a random variable with distribution f f f is ∫ Π ( δ x ) f ( d x ) \int\Pi(\delta_x)\,f(dx) ∫ Π ( δ x ) f ( d x ) , which is Π ( f ) \Pi(f) Π ( f ) by the linear extension of Π \Pi Π . Since x ~ ∈ { u , v } \tilde x\in\{u,v\} x ~ ∈ { u , v } by (P1) and v ≤ ( 1 + 1 / m ) u v\le(1+1/m)u v ≤ ( 1 + 1/ m ) u by (G1) (Claim B.2 ), we have x / ( 1 + 1 / m ) ≤ x ~ ≤ ( 1 + 1 / m ) x x/(1+1/m)\le\tilde x\le(1+1/m)x x / ( 1 + 1/ m ) ≤ x ~ ≤ ( 1 + 1/ m ) x for every x ≥ 0 x\ge0 x ≥ 0 . Conditioning on Y Y Y and applying this bound and (P5) with x = Y x=Y x = Y gives (7) . In particular, Y ~ = 0 \widetilde Y=0 Y = 0 if and only if Y = 0 Y=0 Y = 0 , and taking expectations in the first identity gives E [ Y ~ ] = E [ Y ] \underset{}{\mathbb E}\left[\widetilde Y\right]=\underset{}{\mathbb E}\left[Y\right] E [ Y ] = E [ Y ] . ◻
Next we show that the CtD projection of likelihood ratios gives the pessimistic CtD approximation of [DGKKM22 ]. Given a PLD and a grid of losses, this approximation is the PLD supported on the grid and on + ∞ +\infty + ∞ whose privacy profile, as a function of e ε e^\varepsilon e ε , is equal to that of the given PLD at the points of the grid and is affine between them.
Claim C.2. Let S ⊆ [ 0 , ∞ ) S\subseteq[0,\infty) S ⊆ [ 0 , ∞ ) be a set of knots that contains 0 0 0 , let L L L be a PLD realization such that e − L ≤ s max e^{-L}\le s_{\max} e − L ≤ s m a x for a knot s max s_{\max} s m a x of S S S , and let L ~ \widetilde L L be the PLD realization for which e − L ~ e^{-\widetilde L} e − L is the CtD projection of e − L e^{-L} e − L onto S S S . Then, as functions of e ε e^\varepsilon e ε :
The privacy profile of D ( L ~ ) \mathcal D\left(\widetilde L\right) D ( L ) is equal to that of D ( L ) \mathcal D\left(L\right) D ( L ) at every point e ε ∈ S e^\varepsilon\in S e ε ∈ S , is affine between every two consecutive points of S S S (including 0 0 0 , where both profiles tend to 1 1 1 ), and is constant for e ε ≥ s max e^\varepsilon\ge s_{\max} e ε ≥ s m a x .
The privacy profile of L ~ \widetilde L L is equal to that of L L L at every point e ε = 1 / s e^\varepsilon=1/s e ε = 1/ s with s ∈ S ∖ { 0 } s\in S\setminus\{0\} s ∈ S ∖ { 0 } , is affine between every two such consecutive points and for e ε ≤ 1 / s max e^\varepsilon\le1/s_{\max} e ε ≤ 1/ s m a x , and is constant for e ε ≥ 1 / s min e^\varepsilon\ge1/s_{\min} e ε ≥ 1/ s m i n if S S S has a smallest positive knot s min s_{\min} s m i n .
Thus D ( L ~ ) \mathcal D\left(\widetilde L\right) D ( L ) and L ~ \widetilde L L are the pessimistic CtD approximations of D ( L ) \mathcal D\left(L\right) D ( L ) and of L L L on the grids of losses ln ( S ∖ { 0 } ) \ln(S\setminus\{0\}) ln ( S ∖ { 0 }) and − ln ( S ∖ { 0 } ) -\ln(S\setminus\{0\}) − ln ( S ∖ { 0 }) , respectively.
Proof. Let X ≔ e − L X\coloneqq e^{-L} X : = e − L and X ~ ≔ e − L ~ \widetilde X\coloneqq e^{-\widetilde L} X : = e − L , so that E [ X ~ ] = E [ X ] \underset{}{\mathbb E}\left[\widetilde X\right]=\underset{}{\mathbb E}\left[X\right] E [ X ] = E [ X ] . Let C ( s ) ≔ 1 − E [ X ] + E [ ( X − s ) + ] C(s)\coloneqq 1-\underset{}{\mathbb E}\left[X\right]+\underset{}{\mathbb E}\left[(X-s)_+\right] C ( s ) : = 1 − E [ X ] + E [ ( X − s ) + ] , and let C ~ \widetilde C C be defined in the same way for X ~ \widetilde X X . By (2) , the privacy profiles of D ( L ) \mathcal D\left(L\right) D ( L ) and of D ( L ~ ) \mathcal D\left(\widetilde L\right) D ( L ) at e ε e^\varepsilon e ε are C ( e ε ) C(e^\varepsilon) C ( e ε ) and C ~ ( e ε ) \widetilde C(e^\varepsilon) C ( e ε ) . For a knot s ∈ S s\in S s ∈ S , the function x ↦ ( x − s ) + x\mapsto(x-s)_+ x ↦ ( x − s ) + is affine between every two adjacent knots, and the CtD projection preserves the mean of every value. Thus C ~ ( s ) = C ( s ) \widetilde C(s)=C(s) C ( s ) = C ( s ) . Between two consecutive knots u < v u<v u < v , every value of X ~ \widetilde X X is either at most u u u or at least v v v . Thus C ~ \widetilde C C is affine on [ u , v ] [u,v] [ u , v ] . In addition, C ~ ( 0 ) = C ( 0 ) = 1 \widetilde C(0)=C(0)=1 C ( 0 ) = C ( 0 ) = 1 , and C ~ ( s ) = 1 − E [ X ] \widetilde C(s)=1-\underset{}{\mathbb E}\left[X\right] C ( s ) = 1 − E [ X ] for s ≥ s max s\ge s_{\max} s ≥ s m a x since X ~ ≤ s max \widetilde X\le s_{\max} X ≤ s m a x . This proves the first part.
For the second part, ( 1 − e ε x ) + = e ε ( ( x − e − ε ) + − x + e − ε ) (1-e^\varepsilon x)_+=e^\varepsilon\bigl((x-e^{-\varepsilon})_+-x+e^{-\varepsilon}\bigr) ( 1 − e ε x ) + = e ε ( ( x − e − ε ) + − x + e − ε ) . Thus by (2) the privacy profile of L L L at e ε e^\varepsilon e ε is 1 − e ε + e ε C ( e − ε ) 1-e^\varepsilon+e^\varepsilon C(e^{-\varepsilon}) 1 − e ε + e ε C ( e − ε ) , and the same holds for L ~ \widetilde L L and C ~ \widetilde C C . Thus the two privacy profiles are equal at every point e ε = 1 / s e^\varepsilon=1/s e ε = 1/ s with s ∈ S ∖ { 0 } s\in S\setminus\{0\} s ∈ S ∖ { 0 } . If C ~ ( s ) = A + B s \widetilde C(s)=A+Bs C ( s ) = A + B s for s = e − ε s=e^{-\varepsilon} s = e − ε between two consecutive knots, then the privacy profile of L ~ \widetilde L L is ( 1 + B ) + ( A − 1 ) e ε (1+B)+(A-1)e^\varepsilon ( 1 + B ) + ( A − 1 ) e ε , which is affine in e ε e^\varepsilon e ε . For e ε ≤ 1 / s max e^\varepsilon\le1/s_{\max} e ε ≤ 1/ s m a x it is 1 − E [ X ] e ε 1-\underset{}{\mathbb E}\left[X\right]e^\varepsilon 1 − E [ X ] e ε . If S S S has a smallest positive knot s min s_{\min} s m i n , then C ~ \widetilde C C is affine on [ 0 , s min ] [0,s_{\min}] [ 0 , s m i n ] with C ~ ( 0 ) = 1 \widetilde C(0)=1 C ( 0 ) = 1 , that is, A = 1 A=1 A = 1 there, and the privacy profile is constant for e ε ≥ 1 / s min e^\varepsilon\ge1/s_{\min} e ε ≥ 1/ s m i n .
Since L ~ \widetilde L L is supported on − ln ( S ∖ { 0 } ) ∪ { ∞ } -\ln(S\setminus\{0\})\cup\{\infty\} − ln ( S ∖ { 0 }) ∪ { ∞ } and, by the definition of the dual, D ( L ~ ) \mathcal D\left(\widetilde L\right) D ( L ) is supported on ln ( S ∖ { 0 } ) ∪ { ∞ } \ln(S\setminus\{0\})\cup\{\infty\} ln ( S ∖ { 0 }) ∪ { ∞ } , the two parts of the claim identify them with the pessimistic CtD approximations defined above (see also [FS26pld Remark C.2]). ◻
In particular, the CtD approximations of L L L and of D ( L ) \mathcal D\left(L\right) D ( L ) obtained in this way are duals of each other. FS26 require this property when they use CtD to discretize the input of the remove direction [FS26pld Remark C.2].
Couplings and the Proof of Theorem 4.1
Lemma C.3 (Coupling along the tree). Consider an unfolded tree of depth d d d whose leaves are independent nonnegative random variables, in which every leaf applies the CtD projection onto G m \mathcal G_{m} G m , as an independent random map, to its value, and every internal node applies it to the sum of the values of its children. Let L \mathcal L L denote the values of the leaves, let Y Y Y be their sum and let Y ^ \widehat Y Y be the value at the root. Then E [ Y ^ ∣ L ] = Y , ( 1 + 1 m ) − ( d + 1 ) Y ≤ Y ^ ≤ ( 1 + 1 m ) d + 1 Y ,
\underset{}{\mathbb E}\left[\widehat Y\mid\mathcal L\right]=Y,
\qquad
\Bigl(1+\frac1m\Bigr)^{-(d+1)}Y\le\widehat Y\le\Bigl(1+\frac1m\Bigr)^{d+1}Y,
E [ Y ∣ L ] = Y , ( 1 + m 1 ) − ( d + 1 ) Y ≤ Y ≤ ( 1 + m 1 ) d + 1 Y , and Y ^ = 0 \widehat Y=0 Y = 0 if and only if Y = 0 Y=0 Y = 0 .
Proof. We prove the claims for every node n n n by induction on its height h ( n ) h(n) h ( n ) , where Y n Y_n Y n and Y ^ n \widehat Y_n Y n denote the exact and the computed sums at n n n . For a leaf, Y ^ n \widehat Y_n Y n is the projection of Y n Y_n Y n , and by (7) , E [ Y ^ n ∣ L ] = Y n \underset{}{\mathbb E}\left[\widehat Y_n\mid\mathcal L\right]=Y_n E [ Y n ∣ L ] = Y n and Y ^ n \widehat Y_n Y n is within a factor of 1 + 1 / m 1+1/m 1 + 1/ m of Y n Y_n Y n . For an internal node with children c 1 c_1 c 1 and c 2 c_2 c 2 , the input of the projection is y n = Y ^ c 1 + Y ^ c 2 y_n=\widehat Y_{c_1}+\widehat Y_{c_2} y n = Y c 1 + Y c 2 . By the induction hypothesis, E [ y n ∣ L ] = Y c 1 + Y c 2 = Y n \underset{}{\mathbb E}\left[y_n\mid\mathcal L\right]=Y_{c_1}+Y_{c_2}=Y_n E [ y n ∣ L ] = Y c 1 + Y c 2 = Y n and y n y_n y n is within a factor of ( 1 + 1 / m ) h ( n ) (1+1/m)^{h(n)} ( 1 + 1/ m ) h ( n ) of Y n Y_n Y n . By (7) , E [ Y ^ n ∣ y n , L ] = y n \underset{}{\mathbb E}\left[\widehat Y_n\mid y_n,\mathcal L\right]=y_n E [ Y n ∣ y n , L ] = y n and Y ^ n \widehat Y_n Y n is within a factor of 1 + 1 / m 1+1/m 1 + 1/ m of y n y_n y n , and thus within a factor of ( 1 + 1 / m ) h ( n ) + 1 (1+1/m)^{h(n)+1} ( 1 + 1/ m ) h ( n ) + 1 of Y n Y_n Y n . This gives (8) at the root. Finally, the projection maps zero to itself and positive values to positive values (Claim C.1 ). ◻
Next we show how to convert a coupling of the likelihood ratios under Q Q Q into couplings of the PLDs in both directions. Note that this conversion does not introduce a multiplicative factor in the error in the remove direction.
Lemma C.4 (Two directions). Let Y Y Y and Y ^ \widehat Y Y be bounded nonnegative random variables on a common probability space such that E [ Y ] ≤ 1 \underset{}{\mathbb E}\left[Y\right]\le1 E [ Y ] ≤ 1 and E [ Y ^ ∣ Y ] = Y , e − γ Y ≤ Y ^ ≤ e γ Y . \underset{}{\mathbb E}\left[\widehat Y\mid Y\right]=Y,
\qquad e^{-\gamma}Y\le\widehat Y\le e^\gamma Y. E [ Y ∣ Y ] = Y , e − γ Y ≤ Y ≤ e γ Y . Then − ln ( Y ) -\ln(Y) − ln ( Y ) and − ln ( Y ^ ) -\ln(\widehat Y) − ln ( Y ) are PLD realizations, and for ( A , A ^ ) = ( − ln ( Y ) , − ln ( Y ^ ) ) (A,\widehat A)=(-\ln(Y),-\ln(\widehat Y)) ( A , A ) = ( − ln ( Y ) , − ln ( Y )) and for ( A , A ^ ) = ( D ( − ln ( Y ) ) , D ( − ln ( Y ^ ) ) ) (A,\widehat A)=(\mathcal D\left(-\ln(Y)\right),\mathcal D\left(-\ln(\widehat Y)\right)) ( A , A ) = ( D ( − ln ( Y ) ) , D ( − ln ( Y ) ) ) there is a coupling of A A A and A ^ \widehat A A under which A = ∞ A=\infty A = ∞ if and only if A ^ = ∞ \widehat A=\infty A = ∞ , and ∣ A − A ^ ∣ ≤ γ |A-\widehat A|\le\gamma ∣ A − A ∣ ≤ γ otherwise. In particular, A ⪯ ( γ , 0 ) A ^ A\preceq_{(\gamma,0)}\widehat A A ⪯ ( γ , 0 ) A and A ^ ⪯ ( γ , 0 ) A \widehat A\preceq_{(\gamma,0)}A A ⪯ ( γ , 0 ) A .
Proof. Since E [ Y ^ ] = E [ Y ] ≤ 1 \underset{}{\mathbb E}\left[\widehat Y\right]=\underset{}{\mathbb E}\left[Y\right]\le1 E [ Y ] = E [ Y ] ≤ 1 , both are PLD realizations. Under a coupling as in the statement, A ^ ≤ A + γ \widehat A\le A+\gamma A ≤ A + γ and A ≤ A ^ + γ A\le\widehat A+\gamma A ≤ A + γ , which gives the last statement. We now construct the couplings. Let π \pi π be the joint distribution of ( Y , Y ^ ) (Y,\widehat Y) ( Y , Y ) . For − ln ( Y ) -\ln(Y) − ln ( Y ) and − ln ( Y ^ ) -\ln(\widehat Y) − ln ( Y ) , the coupling is the joint distribution of − ln ( Y ) -\ln(Y) − ln ( Y ) and − ln ( Y ^ ) -\ln(\widehat Y) − ln ( Y ) under π \pi π . Indeed, Y = 0 Y=0 Y = 0 if and only if Y ^ = 0 \widehat Y=0 Y = 0 , and the finite values differ by at most γ \gamma γ . For the duals, we weight π ( d y , d y ^ ) \pi(dy,d\hat y) π ( d y , d y ^ ) by y ^ \hat y y ^ . Since E [ Y ^ ∣ Y ] = Y \underset{}{\mathbb E}\left[\widehat Y\mid Y\right]=Y E [ Y ∣ Y ] = Y , the marginal of the resulting measure over y y y is the distribution of Y Y Y weighted by y y y , and its marginal over y ^ \hat y y ^ is the distribution of Y ^ \widehat Y Y weighted by y ^ \hat y y ^ . This measure has mass E [ Y ] \underset{}{\mathbb E}\left[Y\right] E [ Y ] , and under it both coordinates are positive. Taking the logarithm of both coordinates and adding mass 1 − E [ Y ] 1-\underset{}{\mathbb E}\left[Y\right] 1 − E [ Y ] at ( ∞ , ∞ ) (\infty,\infty) ( ∞ , ∞ ) , we obtain a coupling of the two duals (by the definition of the dual) in which the finite values differ by at most γ \gamma γ . ◻
Claim C.5. In the setting of Theorem 4.1 , the positive finite part of the distribution computed at a node of height h h h of the unfolded tree of repeated squaring is supported on the bands j − , … , j + + h + 1 j_-,\ldots,j_++h+1 j − , … , j + + h + 1 . In particular, every distribution in the computation is supported on at most J + ⌈ log 2 ( t ) ⌉ + 1 J+\lceil\log_2(t)\rceil+1 J + ⌈ log 2 ( t )⌉ + 1 bands.
Proof. We use induction on h h h . For a leaf (h = 0 h=0 h = 0 ) this holds since the positive values of e − L ′ e^{-L'} e − L ′ are knots of G m \mathcal G_{m} G m in [ 2 j − , 2 j + + 1 ] [2^{j_-},2^{j_++1}] [ 2 j − , 2 j + + 1 ] (§ 3.2 ), and 2 j + + 1 2^{j_++1} 2 j + + 1 is the smallest knot of band j + + 1 j_++1 j + + 1 . The children of a node of height h ≥ 1 h\ge1 h ≥ 1 have heights at most h − 1 h-1 h − 1 , and thus by the induction hypothesis their positive finite parts are supported on the bands j − , … , j + + h j_-,\ldots,j_++h j − , … , j + + h . By Theorem 3.1 , the positive finite part of their merge is supported on the bands j − , … , j + + h + 1 j_-,\ldots,j_++h+1 j − , … , j + + h + 1 . The last statement holds since h ≤ ⌈ log 2 ( t ) ⌉ h\le\lceil\log_2(t)\rceil h ≤ ⌈ log 2 ( t )⌉ (Claim B.4 ) and J = j + − j − + 1 J=j_+-j_-+1 J = j + − j − + 1 . ◻
Proof of Theorem 4.1 . Setup. By line 2, the positive values of e − L e^{-L} e − L lie in [ 2 j − , 2 j + + 1 ] [2^{j_-},2^{j_++1}] [ 2 j − , 2 j + + 1 ] , and thus e − L e^{-L} e − L is a bounded nonnegative random variable. Consider the unfolded tree of repeated squaring for the sum of t t t copies, with independent copies of e − L e^{-L} e − L at its leaves, in which every leaf projects its value onto G m \mathcal G_{m} G m (line 3) and every projection is applied as an independent random map. The projected leaves are independent copies of e − L ′ e^{-L'} e − L ′ , whose positive values are knots of G m \mathcal G_{m} G m in [ 2 j − , 2 j + + 1 ] [2^{j_-},2^{j_++1}] [ 2 j − , 2 j + + 1 ] . The depth of the tree is d ≔ ⌈ log 2 ( t ) ⌉ d\coloneqq\lceil\log_2(t)\rceil d : = ⌈ log 2 ( t )⌉ (Claim B.4 ), and the value S ^ \widehat S S at its root has the distribution f S ^ f_{\widehat S} f S computed in line 4 of Algorithm alg:ctd-alloc (Claim B.5 ). Let R t ≔ 1 t ∑ i = 1 t e − L ( i ) R_{t}\coloneqq\frac1t\sum_{i=1}^te^{-L^{(i)}} R t : = t 1 ∑ i = 1 t e − L ( i ) be the average of the leaves and let R ^ ≔ S ^ / t \widehat R\coloneqq\widehat S/t R : = S / t . By line 5, \reflectbox{$\vec{\reflectbox{$L$}}$}_t=-\ln(\widehat R) and L ⃗ t = D ( − ln ( R ^ ) ) \vec{L}_t=\mathcal D\left(-\ln(\widehat R)\right) L t = D ( − ln ( R ) ) , and by (3) and (4) , \reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L)=-\ln(R_{t}) and ψ ⃗ t ( D ( L ) ) = D ( − ln ( R t ) ) \vec{\psi}_{t}(\mathcal D\left(L\right))=\mathcal D\left(-\ln(R_{t})\right) ψ t ( D ( L ) ) = D ( − ln ( R t ) ) .
Validity. Let γ = ( d + 1 ) ln ( 1 + 1 / m ) \gamma=(d+1)\ln(1+1/m) γ = ( d + 1 ) ln ( 1 + 1/ m ) . By Lemma C.3 , E [ S ^ ∣ e − L ( 1 ) , … , e − L ( t ) ] = t R t \underset{}{\mathbb E}\left[\widehat S\mid e^{-L^{(1)}},\ldots,e^{-L^{(t)}}\right]=tR_{t} E [ S ∣ e − L ( 1 ) , … , e − L ( t ) ] = t R t and e − γ t R t ≤ S ^ ≤ e γ t R t e^{-\gamma}tR_{t}\le\widehat S\le e^{\gamma}tR_{t} e − γ t R t ≤ S ≤ e γ t R t . Dividing by t t t , and since R t R_{t} R t is a function of the leaves, the tower property gives E [ R ^ ∣ R t ] = R t \underset{}{\mathbb E}\left[\widehat R\mid R_{t}\right]=R_{t} E [ R ∣ R t ] = R t and e − γ R t ≤ R ^ ≤ e γ R t e^{-\gamma}R_{t}\le\widehat R\le e^{\gamma}R_{t} e − γ R t ≤ R ≤ e γ R t . In particular, R t ≤ c x R ^ R_{t}\le_{\mathrm{cx}}\widehat R R t ≤ cx R by Jensen’s inequality. Since e − L e^{-L} e − L and R ^ \widehat R R are bounded and nonnegative, Lemma 4.3 shows that \reflectbox{$\vec{\reflectbox{$L$}}$}_t is a PLD realization that dominates \reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L) , and that L ⃗ t \vec{L}_t L t dominates ψ ⃗ t ( D ( L ) ) \vec{\psi}_{t}(\mathcal D\left(L\right)) ψ t ( D ( L ) ) . Since the dual of a PLD realization is a PLD realization (Claim A.2 ), L ⃗ t \vec{L}_t L t is also a PLD realization.
Tightness. The variables R t R_{t} R t and R ^ \widehat R R are bounded and nonnegative, and E [ R t ] = E [ e − L ] ≤ 1 \underset{}{\mathbb E}\left[R_{t}\right]=\underset{}{\mathbb E}\left[e^{-L}\right]\le1 E [ R t ] = E [ e − L ] ≤ 1 . Thus Lemma C.4 with ( Y , Y ^ ) = ( R t , R ^ ) (Y,\widehat Y)=(R_{t},\widehat R) ( Y , Y ) = ( R t , R ) gives \reflectbox{$\vec{\reflectbox{$L$}}$}_t\preceq_{(\gamma,0)}\reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L) and L ⃗ t ⪯ ( γ , 0 ) ψ ⃗ t ( D ( L ) ) \vec{L}_t\preceq_{(\gamma,0)}\vec{\psi}_{t}(\mathcal D\left(L\right)) L t ⪯ ( γ , 0 ) ψ t ( D ( L ) ) . By Claim A.4 , \boldsymbol H_{e^\varepsilon}\left(\reflectbox{$\vec{\reflectbox{$L$}}$}_t\right)\le\boldsymbol H_{e^{\varepsilon-\gamma}}\left(\reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L)\right) and H e ε ( L ⃗ t ) ≤ H e ε − γ ( ψ ⃗ t ( D ( L ) ) ) \boldsymbol H_{e^\varepsilon}\left(\vec{L}_t\right)\le\boldsymbol H_{e^{\varepsilon-\gamma}}\left(\vec{\psi}_{t}(\mathcal D\left(L\right))\right) H e ε ( L t ) ≤ H e ε − γ ( ψ t ( D ( L ) ) ) for every ε ∈ R \varepsilon\in\mathbb R ε ∈ R . Together with validity, these are the two inequalities of Definition 2.1 with the parameters ( γ , 0 ) (\gamma,0) ( γ , 0 ) .
χ 2 \chi^2 χ 2 error and bias. By the setup, Lemma C.8 applies to this tree, and its exact and computed sums at the root are Y = t R t Y=tR_{t} Y = t R t and Y ^ = S ^ \widehat Y=\widehat S Y = S . Thus its two pairs ( A , A ^ ) (A,\widehat A) ( A , A ) are (\reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L),\reflectbox{$\vec{\reflectbox{$L$}}$}_t) and ( ψ ⃗ t ( D ( L ) ) , L ⃗ t ) (\vec{\psi}_{t}(\mathcal D\left(L\right)),\vec{L}_t) ( ψ t ( D ( L ) ) , L t ) , and for each of them with χ 2 ( A ) < ∞ \chi^2(A)<\infty χ 2 ( A ) < ∞ the χ 2 \chi^2 χ 2 error is at most ( ( 1 + τ ) d + 1 − 1 ) ( 1 + χ 2 ( A ) ) ((1+\tau)^{d+1}-1)(1+\chi^2(A)) (( 1 + τ ) d + 1 − 1 ) ( 1 + χ 2 ( A )) for τ ≔ 1 / ( 4 m ( m + 1 ) ) \tau\coloneqq 1/(4m(m+1)) τ : = 1/ ( 4 m ( m + 1 )) . For m ≥ d + 1 m\ge d+1 m ≥ d + 1 we have ( d + 1 ) τ ≤ 1 (d+1)\tau\le1 ( d + 1 ) τ ≤ 1 , and thus
( 1 + τ ) d + 1 − 1 ≤ e ( d + 1 ) τ − 1 ≤ ( d + 1 ) τ + ( d + 1 ) 2 τ 2 ≤ d + 1 4 m 2 , (1+\tau)^{d+1}-1\le e^{(d+1)\tau}-1\le(d+1)\tau+(d+1)^2\tau^2\le\frac{d+1}{4m^2}, ( 1 + τ ) d + 1 − 1 ≤ e ( d + 1 ) τ − 1 ≤ ( d + 1 ) τ + ( d + 1 ) 2 τ 2 ≤ 4 m 2 d + 1 , where the last inequality holds since d + 1 ≤ 4 ( m + 1 ) d+1\le4(m+1) d + 1 ≤ 4 ( m + 1 ) . This gives the bound on the χ 2 \chi^2 χ 2 error, and Appendix § 9.5 gives the bound on the bias.
Computational complexity. The positive finite part of every distribution in the computation is supported on at most J + d + 1 J+d+1 J + d + 1 bands (Claim C.5 ). Repeated squaring performs at most 2 d 2d 2 d merges (Claim B.4 ), and by Theorem 3.1 , each of them uses O ( ( J + d ) m log ( m ) ) O((J+d)m\log(m)) O (( J + d ) m log ( m )) operations and O ( ( J + d ) m ) O((J+d)m) O (( J + d ) m ) space. Besides the input, repeated squaring keeps at most two intermediate distributions, each supported on O ( ( J + d ) m ) O((J+d)m) O (( J + d ) m ) points. Line 5 computes both outputs from f S ^ f_{\widehat S} f S in time linear in the size of its support, that is, O ( ( J + d ) m ) O((J+d)m) O (( J + d ) m ) . Since d = O ( log ( t ) ) d=O(\log(t)) d = O ( log ( t )) , the running time is O ( ( J + log ( t ) ) m log ( m ) log ( t ) ) O((J+\log(t))\,m\log(m)\log(t)) O (( J + log ( t )) m log ( m ) log ( t )) and the space is O ( ( J + log ( t ) ) m ) O((J+\log(t))\,m) O (( J + log ( t )) m ) , apart from the computation of L ′ L' L ′ in lines 2 and 3, which depends on the representation of the input. ◻
χ 2 \chi^2 χ 2 Error of a CtD Projection
We first bound the χ 2 \chi^2 χ 2 error of rounding, which § 4.0.0.4 uses for the comparison with direct convolution.
Claim C.6. Let L L L and U U U be PLD realizations with χ 2 ( L ) < ∞ \chi^2(L)<\infty χ 2 ( L ) < ∞ .
If L ⪯ U ⪯ ( α , 0 ) L L\preceq U\preceq_{(\alpha,0)}L L ⪯ U ⪯ ( α , 0 ) L for some α ≥ 0 \alpha\ge0 α ≥ 0 , then the χ 2 \chi^2 χ 2 error of U U U relative to L L L is between 0 0 0 and ( e α − 1 ) ( 1 + χ 2 ( L ) ) (e^\alpha-1)(1+\chi^2(L)) ( e α − 1 ) ( 1 + χ 2 ( L )) .
If U U U is obtained by rounding L L L up to the grid α ′ ( Z + θ ) \alpha'(\mathbb Z+\theta) α ′ ( Z + θ ) , where α ′ > 0 \alpha'>0 α ′ > 0 and θ \theta θ is uniform on [ 0 , 1 ) [0,1) [ 0 , 1 ) and independent of L L L , then the χ 2 \chi^2 χ 2 error of U U U relative to L L L is ( ( e α ′ − 1 ) / α ′ − 1 ) ( 1 + χ 2 ( L ) ) ≥ ( α ′ / 2 ) ( 1 + χ 2 ( L ) ) ((e^{\alpha'}-1)/\alpha'-1)(1+\chi^2(L))\ge(\alpha'/2)(1+\chi^2(L)) (( e α ′ − 1 ) / α ′ − 1 ) ( 1 + χ 2 ( L )) ≥ ( α ′ /2 ) ( 1 + χ 2 ( L )) .
Proof. For the first part, F ‾ L ( x ) ≤ F ‾ U ( x ) ≤ F ‾ L ( x − α ) \overline F_L(x)\le\overline F_U(x)\le\overline F_L(x-\alpha) F L ( x ) ≤ F U ( x ) ≤ F L ( x − α ) for all x x x . Since the exponential function is increasing, E [ e L ] ≤ E [ e U ] ≤ E [ e L + α ] = e α E [ e L ] \underset{}{\mathbb E}\left[e^L\right]\le\underset{}{\mathbb E}\left[e^U\right]\le\underset{}{\mathbb E}\left[e^{L+\alpha}\right]=e^\alpha\underset{}{\mathbb E}\left[e^L\right] E [ e L ] ≤ E [ e U ] ≤ E [ e L + α ] = e α E [ e L ] .
For the second part, L L L is finite since χ 2 ( L ) < ∞ \chi^2(L)<\infty χ 2 ( L ) < ∞ . Let Z ≔ L / α ′ − θ Z\coloneqq L/\alpha'-\theta Z : = L / α ′ − θ , so that U − L = α ′ ( ⌈ Z ⌉ − Z ) U-L=\alpha'(\lceil Z\rceil-Z) U − L = α ′ (⌈ Z ⌉ − Z ) . Conditioned on L L L , the fractional part of Z Z Z is uniform on [ 0 , 1 ) [0,1) [ 0 , 1 ) , and thus ⌈ Z ⌉ − Z \lceil Z\rceil-Z ⌈ Z ⌉ − Z is uniform on [ 0 , 1 ) [0,1) [ 0 , 1 ) up to an event of probability zero. Therefore E [ e U ∣ L ] = e L ∫ 0 1 e α ′ v d v = e L ( e α ′ − 1 ) / α ′ \underset{}{\mathbb E}\left[e^U\mid L\right]=e^L\int_0^1e^{\alpha'v}\,dv=e^L(e^{\alpha'}-1)/\alpha' E [ e U ∣ L ] = e L ∫ 0 1 e α ′ v d v = e L ( e α ′ − 1 ) / α ′ , and ( e α ′ − 1 ) / α ′ − 1 = ∑ k ≥ 1 α ′ k / ( k + 1 ) ! ≥ α ′ / 2 (e^{\alpha'}-1)/\alpha'-1=\sum_{k\ge1}\alpha'^k/(k+1)!\ge\alpha'/2 ( e α ′ − 1 ) / α ′ − 1 = ∑ k ≥ 1 α ′ k / ( k + 1 )! ≥ α ′ /2 . ◻
In contrast, the CtD projection changes the χ 2 \chi^2 χ 2 divergence only to the second order.
Lemma C.7 (χ 2 \chi^2 χ 2 error of a CtD projection). Let α ′ > 0 \alpha'>0 α ′ > 0 and let S ⊆ [ 0 , ∞ ) S\subseteq[0,\infty) S ⊆ [ 0 , ∞ ) be a set of knots that contains 0 0 0 and in which every two consecutive positive knots u < v u<v u < v satisfy v ≤ e α ′ u v\le e^{\alpha'}u v ≤ e α ′ u . Let X X X be a nonnegative random variable whose positive values lie between positive knots of S S S , and let X ~ \widetilde X X be its CtD projection onto S S S (as a random map). Then E [ X 2 ] ≤ E [ X ~ 2 ] ≤ cosh 2 ( α ′ / 2 ) E [ X 2 ] \underset{}{\mathbb E}\left[X^2\right]\le\underset{}{\mathbb E}\left[\widetilde X^2\right]\le\cosh^2(\alpha'/2)\,\underset{}{\mathbb E}\left[X^2\right] E [ X 2 ] ≤ E [ X 2 ] ≤ cosh 2 ( α ′ /2 ) E [ X 2 ] and E [ X − 1 1 { X > 0 } ] ≤ E [ X ~ − 1 1 { X ~ > 0 } ] ≤ cosh 2 ( α ′ / 2 ) E [ X − 1 1 { X > 0 } ] . \underset{}{\mathbb E}\left[X^{-1}\mathbf 1_{\{X>0\}}\right]\le\underset{}{\mathbb E}\left[\widetilde X^{-1}\mathbf 1_{\{\widetilde X>0\}}\right]\le\cosh^2(\alpha'/2)\,\underset{}{\mathbb E}\left[X^{-1}\mathbf 1_{\{X>0\}}\right]. E [ X − 1 1 { X > 0 } ] ≤ E [ X − 1 1 { X > 0 } ] ≤ cosh 2 ( α ′ /2 ) E [ X − 1 1 { X > 0 } ] . In particular, let L L L be a PLD realization, and let L ~ \widetilde L L be the PLD realization for which f e − L ~ = Π S ( f e − L ) f_{e^{-\widetilde L}}=\Pi_S(f_{e^{-L}}) f e − L = Π S ( f e − L ) . Then for ( A , A ~ ) = ( L , L ~ ) (A,\widetilde A)=(L,\widetilde L) ( A , A ) = ( L , L ) and for ( A , A ~ ) = ( D ( L ) , D ( L ~ ) ) (A,\widetilde A)=(\mathcal D\left(L\right),\mathcal D\left(\widetilde L\right)) ( A , A ) = ( D ( L ) , D ( L ) ) with χ 2 ( A ) < ∞ \chi^2(A)<\infty χ 2 ( A ) < ∞ , the χ 2 \chi^2 χ 2 error of A ~ \widetilde A A relative to A A A is between 0 0 0 and sinh 2 ( α ′ / 2 ) ( 1 + χ 2 ( A ) ) \sinh^2(\alpha'/2)(1+\chi^2(A)) sinh 2 ( α ′ /2 ) ( 1 + χ 2 ( A )) . The factor cosh 2 ( α ′ / 2 ) \cosh^2(\alpha'/2) cosh 2 ( α ′ /2 ) cannot be improved. If v = e α ′ u v=e^{\alpha'}u v = e α ′ u are adjacent knots of S S S and X ≡ ( u + v ) / 2 X\equiv(u+v)/2 X ≡ ( u + v ) /2 , then the second upper bound holds with equality.
Proof. The projection fixes 0 0 0 and the knots, and by (P1) it maps positive values to positive values. Thus it suffices to consider a value x x x of X X X between adjacent positive knots u < x < v u<x<v u < x < v , where v ≤ e α ′ u v\le e^{\alpha'}u v ≤ e α ′ u . The projection maps x x x to u u u and to v v v with the probabilities ( v − x ) / ( v − u ) (v-x)/(v-u) ( v − x ) / ( v − u ) and ( x − u ) / ( v − u ) (x-u)/(v-u) ( x − u ) / ( v − u ) , and thus with mean x x x and variance ( x − u ) ( v − x ) (x-u)(v-x) ( x − u ) ( v − x ) . Direct calculation gives
E [ X ~ 2 ∣ X = x ] x 2 = 1 + ( x − u ) ( v − x ) x 2 and E [ X ~ − 1 ∣ X = x ] x − 1 = 1 + ( x − u ) ( v − x ) u v . \frac{\underset{}{\mathbb E}\left[\widetilde X^2\mid X=x\right]}{x^2}=1+\frac{(x-u)(v-x)}{x^2}
\qquad\text{and}\qquad
\frac{\underset{}{\mathbb E}\left[\widetilde X^{-1}\mid X=x\right]}{x^{-1}}=1+\frac{(x-u)(v-x)}{uv}. x 2 E [ X 2 ∣ X = x ] = 1 + x 2 ( x − u ) ( v − x ) and x − 1 E [ X − 1 ∣ X = x ] = 1 + uv ( x − u ) ( v − x ) . Since ( x − u ) ( v − x ) ≤ ( v − u ) 2 / 4 (x-u)(v-x)\le(v-u)^2/4 ( x − u ) ( v − x ) ≤ ( v − u ) 2 /4 , the second fraction after 1 1 1 is at most ( v − u ) 2 / ( 4 u v ) (v-u)^2/(4uv) ( v − u ) 2 / ( 4 uv ) , and so is the first, since ( v − u ) 2 x 2 − 4 u v ( x − u ) ( v − x ) = ( ( u + v ) x − 2 u v ) 2 ≥ 0 (v-u)^2x^2-4uv(x-u)(v-x)=((u+v)x-2uv)^2\ge0 ( v − u ) 2 x 2 − 4 uv ( x − u ) ( v − x ) = (( u + v ) x − 2 uv ) 2 ≥ 0 . In addition, 1 + ( v − u ) 2 / ( 4 u v ) = cosh 2 ( ln ( v / u ) / 2 ) ≤ cosh 2 ( α ′ / 2 ) 1+(v-u)^2/(4uv)=\cosh^2(\ln(v/u)/2)\le\cosh^2(\alpha'/2) 1 + ( v − u ) 2 / ( 4 uv ) = cosh 2 ( ln ( v / u ) /2 ) ≤ cosh 2 ( α ′ /2 ) . Integrating over the values of X X X gives the two chains of inequalities. For x = ( u + v ) / 2 x=(u+v)/2 x = ( u + v ) /2 and v = e α ′ u v=e^{\alpha'}u v = e α ′ u , the second fraction is equal to ( v − u ) 2 / ( 4 u v ) (v-u)^2/(4uv) ( v − u ) 2 / ( 4 uv ) , which gives the equality.
For the second statement, let X ≔ e − L X\coloneqq e^{-L} X : = e − L . Since χ 2 ( A ) < ∞ \chi^2(A)<\infty χ 2 ( A ) < ∞ , A A A has no mass at infinity. By (P1) and (P5) , P ( X ~ = 0 ) = P ( X = 0 ) \underset{}{\mathbb P}\left(\widetilde X=0\right)=\underset{}{\mathbb P}\left(X=0\right) P ( X = 0 ) = P ( X = 0 ) and E [ X ~ ] = E [ X ] \underset{}{\mathbb E}\left[\widetilde X\right]=\underset{}{\mathbb E}\left[X\right] E [ X ] = E [ X ] , and thus A ~ \widetilde A A has no mass at infinity either. Therefore the definition of the dual gives E [ e L ] = E [ X − 1 ] \underset{}{\mathbb E}\left[e^{L}\right]=\underset{}{\mathbb E}\left[X^{-1}\right] E [ e L ] = E [ X − 1 ] for A = L A=L A = L and E [ e D ( L ) ] = E [ X 2 ] \underset{}{\mathbb E}\left[e^{\mathcal D\left(L\right)}\right]=\underset{}{\mathbb E}\left[X^2\right] E [ e D ( L ) ] = E [ X 2 ] for A = D ( L ) A=\mathcal D\left(L\right) A = D ( L ) , and similarly for A ~ \widetilde A A . Thus the two chains of inequalities give the claim, since cosh 2 ( α ′ / 2 ) − 1 = sinh 2 ( α ′ / 2 ) \cosh^2(\alpha'/2)-1=\sinh^2(\alpha'/2) cosh 2 ( α ′ /2 ) − 1 = sinh 2 ( α ′ /2 ) . ◻
For the grid G m \mathcal G_{m} G m we can take α ′ = ln ( 1 + 1 / m ) \alpha'=\ln(1+1/m) α ′ = ln ( 1 + 1/ m ) , for which sinh 2 ( α ′ / 2 ) = 1 / ( 4 m ( m + 1 ) ) \sinh^2(\alpha'/2)=1/(4m(m+1)) sinh 2 ( α ′ /2 ) = 1/ ( 4 m ( m + 1 )) . Thus for a single projection onto G m \mathcal G_{m} G m , the χ 2 \chi^2 χ 2 error of A ~ \widetilde A A relative to A A A is at most ( 1 + χ 2 ( A ) ) / ( 4 m ( m + 1 ) ) (1+\chi^2(A))/(4m(m+1)) ( 1 + χ 2 ( A )) / ( 4 m ( m + 1 )) .
Proof of the χ 2 \chi^2 χ 2 Error Bound
Lemma C.8 (χ 2 \chi^2 χ 2 error along the tree). Consider the unfolded tree of Lemma C.3 of depth d d d with t t t leaves, which are independent copies of e − L e^{-L} e − L for a PLD realization L L L such that e − L e^{-L} e − L takes values in { 0 } ∪ [ 2 j − , 2 j + + 1 ] \{0\}\cup[2^{j_-},2^{j_++1}] { 0 } ∪ [ 2 j − , 2 j + + 1 ] for integers j − ≤ j + j_-\le j_+ j − ≤ j + . Let Y Y Y and Y ^ \widehat Y Y denote the exact and the computed sums at the root, and let τ ≔ 1 / ( 4 m ( m + 1 ) ) \tau\coloneqq 1/(4m(m+1)) τ : = 1/ ( 4 m ( m + 1 )) . Then E [ Y 2 ] ≤ E [ Y ^ 2 ] ≤ ( 1 + τ ) d + 1 E [ Y 2 ] \underset{}{\mathbb E}\left[Y^2\right]\le\underset{}{\mathbb E}\left[\widehat Y^2\right]\le(1+\tau)^{d+1}\,\underset{}{\mathbb E}\left[Y^2\right] E [ Y 2 ] ≤ E [ Y 2 ] ≤ ( 1 + τ ) d + 1 E [ Y 2 ] and E [ Y − 1 1 { Y > 0 } ] ≤ E [ Y ^ − 1 1 { Y ^ > 0 } ] ≤ ( 1 + τ ) d + 1 E [ Y − 1 1 { Y > 0 } ] . \underset{}{\mathbb E}\left[Y^{-1}\mathbf 1_{\{Y>0\}}\right]\le\underset{}{\mathbb E}\left[\widehat Y^{-1}\mathbf 1_{\{\widehat Y>0\}}\right]\le(1+\tau)^{d+1}\,\underset{}{\mathbb E}\left[Y^{-1}\mathbf 1_{\{Y>0\}}\right]. E [ Y − 1 1 { Y > 0 } ] ≤ E [ Y − 1 1 { Y > 0 } ] ≤ ( 1 + τ ) d + 1 E [ Y − 1 1 { Y > 0 } ] . In particular, for ( A , A ^ ) = ( − ln ( Y / t ) , − ln ( Y ^ / t ) ) (A,\widehat A)=(-\ln(Y/t),-\ln(\widehat Y/t)) ( A , A ) = ( − ln ( Y / t ) , − ln ( Y / t )) and for ( A , A ^ ) = ( D ( − ln ( Y / t ) ) , D ( − ln ( Y ^ / t ) ) ) (A,\widehat A)=(\mathcal D\left(-\ln(Y/t)\right),\mathcal D\left(-\ln(\widehat Y/t)\right)) ( A , A ) = ( D ( − ln ( Y / t ) ) , D ( − ln ( Y / t ) ) ) , if χ 2 ( A ) < ∞ \chi^2(A)<\infty χ 2 ( A ) < ∞ , then the χ 2 \chi^2 χ 2 error of A ^ \widehat A A relative to A A A is between 0 0 0 and ( ( 1 + τ ) d + 1 − 1 ) ( 1 + χ 2 ( A ) ) ((1+\tau)^{d+1}-1)(1+\chi^2(A)) (( 1 + τ ) d + 1 − 1 ) ( 1 + χ 2 ( A )) .
We prove Lemma C.8 by induction on the subtrees of the unfolded tree. All the random variables below are bounded, and on the event that they are positive they are bounded away from zero. Thus all the expectations are finite. Let φ ( w ) = w 2 \varphi(w)=w^2 φ ( w ) = w 2 or φ ( w ) = 1 / w \varphi(w)=1/w φ ( w ) = 1/ w , which are convex on ( 0 , ∞ ) (0,\infty) ( 0 , ∞ ) and satisfy φ ( a b ) = φ ( a ) φ ( b ) \varphi(ab)=\varphi(a)\varphi(b) φ ( ab ) = φ ( a ) φ ( b ) . For a node n n n , let Y n Y_n Y n and Y ^ n \widehat Y_n Y n denote the exact and the computed sums at n n n , and let L \mathcal L L denote the values of the leaves, as in Lemma C.3 .
Claim C.9 (Moments along the subtrees). For every node n n n of height h h h , on the event Y n > 0 Y_n>0 Y n > 0 , 1 ≤ E [ φ ( Y ^ n / Y n ) ∣ L ] ≤ ( 1 + τ ) h + 1 . 1\le\underset{}{\mathbb E}\left[\varphi(\widehat Y_n/Y_n)\mid\mathcal L\right]\le(1+\tau)^{h+1}. 1 ≤ E [ φ ( Y n / Y n ) ∣ L ] ≤ ( 1 + τ ) h + 1 .
Proof. The lower bound follows from Jensen’s inequality, since E [ Y ^ n ∣ L ] = Y n \underset{}{\mathbb E}\left[\widehat Y_n\mid\mathcal L\right]=Y_n E [ Y n ∣ L ] = Y n by Lemma C.3 applied to the subtree of n n n . By Lemma C.7 applied to a constant y > 0 y>0 y > 0 , with α ′ = ln ( 1 + 1 / m ) \alpha'=\ln(1+1/m) α ′ = ln ( 1 + 1/ m ) by (G1) , the projection y ~ \tilde y y ~ of y y y satisfies E [ φ ( y ~ / y ) ] ≤ cosh 2 ( α ′ / 2 ) = 1 + τ \underset{}{\mathbb E}\left[\varphi(\tilde y/y)\right]\le\cosh^2(\alpha'/2)=1+\tau E [ φ ( y ~ / y ) ] ≤ cosh 2 ( α ′ /2 ) = 1 + τ . At a leaf, this is the upper bound for h = 0 h=0 h = 0 . At an internal node n n n of height h h h , conditioned on L \mathcal L L , the sums y i y_i y i at its children n i n_i n i are fixed, and the computed value at a child with y i = 0 y_i=0 y i = 0 is zero (Lemma C.3 ). Thus the input s s s of the projection at n n n satisfies
s Y n = ∑ i : y i > 0 y i Y n ⋅ Y ^ n i y i , \frac s{Y_n}=\sum_{i:\,y_i>0}\frac{y_i}{Y_n}\cdot\frac{\widehat Y_{n_i}}{y_i}, Y n s = i : y i > 0 ∑ Y n y i ⋅ y i Y n i , which is a convex combination. Since φ \varphi φ is convex and the heights of the children are at most h − 1 h-1 h − 1 , the induction hypothesis gives E [ φ ( s / Y n ) ∣ L ] ≤ ( 1 + τ ) h \underset{}{\mathbb E}\left[\varphi(s/Y_n)\mid\mathcal L\right]\le(1+\tau)^h E [ φ ( s / Y n ) ∣ L ] ≤ ( 1 + τ ) h . Conditioned also on s s s , the projection at n n n gives E [ φ ( Y ^ n / s ) ∣ s , L ] ≤ 1 + τ \underset{}{\mathbb E}\left[\varphi(\widehat Y_n/s)\mid s,\mathcal L\right]\le1+\tau E [ φ ( Y n / s ) ∣ s , L ] ≤ 1 + τ . Since Y ^ n / Y n = ( Y ^ n / s ) ( s / Y n ) \widehat Y_n/Y_n=(\widehat Y_n/s)(s/Y_n) Y n / Y n = ( Y n / s ) ( s / Y n ) and φ \varphi φ is multiplicative, the tower property gives the upper bound. ◻
Proof of Lemma C.8 . The root has height at most d d d . Multiplying Claim C.9 at the root by Y 2 Y^2 Y 2 , or by Y − 1 Y^{-1} Y − 1 on the event Y > 0 Y>0 Y > 0 , and taking expectations gives the two chains of inequalities, where the reciprocal moments are restricted to the event Y > 0 Y>0 Y > 0 , which is the event Y ^ > 0 \widehat Y>0 Y > 0 . For the second statement, by the definition of the dual, the masses of − ln ( Y / t ) -\ln(Y/t) − ln ( Y / t ) and of its dual at infinity are P ( Y = 0 ) \underset{}{\mathbb P}\left(Y=0\right) P ( Y = 0 ) and 1 − E [ Y ] / t 1-\underset{}{\mathbb E}\left[Y\right]/t 1 − E [ Y ] / t , and the expectations of e − ln ( Y / t ) e^{-\ln(Y/t)} e − l n ( Y / t ) and of the exponential of its dual over their finite parts are t E [ Y − 1 1 { Y > 0 } ] t\,\underset{}{\mathbb E}\left[Y^{-1}\mathbf 1_{\{Y>0\}}\right] t E [ Y − 1 1 { Y > 0 } ] and E [ Y 2 ] / t 2 \underset{}{\mathbb E}\left[Y^2\right]/t^2 E [ Y 2 ] / t 2 , and similarly for Y ^ \widehat Y Y . By Lemma C.3 , P ( Y ^ = 0 ) = P ( Y = 0 ) \underset{}{\mathbb P}\left(\widehat Y=0\right)=\underset{}{\mathbb P}\left(Y=0\right) P ( Y = 0 ) = P ( Y = 0 ) and E [ Y ^ ] = E [ Y ] \underset{}{\mathbb E}\left[\widehat Y\right]=\underset{}{\mathbb E}\left[Y\right] E [ Y ] = E [ Y ] , and thus A A A and A ^ \widehat A A have the same mass at infinity. If χ 2 ( A ) < ∞ \chi^2(A)<\infty χ 2 ( A ) < ∞ , this mass is zero, and the two chains of inequalities give the bounds on the χ 2 \chi^2 χ 2 errors. ◻
Lemma C.8 gives the bound on the χ 2 \chi^2 χ 2 error in the third part of Theorem 4.1 , since -\ln(Y/t)=\reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L) and D ( − ln ( Y / t ) ) = ψ ⃗ t ( D ( L ) ) \mathcal D\left(-\ln(Y/t)\right)=\vec{\psi}_{t}(\mathcal D\left(L\right)) D ( − ln ( Y / t ) ) = ψ t ( D ( L ) ) by (4) .
Proof of the Bias Bound
Proof of the bound on the bias in Theorem 4.1 . We use the unfolded tree of the proof of Theorem 4.1 , whose depth is d ≔ ⌈ log 2 ( t ) ⌉ d\coloneqq\lceil\log_2(t)\rceil d : = ⌈ log 2 ( t )⌉ , and the notation Y n Y_n Y n , Y ^ n \widehat Y_n Y n and L \mathcal L L of Appendix § 9.4 , with Y Y Y and Y ^ \widehat Y Y the sums at the root. Let α ′ ≔ ln ( 1 + 1 / m ) \alpha'\coloneqq\ln(1+1/m) α ′ : = ln ( 1 + 1/ m ) . By line 5 and (4) , the allocation PLD and the output are A = − ln ( Y / t ) A=-\ln(Y/t) A = − ln ( Y / t ) and A ^ = − ln ( Y ^ / t ) \widehat A=-\ln(\widehat Y/t) A = − ln ( Y / t ) in the add direction, and their duals in the remove direction. As in the proof of Lemma C.8 , A A A and A ^ \widehat A A have the same mass at infinity.
We first bound the bias of a single projection. For the projection y ~ \tilde y y ~ of a fixed value y > 0 y>0 y > 0 , let Z ≔ y ~ / y Z\coloneqq\tilde y/y Z : = y ~ / y . By (P1) , (P5) and (G1) , − ln ( y ~ ) -\ln(\tilde y) − ln ( y ~ ) is the CtD discretization of the loss − ln ( y ) -\ln(y) − ln ( y ) on a grid with spacing at most α ′ \alpha' α ′ [FS26clt Definition 6.1], which changes this loss by − ln ( Z ) -\ln(Z) − ln ( Z ) . In the dual, the loss ln ( y ) \ln(y) ln ( y ) changes by ln ( Z ) \ln(Z) ln ( Z ) , with the distribution of Z Z Z weighted by Z Z Z . Thus the bound on the bias of a CtD discretization [FS26clt Lemma 6.2 and its proof], applied in both directions, gives
0 ≤ E [ − ln ( Z ) ] ≤ α ′ 2 8 and 0 ≤ E [ Z ln ( Z ) ] ≤ α ′ 2 8 . 0\le\underset{}{\mathbb E}\left[-\ln(Z)\right]\le\frac{\alpha'^2}8
\qquad\text{and}\qquad
0\le\underset{}{\mathbb E}\left[Z\ln(Z)\right]\le\frac{\alpha'^2}8 . 0 ≤ E [ − ln ( Z ) ] ≤ 8 α ′2 and 0 ≤ E [ Z ln ( Z ) ] ≤ 8 α ′2 . Let φ ( w ) = − ln ( w ) \varphi(w)=-\ln(w) φ ( w ) = − ln ( w ) or φ ( w ) = w ln ( w ) \varphi(w)=w\ln(w) φ ( w ) = w ln ( w ) , which are convex on ( 0 , ∞ ) (0,\infty) ( 0 , ∞ ) and satisfy φ ( 1 ) = 0 \varphi(1)=0 φ ( 1 ) = 0 . We show that for every node n n n of height h h h , on the event Y n > 0 Y_n>0 Y n > 0 ,
0 ≤ E [ φ ( Y ^ n / Y n ) ∣ L ] ≤ ( h + 1 ) α ′ 2 8 . \begin{equation}
0\le\underset{}{\mathbb E}\left[\varphi(\widehat Y_n/Y_n)\mid\mathcal L\right]\le\frac{(h+1)\alpha'^2}{8}. \tag*{(9)}
\end{equation} 0 ≤ E [ φ ( Y n / Y n ) ∣ L ] ≤ 8 ( h + 1 ) α ′2 . (9) The lower bound follows from Jensen’s inequality, since E [ Y ^ n ∣ L ] = Y n \underset{}{\mathbb E}\left[\widehat Y_n\mid\mathcal L\right]=Y_n E [ Y n ∣ L ] = Y n by Lemma C.3 applied to the subtree of n n n . We prove the upper bound by induction on h h h , as in the proof of Claim C.9 . At a leaf, it is the bound for a single projection. At an internal node n n n , conditioned on L \mathcal L L , the ratio V ≔ s / Y n V\coloneqq s/Y_n V : = s / Y n for the input s s s of the projection at n n n is a convex combination of the ratios Y ^ n i / Y n i \widehat Y_{n_i}/Y_{n_i} Y n i / Y n i at the children n i n_i n i of n n n with Y n i > 0 Y_{n_i}>0 Y n i > 0 . Since φ \varphi φ is convex and the heights of the children are at most h − 1 h-1 h − 1 , the induction hypothesis gives E [ φ ( V ) ∣ L ] ≤ h α ′ 2 / 8 \underset{}{\mathbb E}\left[\varphi(V)\mid\mathcal L\right]\le h\alpha'^2/8 E [ φ ( V ) ∣ L ] ≤ h α ′2 /8 . Conditioned also on V V V , the ratio Y ^ n / s \widehat Y_n/s Y n / s is the ratio Z Z Z for y = s y=s y = s , and Y ^ n / Y n = V Z \widehat Y_n/Y_n=VZ Y n / Y n = V Z . Therefore
E [ − ln ( V Z ) ∣ V , L ] ≤ − ln ( V ) + α ′ 2 8 , E [ V Z ln ( V Z ) ∣ V , L ] ≤ V ln ( V ) + V α ′ 2 8 . \underset{}{\mathbb E}\left[-\ln(VZ)\mid V,\mathcal L\right]\le-\ln(V)+\frac{\alpha'^2}8,
\qquad
\underset{}{\mathbb E}\left[VZ\ln(VZ)\mid V,\mathcal L\right]\le V\ln(V)+\frac{V\alpha'^2}8 . E [ − ln ( V Z ) ∣ V , L ] ≤ − ln ( V ) + 8 α ′2 , E [ V Z ln ( V Z ) ∣ V , L ] ≤ V ln ( V ) + 8 V α ′2 . Since E [ V ∣ L ] = 1 \underset{}{\mathbb E}\left[V\mid\mathcal L\right]=1 E [ V ∣ L ] = 1 , taking expectations conditioned on L \mathcal L L gives the upper bound.
The root has height at most d d d . In the add direction, both losses are finite exactly when Y > 0 Y>0 Y > 0 , and then A ^ − A = − ln ( Y ^ / Y ) \widehat A-A=-\ln(\widehat Y/Y) A − A = − ln ( Y / Y ) . Thus the bias is the expectation of E [ φ ( Y ^ / Y ) ∣ L ] 1 { Y > 0 } \underset{}{\mathbb E}\left[\varphi(\widehat Y/Y)\mid\mathcal L\right]\mathbf 1_{\{Y>0\}} E [ φ ( Y / Y ) ∣ L ] 1 { Y > 0 } for φ ( w ) = − ln ( w ) \varphi(w)=-\ln(w) φ ( w ) = − ln ( w ) . In the remove direction, the finite parts of A A A and A ^ \widehat A A are distributed as ln ( Y / t ) \ln(Y/t) ln ( Y / t ) and ln ( Y ^ / t ) \ln(\widehat Y/t) ln ( Y / t ) , weighted by Y / t Y/t Y / t and Y ^ / t \widehat Y/t Y / t , respectively (§ 2 ). Since E [ Y ^ ∣ L ] = Y \underset{}{\mathbb E}\left[\widehat Y\mid\mathcal L\right]=Y E [ Y ∣ L ] = Y , the bias is then the expectation of ( Y / t ) E [ φ ( Y ^ / Y ) ∣ L ] 1 { Y > 0 } (Y/t)\,\underset{}{\mathbb E}\left[\varphi(\widehat Y/Y)\mid\mathcal L\right]\mathbf 1_{\{Y>0\}} ( Y / t ) E [ φ ( Y / Y ) ∣ L ] 1 { Y > 0 } for φ ( w ) = w ln ( w ) \varphi(w)=w\ln(w) φ ( w ) = w ln ( w ) . Therefore (9) and E [ Y / t ] ≤ 1 \underset{}{\mathbb E}\left[Y/t\right]\le1 E [ Y / t ] ≤ 1 give the bounds on the bias. ◻
Proof of Corollary 4.5 . The algorithm returns the add output of Algorithm alg:ctd-alloc on \reflectbox{$\vec{\reflectbox{$L$}}$} and the remove output of Algorithm alg:ctd-alloc on D ( L ⃗ ) \mathcal D\left(\vec{L}\right) D ( L ) , since ψ ⃗ t ( D ( D ( L ⃗ ) ) ) = ψ ⃗ t ( L ⃗ ) \vec{\psi}_{t}(\mathcal D\left(\mathcal D\left(\vec{L}\right)\right))=\vec{\psi}_{t}(\vec{L}) ψ t ( D ( D ( L ) ) ) = ψ t ( L ) . (If L ⃗ \vec{L} L and \reflectbox{$\vec{\reflectbox{$L$}}$} are duals of each other, then a single call gives both outputs.) Consider one of these calls, and denote its input by L L L and its outputs by \reflectbox{$\vec{\reflectbox{$L$}}$}_t and L ⃗ t \vec{L}_t L t . The bands chosen in line 2 satisfy j + − j − ≤ ( ℓ + − ℓ − ) / ln ( 2 ) + 1 ≤ Δ / ln ( 2 ) + 1 j_+-j_-\le(\ell_+-\ell_-)/\ln(2)+1\le\Delta/\ln(2)+1 j + − j − ≤ ( ℓ + − ℓ − ) / ln ( 2 ) + 1 ≤ Δ/ ln ( 2 ) + 1 , since the finite values of − D ( L ⃗ ) -\mathcal D\left(\vec{L}\right) − D ( L ) are those of L ⃗ \vec{L} L . Let α ′ = ln ( 1 + 1 / m ) \alpha'=\ln(1+1/m) α ′ = ln ( 1 + 1/ m ) , so that ( ⌈ log 2 ( t ) ⌉ + 1 ) α ′ ≤ ( ⌈ log 2 ( t ) ⌉ + 1 ) / m ≤ α (\lceil\log_2(t)\rceil+1)\alpha'\le(\lceil\log_2(t)\rceil+1)/m\le\alpha (⌈ log 2 ( t )⌉ + 1 ) α ′ ≤ (⌈ log 2 ( t )⌉ + 1 ) / m ≤ α . Thus by the first two parts of Theorem 4.1 , \reflectbox{$\vec{\reflectbox{$L$}}$}_t and L ⃗ t \vec{L}_t L t ( α , 0 ) (\alpha,0) ( α , 0 ) -tightly dominate \reflectbox{$\vec{\reflectbox{$\psi$}}$}_{t}(L) and ψ ⃗ t ( D ( L ) ) \vec{\psi}_{t}(\mathcal D\left(L\right)) ψ t ( D ( L ) ) .
χ 2 \chi^2 χ 2 error and bias. Since m ≥ ( ⌈ log 2 ( t ) ⌉ + 1 ) / α ≥ ⌈ log 2 ( t ) ⌉ + 1 m\ge(\lceil\log_2(t)\rceil+1)/\alpha\ge\lceil\log_2(t)\rceil+1 m ≥ (⌈ log 2 ( t )⌉ + 1 ) / α ≥ ⌈ log 2 ( t )⌉ + 1 , the third part of Theorem 4.1 bounds the χ 2 \chi^2 χ 2 error of each output relative to the corresponding allocation PLD Ψ \Psi Ψ of L L L with χ 2 ( Ψ ) < ∞ \chi^2(\Psi)<\infty χ 2 ( Ψ ) < ∞ by ( ⌈ log 2 ( t ) ⌉ + 1 ) ( 1 + χ 2 ( Ψ ) ) / ( 4 m 2 ) ≤ α 2 ( 1 + χ 2 ( Ψ ) ) / ( 4 ( ⌈ log 2 ( t ) ⌉ + 1 ) ) (\lceil\log_2(t)\rceil+1)(1+\chi^2(\Psi))/(4m^2)\le\alpha^2(1+\chi^2(\Psi))/(4(\lceil\log_2(t)\rceil+1)) (⌈ log 2 ( t )⌉ + 1 ) ( 1 + χ 2 ( Ψ )) / ( 4 m 2 ) ≤ α 2 ( 1 + χ 2 ( Ψ )) / ( 4 (⌈ log 2 ( t )⌉ + 1 )) , and the bias of each output by ( ⌈ log 2 ( t ) ⌉ + 1 ) α ′ 2 / 8 ≤ α 2 / ( 8 ( ⌈ log 2 ( t ) ⌉ + 1 ) ) (\lceil\log_2(t)\rceil+1)\alpha'^2/8\le\alpha^2/(8(\lceil\log_2(t)\rceil+1)) (⌈ log 2 ( t )⌉ + 1 ) α ′2 /8 ≤ α 2 / ( 8 (⌈ log 2 ( t )⌉ + 1 )) .
Complexity. Since j + − j − ≤ Δ / ln ( 2 ) + 1 j_+-j_-\le\Delta/\ln(2)+1 j + − j − ≤ Δ/ ln ( 2 ) + 1 , the positive values of e − L ′ e^{-L'} e − L ′ lie in the J + 1 = O ( 1 + Δ ) J+1=O(1+\Delta) J + 1 = O ( 1 + Δ ) bands j − , … , j + + 1 j_-,\ldots,j_++1 j − , … , j + + 1 . Computing D ( L ⃗ ) \mathcal D\left(\vec{L}\right) D ( L ) and L ′ L' L ′ takes O ( S + J m ) O(S+Jm) O ( S + J m ) operations, since every atom contributes to at most two knots. Substituting m = O ( log ( t ) / α ) m=O(\log(t)/\alpha) m = O ( log ( t ) / α ) into Theorem 4.1 gives the bounds on the running time and the space. ◻