Faster Algorithms for Privately Releasing Marginals

Justin Thaler, Jonathan Ullman, Salil Vadhan

Introduction

Consider a database D∈({0,1}d)nD\in(\{0,1\}^{d})^{n} in which each of the n=∣D∣n=|D| rows corresponds to an individual’s record, and each record consists of dd binary attributes. The goal of privacy-preserving data analysis is to enable rich statistical analyses on the database while protecting the privacy of the individuals. In this work, we seek to achieve differential privacy , which guarantees that no individual’s data has a significant influence on the information released about the database.

One of the most important classes of statistics on a dataset is its marginals. A marginal query is specified by a set S⊆[d]S\subseteq[d] and a pattern t∈{0,1}∣S∣t\in\{0,1\}^{|S|}. The query asks, “What fraction of the individual records in DD has each of the attributes j∈Sj\in S set to tjt_{j}?” A major open problem in privacy-preserving data analysis is to efficiently create a differentially private summary of the database that enables analysts to answer each of the 3d3^{d} marginal queries. A natural subclass of marginals are kk-way marginals, the subset of marginals specified by sets S⊆[d]S\subseteq[d] such that ∣S∣≤k|S|\leq k.

Privately answering marginal queries is a special case of the more general problem of privately answering counting queries on the database, which are queries of the form, “What fraction of individual records in DD satisfy some property qq?” Early work in differential privacy showed how to approximately answer any set of of counting queries Q\mathcal{Q} by perturbing the answers with appropriately calibrated noise, providing good accuracy (say, within ±.01\pm.01 of the true answer) as long as ∣D∣≳∣Q∣1/2|D|\gtrsim|\mathcal{Q}|^{1/2}.

Given this state of affairs, it is natural to seek efficient algorithms capable of privately releasing approximate answers to marginal queries even when ∣D∣≪dk|D|\ll d^{k}. A recent series of works have shown how to privately release answers to kk-way marginal queries with small average error (over various distributions on the queries) with both running time and minimum database size much smaller than dkd^{k} (e.g. dO(1)d^{O(1)} for product distributions and min⁡{dO(k),dO(d1/3)}\min\{d^{O(\sqrt{k})},d^{O(d^{1/3})}\} for arbitrary distributions ). Hardt et. al. also gave an algorithm for privately releasing kk-way marginal queries with small worst-case error and minimum database size much smaller than dkd^{k}. However the running time of their algorithm is still dΘ(k)d^{\Theta(k)}, which is polynomial in the number of queries.

In this paper, we give faster algorithms for releasing marginals and other classes of counting queries.

For notational convenience, we focus on monotone kk-way disjunction queries. However, our results extend straightforwardly to general non-monotone kk-way disjunction queries (see Section 4.1), which are equivalent to kk-way marginals. A monotone kk-way disjunction is specified by a set S⊆[d]S\subseteq[d] of size kk and asks what fraction of records in DD have at least one of the attributes in SS set to 11.

Our algorithm is inspired by a series of works reducing the problem of private query release to various problems in learning theory. One ingredient in this line of work is a shift in perspective introduced by Gupta, Hardt, Roth, and Ullman . Instead of viewing disjunction queries as a set of functions on the database, they view the database as a function fD ⁣:{0,1}d→f_{D}\colon\{0,1\}^{d}\to, in which each vector s∈{0,1}ds\in\{0,1\}^{d} is interpreted as the indicator vector of a set S⊆[d]S\subseteq[d], and fD(s)f_{D}(s) equals the evaluation of the disjunction specified by SS on the database DD. They use the structure of the functions fDf_{D} to privately learn an approximation gDg_{D} that has small average error over any product distribution on disjunctions.In their learning algorithm, privacy is defined with respect to the rows of the database DD that defines fDf_{D}, not with respect to the examples given to the learning algorithm (unlike earlier works on “private learning” ).

Cheraghchi, Klivans, Kothari, and Lee observed that the functions fDf_{D} can be approximated by a low-degree polynomial with small average error over the uniform distribution on disjunctions. They then use a private learning algorithm for low-degree polynomials to release an approximation to fDf_{D}; and thereby obtain an improved dependence on the accuracy parameter, as compared to .

Hardt, Rothblum, and Servedio observe that fDf_{D} is itself an average of disjunctions (each row of DD specifies a disjunction of bits in the indicator vector s∈{0,1}ds\in\{0,1\}^{d} of the query), and thus develop private learning algorithms for threshold of sums of disjunctions. These learning algorithms are also based on low-degree approximations of sums of disjunctions. They show how to use their private learning algorithms to obtain a sanitizer with small average error over arbitrary distributions with running time and minimum database size dO(k)d^{O(\sqrt{k})}. They then are able to apply the private boosting technique of Dwork, Rothblum, and Vadhan to obtain worst-case accuracy guarantees. Unfortunately, the boosting step incurs a blowup of dkd^{k} in the running time.

We improve the above results by showing how to directly compute (a noisy version of) a polynomial pDp_{D} that is privacy-preserving and still approximates fDf_{D} on all kk-way disjunctions, as long as ∣D∣|D| is sufficiently large. Specifically, the running time and the database size requirement of our algorithm are both polynomial in the number of monomials in pDp_{D}, which is dO(k)d^{O(\sqrt{k})}. By “directly”, we mean that we compute pDp_{D} from the database DD itself and perturb its coefficients, rather than using a learning algorithm. Our construction of the polynomial pDp_{D} uses the same low-degree approximations exploited by Hardt et. al. in the development of their private learning algorithms.

In summary, the main difference between prior work and ours is that prior work used learning algorithms that have restricted access to the database, and released the hypothesis output by the learning algorithm. In contrast, we do not make use of any learning algorithms, and give our release algorithm direct access to the database. This enables our algorithm to achieve a worst-case error guarantee while maintaining a minimal database size and running time much smaller than the size of the query set. Our algorithm is also substantially simpler than that of Hardt et. al.

We also consider other families of counting queries. We define the class of rr-of-kk queries. Like a monotone kk-way disjunction, an rr-of-kk query is defined by a set S⊆[d]S\subseteq[d] such that ∣S∣≤k|S|\leq k. The query asks what fraction of the rows of DD have at least rr of the attributes in SS set to 11. For r=1r=1, these queries are exactly monotone kk-way disjunctions, and rr-of-kk queries are a strict generalization.

As an example application, consider a database that allows high school students to express their preferences for colleges in the form of a decision list. For example, a student may say, “If the school is ranked in the top ten nationwide, I am willing to apply to it. Otherwise, if the school is rural, I am unwilling to apply. Otherwise, if the school has a good basketball team then I am willing to apply to it.” And so on. Each student is allowed to use up to kk attributes out of a set of mm binary attributes. Our sanitizer allows any college (represented by its mm binary attributes) to determine the fraction of students willing to apply.

For comparison, we note that all the results on releasing kk-way disjunctions (including ours) also apply to a dual setting where the database records specify a kk-way disjunction over mm bits and the queries are mm-bit strings (in this setting mm plays the role of dd). Theorem 1.3 generalizes this dual version of Theorem 1.1, as length-kk decision lists are a strict generalization of kk-way disjunctions.

We prove the latter two results (Theorems 1.2 and 1.3) using the same approach outlined for marginals (Theorem 1.1), but with different low-degree polynomial approximations appropriate for the different types of queries.

An attractive type of summary is a synthetic database. A synthetic database is a new database D^∈({0,1}d)n^\widehat{D}\in(\{0,1\}^{d})^{\widehat{n}} whose rows are “fake”, but such that D^\widehat{D} approximately preserves many of the statistical properties of the database DD (e.g. all the marginals). Some of the previous work on counting query release has provided synthetic data, starting with Barak et. al. and including .

Preliminaries

Let a database D∈XnD\in\mathcal{X}^{n} be a collection of nn rows x(1),…,x(n)x^{(1)},\dots,x^{(n)} from a data universe X\mathcal{X}. We say that two databases D1,D2∈XnD_{1},D_{2}\in\mathcal{X}^{n} are adjacent if they differ only on a single row, and we denote this by D1∼D2D_{1}\sim D_{2}.

A sanitizer A:Xn→R\mathcal{A}:\mathcal{X}^{n}\to\mathcal{R} takes a database as input and outputs some data structure in R\mathcal{R}. We are interested in sanitizers that satisfy differential privacy.

A sanitizer A ⁣:Xn→R\mathcal{A}\colon\mathcal{X}^{n}\to\mathcal{R} is (ε,δ)(\varepsilon,\delta)-differentially private if for every two adjacent databases D,D′∈XnD,D^{\prime}\in\mathcal{X}^{n} and every subset S⊆RS\subseteq\mathcal{R}, Pr⁡[A(D)∈S]≤eεPr⁡[A(D′)∈S]+δ.\Pr\left[\mathcal{A}(D)\in S\right]\leq e^{\varepsilon}\Pr\left[\mathcal{A}(D^{\prime})\in S\right]+\delta. In the case where δ=0\delta=0 we say that A\mathcal{A} is ε\varepsilon-differentially private.

Since a sanitizer that always outputs ⊥\bot satisfies Definition 2.1, we also need to define what it means for a sanitizer to be accurate. In particular, we are interested in sanitizers that give accurate answers to counting queries. A counting query is defined by a boolean predicate q ⁣:X→{0,1}q\colon\mathcal{X}\to\{0,1\}. We define the evaluation of the query qq on a database D∈XnD\in\mathcal{X}^{n} to be q(D)=1n∑i=1nq(x(i)).q(D)=\frac{1}{n}\sum_{i=1}^{n}q(x^{(i)}). We use Q\mathcal{Q} to denote a set of counting queries.

An output ZZ of a sanitizer A(D)\mathcal{A}(D) is α\alpha-accurate for the query set Q\mathcal{Q} if ∣q(Z)−q(D)∣≤α|q(Z)-q(D)|\leq\alpha for every q∈Qq\in\mathcal{Q}. A sanitizer is (α,β)(\alpha,\beta)-accurate for the query set Q\mathcal{Q} if for every database DD,

where the probability is taken over the coins of A\mathcal{A}.

The choice of the L1L_{1} norm in the accuracy guarantee of the lemma is for convenience, and doesn’t matter for the parameters of Theorems 1.1-1.3 (except for the hidden constants).

If the privacy requirement is relaxed to (ε,δ)(\varepsilon,\delta)-differential privacy (for δ>0)\delta>0), then it is sufficient to perturb each coordinate of g(D)g(D) with noise from a Laplace distribution of smaller magnitude, leading to smaller error.

2 Query Function Families

We take the approach of Gupta et. al. and think of the database DD as specifying a function fDf_{D} mapping queries qq to their answers q(D)q(D), which we call the Q\mathcal{Q}-representation of DD. We now describe this transformation more formally:

Let Q={qy}y∈YQ⊆{0,1}m\mathcal{Q}=\left\{q_{y}\right\}_{y\in Y_{\mathcal{Q}}\subseteq\{0,1\}^{m}} be a set of counting queries on a data universe X\mathcal{X}, where each query is indexed by an mm-bit string. We define the index set of Q\mathcal{Q} to be the set YQ={y∈{0,1}m∣qy∈Q}Y_{\mathcal{Q}}=\left\{y\in\{0,1\}^{m}\mid q_{y}\in\mathcal{Q}\right\}.

For some intuition about this transformation, when the queries are monotone kk-way disjunctions on a database D∈({0,1}d)nD\in(\{0,1\}^{d})^{n}, the queries are defined by sets S⊆[d]S\subseteq[d] , ∣S∣≤k|S|\leq k. In this case each query can be represented by the dd-bit indicator vector of the set SS, with at most kk non-zero entries. Thus we can take m=dm=d and YQ={y∈{0,1}d∣∑j=1dyj≤k}Y_{\mathcal{Q}}=\left\{y\in\{0,1\}^{d}\mid\sum_{j=1}^{d}y_{j}\leq k\right\}.

3 Polynomial Approximations

Let Pt,T\mathcal{P}_{t,T} be the family of all mm-variate real polynomials of degree tt and norm TT. In many cases, the functions fQ,x:{0,1}m→{0,1}f_{\mathcal{Q},x}:\{0,1\}^{m}\to\{0,1\} can be approximated well on all the indices in YQY_{\mathcal{Q}} by a family of polynomials Pt,T\mathcal{P}_{t,T} with low degree and small norm. Formally:

Given a family of mm-variate functions F={fx}x∈X\mathcal{F}=\left\{f_{x}\right\}_{x\in\mathcal{X}} and a set Y⊆{0,1}mY\subseteq\{0,1\}^{m}, we say that the family Pt,T\mathcal{P}_{t,T} uniformly γ\gamma-approximates F\mathcal{F} on YY if for every x∈Xx\in\mathcal{X}, there exists px∈Pt,Tp_{x}\in\mathcal{P}_{t,T} such that max⁡y∈Y∣fx(y)−px(y)∣≤γ\max_{y\in Y}|f_{x}(y)-p_{x}(y)|\leq\gamma.

From Polynomial Approximations to Data Release Algorithms

In this section we present an algorithm for privately releasing any family of counting queries Q\mathcal{Q} such that FQ\mathcal{F}_{\mathcal{Q}} that can be efficiently and uniformly approximated by polynomials. The algorithm will take an nn-row database DD and, for each row x∈Dx\in D, constructs a polynomial pxp_{x} that uniformly approximates the function fQ,xf_{\mathcal{Q},x} (recall that fQ,x(q)=q(x)f_{\mathcal{Q},x}(q)=q(x), for each q∈Qq\in\mathcal{Q}). From these, it constructs a polynomial pD=1n∑x∈Dpxp_{D}=\frac{1}{n}\sum_{x\in D}p_{x} that uniformly approximates fQ,Df_{\mathcal{Q},D}. The final step is to perturb each of the coefficients of pDp_{D} using noise from a Laplace distribution (Theorem 2.3) and bound the error introduced from the perturbation.

is (α,β)(\alpha,\beta)-accurate for Q\mathcal{Q} for α=γ+4T(m+tt)2log⁡((m+tt)/β)εn.\alpha=\gamma+\frac{4T\binom{m+t}{t}^{2}\log\left(\binom{m+t}{t}/\beta\right)}{\varepsilon n}.

First we construct the sanitizer A\mathcal{A}. See the relevant codebox below.

We establish that A\mathcal{A} is ε\varepsilon-differentially private. This follows from the observation that for any two adjacent D∼D′D\sim D^{\prime} that differ only on row i∗i^{*},

The last inequality is from the fact that for every xx, p⃗x\vec{p}_{x} is a vector of L∞L_{\infty} norm at most TT. Part 1 of the Theorem now follows directly from the properties of the Laplace Mechanism (Theorem 2.3). Now we construct the evaluator E\mathcal{E}.

Efficiency.

Accuracy. Finally, we analyze the accuracy of the sanitizer A\mathcal{A}. First, by the assumption that Pt,T\mathcal{P}_{t,T} uniformly γ\gamma-approximates F\mathcal{F} on Y⊆{0,1}mY\subseteq\{0,1\}^{m}, we have

where the probability is taken over the coins of A\mathcal{A}. Part (3) of the Theorem will then follow by the triangle inequality.

The first inequality follows from the fact that every monomial evaluates to or 11 at the point yy. This completes the proof of the theorem.

Using Theorem 2.4, we can improve the bound on the error at the expense of relaxing the privacy guarantee to (ε,δ)(\varepsilon,\delta)-differential privacy. This improved error only affects the hidden constants in Theorems 1.1-1.3, so we only state those theorems for ε\varepsilon-differential privacy.

is (ε,δ)(\varepsilon,\delta)-differentially private,

is (α,β)(\alpha,\beta)-accurate for Q\mathcal{Q} for α=γ+12T(m+tt)(m+tt)log⁡(1/δ)log⁡((m+tt)/β)εn.\alpha=\gamma+\frac{12T\binom{m+t}{t}\sqrt{\binom{m+t}{t}\log(1/\delta)}\log\left(\binom{m+t}{t}/\beta\right)}{\varepsilon n}.

The proof of this theorem is identical to that of Theorem 3.1, but using the analysis of the Laplace mechanism from Theorem 2.4 in place of that of Theorem 2.3.

Applications

In this section we establish the existence of explicit families of low-degree polynomials approximating the families FQ\mathcal{F}_{\mathcal{Q}} for some interesting query sets.

We define the class of monotone kk-way disjunctions as follows:

for every i∈{0,1,…,tk},∣ci∣≤2O(klog⁡(1/γ))i\in\left\{0,1,\dots,t_{k}\right\},|c_{i}|\leq 2^{O(\sqrt{k}\log(1/\gamma))},

for every x∈{1,…,k}x\in\left\{1,\dots,k\right\}, 1−γ≤gk(x)≤1+γ1-\gamma\leq g_{k}(x)\leq 1+\gamma.

We can use Lemma 4.2 to approximate kk-way monotone disjunctions. Note that our result easily extends to monotone kk-way conjunctions via the identity ∧j=1dxjyj=1−∨j=1d(1−xj)yj\wedge_{j=1}^{d}x_{j}y_{j}=1-\vee_{j=1}^{d}(1-x_{j})y_{j}. Moreover, it extends to non-monotone conjunctions and disjunctions: we may extend the data universe as in [15, Theorem 1.2] to {0,1}2d\{0,1\}^{2d}, and include the negation of each item in the original domain. Non-monotone conjunctions over domain {0,1}d\{0,1\}^{d} correspond to monotone conjunctions over the expanded domain {0,1}2d\{0,1\}^{2d}.

Theorem 1.1 in the introduction follows by combining Theorems 3.1 and 4.3.

2 Releasing Monotone r𝑟r-of-k𝑘k Queries

We define the class of monotone rr-of-kk queries as follows:

Sherstov [20, Lemma 3.11] gives an explicit construction of polynomials that can be used to approximate the family FQr,k\mathcal{F}_{\mathcal{Q}_{r,k}} over YkY_{k} with low degree. It can be verified by inspecting the construction that the coefficients of the resulting polynomial are not too large.

tr,k=O(rklog⁡(k)+klog⁡(1/γ)log⁡(k))t_{r,k}=O\left(\sqrt{rk}\log(k)+\sqrt{k\log(1/\gamma)\log(k)}\right),

for every x∈{0,1,…,r−1}x\in\left\{0,1,\dots,r-1\right\}, −γ≤gr,k(x)≤γ-\gamma\leq g_{r,k}(x)\leq\gamma, and

for every x∈{r,…,k}x\in\left\{r,\dots,k\right\}, 1−γ≤gr,k(x)≤1+γ1-\gamma\leq g_{r,k}(x)\leq 1+\gamma.

For completeness we include a proof of Lemma 4.5 in the appendix. We can use these polynomials to approximate monotone rr-of-kk queries.

The construction and proof is identical to that of Theorem 4.3 with the polynomials of Lemma 4.5 in place of the polynomials described in Lemma 4.2. ∎

Theorem 1.2 in the introduction now follows by combining Theorems 3.1 and 4.6. Note that our result also extends easily to non-monotone rr-of-kk queries in the same manner as Theorem 1.1.

Using the principle of inclusion-exclusion, the answer to a monotone rr-of-kk query can be written as a linear combination of the answers to kO(r)k^{O(r)} monotone kk-way disjunctions. Thus, a sanitizer that is (α/kO(r),β)(\alpha/k^{O(r)},\beta)-accurate for monotone kk-way disjunctions implies a sanitizer that is (α,β)(\alpha,\beta)-accurate for monotone rr-of-kk queries. However, combining this implication with Theorem 1.1 yields a sanitizer with running time dO(rklog⁡(k/β))d^{O(r\sqrt{k}\log(k/\beta))}, which has a worse dependence on rr than what we achieve in Theorem 1.2.

3 Releasing Decision Lists

We obtain Theorem 1.3 of the introduction by combining Theorems 3.1 and 4.9.

Generalizations and Limitations of Our Approach

Acknowledgements

We thank Vitaly Feldman, Moritz Hardt, Varun Kanade, Aaron Roth, Guy Rothblum, and Li-Yang Tan for helpful discussions.

References

Appendix A Polynomial Approximation of Decision Lists

At a high level, we treat each term of the above sum independently, using a transformation of the Chebyshev polynomials to approximate each term within additive error γ/k\gamma/k. This ensures that that the sum of the resulting polynomials approximates fQ,x(y)f_{\mathcal{Q},x}(y) within additive error γ\gamma as desired. Details follow.

Let gkg_{k} be the polynomial described in Lemma 4.2 with error parameter γ′=γ/k\gamma^{\prime}=\gamma/k. Then the polynomial hk(z)=1−gk(k−z)h_{k}(z)=1-g_{k}(k-z) satisfies the following properties:

The degree of hkh_{k} is tk=O(klog⁡(k/γ))t_{k}=O(\sqrt{k}\log(k/\gamma)),

for every z∈{0,…,k−1}z\in\left\{0,\dots,k-1\right\}, ∣hk(z)∣≤γk|h_{k}(z)|\leq\frac{\gamma}{k}.

Consider the polynomial pxp_{x} defined as

Appendix B Polynomial Approximation of r𝑟r-of-k𝑘k Queries

tr,k=O(rklog⁡(k)+klog⁡(1/γ)log⁡(k))t_{r,k}=O\left(\sqrt{rk}\log(k)+\sqrt{k\log(1/\gamma)\log(k)}\right) ,

for every x∈{0,1,…,r−1}x\in\left\{0,1,\dots,r-1\right\}, −γ≤gr,k(x)≤γ-\gamma\leq g_{r,k}(x)\leq\gamma, and

for every x∈{r,…,k}x\in\left\{r,\dots,k\right\}, 1−γ≤gr,k(x)≤1+γ1-\gamma\leq g_{r,k}(x)\leq 1+\gamma.

Let TzT_{z} be the degree zz Chebyshev polynomial of the first kind (Fact B.2). We will use the following well-known properties of Chebyshev polynomials.

The Chebyshev polynomials of the first kind satisfy the following properties.

Each coefficient of TzT_{z} has absolute value at most 3z3^{z}.

Let \Delta=\big{\lceil}\frac{\log(k/\gamma)}{\log n}\big{\rceil}, and z=3\Delta\big{\lceil}\log k\big{\rceil}. The construction proceeds in several steps, with the final polynomial pp defined in terms of multiple intermediate polynomials.

The coefficients of q1(t)q_{1}(t) have absolute value at most kO(Δ)k^{O(\Delta)}.

The final polynomial p(t)p(t) is defined as