The Structure of Optimal Private Tests for Simple Hypotheses
Clément L. Canonne, Gautam Kamath, Audra McMillan, Adam Smith, Jonathan Ullman
Introduction
Hypothesis testing plays a central role in statistical inference, analogous to that of decision or promise problems in computability and complexity theory. A hypothesis testing problem is specified by two disjoint sets of probability distributions over the same set, called hypotheses, and . An algorithm for this problem, called a hypothesis test, is given a sample from an unknown distribution , with the requirement that should, with high probability, output “0” if , and “1” if . There is no requirement for distributions outside of . In computer science, such problems sometimes go by the name distribution property testing.
Hypothesis testing problems are important in their own right, as they formalize yes-or-no questions about an underlying population based on a randomly drawn sample, such as whether education strongly influences life expectancy, or whether a particular medical treatment is effective. Successful hypothesis tests with high degrees of confidence remain the gold standard for publication in top journals in the physical and social sciences. Hypothesis testing problems are also important in the theory of statistics and machine learning, as many lower bounds for estimation and optimization problems are obtained by reducing from hypothesis testing.
This paper aims to understand the structure and sample complexity of optimal hypothesis tests subject to strong privacy guarantees. Large collections of personal information are now ubiquitous, but their use for effective scientific discovery remains limited by concerns about privacy. In addition to the well-understood settings of data collected during scientific studies, such as clinical experiments and surveys, many other data sources where privacy concerns are paramount are now being tapped for socially beneficial analysis, such as Social Science One [Soc18], which aims to allow access to data collected by Facebook and similar companies.
We study algorithms that satisfy differential privacy (DP) [DMNS06], a restriction on the algorithm that ensures meaningful privacy guarantees against an adversary with arbitrary side information [KS08]. Differential privacy has come to be the de facto standard for the analysis of private data, used as a measure of privacy for data analysis systems at Google [EPK14], Apple [Dif17], and the U.S. Census Bureau [DLS+17]. Differential privacy and related distributional notions of algorithmic stability can be crucial for statistical validity even when confidentiality is not a direct concern, as they provide generalization guarantees in an adaptive setting [DFH+15b].
Consider an algorithm that takes a set of data points from a set —where each point belongs to some individual—and produces some public output. We say the algorithm is differentially private if no single data point can significantly impact the distribution on outputs. Formally, we say two data sets of the same size are neighbors if they differ in at most one entry.
A randomized algorithm taking inputs in and returning random outputs in a space with event set is -differentially private if for all , for all neighboring data sets , and for all events ,
For algorithms with binary outputs, this definition is essentially equivalent to all other commonly studied notions of privacy and distributional algorithmic stability (see “Connections to Algorithmic Stability”, below).
Contribution: The Sample Complexity of Private Tests for Simple Hypotheses. We focus on the setting of i.i.d. data and singleton hypotheses , which are called simple hypotheses. The algorithm is given a sample of points drawn i.i.d. from one of two distributions, or , and attempts to determine which one generated the input. That is, and . We investigate the following question.
Given two distributions and and a privacy parameter , what is the minimum number of samples (denoted ) needed for an -differentially private test to reliably distinguish from , and what are optimal private tests?
These questions are well understood in the classical, nonprivate setting. The number of samples needed to distinguish from is , where denotes the squared Hellinger distance (3).This statement is folklore, but see, e.g., [BY02] for the lower bound, [Can17] or Corollary 2.2 for the upper bound. Furthermore, by the Neyman–Pearson lemma, the exactly optimal test consists of computing the likelihood ratio and comparing it to some threshold.
Our result provides the first instance-specific characterization of a statistical problem’s complexity for differentially private algorithms. Understanding the private sample complexity of statistical problems is delicate. We know there are regimes where statistical problems can be solved privately “for free” asymptotically (e.g. [DMNS06, CMS11, Smi11, KV18]) and others where there is a significant cost, even for relaxed definitions of privacy (e.g. [BUV14, DSS+15]), and we remain far from a general characterization of the statistical cost of privacy. Duchi, Jordan, and Wainwright [DJW13] give a characterization for the special case of simple tests by local differentially private algorithms, a more restricted setting where samples are randomized individually, and the test makes a decision based on these randomized samples. Our characterization in the general case is more involved, as it exhibits several distinct regimes for the parameter .
Our analysis relies on a number of tools of independent interest: a characterization of private hypothesis testing in terms of couplings between distributions on , and a novel interpretation of Hellinger distance as the advantage over random guessing of a specific, randomized likelihood ratio test.
The Importance of Simple Hypotheses. Many of the hypotheses that arise in application are not simple, but are so-called composite hypotheses. For example, deciding if two features are independent or far from it involves sets and each containing many distributions. Yet many of those tests can be reduced to simple ones. For example, deciding if the mean of a Gaussian is less than 0 or greater than 1 can be reduced to testing if the mean is either 0 or 1. Furthermore, simple tests arise in lower bounds for estimation—the well-known characterization of parametric estimation in terms of Fisher information is obtained by showing that the Fisher information measures variability in the Hellinger distance and then employing the Hellinger-based characterization of nonprivate simple tests (e.g. [Bor99, Chap. II.31.2, p.180]).
Our characterization of private testing implies similar lower bounds for estimation (along the lines of lower bounds of Duchi and Ruan [DR18] in the local model of differential privacy).
Connection to Algorithmic Stability. For hypothesis tests with constant error probabilities, sample complexity bounds for differential privacy are equivalent, up to constant factors, to sample complexity bounds for other notions of distributional algorithmic stability, such as -DP [DKM+06], concentrated DP [DR16, BS16], KL- and TV-stability [WLF16, BNS+16] (see [ASZ18, Lemma 5]). (Briefly: if we ensure that for all , then an additive change of corresponds to an multiplicative change of , and vice-versa.) Consequently, our results imply optimal tests for use in conjunction with stability-based generalization bounds for adaptive data analysis, which has generated significant interest in recent years [DFH+15b, DFH+15a, DFH+15c, RZ16, BNS+16, RRST16, XR17, FS17, FS18].
To put our result in context, we review classical results about non-private hypothesis testing. Let and be two probability distributions over an arbitrary domain . A hypothesis test K\colon\mathcal{X}^{*}\to\{\text{``P''},\text{``Q''}\} is an algorithm that takes a set of samples and attempts to determine if it was drawn from or . Define the advantage of a test given samples as
for some threshold . We will sometimes abuse notation and use the test statistic and the implied hypothesis test interchangeably.
Another classical result says that the optimal sample complexity is characterized by the squared Hellinger distance between , which is defined as
Specifically, . Note that the same metric provides upper and lower bounds on the sample complexity.
2 Our Results
Our main result is an approximate characterization of the sample complexity of -differentially private tests for distinguishing and . Analogous to the non-private case, we will write \mathit{SC}^{P,Q}_{{\varepsilon}}=\min_{\textrm{{\varepsilon}K}}\mathit{SC}^{P,Q}(K) to denote the sample complexity of -differentially privately (-DP) distinguishing from , and we characterize this quantity up to constant factors in terms of the structure of and the privacy parameter . Specifically, we show that a privatized clamped log-likelihood ratio test is optimal up to constant factors. This privatization may be achieved through either the Laplace or Exponential mechanism, and we will prove optimality of both methods.
For parameters , we define the clamped log-likelihood ratio statistic,
where denotes the projection onto the interval (that is, ).
Define the soft clamped log-likelihood test:
The test is an instance of the exponential mechanism [MT07], and thus satisfies -differential privacy for .
Similarly, define the noisy clamped log-likelihood ratio test:
The test is an instance of postprocessing the Laplace mechanism [DMNS06], and satisfies -differential privacy.
Our main result is that, for every , and every , the tests and are optimal up to constant factors, for some appropriate . To state the result more precisely, we introduce some additional notation. First define
and assume without loss of generality that , which we assume for the remainder of this work.For , the quantity is an -divergence and has appeared in the literature before under the names -divergence, hockey-stick divergence, or elementary divergence [LCV15, BBG18] (for , one obtains the usual total variation distance). Thus, is the maximum of the divergences and . It can also be described as the smallest value such that and are -indistinguishable [DR14]. Next, let be the largest value such that
The distributions are such that
where and are distributions with disjoint support. The quantity is the smallest possible number for which such a representation is possible. With these definitions in hand, we can now state our main result.
For every pair of distributions , and every , the optimal sample complexity for -differentially private tests is achieved by either the soft or noisy clamped log-likelihood test, and satisfies
When , Theorem 1.2 reduces to , which is the sample complexity for distinguishing between and in the non-private setting. This implies that we get privacy for free asymptotically in this parameter regime. We will focus on proving the first equality in this paper, the second is proved in Appendix E.
Comparison to Known Bounds. For , the bounds
follow directly from the non-private sample complexity. Namely, the lower bound is the non-private sample complexity and the upper bound is obtain by applying the sample-and-aggregate technique [NRS07] to the optimal non-private test. They can be recovered from Theorem 1.2 by noting that
where .
As an application of our result, we obtain optimal private algorithms for change-point detection. Given distributions and , an algorithm solving offline change-point detection for and takes a stream with the guarantee that the there is an index such that first elements are sampled i.i.d. from and the latter elements are sampled i.i.d. from , and attempts to output . We can also consider an online variant where elements arrive one at a time.
Change-point detection has a long history in statistics and information theory (e.g. [She31, Pag54, Pag55, Shi63, Lor71, Pol85, Mou86, Pol87, Lai95, Kul01, Mei06, VB14]). Cummings et al. [CKM+18] recently gave the first private algorithms for change-point detection. Their algorithms are based on a private version of the log-likelihood ratio, and in cases where the log-likelihood ratio is not strictly bounded, they relax to a weaker distributional variant of differential privacy. Using Theorem 1.2, we can achieve the standard worst-case notion of differential privacy, and to achieve optimal error bounds for every .
For every pair of distributions and , and every , there is an -differentially private algorithm that solves offline change-point detection for and such that, with probability at least , .
The expected error in this result is optimal up to constant factors for every pair , as one can easily show that the error must be at least . Theorem 1.3 can be extended to give an arbitrarily small probability of failure, and can be extended to the online change-point detection problem, although with more complex accuracy guarantees. Our algorithm introduces a general reduction from private change-point detection for families of distributions and to private hypothesis testing for the same family, which we believe to be of independent interest.
3 Techniques
First Attempts. A folklore result based on the sample-and-aggregate paradigm [NRS07] shows that for every and every , , meaning privacy comes at a cost of at most .See, e.g., [CDK17] for a proof. However, there are many examples where even when , and understanding this phenomenon is crucial.
The sample complexity of testing Bernoulli distributions (6) already demonstrates an important phenomenon in private hypothesis testing—for many distributions , there is a “phase transition” where the sample complexity takes one form when is sufficiently large and another when is sufficiently small, and often the sample complexity in the “large regime” is equal to the non-private complexity up to lower order terms. A key challenge in obtaining Theorem 1.2 is to understand these transitions, and to understand the sample complexity in each regime.
Since each of the terms in (6) is a straightforward lower bound on the sample complexity of private testing, one might conjecture that (6) holds for every pair of distributions. However, our next illustrative example shows that this conjecture is false even for the domain . Consider the distributions given by the densities
For these distributions, (6) reduces to , so these distributions show that the optimal sample complexity can be much larger than (6). Moreover, these distributions exhibit that the optimal sample complexity can vary with in complex ways, making several transitions and never matching the non-private complexity unless or is constant.
Key Ingredients. The second example above demonstrates that the optimal test itself can vary with in an intricate fashion, which makes it difficult to construct a single test for which we can prove matching upper and lower bounds on the sample complexity. The use of the clamped log-likelihood test arose out of an attempt to find a single test that is optimal for the second pair of distributions and , and relies on a few crucial technical ingredients.
This observation is crucial for our work, because it implies that is -DP if . That is, in the case that , we get -DP for free (since Hellinger distance, and thus , characterizes the optimal asymptotic sample complexity). Thus, we use the clamped log-likelihood ratio test, which forces the log-likelihood ratio to be bounded. Our lower bound in a sense shows that any loss of power in the test due to clamping is necessary for differentially private tests.
The proof of the upper bound also splits into two parts, roughly corresponding to the same aspects of the distributions and as above. That is, we view our tester as either counting the number of high-ratio elements or computing the log-likelihood ratio on low-ratio elements. A useful observation is that this duality between the upper and lower bounds is inevitable. In Section 3, we characterize the advantage of the optimal tester in terms of Wasserstein distance between and with metric . That is, the advantage of the optimal tester must be matched by some coupling of and .
4 Related Work
Early work on differentially private hypothesis testing began in the Statistics community with [VS09, USF13]. More recently, there has been a significant number of works on differentially private hypothesis testing. One line of work [WLK15, GLRV16, KR17, KSF17, CBRG18, SGHG+19, CKS+19] designs differentially private versions of popular test statistics for testing goodness-of-fit, closeness, and independence, as well as private ANOVA, focusing on the performance at small sample sizes. Work by Wang et al. [WKLK18] focuses on generating statistical approximating distributions for differentially private statistics, which they apply to hypothesis testing problems. A recent work by Awan and Slavkovic [AS18] gives a universally optimal test when the domain size is two, however Brenner and Nissim [BN14] shows that such universally optimal tests cannot exist when the domain has more than two elements. A complementary research direction, initiated by Cai et al. [CDK17], studies the minimax sample complexity of private hypothesis testing. [ASZ18] and [ADR18] have given worst-case nearly optimal algorithms for goodness-of-fit and closeness testing of arbitrary discrete distributions. That is, there exists some worst-case distribution such that their algorithm has optimal sample complexity for testing goodness-of-fit to . Recently, [AKSZ18] designed nearly optimal algorithms for estimating properties like support size and entropy.
Another related area [GR18, She18, ACFT19] studies hypothesis testing in the local model of differential privacy. In particular, Duchi, Jordan, and Wainwright [DJW13] proved an analogue of our result for the restricted case of locally differentially private algorithms. Their characterization shows that, the optimal sample complexity for -DP local algorithms is . This characterization does not exhibit the same phenomena that we demonstrate in the central model—privacy never comes “for free” if , and the sample complexity does not exhibit different regimes depending on . More generally, local-model tests are considerably simpler, and simpler to reason about, than central-model tests.
There are also several rich lines of work attempting to give tight instance-specific characterizations of the sample complexities of various differentially private computations, most notably linear query release [HT10, BDKT12, NTZ16, Nik15, KN16] and PAC and agnostic learning [KLN+08, BNS13, FX14]. The problems considered in these works are arguably more complex than the hypothesis testing problems we consider here, the characterizations are considerably looser, and are only optimal up to polynomial factors.
There has been a recent line of work [DFH+15b, DFH+15a, DFH+15c, RZ16, CLN+16, BNS+16, RRST16, FS17, XR17, FS18] on adaptive data analysis, in which the same dataset is used repeatedly across multiple statistics analyses, the choice of each analysis depends on the outcomes of previous analyses. The key theme in these works is to show that various strong notions of algorithmic stability, including differential privacy imply generalization bounds in the adaptive setting. Our characterization applies to all notions of stability considered in these works.
As an application of our private hypothesis testing results, we provide algorithms for private change-point detection. As discussed in Section 1.2.1, change-point detection has enjoyed a significant amount of study in information theory and statistics. Our results are in the private minimax setting, as recently introduced by Cummings et al. [CKM+18]. We improve on their results by improving the detection accuracy and providing strong privacy guarantees for all pairs of hypotheses.
Upper Bound on Sample Complexity of Private Testing
Due to the number of named tests in this paper, the reader may find it useful to refer to Appendix A, where we enumerate all the tests that we mention.
It has long been known that the Hellinger distance characterizes the asymptotic sample complexity of non-private testing (see, e.g., [Bor99]). In this section we show that the Hellinger distance exactly characterizes the advantage of the following randomized test given a single data point:
Now, , and therefore
Thus, the advantage of is , as claimed. ∎
This tells us the advantage of the test which takes only one sample. As a corollary, we can derive the sample complexity of distinguishing and using .
.
2 The Noisy Log-Likelihood Ratio Test
We now consider the noisy log-likelihood ratio test, which, similar to , is also -differentially private.
.
Furthermore, if then .
where . If we let the threshold then the test based on the test statistic is
Now, we will use the following two inequalities:
are the probabilities of success, we have
Therefore, if has a probability of success of then has a probability of success of . This implies that .
If then so we have iff iff and therefore
If has asymptotically optimal sample complexity then has asymptotically optimal sample complexity.
3 The Sample Complexity of ncLLRncLLR\operatorname{ncLLR}
The test is -DP and
Theorem 2.5 combined with a matching lower bound (given later in Theorem 3.5) imply that has asymptotically optimal sample complexity. Thus, by Corollary 2.4, has asymptotically optimal sample complexity.
Before proving the bound, we pause to provide some intuition for its form. As discussed in the introduction, we can write and as mixtures and where have disjoint support. Now consider a thought experiment, in which the test that must distinguish from using a sample of size is given, along with the sample , a list of binary labels that indicate for each record whether it was sampled from the first component of the mixture (either or ), or the second component (either or ). Of course this can only be a though experiment—these labels are not available to a real test.
Because the mixture weights are the same for both and , the number of labels of each type would be distributed the same under and under , and so the tester would be faced with two independent testing problems: distinguishing from using a sample of size about , and distinguishing from using a sample of size about . It would suffice for the tester to solve either of these problems.
Theorem 2.5 shows that the real tests ( and ) do as well as the hypothetical tester that has access to the labels. The two arguments to the minimum in the theorem statement correspond directly to the -DP sample complexity of distinguishing from (which requires ) or distinguishing from (which requires ). The proof proceeds by breaking the clamped log-likelihood ratio into two pieces, each corresponding to one of the two mixture components (again, this decomposition is not known to the algorithm). These two pieces correspond to the test statistics of the optimal testers for the two separate sub-problems in the thought experiment. We show that the test does well at distinguishing from as long as either of these pieces is sufficiently informative.
On a more mechanical level, our proof of Theorem 2.5 bounds the expectation and standard deviation of the two pieces of the test statistic. We use the following simple lemma, which states that a test statistic performs well if the distribution of the test statistic on and , and , must not overlap too much. The proof is a simple application of Chebyshev’s inequality.
then can be used to distinguish between and with probability of success 2/3 and sample complexity at most .
This result follows by Chebyshev’s inequality. For completeness, it is proved in Appendix D.
and set .
where the last equality follows by the definition of . Moreover,
where the last inequality follows since for any distributions and .
Recall that is a distribution such that and the support of is contained in . Thus,
Since , . Therefore,
Also, and thus,
Lower Bound on the Sample Complexity of Private Testing
We now prove the lower bound in Theorem 1.2. We do so by constructing an appropriate coupling between the distributions and , which implies lower bounds for privately distinguishing from . This style of analysis was introduced in [ASZ18], though we require a strengthening of their statement. Specifically, the lower bound of Acharya et al. involves , whereas we have .
where the is over all couplings of and . Let .
For every -DP algorithm , if and are neighboring datasets then
where the expectations are over the randomness of the algorithm .
For every -DP algorithm the advantage satisfies
The upper bound in Lemma 3.2 is in fact tight. We state the converse below for completeness, although we will not use it in this work. The proof of Lemma 3.3 is contained in Appendix F.
There is a -DP algorithm such that
We will also rely on the following standard fact characterizing total variation distance in terms of couplings:
We can now prove the lower bound component of Theorem 1.2. Recall that and were defined in Equation (5).
Given and , every -DP test that distinguishes and has the property that
Recalling now that the distribution of is that of the TV-coupling of and , and that , we get
Therefore, by Lemma 3.2, we have that for every -DP test ,
Thus, in order for the probability of success to be , we need either or to be . That is, . ∎
Application: Differentially Private Change-Point Detection
In this section, we give an application of our method to differentially private change-point detection. In the change-point detection problem, we are given a time-series of data. Initially, it comes from a known distribution , and at some unknown time step, it begins to come from another known distribution . The goal is to approximate when this change occurs. More formally, we have the following definition.
In the offline change-point detection problem, we are given distributions and a data set . We are guaranteed that there exists such that and . The goal is to output such that is small.
In the online change-point detection problem, we are given distributions , a stream of data points . We are guaranteed that there exists such that and . The goal is to output such that is small.
We study the parameterization of the private change-point detection problem recently introduced by Cummings et al. [CKM+18].
An algorithm for a (online) change-point detection problem is -accurate if for any input dataset (data stream), with probability at least outputs a such that , where the probability is with respect to the randomness in the sampling of the data set and the random choices made by the algorithm.
There exists an efficient -differentially private and -accurate algorithm for offline change-point detection from distribution to with
Furthermore, there exists an efficient -differentially private and -accurate algorithm for online change-point detection from distribution to with the same value of . This latter algorithm also requires as input a value such that . If the algorithm is accurate, it will observe at most data points, and with high probability observe data points.
As one might guess, this problem is intimately related to the hypothesis testing question studied in the rest of this paper. Indeed, our change-point detection algorithm will use the hypothesis testing algorithm of Theorem 1.2 as a black box, in order to reduce to a simpler Bernoulli change-point detection problem (see Lemma 4.4 in Section 4.1). We then give an algorithm to solve this simpler problem (Lemma 4.5 in Section 4.2), completing the proof of Theorem 4.3. In Section 4.3, we show that our reduction is applicable more generally, as we describe an algorithm change-point detection in a goodness-of-fit setting.
In this section, we provide a reduction from private change-point detection with arbitrary distributions to non-private change-point detection with Bernoulli distributions.
Then there exists an -differentially private and -accurate algorithm which solves the change-point detection problem, where is as defined in Theorem 1.2.
We describe the reduction for the offline version of the problem, the reduction in the online setting is identical. The reduction is easy to describe. We partition the sample indices into intervals of length . More precisely, let , for to , and disregard the remaining “tail” of ’s. We run the algorithm of Theorem 1.2 on each , and produce a bit if the algorithm outputs that the distribution is , and a otherwise.
Finally, we show that the existence of an -accurate algorithm that solves this problem also solves the original problem. Suppose that the output of the algorithm on the restricted change-point detection problem is . To map this to an answer to the original problem, we let .
First, note that will be -differentially private. We claim that the sequence of ’s is -differentially private. This is because the algorithm of Theorem 1.2 is -differentially private, we apply the algorithm independently to each component of the partition, and each data point can only affect one component (since they are disjoint). Privacy of follows since privacy is closed under post-processing.
2 Solving Bernoulli Change-Point Detection
In this section, we show that there is a -accurate algorithm for the restricted change-point detection problem. Combined with Lemma 4.4, this implies Theorem 4.3.
There exists an efficient -accurate algorithm for the offline restricted change-point detection problem (as defined in Lemma 4.4).
Similarly, there exists an efficient -accurate algorithm for the online restricted change-point detection problem. This algorithm requires as input a value such that . If the algorithm is accurate, it will observe at most data points, and with high probability observe data points.
We start by describing the algorithm for the offline version of the problem. We then discuss how to reduce from the online problem to the offline problem.
Let be some absolute constant. With probability at least , for all simultaneously,
This implies that, with probability at least , we have that for all
Note that the right-hand side is non-increasing in , so it is maximized at , and thus
where the last inequality follows for a sufficiently large choice of .
The algorithm will be as follows. Partition the stream into consecutive intervals of length , which we will draw in batches. If an interval has more ’s than ’s, then call the offline change-point detection algorithm on the final data points with failure probability parameter set to , and output whatever it says.
Let be the true change-point index. First, we show that with probability , the algorithm will not see more ’s than ’s in any interval before the one containing . The number of ’s in this interval will be distributed as for . By a Chernoff bound, the probability that we have ’s is at most . Taking a union bound over all intervals before the change point gives a failure probability of , where the last inequality follows by our condition on .
Next, note that the interval following the one containing will have a number of ’s which is distributed as for . By a similar Chernoff bound as before, the probability that we have ’s is at most . Therefore, with probability , the algorithm will call the offline change-point detection algorithm on an interval containing the true change point .
We conclude by the correctness guarantees of the offline change-point detection algorithm. Note that we chose the failure probablity parameter to be , as the offline algorithm may either be called at the interval containing , or the following one, and we take a union bound over both of them. ∎
3 Private Goodness-of-Fit Change-Point Detection
Our reduction as given above is rather general: and it can apply to more general change-point detection settings than those described above. For instance, the above discussion assumes we know both the initial and final distributions and . Instead, one could imagine a setting where one knows the initial distribution but not the final distribution , which we term goodness-of-fit change-point detection.
We note that analogous definitions and results hold for the online version of this problem, as in the previous sections.
We omit the full details of the proof, but it proceeds by a very similar argument to that in Sections 4.1 and 4.2. In particular, it is possible to prove an analogue of Lemma 4.4, at which point we can apply Lemma 4.5. The only difference is that we need an algorithm for private goodness-of-fit testing, rather than Theorem 1.2 for hypothesis testing. We use the following result from [ASZ18].
With this in hand, we have the following result for goodness-of-fit changepoint detection.
There exists an efficient -differentially private and -accurate algorithm for offline -goodness-of-fit change-point detection with
Acknowledgments
We are grateful to Salil Vadhan for valuable discussions in the early stages of this work.
References
Appendix A Glossary of Tests
In this section, we list all the tests mentioned in this paper. As some mnemonics, the prefix “s” indicates that a test is “soft,” meaning that the test’s output is distributed as Bernoulli random variable with parameter proportional to some test statistic. The prefix “n” means that a statistic is “noisy,” which we enforce by adding Laplace noise. The prefix “c” means that a statistic is “clamped”: to limit the sensitivity of the statistic, we clamp the value of each summand to a fixed range, so that terms can not be unboundedly large.
The is the log-likelihood ratio statistic:
The is the soft log-likelihood ratio test:
The is the clamped log-likelihood ratio statistic:
The is the soft clamped log-likelihood ratio test:
The is the noisy log-likelihood ratio test, which is also -differentially private:
Let and be two arbitrary distributions and let be as defined in (4). Assume without loss of generality that . Then there exists such that .
Appendix C Proof of Theorem 1.2 when P𝑃P and Q𝑄Q have disjoint support.
If and have disjoint support then and are asymptotically optimal among all -DP tests and have sample complexity .
For the lower bound, consider the coupling of and that takes a sample and simply resamples it from . Since and have disjoint support, . Thus, by Lemma 3.2, we have that is a necessary condition. ∎
Appendix D Proof of Lemma 2.6
Appendix E The Advantage of scLLRscLLR\operatorname{scLLR}
In this section, we show that the Soft Clamped Log-Likelihood Ratio test () achieves advantage related to the quantities and transformed distributions introduced earlier. Recall the definition
so the term 1 is only non-zero if , where it takes the value
so term 2 is only non-zero if , where it takes the value
We can therefore simplify the expression in (8) to obtain:
Appendix F Proof of Lemma 3.3
The proof of Lemma 3.3 relies on the following dual formulation of Wasserstein distance:
is -Lipschitz with respect to , and
.
The second claim is immediate from the definition of . To see that is -DP, note that any function that is -Lipschitz with respect to is -Lipschitz with respect to . For any pair of neighbours and , we have