Permute-and-Flip: A new mechanism for differentially private selection

Ryan McKenna, Daniel Sheldon

Introduction

The exponential mechanism is one of the most fundamental mechanisms for differential privacy. It addresses the important problem of differentially private selection, or selecting an item from a set of candidates that approximately maximizes some objective function. The exponential mechanism was introduced soon after differential privacy itself, and has remained the dominant mechanism for private selection since.

The exponential mechanism is simple, easy to implement, runs in linear time, has good theoretical and practical performance, and solves an important problem. It can be used directly as a competitive mechanism for computing simple statistics like medians or modes . Furthermore, it is an integral part of several more complex differentially private mechanisms for a range of tasks, including linear query answering , heavy hitter estimation , synthetic data generation , dimensionality reduction , linear regression , and empirical risk minimization .

In this work, we propose the permute-and-flip mechanism as an alternative to the exponential mechanism for the task of differentially private selection. It enjoys the same desirable properties of the exponential mechanism stated above, and its expected error is never higher, but can be up to two times lower than that of the exponential mechanism. Furthermore, we show that in reasonable settings no better mechanism exists: the permute-and-flip mechanism is Pareto optimal, and, if ϵ≥log⁡(12(3+5))≈0.96\epsilon\geq\log(\frac{1}{2}(3+\sqrt{5}))\approx 0.96, is optimal in a reasonable sense “overall”.

The permute-and-flip mechanism serves as a drop-in replacement for the exponential mechanism in existing and future mechanisms, and immediately offers utility improvements. The utility improvements of up to 2×2\times over the state-of-the-art will impact practical deployments of differential privacy, where choosing the right privacy-utility trade-off is already a challenging social choice .

Preliminaries

A dataset DD is a collection of individual data coming from the universe of all possible datasets D\mathcal{D}. We say datasets DD and D′D^{\prime} are neighbors, denoted D∼D′D\sim D^{\prime}, if they differ in the data of a single individual.

Differential privacy is a mathematical privacy definition, and a property of a mechanism, that guarantees the output of the mechanism will not differ significantly (in a probabilistic sense) between any two neighboring datasets.

A randomized mechanism M:D→R\mathcal{M}:\mathcal{D}\rightarrow\mathcal{R} is ϵ\epsilon-differentially private, if and only if:

for all neighboring datasets D∼D′D\sim D^{\prime} and all possible subsets of outcomes S⊆RS\subseteq\mathcal{R}.

The sensitivity of a function is an important quantity to consider when designing differentially private mechanisms, which measures how much a function can change between two neighboring datasets.

2 Private Selection

Monotonicity: If qr≤qr′q_{r}\leq q^{\prime}_{r} and qs≥qs′q_{s}\geq q^{\prime}_{s} for all s≠rs\neq r, then

Informally, a symmetric mechanism is one where the quality scores can be permuted arbitrarily without affecting the distribution of outcomes. This avoids pathologies where a mechanism can appear to do well for a particular quality score vector, but only because it has a built-in bias towards certain outcomes. Similarly, a shift-invariant mechanism is one where a constant can be added to all quality scores without changing the distribution of outcomes. A mechanism is monotonic if increasing one quality score while decreasing others will increase the probability on that outcome, and decrease the probability on all other outcomes. A mechanism that satisfies all of these criteria is called regular.

Mechanisms that are not regular have undesirable pathologies. Thus, we restrict our attention to regular mechanisms in this work. Beyond regularity, the main criteria we use to evaluate a mechanism is the error random variable:

where q∗=max⁡r∈Rqrq_{*}=\max_{r\in\mathcal{R}}q_{r} is the optimal quality score.

3 Exponential Mechanism

The exponential mechanism is a mechanism that is both classical and state-of-the-art for the task of differentially private selection.

It is well-known that the exponential mechanism is ϵ\epsilon-differentially private, and it is easy to show that it also satisfies the regularity conditions in Definition 3. In addition, it is possible to bound the error of the exponential mechanism, both in expectation and in probability:

Permute-and-Flip Mechanism

In this section, we propose a new mechanism, MPF\mathcal{M}_{PF}, which we call the “permute-and-flip” mechanism. Just like the exponential mechanism, it is simple, easy to implement, and runs in linear time. It is stated formally in Algorithm 1. The mechanism works by iterating through the set of candidates R\mathcal{R} in a random order. For each item, it flips a biased coin, and returns that item if the coin comes up heads. The probability of heads is an exponential function of the quality score, which encourages the mechanism to return results with higher quality scores. The mechanism is guaranteed to terminate with a result because if qr=q∗q_{r}=q_{*}, then the probability of heads is 11.

The Permute-and-Flip mechanism MPF\mathcal{M}_{PF} is regular and ϵ\epsilon-differentially private.

Proofs of all results appear in the supplement; in addition, the main text will contain some proof sketches. The proof of this theorem uses Proposition 2 (below) and a direct analysis of the probability mass function of MPF\mathcal{M}_{PF}. Note that the condition in Proposition 2 can be immediately verified to hold (with equality) when qr≤q∗−2Δq_{r}\leq q_{*}-2\Delta by observing that prp_{r} in Algorithm 1 changes by exactly exp⁡(ϵ)\exp(\epsilon) when qrq_{r} increases by 2Δ2\Delta, and by a short argument conditioning on the random permutation. The proof using the pmf also handles the case when increasing qrq_{r} by 2Δ2\Delta causes item rr to have maximum score.

We now describe the principles underlying the permute-and-flip mechanism and intuition behind its derivation. To define a mechanism, we must specify the value of Pr⁡[M(q⃗)=r]\Pr[\mathcal{M}(\vec{q})=r] for every (q⃗,r)(\vec{q},r) pair. Intuitively, we would like to place as much probability mass as possible on the items with the highest score, and as little mass as possible on other items, subject to the constraints of differential privacy. For regular mechanisms, these constraints simplify greatly:

for all (q⃗,r)(\vec{q},r), where e⃗r\vec{e}_{r} is the unit vector with a one at position rr.

The proof (in the supplement) argues that it is only necessary to compare q⃗\vec{q} to the quality-score vector with qr′=qr+Δq^{\prime}_{r}=q_{r}+\Delta and qs′=qs−Δq^{\prime}_{s}=q_{s}-\Delta for all s≠rs\neq r, which, by monotonicity, is the worst-case neighbor of q⃗\vec{q}. By shift-invariance, the mechanism is identical when qr′=qr+2Δq^{\prime}_{r}=q_{r}+2\Delta and qs′=qsq^{\prime}_{s}=q_{s}, or q⃗q′=q⃗+2Δe⃗r\vec{q}\mkern 2.0mu\vphantom{q}^{\prime}=\vec{q}+2\Delta\vec{e}_{r}, which leads to the constraint in the theorem.

This theorem allows allows us to reason about only one constraint for every (q⃗,r)(\vec{q},r) pair, instead of infinitely many. Ideally we would like to distribute probability to items as unevenly as possible, which would make these constraints tight (satisfied with equality). However, we can see by examining the overall numbers of constraints and variables that we cannot make all of them tight. For each score vector q⃗\vec{q}, there are: (1) n=∣R∣n=|\mathcal{R}| free variables (the probabilities of the mechanism run on q⃗\vec{q}), (2) nn inequality constraints (Proposition 2), and (3) one additional constraint that the probabilities sum to one. This is a total of nn inequality constraints and one equality constraint per nn variables. On average, we expect at most n−1n-1 of the inequality constraints to be tight, leading to nn linear constraints that are satisfied with equality for each group of nn variables.

The following recurrence for Pr⁡[M(q⃗)=r]\Pr[\mathcal{M}(\vec{q})=r] defines a mechanism by selecting certain constraints to be satisfied with equality:

The privacy constraint is tight whenever qr≤q∗−2Δq_{r}\leq q_{*}-2\Delta (Case 1). When qrq_{r} is one of the maximum scores (Case 2, qr=q∗q_{r}=q_{*}), the sum-to-one constraint is used instead, in conjunction with symmetry; here, n∗n_{*} is the number of quality scores equal to q∗q_{*}.

The only difference is Case 1, which is obtained by unrolling Case 1 of the original recurrence (q∗−qr)/2Δ(q_{*}-q_{r})/2\Delta times so that the rrth score becomes exactly q∗q_{*}. The advantage is that the new expression is well defined for vectors that are not on the 2Δ2\Delta-lattice.

Equation 6 defines a mechanism. In principle, it also gives a way to compute the probabilities of the mechanism for any fixed q⃗\vec{q}. The most direct approach to calculate these probabilities uses dynamic programming and takes exponential time. A smarter algorithm based on an analytic expression for the solution to the recurrence runs in O(n2)O(n^{2}) time (Appendix E), but is still unacceptably slow compared to the linear time exponential mechanism. Remarkably, it is not necessary to explicitly compute the probabilities of this mechanism, as the permute-and-flip mechanism solves this recurrence relation. As a result, we can simply run the simple linear-time Algorithm 1 and avoid computing the mechanism probabilities directly.

MPF\mathcal{M}_{PF} solves the recurrence relation in Equation 6.

Case 2 is satisfied because MPF\mathcal{M}_{PF} is symmetric and a valid probability distribution. For Case 1, let q⃗q′=q⃗+(q∗−qr)e⃗r\vec{q}\mkern 2.0mu\vphantom{q}^{\prime}=\vec{q}+(q_{*}-q_{r})\vec{e}_{r} and consider applying MPF\mathcal{M}_{PF} to both q⃗\vec{q} and q⃗q′\vec{q}\mkern 2.0mu\vphantom{q}^{\prime}. In each case, the coin-flip probabilities are the same for all items except rr, and the probability of selecting any given permutation is the same. The ratio Pr⁡[MPF(q⃗)=r]/Pr⁡[MPF(q⃗q′)=r]\Pr[\mathcal{M}_{PF}(\vec{q})=r]/\Pr[\mathcal{M}_{PF}(\vec{q}\mkern 2.0mu\vphantom{q}^{\prime})=r] can be shown to be exactly pr/pr′p_{r}/p^{\prime}_{r}, where p_{r}=\exp{\big{(}\frac{\epsilon}{2\Delta}(q_{r}-q_{*})\big{)}} is the coin-flip probability with q⃗\vec{q} and pr′=1p^{\prime}_{r}=1 is the coin-flip probability with q⃗q′\vec{q}\mkern 2.0mu\vphantom{q}^{\prime}. The ratio is exactly \exp{\big{(}\frac{\epsilon}{2\Delta}(q_{r}-q_{*})\big{)}}, as required by Case 1. ∎

Comparison with Exponential Mechanism

In this section, we compare the permute-and-flip and exponential mechanisms, both algorithmically and in terms of the error each incurs. One (unconventional) way to sample from the exponential mechanism is stated in Algorithm 2. This is a rejection sampling algorithm: an item is repeatedly sampled uniformly at random from the set R\mathcal{R} with replacement and returned with probability p_{r}=\exp{\big{(}\frac{\epsilon}{2\Delta}(q_{r}-q_{*})\big{)}}. For the permute-and-flip mechanism, an item is repeatedly sampled uniformly at random from the set R\mathcal{R} without replacement and returned with the same probability. Sampling without replacement is mathematically equivalent to iterating through a random permutation, and hence Algorithm 3 is equivalent to Algorithm 1. These implementations are not recommended in practice, but are useful to illustrate connections between the two mechanisms.

Intuitively, sampling without replacement is better, because items that are not selected, which are likely to have low scores, are eliminated from future consideration. In fact, in Theorem 2 we prove that the permute-and-flip mechanism is never worse than the exponential mechanism in a very strong sense. Specifically, we show that the expected error of permute-and-flip is never larger than the exponential mechanism, and the probability of the error random variable exceeding tt is never larger for permute-and-flip (for any tt). This is a form of stochastic dominance , and suggests it is always preferable to use permute-and-flip over the exponential mechanism, no matter what the risk profile is.

As a direct consequence of Theorem 2, the permute-and-flip mechanism inherits the theoretical guarantees of the exponential mechanism (Proposition 1).

To further compare the two mechanisms, it is instructive to compare their expected errors for a particular class of score vectors. In particular, we examine score vectors that are worst cases for both mechanisms. This analysis will reveal that permute-and-flip can be up to 2×2\times better than the exponential mechanism, and that the upper bounds on expected error in Proposition 1 and Corollary 1 are within a factor of four of being tight.

The worst-case expected errors are found by maximizing Equations 7 and 8 over p∈(0,1]p\in(0,1].

Figure 1(a) shows the expected error of both mechanisms using Equations 7 and 8 for n=3n=3 and p∈(0,1]p\in(0,1]. The error of MPF\mathcal{M}_{PF} is always lower than that of MEM\mathcal{M}_{EM}, as expected by Theorem 2. At the two extremes (p=0p=0 and p=1p=1), the expected error of both mechanisms is exactly , because: (1) when p=1p=1, all scores are equal to the maximum, and (2) when p→0p\rightarrow 0, the total probability assigned to items with non-maximum scores vanishes. The maximum error for each mechanism occurs somewhere in the middle, typically near p=1np=\frac{1}{n}. In fact, by substituting p=1np=\frac{1}{n} into Equation 8, we obtain:

The ratio is always between one and two, and approaches two in the limit at p→0p\rightarrow 0 (larger ϵ\epsilon).

The required pp to achieve a fixed ratio decreases with nn, and the ratio converges to one for all p>0p>0 as nn goes to infinity. This behavior is well-explained by the algorithmic comparison earlier in this section: as nn goes to infinity, the probability of sampling the same low-scoring item multiple times becomes negligible, so sampling without replacement (MPF\mathcal{M}_{PF}) becomes essentially identical to sampling with replacement (MEM\mathcal{M}_{EM}).

These results are for a particular class of (worst-case) quality-score vectors and not necessarily indicative of what will happen in applications. In our experiments with real quality-score vectors (Section 6) we observe ratios close to two for the values of ϵ\epsilon that provide reasonable utility. We have never observed a ratio greater than two for any q⃗\vec{q}, and it is an open question whether this is possible. In practice, we can and do realize significant improvements even for large nn.

Figure 1(c) compares the worst-case expected errors of MEM\mathcal{M}_{EM} and MPF\mathcal{M}_{PF} as a function of nn by numerically maximizing over pp in Equations 7 and 8 for different values of nn and ϵ=Δ=1\epsilon=\Delta=1. For reference, we also plot the analytic upper and lower bounds from Proposition 1, Corollary 1, and Proposition 5. The ratio of worst-case expected error between MEM\mathcal{M}_{EM} and MPF\mathcal{M}_{PF} is largest at n=2n=2, and it decays towards 11 as nn increases. Again, this is explained by the algorithmic similarities between the two mechanisms as n→∞n\to\infty.

Optimality of Permute-and-Flip

Pareto optimality is a desirable property that differentiates permute-and-flip from the exponential mechanism. However, there are many Pareto optimal mechanisms, so we would like additional assurance that permute-and-flip is in some sense the “right” one. To achieve this, we show that it is optimal in some reasonable “overall” sense. In particular, it minimizes the expected error averaged over a representative set of quality score vectors, as long as ϵ\epsilon is sufficiently large.

For all regular mechanisms M\mathcal{M} and all ϵ≥log⁡(12(3+5))\epsilon\geq\log{(\frac{1}{2}(3+\sqrt{5}))},

This theorem is proved by analyzing a linear program (LP) that describes the behavior of an optimal regular mechanism on the 2Δ2\Delta-lattice, using the linear constraints described in Section 3.1 to enforce privacy and regularity, and the linear objective from the theorem. The result holds for the bounded lattice with q∗=0q_{*}=0 and all scores at most kk lattice points away from zero. Boundedness is required to have a finite number of variables and constraints. The restriction that q∗=0q_{*}=0 is without loss of generality: by shift-invariance, a regular mechanism is completely defined by its behavior on vectors with q∗=0q_{*}=0.

As shown in Figure 2(a) and Figure 2(b), the optimality ratio for permute-and-flip is equal to one above the threshold, as expected. Furthermore, it barely exceeds one even when ϵ\epsilon is below the threshold: the largest measured value is about 1.011.01. The ratio grows slowly with kk (Figure 2(b)) and shows no strong dependence on nn (Figure 2(a)). For the exponential mechanism (Figure 2(c)), the optimality ratio is much more significantly larger than one, and generally increases with ϵ\epsilon, approaching two for larger kk and ϵ\epsilon. Interestingly, the optimality ratio approaches one for both mechanisms as ϵ→0\epsilon\rightarrow 0.

Experiments

We now perform an empirical analysis of the permute-and-flip mechanism. Our aim is to quantify the utility improvement from permute-and-flip relative to the exponential mechanism for different values of ϵ\epsilon on real-world problem instances. We use five representative data sets from the DPBench study: HEPTH, ADULTFRANK, MEDCOST, SEARCHLOGS, and PATENT and consider the tasks of mode and median selection. In each case, the candidates are the 1024 bins of a discretized domain. For each task, we construct the quality score vector and then analytically compute the expected error for a range of different ϵ\epsilon for both the permute-and-flip and exponential mechanisms using their probability mass functions. Below we summarize our experimental findings; additional experimental results can be found in Appendix G.

For mode selection, the quality function is the number of items in the bin, which has sensitivity one. Figure 3(a) shows expected error as a function of ϵ\epsilon for the HEPTH data set. Note that expected error is plotted on a log scale, while ϵ\epsilon is plotted on a linear scale, and we truncate the plot when the expected error falls below one. The ratio of the expected error of the exponential mechanism to that of permute-and-flip ranges from one (for smaller ϵ\epsilon) to two (for larger ϵ\epsilon). For the range of ϵ\epsilon that provide reasonable utility, the improvement is closer to two. For example, at ϵ=0.04\epsilon=0.04, the ratio is 1.841.84. The expected error of MPF\mathcal{M}_{PF} at this value of ϵ\epsilon is about 5.45.4, and MEM\mathcal{M}_{EM} would need about 1.271.27 times larger privacy budget to achieve the same utility.

Median.

For median selection, the quality function is the (negated) number of individuals that must be added or removed to make a given bin become the median, which is also a sensitivity one function . Figure 3(b) again shows the expected error as a function of ϵ\epsilon for the HEPTH data set. Again, the ratio of expected errors ranges from one (for smaller ϵ\epsilon) to two (for larger ϵ\epsilon). For the range of ϵ\epsilon that provide reasonable utility, the improvement is closer to two. For example, at ϵ=0.01\epsilon=0.01, the ratio is 1.931.93. The expected error of MPF\mathcal{M}_{PF} at this value of ϵ\epsilon is about 13.713.7, and MEM\mathcal{M}_{EM} would need about 1.191.19 times larger privacy budget to achieve the same utility.

In Figures 3(a) and 3(b), the expected errors of MEM\mathcal{M}_{EM} and MPF\mathcal{M}_{PF} become approximately parallel lines as ϵ\epsilon increases. Because the plots use linear scale for ϵ\epsilon and logarithmic scale for expected error this means that the error of both mechanisms behaves approximately as cexp⁡(−ϵ)c\exp(-\epsilon) for some cc. Additionally, MPF\mathcal{M}_{PF} offers an asymptotically constant multiplicative improvement in expected error (a factor of two) and an additive savings of ϵ\epsilon. For the range of ϵ\epsilon that demonstrate the most reasonable privacy-utility tradeoffs, this additive improvement is a meaningful fraction of the privacy budget.

In Figure 3(c) we plot the expected error of MEM\mathcal{M}_{EM} and MPF\mathcal{M}_{PF} on all five data sets. For each dataset, we use the value of ϵ\epsilon where MEM\mathcal{M}_{EM} gives a expected error of 5050. This allows us to plot all datasets on the same scale for some ϵ\epsilon that gives a reasonable tradeoff between privacy and utility. The improvements are significant, and close to a factor of two for all data sets.

Related Work

The exponential mechanism and the problem of differentially private selection have been studied extensively in prior work .

The most common alternative to the exponential mechanism for the private selection problem is report noisy max , which adds noise to each quality score and outputs the item with the largest noisy score. While we did not compare directly to this mechanism, our initial findings (Appendix F) indicate that it is competitive with the exponential mechanism, but neither mechanism Pareto dominates the other — report noisy max is better for some quality score vectors, while the exponential mechanism is better for others. Several other mechanisms have been proposed for the private selection problem that may work better under different assumptions and special cases .

A generalization of the exponential mechanism was proposed in that can effectively handle quality score functions with varying sensitivity. This technique works by defining a new quality score function that balances score and sensitivity and then running the exponential mechanism, and is therefore also compatible with the permute-and-flip-mechanism. The exponential mechanism was also studied in , where the focus was to improve the privacy analysis for a composition of multiple sequential executions of the exponential mechanism. They also show that the analysis can be improved in some cases by using a measure of the range of the score function instead of the sensitivity (though in commonly-used score functions the range and sensitivity usually coincide). This improvement is orthogonal to our approach, and it is straightforward to extend the analysis of the permute-and-flip mechanism in a similar way.

A new mechanism for private selection from private candidates was studied in . Instead of assuming the quality functions have bounded sensitivity, it is assumed that the quality functions are themselves differentially private mechanisms. This relaxed assumption is appealing for many problems where the traditional exponential mechanism does not apply, like hyperparameter optimization.

The optimality of the exponential mechanism was studied in , where the authors considered linear programs for computing mechanisms that are optimal on average (similar to our Theorem 3). They restricted attention to scenarios where the input/output universe of the mechanism is a graph, and each node is associated with a database. They argued that the optimal mechanism should satisfy privacy constraints with equality for connected nodes in this graph, and showed that the exponential mechanism was optimal up to a constant factor of two in this setting.

Other works have carefully analyzed privacy constraints to construct optimal mechanisms for other tasks and privacy definitions, including predicate counting queries , information theoretic quantities , and generic low-sensitivity functions .

Conclusions and Open Questions

In this work we proposed permute-and-flip, a new mechanism for differentially private selection that can be seen as a replacement for the exponential mechanism. For every set of scores, the expected error of the permute-and-flip mechanism is not higher than the expected error of exponential mechanism, and can be lower by a factor of two; we observe factors close to two in real-world settings. Furthermore, we prove that the permute-and-flip mechanism is optimal in a fairly strong sense overall. Improving the exponential mechanism by a factor between one and two has the potential for wide-reaching impact, since it is one of the most important primitives in differential privacy.

We focused primarily on the utility improvements offered by permute-and-flip in this work. In some cases, permute-and-flip may also offer runtime improvement. Specifically, if q∗q_{*} is known a-priori, then permute-and-flip can potentially terminate early without evaluating all nn quality scores. Identifying situations where this potential benefit can be realized and provide meaningful improvement is an interesting open question.

We demonstrated meaninful improvement over the exponential mechanism for simple tasks like median and mode estimation. It would be interesting to apply permute-and-flip to more advanced mechanisms that use the exponential mechanism, and quantify the improvement there.

Our overall optimality result restricts to score vectors on the bounded 2Δ2\Delta-lattice. It would be interesting to understand more fully the nature of optimal mechanisms on more general domains or with other ways of averaging or aggregating over score vectors.

Broader Impact

Our work fits in the established research area of differential privacy, which enables the positive societal benefits of gleaning insight and utility from data sets about people while offering formal guarantees of privacy to individuals who contribute data. While these benefits are largely positive, unintended harms could arise due to misapplication of differential privacy or misconceptions about its guarantees. Additionally, difficult social choices are faced when deciding how to balance privacy and utility. Our work addresses a foundational differential privacy task and enables better utility-privacy tradeoffs within this broader context.

Acknowledgements

We would like to thank Gerome Miklau and the anonymous reviewers for their helpful comments to improve the paper. This work was supported by the National Science Foundation under grants CNS-1409143, IIS-1749854, IIS-1617533, and by DARPA and SPAWAR under contract N66001-15-C-4067.

References

We begin by deriving two different expressions for the probability mass function of MPF\mathcal{M}_{PF}, which we will reference in other proofs throughout the supplement.

The probability mass function (pmf) of MPF\mathcal{M}_{PF} can be expressed as:

where π\pi is a permutation and p_{r}=\exp{\big{(}\frac{\epsilon}{2\Delta}(q_{r}-q_{*})\big{)}}.

Let XsX_{s} be the event that the ssth coin is heads, and let π\pi be a random permutation. The events XsX_{s} are independent. The rrth item is selected if XrX_{r} is true, and XsX_{s} is false for all ss that come before rr in the permutation π\pi, that is:

An equivalent expression for the probability mass function of MPF\mathcal{M}_{PF} is:

Let XsX_{s} again denote the event that the ssth coin is heads. Let π\pi be a random permutation and let YsY_{s} be the event Xs∩(π(s)<π(r))X_{s}\cap(\pi(s)<\pi(r)), or “the ssth coin is heads and appears before the rrth coin in the random permuation”. Note that the events XrX_{r} and YsY_{s} are independent for r≠sr\neq s.

By independence and the inclusion-exclusion principle:

We now split the event ⋂s∈SYS\bigcap_{s\in S}Y_{S}, or “all coins in SS appear before rr and are heads”, into the conjunction of the events “all coins in SS appear before rr” and “all coins in SS are heads”, and continue as:

Appendix B Proofs for Section 3: Permute-and-Flip Mechanism

In this section, we first prove Proposition 2, which gives simplifed sufficient conditions for privacy for a regular mechanism. We then use Proposition 2 to prove Theorem 1, which establishes the privacy of permute-and-flip. Finally, we prove Proposition 3, which shows that permute-and-flip satisfies the recurrence used in the derivation.

Let M\mathcal{M} be a regular mechanism satisfying:

Using this assumption together with the regularity of M\mathcal{M}, we obtain:

Thus, we conclude that M\mathcal{M} is differentially-private, as desired. This completes the proof. ∎

Before proving Theorem 1, we will argue regularity.

We will establish the three conditions: symmetry, shift-invariance, and monotonicity.

Symmetry: Consider prp_{r} as defined in the definition of MPF\mathcal{M}_{PF}, and let p⃗p′=Πp⃗\vec{p}\mkern 2.0mu\vphantom{p}^{\prime}=\Pi\vec{p} denote the same vector on the permuted quality scores. Now note that every permutation is equally likely for both p⃗\vec{p} and p⃗p′\vec{p}\mkern 2.0mu\vphantom{p}^{\prime}, and that the only difference is that pr=pπ(r)′p_{r}=p^{\prime}_{\pi(r)}. Hence Pr⁡[M(q⃗)=r]=Pr⁡[M(Πq⃗)=π(r)]\Pr[\mathcal{M}(\vec{q})=r]=\Pr[\mathcal{M}(\Pi\vec{q})=\pi(r)], which implies M\mathcal{M} is symmetric as desired.

Shift-invariance: MPF\mathcal{M}_{PF} is shift-invariant because on only depends on q⃗\vec{q} through qr−q∗q_{r}-q_{*}. Adding a constant to q⃗\vec{q} does not change qr−q∗q_{r}-q_{*}.

Monotonicity: Monotonicity follows from the pmf of the mechanism:

Assume without loss of generality that q∗=0q_{*}=0 and note that pr=exp⁡(ϵ2Δqr)p_{r}=\exp{(\frac{\epsilon}{2\Delta}q_{r})}. Clearly, the expression above is monotonically increasing in prp_{r} (and hence qrq_{r}) and monotonically decreasing in psp_{s} (and hence qsq_{s}). Hence MPF\mathcal{M}_{PF} satisfies the monotonicity property.

Because MPF\mathcal{M}_{PF} is symmetric, shift-invariant, and monotonic, it is regular. ∎

Lemma 3 established regularity. It remains to argue that MPF\mathcal{M}_{PF} is differentially-private. Let q⃗\vec{q} and rr be arbitrary. By Proposition 2, it suffices to show that

Assume without loss of generality that max⁡s≠rqs=0\max_{s\neq r}q_{s}=0, so that qrq_{r} is a maximum score if and only if qr≥0q_{r}\geq 0. Let fr(q⃗)=log⁡Pr⁡[MPF(q⃗)=r]f_{r}(\vec{q})=\log\Pr[\mathcal{M}_{PF}(\vec{q})=r]. Then is enough to show that ∂∂qrfr(q⃗)≤ϵ2Δ\frac{\partial}{\partial q_{r}}f_{r}(\vec{q})\leq\frac{\epsilon}{2\Delta} for all q⃗\vec{q}, since

The final equality is justified because, by the definition of the pmf for MPF\mathcal{M}_{PF}, the function fr(q⃗)f_{r}(\vec{q}) is continuous. Furthermore, there is at most one point of non-differentiability of the partial derivative (at t=0t=0, when the rrth score becomes equal to the maximum), so, if needed, the integral can be split into two parts about t=0t=0. This integral is bounded by ϵ\epsilon as long the partial derivative ∂fr∂qr\frac{\partial f_{r}}{\partial q_{r}} is bounded by ϵ2Δ\frac{\epsilon}{2\Delta}.

Using the expression for the probability mass function of MPF\mathcal{M}_{PF} from Lemma 2, we have:

We will show using this formula that ∂fr∂qr\frac{\partial f_{r}}{\partial q_{r}} is always bounded by ϵ2Δ\frac{\epsilon}{2\Delta}. We examine the cases when qr<0q_{r}<0 and qr≥0q_{r}\geq 0 separately.

Case 1: qr<0q_{r}<0. In this case, observe that p_{s}=\exp\big{(}\frac{\epsilon}{2\Delta}q_{s}\big{)} does not depend on qrq_{r} for s≠rs\neq r. Therefore, differentiating the formula for fr(q⃗)f_{r}(\vec{q}) gives

Case 2: qr≥0q_{r}\geq 0. In this case, because qrq_{r} is the maximum score, we have p_{s}=\exp\big{(}\frac{\epsilon}{2\Delta}(q_{s}-q_{r})\big{)} for all rr. We therefore proceed by differentiating fr(q⃗)f_{r}(\vec{q}) using this expression for psp_{s}:

Equivalently, by multiplying both sides by Pr⁡[MPF(q⃗)=r]\Pr[\mathcal{M}_{PF}(\vec{q})=r] and rearranging, we would like to show:

Substituting the expression for Pr⁡[MPF(q⃗)=r]\Pr[\mathcal{M}_{PF}(\vec{q})=r] and simplifying, the expression on the left-hand side above becomes:

The final equality can be seen directly by multiplying out ∏s∈R∖{r}(1−ps)\prod_{s\in\mathcal{R}\setminus\{r\}}(1-p_{s}) or (equivalently) via the inclusion-exclusion formula. The final expression is the probability that the coins for all s∈R∖{r}s\in\mathcal{R}\setminus\{r\} are “tails”, and is clearly non-negative, as desired.

When the quality function is monotonic in the sense that adding an individual to the dataset can only increase qrq_{r} (and not decrease it), MPF\mathcal{M}_{PF} offers ϵ2\frac{\epsilon}{2}-differential privacy. The proof is largely the same, but the worst-case neighbor from Proposition 2 now occurs when q⃗q′=q⃗+Δe⃗r\vec{q}\mkern 2.0mu\vphantom{q}^{\prime}=\vec{q}+\Delta\vec{e}_{r}.

Because MPF(q⃗)\mathcal{M}_{PF}(\vec{q}) is a valid probability distribution for all q⃗\vec{q}, and it is symmetric, it must satisfy case 22 of the recurrence relation.

Note that the pmf of MPF\mathcal{M}_{PF} is:

where pr=exp⁡(ϵ2Δ(qr−q∗))p_{r}=\exp{(\frac{\epsilon}{2\Delta}(q_{r}-q_{*}))} and pr′=exp⁡(ϵ2Δ(q∗−q∗))=1p^{\prime}_{r}=\exp{(\frac{\epsilon}{2\Delta}(q_{*}-q_{*}))}=1. By comparing terms, it is clear that

Hence, MPF\mathcal{M}_{PF} solves case 11 of the recurrence relation. This completes the proof.

Appendix C Proofs for Section 4: Comparison with Exponential Mechanism

In this section, we first prove Theorem 2, which shows that the permute-and-flip error is no worse than the exponential mechanism for any score vector. We then prove Proposition 4 and Proposition 5, which analyze the worst-case expected errors of the two mechanisms and give tight lower bounds on expected error as the number of items nn increases.

We first prove two lemmas. The first lemma establishes a monotonicity property for the factor of the pmf from Lemma 1 excluding prp_{r}, i.e., the function gr(q⃗)g_{r}(\vec{q}) such that Pr⁡[MPF(q⃗)=r]=pr⋅gr(q⃗)\Pr[\mathcal{M}_{PF}(\vec{q})=r]=p_{r}\cdot g_{r}(\vec{q}). The second lemma gives a useful fact about partial sums of a non-decreasing sequence.

If qr≤qsq_{r}\leq q_{s}, then gr(q⃗)≤gs(q⃗)g_{r}(\vec{q})\leq g_{s}(\vec{q}), where

Recall that p_{r}=\exp{\big{(}\frac{\epsilon}{2\Delta}(q_{r}-q_{*})\big{)}}. Note that if qr≤qsq_{r}\leq q_{s} then 1−pr≥1−ps1-p_{r}\geq 1-p_{s}. We will show that gs(q⃗)−gr(q⃗)≥0g_{s}(\vec{q})-g_{r}(\vec{q})\geq 0.

Above, (a) breaks the sum up into permutations where rr precedes ss and vice versa. Step (b) cancels common terms (those that do not contain 1−pr1-p_{r} or 1−ps1-p_{s}). Step (c) makes the dependence on 1−pr1-p_{r} and 1−ps1-p_{s} explicit. Step (d) rearranges terms and uses a variable replacement on the second sum (replacing rr with ss). Step (e) uses the fact that both terms are non-negative. ∎

Then for all s={1,…,n}s=\{1,\dots,n\}, the following holds

Let mm be any index satisfying fm≤0f_{m}\leq 0 and fm+1≥0f_{m+1}\geq 0. If t≤mt\leq m, the claim is clearly true, as it is a sum of non-positive terms. If t>mt>m, we have ∑r=1sfr≤∑r=1nfr=0\sum_{r=1}^{s}f_{r}\leq\sum_{r=1}^{n}f_{r}=0. In either case the partial sum is non-positive, and the claimed bound holds. ∎

We will prove the probability statement first, after which the expected error result will follow easily. Assume without loss of generality (by symmetry) that q1≤q2≤⋯≤qnq_{1}\leq q_{2}\leq\dots\leq q_{n}. Let fr(q⃗)=Pr⁡[MPF(q⃗)=r]−Pr⁡[MEM(q⃗)=r]f_{r}(\vec{q})=\Pr[\mathcal{M}_{PF}(\vec{q})=r]-\Pr[\mathcal{M}_{EM}(\vec{q})=r] and let ss denote the largest index satisfying qs≤q∗−tq_{s}\leq q_{*}-t. Then Pr⁡[E(MPF,q⃗)≥t]−Pr⁡[E(MEM,q⃗)≥t]=∑r=1sfr(q⃗)\Pr[\mathcal{E}(\mathcal{M}_{PF},\vec{q})\geq t]-\Pr[\mathcal{E}(\mathcal{M}_{EM},\vec{q})\geq t]=\sum_{r=1}^{s}f_{r}(\vec{q}) and our goal is to show:

for all s∈{1,…,n}s\in\{1,\dots,n\}. We first argue that frf_{r} monotonically increases with qrq_{r}, i.e., f1≤f2≤⋯≤fnf_{1}\leq f_{2}\leq\dots\leq f_{n}.

Note that fr(q⃗)f_{r}(\vec{q}) can be expressed as pr[gr(q⃗)−hr(q⃗)]p_{r}[g_{r}(\vec{q})-h_{r}(\vec{q})], where

Further, notice that the sequence hrh_{r} (as rr ranges from 1 to nn) is constant-valued, while, from Lemma 4, we know that grg_{r} is also non-decreasing. Thus the sequence gr−hrg_{r}-h_{r} is also non-decreasing. This, together with the fact that prp_{r} is non-negative and also non-decreasing, we know that frf_{r} is non-decreasing. This fact together with Lemma 5 shows ∑r=1sfr(q⃗)≤0\sum_{r=1}^{s}f_{r}(\vec{q})\leq 0, as desired.

The ordering of expected errors now follows directly. Specifically, the expected error can be expressed in terms of the (complementary) cumulative distribution function as:

We have already shown that Pr⁡[E(MPF,q⃗)≥t]≤Pr⁡[E(MEM,q⃗)≥t]\Pr[\mathcal{E}(\mathcal{M}_{PF},\vec{q})\geq t]\leq\Pr[\mathcal{E}(\mathcal{M}_{EM},\vec{q})\geq t]. Thus:

C.2 Proofs for Worst-Case Error Analysis

Assume without loss of generality that q∗=0q_{*}=0 and note that pr=exp⁡(ϵ2Δqr)p_{r}=\exp{(\frac{\epsilon}{2\Delta}q_{r})}.

The (negative) expected error of MEM\mathcal{M}_{EM} can be expressed as:

Our goal is to show this is minimized when p1=⋯=pn−1p_{1}=\cdots=p_{n-1}. We procede by way of contradiction. Assume WLOG p1<p2p_{1}<p_{2}. We will argue that we can replace p1p_{1} and p2p_{2} with new values that decrease the objective. First write the negative expected error as a function of p1p_{1} and p2p_{2}, treating everything else as a constant.

We will show that f(p1+p22,p1+p22)<f(p1,p2)f(\frac{p_{1}+p_{2}}{2},\frac{p_{1}+p_{2}}{2})<f(p_{1},p_{2}).

Above, the inequality follows from the strict convexity of plog⁡(p)p\log{(p)}. Thus, f(p1,p2)f(p_{1},p_{2}) is not a minimum, which is a contradiction.

Plugging in pn=1p_{n}=1 and pr=pp_{r}=p for r<nr<n, we obtain:

The (negative) expected error of MPF\mathcal{M}_{PF} can be expressed as:

where a,b,c,d,e≥0a,b,c,d,e\geq 0. We proceed in cases, by showing that we can always find new values for p1p_{1} and p2p_{2} that reduces ff

Case 1: p1log⁡(p1)<p2log⁡(p2)p_{1}\log{(p_{1})}<p_{2}\log{(p_{2})}

The second term in the sum is (strictly) less by the assumption of case 1. Every other term is strictly less because p1<p2p_{1}<p_{2}, which implies (1−p1)>(1−p2)(1-p_{1})>(1-p_{2}) or equivalently −(1−p1)<−(1−p2)-(1-p_{1})<-(1-p_{2}).

Case 2: p1log⁡(p1)≥p2log⁡(p2)p_{1}\log{(p_{1})}\geq p_{2}\log{(p_{2})}

Set p1=p2←p1+p22p_{1}=p_{2}\leftarrow\frac{p_{1}+p_{2}}{2}.

Consider breaking up the sum into two pieces; i.e., f(p1,p2)=fA(p1,p2)+fB(p1,p2)f(p_{1},p_{2})=f_{A}(p_{1},p_{2})+f_{B}(p_{1},p_{2}) where:

Above, the first step follows from linearity, and the second step follows from the convexity of plog⁡(p)p\log{(p)} and non-negativeness of the linear term. The fourth step uses the assumption that p1log⁡(p1)≥p2log⁡(p⃗2)p_{1}\log{(p_{1})}\geq p_{2}\log{(\vec{p}_{2})} (Case 2), and the fact that a(1−p1)+b>a(1−p2)+ba(1-p_{1})+b>a(1-p_{2})+b and log⁡(p2)<0\log{(p_{2})}<0.

Above, the first step follows from linearity, and the second step follows from the fact that the area of a square is always larger than the area of a rectangle with the same perimeter.

We have shown that fAf_{A} and fBf_{B} are both reduced, so ff as a whole is also reduced.

To derive the expected error for a quality score vector of this form, we use a simple probabilistic argument. There are n−1n-1 items with probability pp coins, and one item with a probability 11 coin. The probability of selecting an item corresponding to a probability pp coin is ∑i=1n1n(1−(1−p)i−1)\sum_{i=1}^{n}\frac{1}{n}(1-(1-p)^{i-1}) where the index of the sum represents the location of the probability 11 item in the permutation and 1−(1−p)i−11-(1-p)^{i-1} is the probability that at least one of the probability pp coins before position ii comes up heads. Using the formula for a geometic series, this simplifies to 1−1−(1−p)nnp1-\frac{1-(1-p)^{n}}{np}. Thus, recalling that c=2Δϵlog⁡(p)c=\frac{2\Delta}{\epsilon}\log{(p)}, the expected error can be expressed as:

Let c=−2Δϵlog⁡(n)c=-\frac{2\Delta}{\epsilon}\log{(n)} and note that p=1np=\frac{1}{n} in Equation 8. Plugging in pp to Equation 8 and simplifying, we obtain:

Appendix D Proofs for Section 5: Optimailty of Permute-and-Flip

In this section we prove Proposition 6, about Pareto optimality of permute-and-flip, and Theorem 3, about “overall” optimality.

Note that the expected error of the mechanism can be expressed as:

Let q⃗q′=q⃗+(q∗−qr)e⃗r\vec{q}\mkern 2.0mu\vphantom{q}^{\prime}=\vec{q}+(q_{*}-q_{r})\vec{e}_{r}. By the differential privacy and regularity of M\mathcal{M} and the recursive construction of MPF\mathcal{M}_{PF}, we know:

Combining the above with the assumption of the Lemma, we obtain:

Note that q⃗qr′=q⃗q∗′\vec{q}\mkern 2.0mu\vphantom{q}^{\prime}_{r}=\vec{q}\mkern 2.0mu\vphantom{q}^{\prime}_{*}. We proceed by way of induction:

Induction Step: Assume Lemma 6 holds when n∗′=k+1n^{\prime}_{*}=k+1. We will show that Lemma 6 holds for n∗′=kn^{\prime}_{*}=k.

Case 1: Pr⁡[M(q⃗q′)=s]≥Pr⁡[MPF(q⃗q′)=s]\Pr[\mathcal{M}(\vec{q}\mkern 2.0mu\vphantom{q}^{\prime})=s]\geq\Pr[\mathcal{M}_{PF}(\vec{q}\mkern 2.0mu\vphantom{q}^{\prime})=s] for all ss such that qs′<q∗′q^{\prime}_{s}<q^{\prime}_{*}.

Case 2: Pr⁡[M(q⃗q′)=s]<Pr⁡[MPF(q⃗q′)=s]\Pr[\mathcal{M}(\vec{q}\mkern 2.0mu\vphantom{q}^{\prime})=s]<\Pr[\mathcal{M}_{PF}(\vec{q}\mkern 2.0mu\vphantom{q}^{\prime})=s] for some ss such that qs′<q∗q^{\prime}_{s}<q_{*}.

Applying the induction hypothesis Lemma 6 using q⃗q′\vec{q}\mkern 2.0mu\vphantom{q}^{\prime} (now with n∗′=k+1n^{\prime}_{*}=k+1), we see that the claim must be true for n∗′=kn^{\prime}_{*}=k, as desired.

For the above optimality criteria, the best mechanism can be obtained by solving a simple linear program. The variables of the linear program correspond to the probabilities the mechanism assigns to different (q⃗,r)(\vec{q},r) pairs, and the constraints are those required for differential privacy and regularity (which are all linear).

Denote the optimization variables as xr(q⃗):=Pr⁡[M(q⃗)=r]x_{r}(\vec{q}):=\Pr[\mathcal{M}(\vec{q})=r] for all q⃗∈Q\vec{q}\in Q and all r∈Rr\in\mathcal{R}. Then the linear program for the optimal regular mechanism can be expressed as:

The first constraint enforces differential privacy for a regular mechanism as in Proposition 2, where q⃗q′\vec{q}\mkern 2.0mu\vphantom{q}^{\prime} is the worst-case neighbor of q⃗\vec{q}. We assumed the maximum entry of every score vector is zero, which is without loss of generality due to shift invariance. To ensure that q⃗q′\vec{q}\mkern 2.0mu\vphantom{q}^{\prime} has maximum entry zero, we use separate expressions for q⃗q′\vec{q}\mkern 2.0mu\vphantom{q}^{\prime} depending on whether or not qr=0q_{r}=0:

The second constraint ensures the mechanism is symmetric, and the final two constraints ensure the mechanism corresponds to a valid probability distribution.

To measure how close to optimal permute-and-flip is for ϵ\epsilon below the threshold, we can solve this linear program numerically, and compare the solution to permute-and-flip. Observe that the linear program has a large number of redundant variables from the symmetry constraint (e.g., x1(−2,−8,0)=x3(0,−8,−2)x_{1}(-2,-8,0)=x_{3}(0,-8,-2)). These variables can be grouped into equivalence classes, and the redundant ones can be eliminated, keeping only a single one from each equivalence class. This drastically reduces the number of variables and also allows us to eliminate the symmetry constraints. Using this trick, the resulting linear program is significantly smaller, but the size still grows quickly with nn and kk, and is only feasible to solve for relatively small nn and kk.

Our goal is to show that MPF\mathcal{M}_{PF} solves the linear program. To do so, we will consider the following relaxation of the linear program:

There is exactly one constraint per optimization variable (excluding non-negativity constraints).

The first set of constraints corresponds to a subset of the privacy constraints from the original, corresponding only to (q⃗,r)(\vec{q},r) pairs with qr<0q_{r}<0. In addition, we performed substitutions of the form

where q⃗−qre⃗r\vec{q}-q_{r}\vec{e}_{r} is the quality score vector obtained by setting qr=0q_{r}=0.

The sum-to-one and symmetry constraints are merged into a single constraint when qr=0q_{r}=0, and other symmetry constraints are dropped.

These constraints correspond exactly to the ones in the recurrence defining MPF\mathcal{M}_{PF} in Section 3.1. This means that MPF\mathcal{M}_{PF} satisfies these constraints with equality, by construction. Furthermore, since MPF\mathcal{M}_{PF} is feasible in the full LP (because it is a private, regular mechanism), if MPF\mathcal{M}_{PF} is optimal for the relaxed LP it is also optimal for the full LP.

Constructing a dual optimal solution

We can show that MPF\mathcal{M}_{PF} is optimal by constructing a corresponding optimal solution to the dual linear program:

Because there is exactly one constraint for each optimization variable, we have used the same indexing scheme for the dual variables. Note that the non-negativity constraints apply only to (q⃗,r)(\vec{q},r) pairs with qr<0q_{r}<0.

To prove optimality, the dual solution and MPF\mathcal{M}_{PF} should satisfy complementary slackness: for each positive primal variable, the corresponding dual constraint should be tight. However, all primal variables are positive. Therefore, all dual constraints must be tight. By treating dual constraints as equalities, we obtain a recurrence for yy similar to the one used to derive MPF\mathcal{M}_{PF}:

Like the recurrence for MPF\mathcal{M}_{PF}, this recurrence is well-founded and defines a unique dual solution yy. The order of evaluation is reversed for the dual variables, and the base case occurs when n∗=1n_{*}=1 (rather than n∗=nn_{*}=n). We will now argue that, whenever \epsilon\geq\log{\big{(}\frac{1}{2}(3+\sqrt{5})\big{)}}, the resulting dual solution is feasible. This, together with complementary slackness, which is satisfied by construction, implies that MPF\mathcal{M}_{PF} and yy are optimal solutions to the primal and dual programs, respectively.

Let yy solve the recurrence above for \epsilon\geq\log{\big{(}\frac{1}{2}(3+\sqrt{5})\big{)}}. To show that yy is feasible, we will argue inductively that these finer-grained bounds hold:

Note that Equation 11 includes the dual feasibility constraints.

We prove Equations 10 and 11 by induction on the n∗n_{*}, the number of zero (i.e., maximum) entries of q⃗\vec{q}. For the base case, when n∗=1n_{*}=1, yr(q)=−qry_{r}(q)=-q_{r}, so Equations 10 and 11 hold.

Now let q⃗\vec{q} be a score vector with n∗>1n_{*}>1 entries equal to zero, and assume that Equations 10 and 11 hold for all score vectors with fewer than n∗n_{*} zeros. By Case 1 of the recurrence, for rr such that qr=0q_{r}=0, we have

In the second line, we used the fact that yr(q⃗−2Δte⃗r)≤−(q⃗−2Δte⃗r)r=2Δty_{r}(\vec{q}-2\Delta t\vec{e}_{r})\leq-(\vec{q}-2\Delta t\vec{e}_{r})_{r}=2\Delta t, which follows from Equation 11 by the induction hypothesis, since q⃗−2Δte⃗r\vec{q}-2\Delta t\vec{e}_{r} is a score vector with n∗−1n_{*}-1 zeros. In the third line, we used the fact that ∑t=1∞texp⁡(−tϵ)≤1\sum_{t=1}^{\infty}t\exp(-t\epsilon)\leq 1 whenever \epsilon\geq\log{\big{(}\frac{1}{2}(3+\sqrt{5})\big{)}}, which is stated and proved in Lemma 7 below.

since, again by Equation 11 and the induction hypothesis, each term of the sum is non-nonegative.

We have now established that Equation 10 holds for all score vectors with n∗n_{*} or fewer zeros, which we use to prove that Equation 11 holds under the same conditions. By Case 2 of the recurrence, when qr<0q_{r}<0 we have

In the second line, we used, from Equation 10 that ys(q⃗)≥−2Δn∗y_{s}(\vec{q})\geq-\frac{2\Delta}{n_{*}}. Similarly, we have

This completes the inductive proof, and establishes that the dual solution yy is feasible. This in turn completes the proof that MPF\mathcal{M}_{PF} is optimal.

If \epsilon\geq\log{\big{(}\frac{1}{2}(3+\sqrt{5})\big{)}}, then ∑k=1∞kexp⁡(−kϵ)≤1\sum_{k=1}^{\infty}k\exp{(-k\epsilon)}\leq 1.

Making the substitution exp⁡(ϵ)=1+z\exp{(\epsilon)}=1+z, we have:

The solution to the quadratic equation 1+z=z21+z=z^{2} is the golden ratio, ϕ=12(1+5)\phi=\frac{1}{2}(1+\sqrt{5}), so the inequality holds whenever z≥ϕz\geq\phi, or whenever \epsilon\geq\log{(1+\phi)}=\log{\big{(}\frac{1}{2}(3+\sqrt{5})\big{)}}. ∎

Appendix E Dynamic Programming Algorithm

In this section, we derive an efficient O(n2)O(n^{2}) dynamic programming algorithm to calculate the probabilities. Recall the expression for the pmf from Lemma 2:

To evaluate the probabilities efficiently, we can break up the sum into groups where ∣S∣=k|S|=k. Then, using dynamic programming, we can calculate these sums efficiently and use them to compute the desired probabilities.

And note that S(k,r)S(k,r) satisfies the recurrence:

S(k,r−1)S(k,r-1) is the sum over subsets not including rr, and prS(k−1,r−1)p_{r}S(k-1,r-1) is the sum over subsets including rr. Using the above recursive formula together with the base cases S(0,r)=1S(0,r)=1 and S(k,0)=0S(k,0)=0, we can compute S(k,r)S(k,r) for all (k,r)(k,r) in O(n2)O(n^{2}) time.

S(k,n)S(k,n) is then the sum over all subsets of size kk. Let T(k,r)T(k,r) denote the sum over all size kk subsets not including r:

and note that T(k,r)T(k,r) satisfies the recurrence:

with T(0,r)=1T(0,r)=1. T(k,r)T(k,r) can also be calculated in O(n2)O(n^{2}) time. The final answer is then:

which can be computed in O(n)O(n) time for each rr. Thus, the overall time complexity of this dynamic programming procedure is O(n2)O(n^{2}).

Appendix F Report Noisy Max

A popular alternative to the exponential mechanism for private selection is report noisy max, which works by adding Laplace noise with scale 2Δϵ\frac{2\Delta}{\epsilon} to the score for each candidate, then returns the candidate with the largest noisy score.

Reasoning about report noisy max analytically and exactly is challenging, and we are not aware of a simple closed form expression for its probability mass function. To compute the probability of returning a particular candidate, we must reason about the probability that one random variable (the noisy score for that candidate) is larger than n−1n-1 other random variables (the scores for other candidates), which in general requires evaluating a complicated integral. Specifically, let f(x)f(x) denote the probability density function of Lap(2Δϵ)\text{Lap}(\frac{2\Delta}{\epsilon}) and let F(x)F(x) denote its cumulative density function.

If we consider quality score vectors of the form q⃗=(c,…,c,0)\vec{q}=(c,\dots,c,0), the expression simplies to:

Due to symmetry, the expected error can be expressed as:

While it is not obvious how to simplify this expression further, we can readily evaluate the integral numerically to obtain the expected error. Doing so allows us to compare report noisy max with the exponential mechanism and permute-and-flip. Figure 4 plots the expected error of report noisy max alongside the exponential mechanism and permute-and-flip for quality score vectors of the form q⃗=(c,c,0)\vec{q}=(c,c,0). It shows that report noisy max is better than the exponential mechanism when cc is closer to but is worse when cc is much smaller than . We made similar observations for different values of nn as well. Thus, we conclude that neither one Pareto dominates the other. On the other hand, permute-and-flip is always better than both mechanisms for all cc. Note that in contrast to Figure 1(a), we plot cc on the x-axis instead of p=\exp{\big{(}\frac{\epsilon}{2\Delta}c\big{)}}, because it is not clear if report noisy max only depends on cc through pp.

This comparison covers a particular class of quality score vectors which allow for a simple and tractable exact comparison. Further comparison with report noisy max would be an interesting future direction.

Appendix G Extra Experiments