Optimal Private Halfspace Counting via Discrepancy
S. Muthukrishnan, Aleksandar Nikolov
Introduction
A range counting problem is specified by a set of size , and a range space . Given a query range , the output is . More generally, each point has an integer weight and the range returns . This problem is fundamental in Computational Geometry and a workhorse in applications, for various examples of range spaces from axis-parallel boxes (orthogonal range counting), to regions bounded by hyperplanes (halfspace counting) and beyond (e.g., simplices). Orthogonal range counting is commonly used in databases and data analysis. Halfspace counting is not only interesting in itself, but general algebraic range counting can be “lifted” to a higher dimension and encoded as halfspace counting .
Surprisingly, very little is known about private range counting. Applying methods of differential privacy from first principles (Laplace noise and the basic composition theorem of differential privacy) will add large — variance in the case of halfspace counting in the plane — noise to each output. More generally, let be an incidence matrix for a range space (i.e. a matrix whose rows are the indicator vectors of all ranges ) and let be the weights. The problem of computing is the range counting problem. The average squared error of an approximate algorithm is . In general, we can consider this problem for any , not necessarily ones that correspond to natural ranges from some constant dimensional geometric space. This is the predicate counting problem, well-studied in differential privacy. Then it is known that no mechanism that has average squared error can be -differentially private . However, the lower bounds are obtained using random ’s that will not correspond to specific range spaces of interest. No super-constant lower bounds are known against -differential privacy for natural problems like halfspace or orthogonal range counting in constant dimensional space. Constant lower bounds follow from the work of Roth as well as from reductions from lower bounds for conjunction queries.
Our results are for -differentially private range counting, and use the combinatorial structure of ’s for range spaces. Our main application is halfspace counting, but our approach is general and yields other results too.
(Halfspace counting upper bound) The (primal) shatter function of is defined as (i.e. the number of distinct sets in the restriction ). The shatter function of defined by halfspaces in -dimensions is bounded as .
We show that there is an -differentially private range counting mechanism that achieves average squared error for range spaces with shatter function bounded by , and therefore for -dimensional halfspace range counting.
Our upper bound shows that previous lower bounds for general ’s indeed do not apply to halfspace range counting. Our algorithm runs in time polynomial in and . Previous work on this problem is incomparable. Work by Blum, Ligett and Roth gave a non-constructive squared error upper bound of for range spaces with VC-dimension and a matching constructive bound for halfspace range counting for -differential privacy with a slightly different objective. Since the shatter function of a range space with VC-dimension is bounded by , our result also implies a constructive approximation upper bound of for VC-dimension range spaces.
Our approach relies on prior work to decompose the range space into a logarithmic number of range spaces, some of them consisting only of small ranges, and some containing a small number of distinct ranges. We exploit this trade-off between maximum range size and number of distinct ranges by combining randomized response and Laplacian noise based differentially private mechanisms, but this balancing still leaves us with large noise in some cases. Nevertheless, we can bound the average privacy loss over the points . Our main idea is to use this approach to preserve privacy for most points ; the shatter function bound does not increase for restrictions of and and we can recurse on the remaining points of . This argument is inspired by partial coloring methods used in discrepancy theory.
(Range counting lower bound) For halfspace counting in dimensions, we show that any mechanism that has average squared error within is not -differentially private for any constant and . We prove this lower bound using a notion of discrepancy where, in contrast to the standard notion where colorings are considered, we allow colorings but subject to some budget constraints on . The budget constraints allows us to relate this notion of discrepancy to the classical one. Once the approach via the correct notion of discrepancy is developed, the mechanics are simple. Lower bounds will follow from combinatorial analysis of the discrepancy of range spaces. For orthogonal range counting, our approach immediately gives a lower bound of on the average squared error of any differentially private mechanism. The best upper bound in this setting is the work of Chan, Shi, and Song who give an algorithm with average squared error . No previous super-constant lower bounds are known for this problem even for large constant . We note that proving a tight lower bound on the combinatorial discrepancy of axis-aligned boxes in dimensions is a major open problem in discrepancy theory, and any improvement to the current discrepancy lower bound will yield a corresponding improvement in lower bounds for privacy.
In Section 2 we review related prior work. In Section 3, we define concepts we need, including differential privacy and suitable notions of discrepancy. In Section 4, we present our lower bounds, and in Section 5, the upper bounds. We describe extensions and alternative algorithmic solutions in Section 6.
Prior Work
There is a rich and growing literature on solving counting problems while satisfying strong privacy guarantees. We will survey the prior work that is most relevant to our results.
In a seminal paper, Dinur and Nissim initiated the study of the limits of output perturbation in answering arbitrary counting queries privately. They showed that if an algorithm satisfies for a random 0-1 matrix , then an adversary can reconstruct almost exactly, implying that the algorithm is not -differentially private for any constant .Our methods based on discrepancy allow us to re-prove the lower bound of Dinur and Nissim, as well as the version of Dwork and Yekhanin that uses an explicit . There is relatively little prior work on negative results for -differential privacy for natural restrictions of . An exception is the work on lower bounding the noise necessary to privately answer conjunction queries . Conjunction queries on a database with attributes can be reduced to answering orthogonal range counting or halfspace range counting queries in dimensions. When is constant, the lower bounds on conjunction queries imply a lower bound of (for an absolute constant ) on the average squared error neccessary to answer -dimensional halfspace or orthogonal queries privately (here and in the remainder of this section we suppress dependence on , , and the probability of failure). In other related work, Roth showed that linear queries with fat shattering dimension require squared noise to preserve privacy. The fat shattering dimension reduces to the VC-dimension for counting queries, and has value for the range space of halfspaces in dimensions. No super-constant lower bounds were previously known for -differential privacy for the halfspace range counting or orthogonal range counting problems in constant dimensional space.
The study of private range counting for restricted range spaces was initiated with the work of Blum, Ligett, and Roth , who, using an argument based on epsilon nets, showed that queries of VC dimension can be answered with worst-case squared noise . Their algorithm is not computationally efficient, but they gave efficient algorithms with comparable guarantees for the interval range counting and halfspace range counting problems. Although their error bound is inferior to ours (when the size of the database is comparable to the universe size), the models are not directly comparable. While we consider a finite universe, they consider a continuous space, but give relaxed utility guarantes, namely that each query answer is accurate for a halfspace close to the query halfspace. Additionally, their algorithms satisfy the stronger notion of -differential privacy and accomodate the regime where is public and bounded by and is much larger.
For interval queries, the work of Blum, Ligett, and Roth was subsequently improved by Xiao, Wang, and Gehrke (in the regime where database size and universe size are comparable), who gave a polylogarithmic noise upper bound via the wavelet transform. A related algorithm that achieves an average squared error upper bound of for -dimensional orthogonal range counting was given by Chan, Shi, and Song . We note that if we relax the privacy guarantee of Chan, Shi, and Song to -differential privacy, their algorithm can be analyzed to provide average squared error .
Much subsequent work has focused on answering arbitrary queries efficiently with squared error linear in and polylogarithmic in . A related line of work investigates the problem of answering conjunction queries with optimal error .
Prior work for -differential privacy. Stronger lower bounds can be shown when , and there are known separations between the cases and , even when is superpolynomially small . Hardt and Tulwar gave a lower bound for linear queries based on geometric properties of the query matrix . De simplified and extended their lower bound results. Blum, Ligett, and Roth showed that no -differentially private mechanism can answer interval queries with any nontrivial noise when the universe is continuous.
Discrepancy theory. For background in discrepancy theory we refer the reader to the books of Chazelle and Matous̆ek . Chazelle provides an overview of the applications of discrepancy theory to computer science, while Matous̆ek gives a survey of discrepancy theory results for geometric range spaces.
Geometric range counting. Geometric range counting and the closely related problems of range sums and range searching have a rich history in computational geometry. We refer the reader to the survey of Agarwal and Erickson for background.
Preliminaries
We typeset vectors and matrices as , and their elements as , . We denote the -th row of as and the -th column as . Given a matrix , the function equals the number of columns of . For a matrix with columns, and a set we use to denote the submatrix of consisting of the columns corresponding to elements of (with duplicated rows removed). Similarly, for a range space with incidence matrix , the range space is the one corresponding to the incidence matrix . We denote the -th standard basis vector (where is in the -th coordinate) as . For a set we denote the collection of subsets of of size as .
We will use the definitions for range counting, average squared error, orthogonal and hyperspace range counting, as well as the linear algebraic notation introduced in the Introduction. We also consider worst-case squared error, which for an algorithm and a range space with incidence matrix is . We give all our lower bounds in average squared error and state our upper bounds in terms of both average and worst-case squared error.
The VC-dimension of a range space is defined as the size of the largest set such that . The (primal) shatter function of is defined as (i.e. the number of distinct sets in ).
If the VC-dimension of is , then . Conversely, if then the VC-dimension of is constant.
2 Differential Privacy
For lower bounds we use the following claim, which implies that being able to decode most of the input from the output contradicts differential privacy.
Let be a mechanism such that for some there exists a (not necessarily efficient) algorithm such that
Then there exist and such that the mechanism is not -differentially private.
A basic mechanism to achieve differential privacy with is the Laplace noise mechanism, first proposed in . Let us here and for the rest of the paper denote by the Laplace distribution centered at 0 with scale parameter .
Let the mechanisms satisfy, respectively, differential privacy. The composition of the mechanisms satisfies -differential privacy.
We also need a stronger result, which is a straightforward extension of the composition theorem of Dwork, Rothblum, and Vadhan . To state the result we define a notion of privacy loss. Following , let us first define the maximum divergence of two random variables and as
where ranges over measurable subsets of the support of . Note that a mechanism is -differentially private if and only if for every and any , we have and .
Let be a composition of . The privacy loss of for the -th output is
Let be a composition of and let . Then, for any , satisfies -differential privacy.
Note that for the range counting problem, the privacy loss is defined for a point .
3 Discrepancy
Here we define a modified notion of discrepancy. In Section 4, we show that this modified notion of discrepancy is useful in carrying out Dinur-Nissm type attacks on privacy.
The standard notions of discrepancy and hereditary discrepancy correspond to the special cases and . The cases and have also been extensively studied, especially as means of proving lower bounds on and . On the other hand the case is trivially the identically 0 function. Next, we exhibit a connection between and for and any .
Let . Then , and, therefore,
We will find an assignment such that , which is sufficient to prove the lemma. Let be such that and . Let . Since , . We recurse to find an assignment such that . Set when and when . ∎
Lemma 5 and the observation imply that for any ,
However using Lemma 5 directly and the observation that a restriction of a halfspace range space (or a range space of axis-aligned boxes) is a range space of the same kind, we get stronger lowerbounds for . Below we list several interesting results that can be derived in this way from known results in combinatorial discrepancy theory . Below we provide more specific references to the discrepancy lower bound used to derive each result. We provide a full proof of the first result; the remaining proofs follow analogous reasoning.
For any and there exists a matrix such that .
Lower Bounds for Privacy from Discrepancy
Our main result in this section is a noise lower bound on -differentially private mechanisms that approximate range counting queries for a host of natural geometric range spaces. Our main conceptual contribution is in identifying as the key quantity in showing lower bounds against -differential privacy via a Dinur-Nissim type attack, and connecting this quantity to the standard notion of combinatorial discrepancy.
is -differentially private.
We extend the lower bound to . This allows us to use the connection between and standard discrepancy.
is -differentially private.
We claim that given and any set , we can construct that takes as input , is -differentially private (with respect to ), and satisfies
Then we can take such that , and the corollary follows from Theorem 1.
We define as follows: extends to by setting for all and outputs . It’s easy to verify that satisfies the claimed properties. ∎
Theorem 1 follows from Lemma 1 and the following lemma.
Corollary 1, instantiated with , and Lemmas 6–8 imply an array of noise lower bounds for approximating geometric range counting while satisfying -differential privacy.
We also note that that Corollary 1, instantiated with and Lemma 9 imply a lower bound on the worst case squared error for privately approximating arbitrary range counting queries where is much larger than .
Any mechanism that, for any range space (, ), with constant probability approximates range counts for with worst case squared error is not -differentially private for any constant and .
The results of Dinur and Nissim for and are special cases of Theorem 5. To the best of our knowledge, this is the first lower bound that explicitly accounts for the dependence of error on for arbitrary .
Algorithm for Bounded Shatter Function Systems
In this section we present an efficient (for constant ) -differentially private range counting algorithm for range spaces with bounded shatter function. We prove the algorithm gives optimal average squared error and almost optimal worst-case squared error bounds. The algorithm is based on a novel use of a decomposition that was first constructed by Matous̆ek to prove optimal discrepancy upper bounds for bounded shatter function range spaces. Even a careful application of known methods in differential privacy together with the decomposition does not provide optimal error bounds directly; we, however, prove that privacy can be satisfied for a constant fraction of while achieving optimal error bounds; then we recurse on the remainder of . Aside from the decomposition, this method of satisfying privacy for a fraction of the database is inspired by partial coloring methods in discrepancy theory.
We will make an essential use of the following lemma, due originally to Haussler. The lemma bounds the size of an epsilon net in the hamming metric.
Let be a range space with shatter function . Let be an integer less than . Let be a collection of ranges such that for any two ranges , the symmetric difference between and is at least . Then, .
We construct collections of ranges with large pairwise distance for gemetrically growing values of . Using the collections as finer and finer epsilon nets, we can represent each range in as the union and set difference of smaller and smaller ranges, while Lemma 11 allows us to control the number of such ranges needed for each value of . We then approximate range counts for the ranges that make up the decomposition; the trade-off between range size and number of distinct ranges allows us to balance the noise incurred by randomized response and by using composition (Lemma 4).
We first detail the construction. Our presentation follows . Let be a range space with shatter function . Let . For each , let be a maximal collection of ranges such that the symmetric difference between any two ranges is at least . In particular, and . For each , fix a such that the symmetric difference between and is at most (such a range exists by maximality of ). Then we set and , so that , , and . Define a new collection of ranges . We can start from and apply the construction recursively, until we have where . Bactracking to reconstruct , we get
All union operations are on disjoint sets and any set is subtracted from a set that entirely contains it.
Each range in has size at most by construction; by Lemma 11, , and, since each range in corresponds to at most two ranges in , we also have . Let be the incidence matrix of . The following lemma follows from the decomposition (2):
Let be a range space with and shatter function . Let be the incidence matrix of . Then, there exist matrices and such that . Furthermore, we have the following properties for and :
each row in has at most nonzero entries;
for some absolute constant ;
each row in has at most 2 nonzero entries.
For the degree of a point in the range space , we use the notation .
Intuitively, we will use randomized response on those consisting of only small ranges, and we will use the Laplace noise mechanism on those consisting of few ranges. The “breaking-even point” for the analysis is . For randomized response gives the guarantee we need: the largest range in for has size at most . However, can have as many as ranges, and it seems that we cannot use Laplace noise with variance and still preserve privacy for those close to . To circumvent this issue, we use the fact that we can bound both the largest range and the number of ranges in each simultaneously. The main observation is that we can add noise with optimal variance to the range counts for those where randomized response doesn’t work, and bound the average privacy loss . Then, we use averaging and Lemma 4, and argue that we can preserve privacy for most . The shatter function bound does not increase for restrictions of and and we can recurse on the remaining points of . Our algorithm for computing range counts over ranges with bounded shatter function is given as Algorithm 1. The algorithm description and the following discussion assume that has shatter function (for ) and the decomposition of Lemma 12 has already been computed. Note that the decomposition can be computed in time .
We analyze the privacy guarantees of Algorithm 1. We first prove some technical claims about the algorithm.
Claim 1. follows by avaraging and the inequality
The first inequality follows from Lemma 12. The second inequality holds for . This finishes the proof of claim 1.
The following privacy analysis uses the fact that the range space is public, and, therefore, the decomposition given by Lemma 12, and the set determined by the decomposition are public as well, i.e. independent of .
Algorithm 1 preserves -differential privacy.
Next we analyze the approximation guarantee of the algorithm. The bounds in following lemma can derived by a straightforward calculation.
We’re now ready to prove an approximation guarantee.
The expected average squared error of Algorithm 1 is . With probability at least , the worst-case squared error of Algorithm 1 is at most .
The worst-case guarantee can be derived by standard use of tail bounds for sums of Laplace random variables. ∎
Extensions
Algorithms for halfspace range counting can be derived from several other methods, each of which provides weaker noise guarantees and/or less generality.
The partition trees of Chan imply a way to factor the incidence matrix of a range space induced by -dimensional halfspaces into matrices and such that , each column in has at most nonzero elements, each row in has at most nonzero elements, and and both have elements bounded in absolute value by . Using Lemma 4, we can add Laplace noise with variance to each element of , preserving privacy. We can then bound the variance of this mechanism to argue that, with constant probability, the average squared error is and the worst case squared error is .
There is a well-known connection between combinatorial discrepancy and epsilon approximations (c.f. , Chapter 1). Let be a range space such that the maximum discrepancy over all restrictions of to a size subset of is (this is the same as in Section 3). Under some reasonable assumptions on the range space, there exists a subset of of size such that range counts on are close to range counts on to within an additive . Using this fact, and the discrepancy upper bound for range spaces with shatter function exponent , we can apply the median mechanism of Roth and Roughgarden with the new analysis in to obtain a squared error upper bound that depends on as . This upper bound is suboptimal; for example, for , it yields an upper bound of as opposed to the optimal . Nevertheless, this method still gives squared error bounds that grow slower than for range system with polynomial shatter function. It also extends to the case where the universe is much larger than . Giving optimal or near optimal error upper bounds in this large universe regime is an interesting open problem.
Concluding Remarks
While predicate count queries () have been studied in differential privacy before, we make one of the first significant progress in understanding the complexity of the problem in terms of the combinatorial properties of , in particular for halfspace, orthogonal and other range count queries. Our main result is tight upper and lower bounds on approximation of differentially private halfspace count queries. Our approach is via a variation of discrepancy. The main problems we leave open are to get tight bounds for orthogonal counts with -differential privacy and to extend our bounds to the large universe regime.
Acknowledgements
We would like to thank Guy Rothblum, Kobbi Nissim, and Aaron Roth for helpful discussions, and the anonymous reviewers for useful suggestions and corrections.
This material is based upon work supported by the National Science Foundation under Grant No. 0916782.