<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Better Private Distribution Testing by Leveraging Unverified Auxiliary Data</title></titleStmt>
			<publicationStmt>
				<publisher>38th Annual Conference on Learning Theory (COLT 2025)</publisher>
				<date>06/30/2025</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10631024</idno>
					<idno type="doi"></idno>
					
					<author>Maryam Aliakbarpour</author><author>Arnav Burudgunte</author><author>Clement Canonne</author><author>Ronitt Rubinfeld</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[We extend the framework of augmented distribution testing (Aliakbarpour, Indyk, Rubinfeld, andSilwal, NeurIPS 2024) to the differentially private setting. This captures scenarios where a data ana-lyst must perform hypothesis testing tasks on sensitive data, but is able to leverage prior knowledge(public, but possibly erroneous or untrusted) about the data distribution.We design private algorithms in this augmented setting for three flagship distribution testingtasks, uniformity, identity, and closeness testing, whose sample complexity smoothly scales withthe claimed quality of the auxiliary information. We complement our algorithms with information-theoretic lower bounds, showing that their sample complexity is optimal (up to logarithmic factors).Keywords: distribution testing, identity testing, closeness testing, differential privacy, learning-augmented algorithms]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>Accurately analyzing data while preserving individual privacy is a fundamental challenge in statistical inference. Since its formulation nearly two decades ago, Differential Privacy (DP) <ref type="bibr">(Dwork et al., 2006)</ref> has emerged as the leading framework for privacy-preserving data analysis, providing strong mathematical privacy guarantees and gaining adoption by major entities such as the U.S. Census Bureau, Amazon <ref type="bibr">(Amazon Web Services, 2024)</ref>, Google <ref type="bibr">(Erlingsson et al., 2014)</ref>, <ref type="bibr">Microsoft (Ding et al., 2017)</ref>, and Apple <ref type="bibr">(Differential Privacy Team, Apple, 2017;</ref><ref type="bibr">Thakurta et al., 2017)</ref>.</p><p>Unfortunately, DP guarantees often come at the cost of increased data requirements or computational resources, which has limited the widespread adoption of differential privacy in spite of its theoretical appeal. To address this issue, a recent line of work has investigated whether access to even small amounts of additional public data could help mitigate this loss of performance. Promising results for various tasks have been shown, both experimentally <ref type="bibr">(Kerrigan et al., 2020;</ref><ref type="bibr">Lowy et al., 2024;</ref><ref type="bibr">Bu et al., 2024;</ref><ref type="bibr">Daum et al., 2024)</ref> and theoretically <ref type="bibr">(Bie et al., 2022;</ref><ref type="bibr">Ben-David et al., 2023)</ref>. The use of additional auxiliary information is very enticing, as such access is available in many real-world applications: for example, hospitals handling sensitive patient data might leverage public datasets, records from different periods or locations, or synthetic data generated by machine learning models to improve analysis. Similarly, medical or socio-econonomic studies focusing on a minority or protected group can leverage statistical data from the overall population.</p><p>However, integrating public data introduces its own challenges, as it often lacks guarantees regarding its accuracy or relevance to private datasets. If the external data distribution deviates significantly from the target population, then it becomes at best useless for the task at hand, and at worst misleading; yet assessing its reliability prior to using it can be as complex as the original inference task. This leads to the following question, which is the focus of our work:</p><p>How can we design private algorithms which optimally utilize auxiliary information in a way that seamlessly adapts to its (unknown, arbitrary) quality?</p><p>We formalize the question by extending the recently proposed framework of "augmented testing" <ref type="bibr">(Aliakbarpour et al., 2024)</ref> to the differentially private setting (see Section 2 for formal definitions). In our new framework, the testing algorithm is provided with the auxiliary information as an "advice" probability distribution p, purported to be a good approximation of the unknown data distribution p, along with a claimed accuracy &#945; of this approximation. The algorithm must correctly solve the inference task when the advice is indeed &#945;-accurate, but it is allowed to abort and return a "failure" symbol when it detects that the advice does not meet the claimed accuracy &#945;. The name of the game is to achieve better data utilization as a function of this new accuracy parameter &#945; by leveraging the advice when it is good, yet not being fooled by it when it is bad enough to derail the algorithm.</p><p>Our new model must take into account the privacy constraints of the samples. While there is no need to consider the privacy of sample data p that is already public, we must ensure that any other sample data remains private, even if our algorithm decides to abort due to bad advice.</p><p>Finally, for the purpose of this paper, we primarily focus on distribution testing (which can be viewed as a finite-sample, computational take on hypothesis testing), the cornerstone of many scientific endeavors. However, we believe that differentially private inference using (unverified) auxiliary public data is a promising avenue for work beyond the specific tasks we consider here.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1.">Related work</head><p>Distribution testing has been extensively studied since its first formulation in <ref type="bibr">Goldreich et al. (1998)</ref>; <ref type="bibr">Batu et al. (2000)</ref>; we only refer below to the papers most relevant to us, and refer the reader to the expositions, textbooks, and surveys <ref type="bibr">(Rubinfeld, 2012;</ref><ref type="bibr">Goldreich, 2017;</ref><ref type="bibr">Canonne, 2020</ref><ref type="bibr">Canonne, , 2022) )</ref> for a more extensive coverage. Uniformity testing, that is, the task of deciding if an unknown distribution over a given domain of size n is uniform, or at distance at least &#949; from it (in total variation), was shown to have sample complexity &#920;( &#8730; n/&#949; 2 ) in <ref type="bibr">Goldreich and</ref><ref type="bibr">Ron (2000, 2011)</ref>; <ref type="bibr">Paninski (2008)</ref>; <ref type="bibr">Acharya et al. (2015)</ref>; <ref type="bibr">Diakonikolas et al. (2018)</ref>. It was shown to be equivalent to the more general task of identity testing, where the reference distribution is allowed to be arbitrary (instead of uniform) in <ref type="bibr">Diakonikolas (2016)</ref>; <ref type="bibr">Goldreich (2020)</ref>. The sample complexity of closeness testing, where the algorithm has access to samples from two unknown distributions and must decide whether they are equal or at total variation distance at least &#949;, was settled in a series of works <ref type="bibr">(Batu et al., 2000;</ref><ref type="bibr">Valiant, 2011;</ref><ref type="bibr">Chan et al., 2014;</ref><ref type="bibr">Diakonikolas et al., 2021;</ref><ref type="bibr">Canonne and Sun, 2022)</ref>, culminating in the tight sample complexity &#920;( &#8730; n/&#949; 2 + n 2/3 /&#949; 4/3 ). Beyond this standard distribution testing setting, the work closest to ours is the recent paper of <ref type="bibr">Aliakbarpour et al. (2024)</ref>, which introduced the (non-private) framework of augmented testing for distributions. While there has been before a large body of work on learning-augmented algorithms (and previously, on algorithms with advice) (e.g., <ref type="bibr">Hsu et al. (2019)</ref>; <ref type="bibr">Indyk et al. (2019)</ref>; <ref type="bibr">Jiang et al. (2020)</ref>; <ref type="bibr">Aamand et al. (2023)</ref>; <ref type="bibr">Bhattacharyya et al. (2024)</ref>), the specific formulation whereby the algorithm is provided with advice in the form of a hypothesis probability distribution, and is allowed to abort if it detects this advice is incorrect, is crucial to obtaining non-vacuous formulations of the problem. While <ref type="bibr">Aliakbarpour et al. (2024)</ref> do address identity (and uniformity) as well as closeness testing of distributions in their augmented testing framework, they only consider the non-private versions of these tasks: introducing the constraint of differential privacy on the data (but not on the advice itself, considered public) is the main novelty of our work, and comes with a host of technical and conceptual challenges to overcome. We refer the reader to the website <ref type="url">https://algorithms-with-predictions.github.io/</ref>, for more on learningaugmented algorithms.</p><p>On the privacy-preserving side, there is a large literature on DP distribution testing, where the samples provided to the algorithm are considered sensitive and the algorithm must satisfy the constraint of (central) DP, notably <ref type="bibr">Cai et al. (2017)</ref>; <ref type="bibr">Acharya et al. (2018)</ref>; <ref type="bibr">Aliakbarpour et al. (2018</ref><ref type="bibr">Aliakbarpour et al. ( , 2019))</ref>. The tight private sample complexity of uniformity, identity,<ref type="foot">foot_1</ref> and closeness testing under &#958;-DP are now known to be &#920;( &#8730; n/&#949; 2 + &#8730; n/(&#949; &#8730; &#958;) + n 1/3 /(&#949; 4/3 &#958; 2/3 ) + 1/(&#949;&#958;)) and &#920;( &#8730; n/&#949; 2 + n 2/3 /&#949; 4/3 + &#8730; n/(&#949; &#8730; &#958;) + n 1/3 /(&#949; 4/3 &#958; 2/3 ) + 1/(&#949;&#958;)), respectively <ref type="bibr">(Zhang, 2021)</ref>. As mentioned earlier, a recent line of work has investigated the use of additional public data for DP inference questions, and in particular for distribution learning questions <ref type="bibr">(Bie et al., 2022;</ref><ref type="bibr">Ben-David et al., 2023)</ref>. We emphasize that while these results can accommodate a (small) amount of distribution shift between the private and public data distributions, they assume that the publicly available data is accurate (comes from the same distribution as, or one very close to, the the sensitive data). This is a crucial limiting assumption, and one our paper does not make: in our setting, we do not have to trust the quality of the auxiliary data. Our framework for distribution testing bears some resemblance to the framework of <ref type="bibr">Khodak et al. (2023)</ref> for learning-augmented private quantile estimation, in which the algorithm must be correct (and efficient) even if the prediction is poor.</p><p>Another important difference is in the parameter regime: <ref type="bibr">(Bie et al., 2022;</ref><ref type="bibr">Ben-David et al., 2023</ref>) consider the setting where the quantity of public data is small compared to the amount of public data: that is, they investigate whether the algorithm can benefit from a few "useful" public data points, in order to perform its analysis on a much larger sensitive dataset. In contrast, we focus on the setting where the public data abounds (so that even using it to get a full probability distribution p as advice is possible), but the private data is much scarcer.</p><p>The broader concept of learning from both public and private data has had some success beyond distribution learning. On the experimental side, prior work has pre-trained models on public data and then used private data for finetuning <ref type="bibr">(Li et al., 2022;</ref><ref type="bibr">Bu et al., 2024)</ref>. On the theoretical side, there has been work on using public data to improve the efficiency of learning algorithms <ref type="bibr">(Block et al., 2024)</ref> and statistical upper and lower bounds for learning when only some of the data is private <ref type="bibr">(Alon et al., 2019)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.2.">Our results</head><p>Our main results are sample-efficient private algorithms for identity and closeness testing in the augmented setting, complemented by (nearly)-matching information-theoretic lower bounds.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Theorem 1 (Informal version of Theorem 16 and Theorem 19)</head><p>There is an algorithm for private augmented identity testing of distributions over [n] which, given a reference distribution q, privacy parameter &#958; &gt; 0, distance parameter &#949; &#8712; (0, 1], purported accuracy &#945; &#8712; (0, 1], as well as advice distribution p, takes</p><p>samples when the distance &#951; := d TV (p, q) satisfies &#951; &#8804; &#945;, and</p><p>Observe that in the "interesting regime" -i.e., when the advice suggests to the algorithm that it should reject, as the claimed distance between p and the unknown distribution p is strictly smaller than the distance between p and the reference distribution q -and, in particular, for vanishing &#945;, the resulting sample complexity can become as small as &#920;(1/&#951; 2 + 1/(&#951;&#958;)), leading to stark savings in the amount of private data required to conduct the task.</p><p>Note that the above theorem also applies to uniformity testing in a straightforward manner. In particular, by setting q as the uniform distribution, our identity testing algorithm immediately applies to uniformity testing, and our lower bound-proven under the assumption of uniform q-establishes the complete equivalence of these two problems. Our results for the task of closeness testing are summarized in the next theorem:</p><p>Theorem 2 (Informal version of Theorem 6 and Theorem 38) There is an algorithm for private augmented closeness testing of distributions over [n] which, given privacy parameter &#958; &gt; 0, distance parameter &#949; &#8712; (0, 1], purported accuracy &#945; &#8712; (0, 1], as well as advice distribution p for one of the two distributions, takes</p><p>samples. Moreover, this is optimal up to logarithmic factors in n.</p><p>Again, observe that the advice influences the first term of the sample complexity. As the claimed advice quality &#945; goes to 0 (and ignoring logarithmic factors), our results show that, surprisingly, the task becomes essentially as simple as differentially private identity testing.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.3.">Overview of our technical contributions</head><p>Upper bounds. A popular technique for testing closeness of distributions p and q in total variation (or &#8467; 1 ) distance is to first test &#8467; 2 distance and translate the result into an &#8467; 1 guarantee. <ref type="bibr">Chan et al. (2014)</ref> use this technique to give an algorithm whose sample complexity is proportional to the minimum of the &#8467; 2 norms of p and q. On a domain of size n, the &#8467; 2 norm of a distribution can vary between 1/ &#8730; n and 1, leading to a large difference between the best and worst case costs of testing. The flattening technique, introduced in <ref type="bibr">Diakonikolas and Kane (2016)</ref>, aims to shrink this gap by reducing every instance of closeness testing to the aforementioned best case. The technique maps a distribution p to a "flattened distribution" p &#8242; with a low &#8467; 2 -norm. It accomplishes this by breaking any high-probability element into multiple new domain elements (buckets) and assigning its probability mass equally among them. The key problem is to determine the number of buckets required for each element i, which can vary depending on the problem's structure.</p><p>The original approach proposed in Diakonikolas and Kane ( <ref type="formula">2016</ref>) is as follows. Suppose we have k samples from an unknown distribution p, referred to as flattening samples. Let k i denote the frequency of element i among these samples. For each element i, we assign k i + 1 buckets. Elements which appear more frequently (i.e., the large elements) are split into more buckets, reducing their individual probability mass. More formally, one can show that the resulting distribution p &#8242; has an &#8467; 2 -norm of at most 1/ &#8730; k in expectation. (Note that we can simulate a sample from p &#8242; by drawing a fresh sample i from p and assigning it to a random bucket in</p><p>Why is this result significant for closeness testing (or related problems)? One can show that if the same flattening is applied to two distributions, their &#8467; 1 -distance remains unchanged. Thus, testing the closeness of p and q reduces to testing the closeness of their flattened versions p &#8242; and q &#8242; . Since the flattened distributions have a reduced &#8467; 2 -norm, we can leverage the &#8467; 2 -tester from <ref type="bibr">Chan et al. (2014)</ref>, whose sample complexity is proportional to the &#8467; 2 -norm of p, thereby achieving more sample-efficient testing. This technique is particularly appealing because it allows us to exploit problem-specific structure to design an effective flattening scheme. For example, <ref type="bibr">Aliakbarpour et al. (2024)</ref> use a predicted distribution to guide the flattening: if the prediction assigns a higher probability to an element, more buckets are allocated to it, further reducing its &#8467; 2 -contribution. After flattening, they test whether the &#8467; 2 -norm of the new distribution p &#8242; is sufficiently small. If not, they conclude that the prediction quality was poor, and abort early. If the norm is small, the &#8467; 2 -tester from Chan et al. ( <ref type="formula">2014</ref>) can be used with significantly fewer samples, yielding an augmented closeness tester with an optimal dependence on the prediction quality. The prediction allows the algorithm to achieve a useful flattening with fewer samples, leading to significant savings over the optimal non-augmented algorithm.</p><p>To achieve our goals, a natural approach is thus to privatize the algorithm from <ref type="bibr">Aliakbarpour et al. (2024)</ref>. Unfortunately, the sample-based flattening step introduces privacy challenges, because flattening via samples is highly sensitive: changing a single sample can alter the number of buckets for two elements, drastically changing the structure of the resulting distribution. To ensure privacy, the outcomes of these very different cases must be made similar, typically by adding a large amount of noise. Consequently, statistics computed on the flattened distribution would require a large number of samples to be privatized, leading to suboptimal algorithms.</p><p>To circumvent this issue, we need to reduce the sensitivity of the flattening step. To do so, we leverage the framework of <ref type="bibr">Aliakbarpour et al. (2019)</ref>, which focuses on privatizing a flattening-based tester -exactly what we need for our approach to work! However, this is not as straightforward as it seems. Because the advice distribution p used as a guide in the flattening step may be wildly inaccurate, we must verify that the outcome of the flattening step is satisfactory; that is, that the &#8467; 2 norm of the flattened distribution is sufficiently small (as it should be, were the advice correct). To further complicate matters, this verification must be done privately.</p><p>Our solution is to apply flattening in two steps. First, we use the prediction p to flatten p into p &#8242; . Then we use samples drawn from p (more precisely, from p &#8242; ) to further flatten the distribution into p &#8242;&#8242; . If p is &#945;-close to the true distribution, we expect that the &#8467; 2 -norm of p &#8242;&#8242; is roughly less than &#945;/k. We separate the two flattening steps due to our privacy requirements; since the prediction is public information, there is no privacy concern in the first step, which in turn simplifies the analysis of the second step.</p><p>The standard statistic for computing the &#8467; 2 -norm is the number of collisions in a sample set (i.e., the number of pairs of equal samples) <ref type="bibr">(Goldreich and Ron, 2011)</ref>. This statistic is highly sensitive to changes in one sample. For example, consider estimating the &#8467; 2 -norm using &#8467; samples. Suppose element i appears &#8467;/2 times. If we assign one bucket to i, the number of collisions is &#8467;/2 2 . However, if we assign two buckets to i, we expect each bucket to receive roughly &#8467;/4 samples, so the total number of collisions is 2 &#8467;/4</p><p>2 . This change reduces the number of collisions by roughly &#8467; 2 /16, whereas ideally we would like this number to be a constant.</p><p>Thankfully, this worst-case only occurs in highly atypical scenarios. In general, if we draw k samples for flattening, we expect about kp i buckets for element i. Then if we draw &#8467; samples for estimation, we expect approximately &#8467;p i samples from i. Distributing these equally among the buckets yields roughly &#8467;/k samples per bucket. Assuming k = &#8467;, a typical dataset should have a constant number of samples per bucket. Consequently, altering either a flattening sample or an estimation sample would change the overall number of collisions by at most a constant factor. Hence, the sensitivity of the statistic should be low for a "typical" dataset.</p><p>The challenge is thus to pay only a privacy cost proportional to the sensitivity of a typical dataset, rather than the worst-case dataset. To this end, we identify the "bad events" that cause our dataset to have high sensitivity, which correspond to having a high unbalance between samples either within buckets, or between flattening and estimation sets. That is, we must ensure that the following holds for every element i &#8712; [n]:</p><p>1. When the samples of element i are distributed among buckets, no bucket receives an unreasonably high number of samples.</p><p>2. The number of instances of i in the estimation sample set is not much larger than the number of instances of i in the flattening sample set.</p><p>To address the first issue, we mitigate the randomness inherent in distributing samples among buckets. The original statistic sums the collisions across buckets, where if &#8467; i,j denotes the number of samples in the j-th bucket of element i, the contribution is &#8467; i,j 2 . We replace this quantity with its expectation under the assumption of a uniform distribution of samples among buckets.</p><p>The second issue is more complex. We need to ensure that the number of instances of element i is approximately the same in both the flattening and estimation sample sets. To achieve this, we employ a technique from <ref type="bibr">Aliakbarpour et al. (2019)</ref>. Roughly speaking, each high-sensitivity sample set X is randomly mapped to another sample set X &#8242; such that any imbalance in the number of samples for an element is corrected. The mapping has the key property of preserving the Hamming distance between datasets. More precisely, if two datasets X 1 and X 2 (differing in one element) are mapped to low-sensitivity datasets Y 1 and Y 2 , then there exists a coupling between Y 1 and Y 2 such that their Hamming distance is bounded by a constant. This property ensures that applying a private algorithm to the Y 's (with low sensitivity) yields privacy guarantees for the original X's.</p><p>In our context, we ensure that the transformed dataset has a balanced number of instances for each element across both the estimation and flattening sets. We then run our private algorithm on this new sample set. If the original sample set already had low sensitivity, it remains unchanged, and we obtain the correct answer with high probability. If the dataset had high sensitivity, it is transformed to ensure privacy; although this may render the statistical result unreliable, such high-sensitivity datasets occur with low probability. 2  With these technical components, we obtain a low-sensitivity statistic for the &#8467; 2 -norm and apply the Laplace mechanism to ensure privacy. Plugging this into the above outline yields our main algorithmic result. A complete proof is given in Appendix C, with a short version is presented in Section 3.</p><p>The upper bound for identity and uniformity testing can be obtained via simple prioritization of the upper bound in <ref type="bibr">Aliakbarpour et al. (2024)</ref> and the existing private algorithm for identity testing <ref type="bibr">Acharya et al. (2018)</ref>.</p><p>Lower bounds. For the lower bounds, the difficulties are reversed. The lower bound for private augmented closeness testing is derived by combining two existing lower bounds; further details are provided in Appendix D.</p><p>For uniformity testing, and consequently for identity testing, to show a lower bound, we must combine the statistical inference and privacy constraints on a private augmented tester. When p and q are closer than the suggested accuracy &#945;, we show that private identity testing reduces to augmented private identity testing using a similar reduction to <ref type="bibr">Aliakbarpour et al. (2024)</ref>. In this case, known lower bounds <ref type="bibr">(Zhang, 2021)</ref> automatically apply to our setting.</p><p>However, if p and q are more than &#945;-far apart, we must combine several tools for proving information-theoretic lower bounds. In the non-augmented setting, a lower bound can be shown using a version of Le Cam's method for differential privacy <ref type="bibr">(Acharya et al., 2018)</ref>. Informally, the idea is to construct a coupling between two distributions (one close to the uniform distribution, one far) whose expected Hamming distance is low given too few samples. Since no answer will succeed for both, and no private algorithm can answer too differently on the two sets of samples, no algorithm can succeed with high probability. In our case, there are three possible answers, which requires us to construct three distributions such that no single answer works for all three. It also does not suffice to directly follow the approach of <ref type="bibr">Aliakbarpour et al. (2024)</ref> and construct a multivariate coupling between the three distributions such that all three are close in Hamming distance. This would prove the privacy terms of our lower bound, but would not give the correct combination of statistical and privacy terms.</p><p>To avoid this problem, we use a general version of Le Cam's method under privacy and statistical constraints. Informally, our result states that if any algorithm requires s 1 samples to statistically distinguish two distributions with high probability and s 2 samples to guarantee that they are far in Hamming distance, it requires max(s 1 , s 2 ) samples to distinguish them privately. We then construct a hard distribution which is &#949;-far from the uniform distribution, and a hard distribution which is &#945;-close to the prediction p. Any private augmented uniformity tester cannot answer similarly for all three distributions, so it must distinguish the uniform distribution from at least one of the hard distributions. Therefore, the sample complexity must satisfy at least one of the constraints imposed by our version of Le Cam's method. This explains why the optimal sample complexity is the minimum of two expressions, which matches our upper bound. For more details, see Appendix B.</p><p>2. For readers familiar with differential privacy, note that our approach differs from the well-known "Propose-Test-Release" mechanism, where noise is added proportional to the typical sensitivity (see Section 3 in Vadhan ( <ref type="formula">2017</ref>)). In that mechanism, the probability of a high-sensitivity (bad) event is absorbed into an approximate DP guarantee via an additive error &#948;. However, our approach is more suitable for pure DP: our privacy guarantee remains intact, and the bad event only introduces a small probability of error in accuracy.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Preliminaries and Problem Setup</head><p>We use <ref type="bibr">[n]</ref> to indicate the set of integers {1, 2, . . . , n}, and standard asymptotic notation (O(&#8226;), &#8486;(&#8226;), &#920;(&#8226;)) as well as the (slightly) less standard &#213;(&#8226;), which omits polylogarithmic factors in its argument. In this paper, we focus on discrete probability distributions with a finite domain, which we identity with their probability mass functions (pmf). Let p denote a probability distribution over [n]: for any i &#8712; [n], we denote by p i the probability of the element i according to p. For a subset S &#8834; [n], p(S) then denotes the probability of observing an element in S according to p: p(S) = i&#8712;S p i . The distribution of s i.i.d. samples from p is written as p &#8855;s . If we know the probability p i of each element, we say p is a known distribution. We also use the following standard probability distributions: Poi(&#955;) denotes a Poisson distribution with mean &#955;; Bern(x) denotes a Bernoulli distribution with success probability x; and Lap(b) denotes a Laplace distribution with scale b.</p><p>The total variation distance between p and q is defined as the maximum possible difference in probabilities assigned to any event (subset of outcomes):</p><p>where for the last expression we identify the pmf of p, q with their vector of probabilities. For two distributions p and q, and any &#949; &#8712; [0, 1], we say p is &#949;-close to q iff d TV (p, q) is at most &#949;. We say p and q are &#949;-far from each other iff d TV (p, q) is greater than &#949;. A property P is a set of distributions.</p><p>We say a distribution p has property P if p &#8712; P, and p is &#949;-far from property P if d TV (p, q) &gt; &#949; for all q &#8712; P.</p><p>Problem setup: The standard distribution testing problem is to decide, given samples from an unknown distribution p, whether p has a property P or whether p is &#949;-far from property P. In our case, the tester receives three additional inputs: a privacy parameter &#958;, which it must respect, a predicted distribution (or "advice") p, and a suggested accuracy value &#945;. If p is &#945;-close to p, the tester must either output accept or reject with high probability; otherwise, it may output &#8869;, which denotes inaccurate information.</p><p>Definition 3 (Augmented private tester) Suppose we are given three parameters &#949;, &#945; &#8712; (0, 1), and &#958; &gt; 0, along with distributions p and p over the same domain. Suppose A receives samples from p and returns a value in {accept, reject, &#8869;}. We say algorithm A is a (&#958;, &#949;, &#945;, &#948;)-private augmented tester for property P iff the following holds:</p><p>&#8226; A is a &#958;-differentially private algorithm.</p><p>&#8226; If p &#8712; P, A does not output reject with probability more than &#948;.</p><p>&#8226; If p is &#949;-far from P, A does not output accept with probability more than &#948;.</p><p>&#8226; If p and p are &#945;-close, A does not output &#8869; with probability more than &#948;.</p><p>Remark 4 (On knowing the parameter &#945;) While it may seem difficult to suggest an accuracy level &#945; for an unverified prediction, this is not an actual limitation, as one can avoid this in practice using the search algorithm of <ref type="bibr">Aliakbarpour et al. (2024)</ref>. The algorithm iteratively increases &#945; until the tester either returns accept or reject. If the true accuracy is &#945; * and the tester uses f (&#945;) samples for a single run with input &#945;, the search algorithm uses O(f (&#945; * )) total samples in expectation.</p><p>While we do not provide the full proof here, careful analysis shows that a private version of this claim can be established under certain constraints. The main challenge is determining the stopping point at which the tester privately returns either accept or reject. This can be accomplished using the well-known Sparse Vector Technique, which does not increase the privacy cost by more than a constant factor, provided that the stopping point can be replaced with a threshold query to a low-sensitivity function. Notably, this condition holds for all the algorithms in this paper.</p><p>We will refer to a non-private augmented tester as a (&#949;, &#945;, &#948;)-augmented tester. We will refer to a non-augmented private tester as a (&#958;, &#945;, &#948;)-private tester. Finally, a (&#949;, &#948;)-tester is simply a standard, non-private, non-augmented tester.</p><p>We focus on two common variants of the distribution testing problem in which P contains a single distribution q, and the problem is to distinguish between the cases p = q and d TV (p, q) &gt; &#949;.</p><p>In the case of identity testing, q is a known distribution. In the case of closeness testing, q is unknown, and the algorithm receives samples from both p and q. Differential privacy: For two datasets X and X &#8242; , we write the Hamming distance of X and X &#8242;the number of samples in which the two datasets differ -as Ham(X, X &#8242; ). We consider an algorithm to be private if it satisfies the following definition.</p><p>Definition 5 (Differential privacy) Fix parameter &#958; &gt; 0. Let X, X &#8242; &#8712; X be two datasets with Ham(X, X &#8242; ) = 1; that is, X and X &#8242; differ in exactly one sample. A randomized algorithm A : X &#8594; {accept, reject, &#8869;} is &#958;-differentially private if for all such X and X &#8242; and any</p><p>Our algorithms use the Laplace mechanism <ref type="bibr">(Dwork and Roth, 2014)</ref>, which works as follows. Let X be the set of all datasets and f : X &#8594; R be a real-valued function. Define the sensitivity of f , denoted</p><p>In this paper, we focus on pure differential privacy in the central setting, and implicitly focus on the "high-privacy regime" (range &#958; &#8712; (0, 1]). We leave other variants (e.g., local DP or approximate DP) as open problems.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Organization of the paper:</head><p>A detailed yet succinct description of the upper bound for private augmented closeness testing is presented in Section 3 of the main paper. Due to space constraints, some proofs have been omitted here; a complete version is available in Appendix C. The lower bound for private augmented closeness testing is given in Appendix D. Additionally, the upper bound for identity testing (and, equivalently, uniformity testing) is presented in Appendix A, while the lower bound for uniformity testing (and hence identity testing) appears in Appendix B.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Upper bound for Private Augmented Closeness Testing</head><p>We establish the algorithmic part of Theorem 2, restated below: Theorem 6 Let &#949;, &#945; &#8712; (0, 1] and &#958; &gt; 0. Let p and q both be unknown distributions over <ref type="bibr">[n]</ref>. Then Algorithm 1 is a &#958;-DP augmented (&#949;, &#945;, 0.32)-closeness tester which takes s samples each from p and q, where</p><p>(1)</p><p>Algorithm 1: PRIVATE-AUGMENTED-CLOSENESS-TESTER</p><p>Run the tester of Lemma 29 and return its answer</p><p>where k, &#8467; are determined as described in the proof of Theorem 6 if kp + kq &gt; 200k or l &gt; 100&#8467; then return reject p &#8242; , q &#8242; &#8592; Flatten p and q according to Eq. ( <ref type="formula">24</ref>) p &#8242;&#8242; , q &#8242;&#8242; &#8592; Flatten p &#8242; and q &#8242; according to Eq. ( <ref type="formula">25</ref>) using kp samples from p and kq from q L &#8592; compute the statistic in Eq. ( <ref type="formula">38</ref>) using l samples</p><p>Run the tester of Lemma 25 and return its answer</p><p>Roadmap. We describe our flattening procedure in Section 3.2, drawing on the flattening procedures of <ref type="bibr">Aliakbarpour et al. (2024)</ref> and <ref type="bibr">Aliakbarpour et al. (2019)</ref> which we review in Appendix C.1; and analyze our algorithm in Section 3.3. Finally, in Section 3.4, we show how to privately estimate the &#8467; 2 norm to verify our flattening procedure. Due to space constraints, all proofs and details are deferred to Appendix C.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">Overview of Flattening</head><p>Flattening is motivated by a result of <ref type="bibr">Chan et al. (2014)</ref>, in which the authors give a closeness tester for distributions p and q whose sample complexity is O(bn/&#949; 2 ), where b = min(&#8741;p&#8741; 2 , &#8741;q&#8741; 2 ). The flattening technique described by <ref type="bibr">Diakonikolas and Kane (2016)</ref> works as follows: draw a multiset F of Poi(k) samples from p. Let k i denote the number of elements in F equal to i. The new distribution p &#8242; will be supported on domain</p><p>To draw a sample from p &#8242; , draw i from p and choose j uniformly at random from the set [k i ]. This effectively divides the probability mass of each element i evenly into k i buckets. <ref type="bibr">Diakonikolas and Kane (2016)</ref> show that the expected &#8467; 2 norm of p &#8242; is low:</p><p>In the rest of this section, we describe two variations on the original technique which will be useful in constructing our augmented private tester.</p><p>Private Flattening: The private tester of <ref type="bibr">Aliakbarpour et al. (2019)</ref> attempts to derandomize the original flattening of <ref type="bibr">Diakonikolas and Kane (2016)</ref>. When a flattening-based tester divides its samples into flattening and test sets, it introduces randomness based on the permutation &#960; used to partition the samples. This results in high sensitivity of the test statistic Z (we treat the statistic itself as a black box, analyzing its sensitivity using results from <ref type="bibr">Aliakbarpour et al. (2019)</ref>). The private tester reduces the sensitivity by taking the expectation of Z over every permutation &#960; of the data and the randomness r of the flattening procedure:</p><p>The authors show that Z has low sensitivity and preserves the correctness of any flattening procedure which satisfies certain properties. In Appendix C.1, we give a formal definition of these properties and establish that the flattening of Diakonikolas (2016) satisfies these properties, allowing it to be made private.</p><p>Augmented Flattening: In the augmented setting of <ref type="bibr">Aliakbarpour et al. (2024)</ref>, the estimate p guides the choice of buckets for each element i. Let &#957; &#8712; (0, 1] be a flattening parameter. Rather than dividing elements into k i + 1 buckets, the flattener creates b i = pi &#957; + k i + 1 buckets in flattened distributions p &#8242; and q &#8242; . If p is &#945;-close to p, the expected &#8467; 2 2 norm after flattening is shown to be</p><p>The tester then draws O( &#8730; n) samples each from p &#8242; and q &#8242; to estimate their &#8467; 2 2 norm. If at least one distribution has been sufficiently flattened, the algorithm proceeds to the test phase. Otherwise, it returns &#8869;.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">Our Two-Step Flattening</head><p>To simplify the analysis of our augmented private closeness tester, we split the flattening into two steps. The first step flattens p and q into distributions p &#8242; and q &#8242; using only on the prediction p. The second step draws samples from p &#8242; and q &#8242; and uses these samples to flatten them into a third set of distributions p &#8242;&#8242; and q &#8242;&#8242; . This two-step flattening makes it much easier to guarantee that the procedure is private. Since the first step draws no samples, it can be performed without any modifications for privacy. Since the second step does not use p, it is precisely the same procedure as the flattening described in Lemma 24, and can be made private by the same mechanism. We show that if d TV (p, p) &#8804; &#945;, then &#8741;p &#8242;&#8242; &#8741; 2 2 is small in expectation, allowing us to test efficiently with fewer flattening samples than the optimal non-augmented tester.</p><p>Flattening procedure: Suppose we are given parameter k, which determines the expected number of flattening samples. The two-step flattening works as follows.</p><p>1. From the original distributions p and q, estimate p, and suggested accuracy &#945;, construct p &#8242; and q &#8242; by flattening each element i &#8712; [n] into b i buckets, where</p><p>(This is analogous to setting &#957; = 1/n in Equation <ref type="formula">22</ref>). Since p, p, and &#945; are not private, this can be done as a preprocessing step before running the private portion of the algorithm. After this step, p &#8242; is defined by having, for all i &#8712; [n] and j &#8712; [b i ], p &#8242; i,j = p i /b i . Sampling from p &#8242; can be done as follows: sample i &#8764; p and j &#8764; Unif([b i ]), and return (i, j). Sampling from q &#8242; is equivalent (note that both p and q use the same bucketing, so p &#8242; and q &#8242; have the same domain).</p><p>2. Sample kp , kq &#8764; Poi(k) independently. Draw a multiset F (p) of kp samples from p &#8242; and a multiset F (q) of kq samples from q &#8242; . Let F = F (p) &#8746; F (p) , and k i,j be the total number of instances of element (i, j) in F . Then divide each element of the domain of p &#8242; , q &#8242; into b i,j = k i,j + 1 buckets.</p><p>The domain of p &#8242;&#8242; and q &#8242;&#8242; is &#8486; = {(i, j, m)</p><p>for all (i, j, m) &#8712; &#8486;. To sample from p &#8242;&#8242; , we sample (i, j) &#8764; p &#8242; and m &#8764; Unif([b i,j ]), then return (i, j, m).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Effect of flattening:</head><p>We now show that the domain size after flattening remains &#920;(n + k) with high probability. After the second flattening step, the number of elements is n &#8242;&#8242; = |&#8486;| (itself a random variable), where</p><p>j=1 (k i,j + 1) &#8804; kp + kq + 3n . Note that kp + kq &#8764; Poi(2k), so kp + kq &#8804; 200k with probability at least 0.99 by Markov's inequality. Therefore, n &#8242;&#8242; = O(n + k) with probability at least 0.99. Next, we bound the expected &#8467; 2 2 norm of the flattened distribution, assuming the suggested accuracy level &#945; is valid:</p><p>Lemma 7 (see Lemma 28) Let p and p be distributions over [n] with d TV (p, p) &#8804; &#945;. Then the two-step flattening produces a distribution p &#8242;&#8242; with E F &#8741;p &#8242;&#8242; &#8741; 2 2 &#8804; 2&#945; k + 4 n .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3.">The Algorithm</head><p>At a high level, our algorithm works in three steps. The first step flattens p and q into distributions p &#8242;&#8242; and q &#8242;&#8242; as described above. The second step tests the &#8467; 2 2 norm of p &#8242;&#8242; . If the norm is not within a constant multiplicative factor of the bound guaranteed by Lemma 28, then we have d TV (p, p) &gt; &#945; with high probability, and the tester returns &#8869;. If the norm is close to the bound, our algorithm can perform an efficient closeness test. The final step runs the private closeness tester of <ref type="bibr">Aliakbarpour et al. (2019)</ref> and returns its result. We give pseudocode for our algorithm in Algorithm 1.</p><p>By our lower bound (Theorem 38), there are some regimes of parameters in which an augmented tester cannot use asymptotically fewer samples than a non-augmented private tester. In these cases, we simply invoke the optimal (private) non-augmented tester of <ref type="bibr">Zhang (2021)</ref>, whose sample complexity is given by Lemma 29. In all other regimes, we show that our tester is optimal up to log n factors. We are now ready to prove our upper bound. Proof [Proof Outline of Theorem 6] For the analysis, we will condition on two assumptions: 1. Poissonization did not cost too many samples: k = kp + kq &lt; 200k, l &lt; 100&#8467;, and &#349; &lt; 100s.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Ratios are roughly what they should be: for all</head><p>This holds with probability at least 0.95 by Lemma 37. If this assumption does not hold in our original dataset, we enforce it via the differentially private mapping of Lemma 35.</p><p>), we run the tester of Lemma 29, which is private by the same result. If &#949; = &#8486;(n -1/4 ) and &#949; 2 &#958; = &#8486;(n -1 ), the algorithm's outputs depend only on the statistic L, and the choice of kp , kq and l. The latter two do not depend on the sampled data. If assumption (2) is satisfied, then L is &#958;-DP by Lemma 12. Finally, the second flattening step is a equivalent to the non-augmented flattening procedure described by <ref type="bibr">Aliakbarpour et al. (2019)</ref>. Therefore, if the algorithm reaches Line 12, its output is private by Lemma 25.</p><p>), the algorithm returns a valid answer with probability at least 0.95 by Lemma 29. Thus, we can hereafter assume that &#949; = &#8486;(n -1/4 ) and &#949; 2 &#958; = &#8486;(n -1 ).</p><p>&#8226; First, we show that if d TV (p, p) &#8804; &#945;, the algorithm does not output &#8869; with high probability.</p><p>The only case in which the algorithm returns &#8869; is when L &gt; 30(2&#945;/k + 4/n). By Lemma 12, the estimate L is within a constant factor of &#8741;p &#8242;&#8242; &#8741; 2 2 with probability at least 0.94:</p><p>Combining Lemma 28 with Markov's inequality, with high probability &#8741;p &#8242;&#8242; &#8741; 2 2 &#8804; 20 2&#945; k + 4 n . Therefore, by union bound, we have that L is not more than 20 times the expected value of &#8741;p &#8242;&#8242; &#8741; 2 2 with probability at least 0.91, and the probability of returning &#8869; in this case is at most 0.09.</p><p>&#8226; Next, we show that the algorithm does not output reject with high probability when p = q.</p><p>Conditioned on assumption (1), the algorithm only rejects if the tester of Lemma 25 rejects. This occurs with probability at most 0.25 when p = q.</p><p>&#8226; Finally, we show that the algorithm does not return accept when d TV (p, q) &gt; &#949;. In this case, the algorithm only accepts if the tester of Lemma 25 accepts, so with probability at most 0.25.</p><p>Therefore, the algorithm outputs a valid answer with probability 0.75 conditioned on the assumptions. Taking a union bound, the algorithm outputs a valid answer with probability 0.68 overall. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Sample</head><p>for testing. By Lemma 25, the sensitivity of the test statistic is &#8710;(Z) = &#920; s+k k , while by Lemma 28 we have E F [&#8741;p &#8242;&#8242; &#8741; 2 2 ] &#8804; 2&#945;/k + 4/n . A careful case analysis and choice of k, s then yields the claimed sample complexity.</p><p>Remark 8 Algorithm 1 can be implemented in polynomial time in the number of samples taken. The test statistic L can be computed efficiently by counting the number of instances of each element in the flattening and test sets, then computing the closed form expression in Eq. (38). We emphasize that this expectation is only over the random choice of buckets, not over permutations of samples as in <ref type="bibr">Aliakbarpour et al. (2019)</ref>.</p><p>To complete the analysis, note that both non-augmented private testers used in our algorithm (see Lemmas 25 and 29) run in polynomial time. Note that the tester of Lemma 25 computes the expected value of an expression over every permutation of samples; this expression appears to take exponential time to compute. However, as described by <ref type="bibr">Aliakbarpour et al. (2019)</ref>, the computation can be performed efficiently. For each domain element, (more precisely, for each element that appears at least once in the sample set), the expression consists of three terms:a, b, and c. Here, a and b are the numbers of test samples drawn from p and q, respectively, and c is the number of samples in the flattening set. By iterating over all possible values a, b, and c for each element (each has at most O(k + s + 1) possible values, the total number of samples), we can compute in polynomial time the probability of observing any given combination under random permutations.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.4.">Private Testing of &#8467; 2 Norm</head><p>To determine whether the two-step flattening worked, we must (privately) test the &#8467; 2 norm of the flattened distribution p &#8242;&#8242; . The standard &#8467; 2 tester <ref type="bibr">(Goldreich and Ron, 2011;</ref><ref type="bibr">Aliakbarpour et al., 2024)</ref> computes the number of collisions in its sample set, and has the following guarantee:</p><p>Lemma 9 <ref type="bibr">(Goldreich and Ron (2011)</ref>; <ref type="bibr">Aliakbarpour et al. (2024)</ref>) Let &#948; &#8712; (0, 1) and p be a distribution over</p><p>Then with probability at least 1 -&#948;,</p><p>The statistic above has high sensitivity; intuitively, if a large number of samples fall in the same bin (i, j, m), changing a single instance of element i could affect a large number of collisions. To avoid this, we will derandomize this tester by taking</p><p>where r is the string of random bits used to choose the bucket when generating a sample from p &#8242;&#8242; given a sample from p &#8242; , and E is a multiset (the estimation set) of Poi(&#8467;) flattening samples from p &#8242; . Each of these samples is a pair (i, j). Rather than sample the third coordinate to generate a sample from p &#8242;&#8242; , we will consider the expected number of collisions over all such samplings, conditioned on E. In the result below, we give a closed-form expression for L.</p><p>Lemma 10 Let k i,j and &#8467; i,j be the number of instances of element (i, j) in the flattening and estimation sets F and E respectively. For each i &#8712; [n], let b i be the number of buckets created for element i by the first flattening step. Then</p><p>In general, the sensitivity of L might be quite high. In the worst case, we might draw no instances of element (i, j) in F but &#920;(&#8467;) instances in E, giving a sensitivity of &#920;(1). However, the sensitivity is considerably lower whenever the flattening and estimation sets are similar (i.e., no element has a much higher frequency in E than in F ). The following lemma formalizes this intuition.</p><p>Lemma 11 Suppose that there exists A &#8805; 0 such that for all i &#8712; [n],</p><p>Assuming the sensitivity obeys this bound (in Appendix C.5, we show how to transform any dataset into one that satisfies this property for A = &#920;(log n)), the last remaining task is to show that we can efficiently estimate &#8741;p &#8242;&#8242; &#8741; 2 2 to within a constant multiplicative factor:</p><p>Lemma 12 Let E be a set of Poi(&#8467;) estimation samples from p, and L be the derandomized &#8467; 2 2 norm estimator defined above. Let A = 12 log(n/0.05). For a given value of &#958; &gt; 0, define</p><p>Suppose k = kp + kq &#8804; 100k, that Eq. (43) holds, and that k</p><p>Putting all these elements together as outlined establishes Theorem 6.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix A. Upper bound for Private Augmented Identity Testing</head><p>Our upper bound follows directly from the upper bound of <ref type="bibr">Aliakbarpour et al. (2024)</ref> for non-private augmented identity testing. The tester aims to detect the case where p is far from q using the Scheff&#233; set S of p and q, where S := {i &#8712; [n] : pi &lt; q i }. The difference in the probability of S under p and q is precisely the total variation distance:</p><p>The algorithm draws samples from p and computes the test statistic &#963;, the fraction of samples which fall in S. If &#963; is sufficiently far from q(S), the tester rejects; otherwise, it returns &#8869;. The full pseudocode of our private tester is given in Algorithm 2.</p><p>The sample complexity of the non-private augmented tester depends on &#951; and &#945;:</p><p>Lemma 13 (Aliakbarpour et al. ( <ref type="formula">2024</ref>)) Let &#949; &#8712; (0, 1], &#945; &#8712; [0, 1). Suppose we are given known distributions q and p, and unknown distribution p, all over [n]. Let &#951; := d TV (q, p) and &#948; 0 := 1/10.</p><p>There is an (&#949;, &#945;, &#948; 0 )-augmented identity testing algorithm which takes s samples from p, where</p><p>This result shows an improvement in sample complexity if p is a sufficiently good estimate of p, and does no worse than a standard identity tester if not. To privatize the tester, we simply add Laplace noise to the test statistic &#963;.</p><p>Lemma 14 Fix privacy parameter &#958; &gt; 0. Let p and q be known distributions, and p be an unknown distribution, over <ref type="bibr">[n]</ref>. Let S := {i &#8712; [n] : pi &lt; q i }. For a set {x 1 , ..., x s } of s i.i.d. samples from p, let</p><p>Then the statistic &#963; = &#963; + Lap(1/(s&#958;)) is &#958;-differentially private.</p><p>Proof The sensitivity of &#963; is</p><p>Therefore, adding Lap(1/(s&#958;)) noise suffices to make the statistic private by the Laplace mechanism.</p><p>In the case where augmentation does not decrease the sample complexity, we must run a nonaugmented private identity tester. The following lemma gives the sample complexity of private identity testing.</p><p>Algorithm 2: PRIVATE-AUGMENTED-IDENTITY-TESTER Input: p, q, p, n, &#949;, &#945;, &#958;, &#948; = 0.1 Output: accept, reject, or &#8869;</p><p>Run the tester of Lemma 15 and output its answer</p><p>Lemma 15 <ref type="bibr">(Acharya et al. (2018)</ref>) Fix parameters &#949; &#8712; (0, 1] and &#958; &gt; 0. Let q be a known distribution and p be an unknown distribution over <ref type="bibr">[n]</ref>. There is a (&#958;, &#949;, &#948; = 0.1)-private identity tester which takes s samples from p, where</p><p>Additionally, any (&#958;, &#949;, &#948; = 0.1)-private identity tester requires &#8486;(s) samples.</p><p>Combining the results above, we have the following upper bound.</p><p>Theorem 16 Fix parameters &#949; &#8712; (0, 1], &#945; &#8712; [0, 1), &#958; &gt; 0, and &#948; 0 := 1/10. Let p and q be known distributions, and p be an unknown distribution, over [n]. Then Algorithm 2 is a (&#958;, &#949;, &#945;, &#948; 0 )-private augmented identity tester which takes s samples from p, where</p><p>Moreover, the algorithm can be implemented in polynomial time in s.</p><p>Proof Note that the choice to use one algorithm or the other only depends on the (public) parameters, not on the samples: therefore, the decision of which algorithm to use does not compromise privacy.</p><p>, we run the non-augmented private identity tester, which is &#958;-differentially private and returns the correct answer with probability at least 0.9. The sample complexity in this case is given by Lemma 15.</p><p>Next, we consider the case where &#951; &gt; &#945; and 1/(&#951; -&#945;) 2 +1/(&#958;(&#951; -&#945;)) &lt; &#8730; n/&#949; 2 + &#8730; n/(&#949; &#8730; &#958;)+ n 1/3 /(&#949; 4/3 &#958; 2/3 ) + 1/(&#949;&#958;). We will separately prove privacy, correctness, and the sample complexity.</p><p>Privacy: In the case where &#951; &#8804; &#945; or the non-augmented tester has lower sample complexity than the augmented version, we run the non-augmented private identity tester, which is &#958;-differentially private by Lemma 15. If we run the augmented tester, the algorithm is &#958;-differentially private by Lemma 14.</p><p>Correctness: Note that the augmented tester can never return accept. We will only consider the other two possibilities. First, we show that with high probability, the algorithm does not return reject when p = q. If s = &#8486;(1/(&#951; -&#945;) 2 ), then by Hoeffding's inequality,</p><p>By the cdf of the Laplace distribution, if s = &#8486;(1/((&#951; -&#945;)&#958;)),</p><p>Combining Eq. ( <ref type="formula">8</ref>) and Eq. ( <ref type="formula">9</ref>) and taking a union bound, the following holds with probability at least 0.9:</p><p>then p(S) = q(S), and the algorithm returns reject with probability at most 0.1.</p><p>Finally, we show that if d TV (p, p) &#8804; &#945;, then the algorithm does not return &#8869; with high probability. In this case, with probability at least 0.9, </p><p>4 and the probability that the algorithm returns &#8869; is at most 0.1.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Sample Complexity:</head><p>We have used the fact that s = &#8486;(1/(&#951; -&#945;) 2 ) and s = &#8486;(1/((&#951; -&#945;)&#958;)). Therefore, it suffices to have</p><p>We can efficiently compute &#963; by checking (in constant time) whether x j &#8712; S for each sample x j , yielding a tester which takes linear time in the number of samples.</p><p>any &#958;-differentially private (&#945;, &#949;, &#948; = 0.2)-augmented testing algorithm for testing identity of p and q with prediction p requires s samples, where</p><p>We defer the proof to the end of this section. We begin by establishing a general tool to combine statistical and privacy constraints. In particular, we show that if two sets of samples look similar with respect to either statistical indistinguishability or Hamming distance, any algorithm must behave similarly on those inputs.</p><p>Lemma 20 Suppose we are given three positive integers n, s 1 , and s 2 , along with parameters &#958; &gt; 0 and &#964; &#8712; (0, 1). Consider two distributions (or families of distributions) p 1 and p 2 over [n]. Let T s 1 and T s 2 indicate two sample set of size s from p 1 and p 2 respectively. Assume we have the following properties:</p><p>&#8226; Suppose we pick p &#8712; {p 1 , p 2 } uniformly at random, and generate a sample set of size s from p. Upon receiving the sample set, no algorithm can distinguish whether the sample set is generated according to p 1 or p 2 with probability more than (1 + &#964; )/2.</p><p>&#8226; For any s &#8804; s 2 , there exists a coupling C between T s 1 and T s 2 such that</p><p>Let M : [n] s &#8594; R be a &#958;-private algorithm that receives a sample set of size s from an unknown underlying distribution and produces an outcome in a finite set R. Then, for any such M, s &#8804; max(s 1 , s 2 ), and any subset of outcomes R &#8838; R, we have:</p><p>Proof We consider two cases based on whether s &#8804; s 1 . If s &#8804; s 1 , we use the statistical indistinguishability of p 1 and p 2 . The behavior of M should be almost identical for sample sets drawn from these two families due to the following standard trick. Consider an algorithm A that runs as follows: Upon receiving a sample set X, it invokes M(X). If the outcome of M is in R it declares p 1 ; otherwise, it declares p 2 . Since this algorithm cannot distinguish p 1 from p 2 , we have:</p><p>Thus, we obtain:</p><p>Now, consider the case where s &gt; s 1 . Since s &#8804; max(s 1 , s 2 ), we must have s &#8804; s 2 . Thus, we use the coupling C 2 . Let W 2 denote the event that Ham(T s 1 , T s 2 ) &#8805; 0.4/&#958; for (T s 1 , T s 2 ) drawn from C 2 . By assumption and Markov's inequality, the probability of W 2 is at most &#964; .</p><p>Using the definition of a &#958;-private algorithm M, for every pair of datasets T s 1 and T s 2 with Ham(T s 1 , T s 2 ) &#8804; 0.4/&#958;, we have</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Now, we obtain</head><p>Hence, the proof is complete.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.3. Construction of Hard Distributions</head><p>It remains to construct three distributions which satisfy the indistinguishability and closeness assumptions of Lemma 20. We will use a similar construction to <ref type="bibr">Aliakbarpour et al. (2024)</ref>. Some of the necessary properties are well-known; we will prove the rest.</p><p>Choice of distributions: First, we describe the three distributions used in the proof. For the following constructions, we will assume without loss of generality that n is even. (For odd n, we can set the probability of the last element to 0 and choose the remaining elements using the construction for n -1.) Let q = U n be the uniform distribution on [n]. We will define the predicted distribution p as follows:</p><p>Note that d TV (p, q) = &#951;.</p><p>We will generate two other distributions p &#8226; and p &#8900; . Set &#949; &#8242; &#8712; (0, 1/2] to be &#920;(&#949;) and &#945; &#8242; &#8712; (0, &#945;) such that &#951; -&#945; &#8242; = &#920;(&#951; -&#945;). Let Z &#8764; Unif({-1, 1} n/2 ). Define p &#8226; and p &#8900; as follows:</p><p>, i is odd <ref type="bibr">(14)</ref> Note that p &#8226; is &#949; &#8242; -far from U n , so accept is an incorrect answer given samples from p &#8226; . Similarly, p &#8900; is &#945;-close to p, so &#8869; is an invalid answer given samples from p &#8900; . Finally, reject is an invalid answer given samples from U n . Therefore, no single answer works for all three distributions U n , p &#8226; , and p &#8900; .</p><p>To prove the privacy assumption of Lemma 20, we will need two couplings: a coupling C &#8226; between U n and p &#8226; , and a coupling C &#8900; between U n and p &#8900; . The existence of C &#8226; follows from a known result:</p><p>Lemma 21 <ref type="bibr">(Acharya et al. (2018)</ref>) Let &#949; &#8242; &#8712; (0, 1/2), and n &gt; 0 be an even number. Let U n be the uniform distribution on [n], and let p &#8226; be the distribution defined in Eq. (13). Then there exists a coupling C &#8226; between U &#8855;s n and p &#8226;&#8855;s such that for any</p><p>for some sufficiently large constant C &gt; 0.</p><p>Finally, we will show that there exists a coupling between T s 1 &#8764; U &#8855;s n and T s 3 &#8764; C &#8900;&#8855;s such that the Hamming distance between the two is small. Lemma 22 Let &#951;, &#945; &#8242; &gt; 0 be parameters such that &#951; -&#945; &#8242; &#8712; (0, 1/2), and n &gt; 0 be an even number. Let U n be the uniform distribution on [n], and let p &#8900; be the distribution defined in Eq. <ref type="bibr">(14)</ref>. Then there exists a coupling C &#8900; such that for any (T s 1 , T s 3 ) &#8764; C &#8900; , we have</p><p>Proof We will construct the coupling by the following process:</p><p>1. Draw P 1 , ..., P s &#8764; Unif([n/2]).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">For each</head><p>First, we will show that this is a valid coupling: that is, the marginal distributions on T s 1 and T s 3 are U &#8855;s n and p &#8900;&#8855;s respectively. For all i &#8712; [n] and j &#8712; [s],</p><p>Since the values X j are independent, the marginal on T s 1 is U &#8855;s n . For all even i &#8712; [n] and j &#8712; [s], we also have</p><p>For all odd i,</p><p>Finally, we bound the expected Hamming distance between the two sample sets. For all j, X j &#824; = Y j if and only if Z j = 1 and Z &#8242; j = 0. Therefore,</p><p>as desired.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.4. Proof of Theorem 19</head><p>Proof Suppose A : [n] s &#8594; {accept, reject, &#8869;} is an (&#945;, &#949;, &#948; = 0.2)-augmented identity tester which uses</p><p>for some constants C 1 , C 2 . We will use Lemma 20 and the distributions constructed above to show that A must have a high error probability if its sample complexity is too low. Let T s 1 &#8764; U &#8855;s n , T s 2 &#8764; p &#8226;&#8855;s , and T s 3 &#8764; p &#8900;&#8855;s . We have the following facts about the distributions:</p><p>&#8226; By a result of <ref type="bibr">Paninski (2008)</ref>, no algorithm can distinguish U n from p &#8226; with probability greater than 0.505 with fewer than 0.004 &#8730; n/(&#949; &#8242; ) 2 samples.</p><p>&#8226; By Lemma 21, for any s</p><p>)) there exists a coupling C &#8226; between T s 1 and T s 2 such that</p><p>&#8226; No algorithm can distinguish U n from p &#8226; with probability greater than 0.505 with fewer than 0.00005/(&#951; -&#945; &#8242; ) 2 samples. This follows by noting that distinguishing a distribution which is biased toward even elements from the uniform distribution is equivalent to distinguishing a &#951; -&#945; &#8242; -biased coin from a fair one. It is a folklore fact that this requires at least &#8486;(1/(&#951; -&#945; &#8242; ) 2 samples. (See, e.g., <ref type="bibr">Aliakbarpour et al. (2024)</ref>).</p><p>&#8226; By Lemma 22, if s &#8804; 0.4/(&#958;(&#951; -&#945; &#8242; )), there exists a coupling C &#8900; between T s 1 and T s 3 such that</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="0.4">&#958;</head><p>Since A has only three possible outputs, we have:</p><p>Using Lemma 20, we have:</p><p>] ] + 0.02 Based on our definition of U n , p &#8226; and p &#8900; , the three probabilities above are at most the probability that A makes a mistake. Thus, we have:</p><p>Hence, &#948; &#8805; 0.245, which contradicts our assumption that &#948; = 0.2. Therefore, s cannot be lower than the bound in Eq. ( <ref type="formula">17</ref>), which immediately implies the lower bound in Eq. ( <ref type="formula">11</ref>).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix C. Upper Bound for Private Augmented Closeness Testing</head><p>Our result for closeness testing combines the flattening-based closeness testers of <ref type="bibr">Aliakbarpour et al. (2024)</ref> and <ref type="bibr">Aliakbarpour et al. (2019)</ref>. The flattening technique, introduced by Diakonikolas and Kane (2016), uses samples to map the original distributions p and q onto new distributions p &#8242; and q &#8242; such that p &#8242; has a low &#8467; 2 norm, but d TV (p, q) = d TV (q &#8242; , q &#8242; ). The main result of <ref type="bibr">Aliakbarpour et al. (2019)</ref> is that any flattening procedure which satisfies certain technical conditions can be made private. Since the augmented closeness tester of <ref type="bibr">Aliakbarpour et al. (2024)</ref> also relies on flattening, we show that it too can be made private with some modifications. In Appendix C.1, we review the flattening procedures of <ref type="bibr">Aliakbarpour et al. (2024)</ref> and <ref type="bibr">Aliakbarpour et al. (2019)</ref>. We describe our own procedure in Appendix C.2, and present our algorithm in Appendix C.3. Finally, in Appendix C.4, we show how to privately estimate the &#8467; 2 norm to verify the success of our flattening.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.1. Overview of Flattening</head><p>In this section, we formally state the guarantees of previous flattening-based testers described in Section 3.1. We restate the descriptions of both algorithms for convenience, followed by the technical results we need for our analysis.</p><p>Private Flattening: The private tester of <ref type="bibr">Aliakbarpour et al. (2019)</ref> attempts to derandomize the original flattening of <ref type="bibr">Diakonikolas and Kane (2016)</ref>. When a flattening-based tester divides its samples into flattening and test sets, it introduces randomness based on the permutation &#960; used to partition the samples. This results in high sensitivity of the test statistic Z, as swapping one of the samples used for the flattening can wildly affect the resulting value of Z. The private tester reduces the sensitivity by taking the expectation of Z over every permutation &#960; of the data and the randomness r of the flattening procedure:</p><p>The authors show that Z has low sensitivity and preserves the correctness of any flattening procedure which satisfies two technical conditions. Such a flattening is called a proper procedure.</p><p>Definition 23 Let A be an algorithm which draws a multiset X from distribution p and reduces testing property P of p to testing closeness between two distributions p &#8242; and q &#8242; . We say A is a proper procedure if there exist constants c 0 &lt; 1 and c 1 &#8805; 1 such that the following holds for any p &#8242; and q &#8242; produced by A:</p><p>As we show in Appendix C.2, a crucial step in our flattening procedure is identical to one proven to be proper in <ref type="bibr">Aliakbarpour et al. (2019)</ref>: the flattening of <ref type="bibr">Diakonikolas and Kane (2016)</ref> when the flattening set is drawn from both p and q.</p><p>Lemma 24 Let A be an algorithm for testing closeness of distributions p and q with the following flattening procedure: draw a multiset F (p) from p and a multiset F (q) from q. Let k i denote the number of instances of element i in F (p) &#8746; F (q) . Divide the probability mass of element i evenly into k i buckets. Then A is a proper procedure.</p><p>The sample complexity of any proper procedure is given by the following result.</p><p>Lemma 25 <ref type="bibr">(Aliakbarpour et al. (2019)</ref>) Let A be a proper procedure for testing property P which reduces the problem to testing closeness of p &#8242; and q &#8242; over a domain of size n &#8242; using Poi(k) flattening samples. Then there exists an (&#958;, &#949;, 3/4)-private tester for property P which draws Poi(s) test samples, for any</p><p>Additionally, the sensitivity of the test statistic Z is bounded by</p><p>Augmented Flattening: In the augmented setting of <ref type="bibr">Aliakbarpour et al. (2024)</ref>, the estimate p guides the choice of buckets for each element i. Let &#957; &#8712; (0, 1] be a flattening parameter. Rather than dividing elements into k i + 1 buckets, the flattener creates</p><p>buckets in flattened distributions p &#8242; and q &#8242; . If p is &#945;-close to p, the expected &#8467; 2 norm after flattening is shown to be</p><p>The tester then draws O( &#8730; n) samples each from p &#8242; and q &#8242; to estimate their &#8467; 2 2 norm. If at least one distribution has been sufficiently flattened, the algorithm proceeds to the test phase. Otherwise, it returns &#8869;. The sample complexity of this tester is given below.</p><p>Lemma 26 <ref type="bibr">(Aliakbarpour et al. (2024)</ref>) Fix parameters &#945;, &#949; &#8712; (0, 1]. Let p and q be unknown distributions, and p be a known distribution over <ref type="bibr">[n]</ref>. There exists an (&#949;, &#945;, &#948; = 0.3)-augmented closeness tester for p and q which uses &#920; n 2/3 &#945; 1/3</p><p>samples from both p and q.</p><p>As discussed in the introduction, to mimic this approach we need to perform this last step -the estimation of the &#8467; 2 2 norm to verify that the flattening was successful -in a differentially private fashion.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.2. Two-Step Flattening</head><p>To simplify the analysis of our augmented private closeness tester, we split the flattening into two steps. The first step flattens p and q into distributions p &#8242; and q &#8242; using only the prediction p. The second step draws samples from p &#8242; and q &#8242; and uses these samples to flatten them into a third set of distributions p &#8242;&#8242; and q &#8242;&#8242; . This two-step flattening makes it much easier to guarantee that the procedure is private. Since the first step draws no samples, it is already differentially private. Since the second step does not use p, it is precisely the same procedure as the flattening described in Lemma 24, and can be made private by the same mechanism. We show that if d TV (p, p) &#8804; &#945;, then &#8741;p &#8242;&#8242; &#8741; 2 2 is small in expectation, allowing us to test efficiently with fewer flattening samples than the optimal non-augmented tester.</p><p>Flattening procedure: Let k be a parameter which will determine the expected number of flattening samples. The two-step flattening works as follows.</p><p>1. From the original distributions p and q, estimate p, and suggested accuracy &#945;, construct p &#8242; and q &#8242; by flattening each element i &#8712; [n] into b i buckets, where</p><p>(This is analogous to setting &#957; = 1/n in Equation <ref type="formula">22</ref>). Since p and &#945; are not private, this can be done as a preprocessing step before running the private portion of the algorithm. After this step, p &#8242; is defined by having, for all i &#8712; [n] and j &#8712; [b i ], p &#8242; i,j = p i /b i . Sampling from p &#8242; can be done as follows: sample i &#8764; p and j &#8764; Unif([b i ]), and return (i, j). Sampling from q &#8242; is analogous (note that both p and q use the same bucketing, so p &#8242; and q &#8242; have the same domain).</p><p>2. Sample kp , kq &#8764; Poi(k) independently. Draw a multiset F (p) of kp samples from p &#8242; and a multiset F (q) of kq samples from q &#8242; . Let F = F (p) &#8746; F (p) , and k i,j be the total number of instances of element (i, j) in F . Then divide each element of the domain of p &#8242; , q &#8242; into b i,j = k i,j + 1 buckets.</p><p>The domain of p &#8242;&#8242; and q &#8242;&#8242; is &#8486; = {(i, j, m)</p><p>for all (i, j, m) &#8712; &#8486;. To sample from p &#8242;&#8242; , we sample (i, j) &#8764; p &#8242; , m &#8764; Unif([b i,j ]), then return (i, j, m).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Effect of flattening:</head><p>We now show that the domain size after flattening remains &#920;(n + k) with high probability. After the second flattening step, the number of elements is n &#8242;&#8242; = |&#8486;| (itself a random variable), where</p><p>Note that kp + kq &#8764; Poi(2k), so kp + kq &#8804; 200k with probability at least 0.99 by Markov's inequality. Therefore, n &#8242;&#8242; = O(n + k) with probability at least 0.99. Next, we bound the expected &#8467; 2 2 norm of the flattened distribution, assuming the suggested accuracy level &#945; is valid.</p><p>Lemma 27 (See, e.g., <ref type="bibr">(Diakonikolas and Kane, 2016, Lemma 2.6</ref>)</p><p>Proof Follows from manipulating the series corresponding to the expectation:</p><p>Lemma 28 Let p and p be distributions over [n] with d TV (p, p) &#8804; &#945;. Then the two-step flattening produces a distribution p &#8242;&#8242; with</p><p>Proof The proof is inspired by <ref type="bibr">Aliakbarpour et al. (2024)</ref>. Let &#8710; i = p i -pi for all i &#8712; [n], so that</p><p>Letting A := {i &#8712; [n] : &#8710; i &#8805; pi }, this gives the following bound on p i :</p><p>By definition of p &#8242; and p &#8242;&#8242; , we have</p><p>Note that we can write k i,j = k</p><p>Combining the two results, the expected norm is bounded by</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.3. The Algorithm</head><p>At a high level, our algorithm works in three steps. The first step flattens p and q into distributions p &#8242;&#8242; and q &#8242;&#8242; as described in Appendix C.2. The second step tests the &#8467; 2 2 norm of p &#8242;&#8242; . If the norm is not within a constant multiplicative factor of the bound guaranteed by Lemma 28, then we have d TV (p, p) &gt; &#945; with high probability, and the tester returns &#8869;. If the norm is close to the bound, our algorithm can perform an efficient closeness test. The final step runs the private closeness tester of <ref type="bibr">Aliakbarpour et al. (2019)</ref> and returns its result. We give pseudocode for our algorithm in Algorithm 1.</p><p>By our lower bound (Theorem 38), there are some regimes of parameters in which an augmented tester cannot use asymptotically fewer samples than a non-augmented private tester. In these cases, we simply invoke the non-augmented tester, whose sample complexity is given by Lemma 29. In all other regimes, we show that our tester is optimal up to log n factors.</p><p>Lemma 29 <ref type="bibr">(Zhang (2021)</ref>) Let &#949; &#8712; (0, 1] and &#958; &gt; 0. Let p and q both be unknown distributions over <ref type="bibr">[n]</ref>. Then there is a (&#958;, &#949;, 0.05)-private closeness tester for p and q which takes</p><p>&#949; 4/3 &#958; 2/3 samples.</p><p>We are now ready to prove our upper bound.</p><p>Theorem 30 [Theorem 6, restated] Let &#949;, &#945; &#8712; (0, 1] and &#958; &gt; 0. Let p and q both be unknown distributions over <ref type="bibr">[n]</ref>. Then Algorithm 1 is a &#958;-differentially private augmented (&#949;, &#945;, 0.32)-closeness tester which takes s samples each from p and q, where</p><p>Proof For the analysis, we will condition on two assumptions:</p><p>1. k = kp + kq &lt; 200k, l &lt; 100&#8467;, and &#349; &lt; 100s. This holds with probability at least 0.97 by Markov's inequality and a union bound.</p><p>2. For all i &#8712; [n],</p><p>This holds with probability at least 0.95 by Lemma 37. If this assumption does not hold in our original dataset, we enforce it via the mapping of Lemma 35, which preserves privacy.</p><p>), we run the tester of Lemma 29, which is private by the same result. If &#949; = &#8486;(n -1/4 ) and &#949; 2 &#958; = &#8486;(n -1 ), the algorithm's outputs depend only on the statistic L, and the choice of kp , kq and l. The latter two do not depend on the sampled data. If assumption (2) is satisfied, then L is &#958;differentially private by Lemma 12 . Finally, the second flattening step is a proper procedure by Lemma 24. Therefore, if the algorithm reaches Line 12, its output is private by Lemma 25.</p><p>), the algorithm returns a valid answer with probability at least 0.95 by Lemma 29. Therefore, we need only consider the case where &#949; = &#8486;(n -1/4 ) and &#949; 2 &#958; = &#8486;(n -1 ).</p><p>First, we show that if d TV (p, p) &#8804; &#945;, the algorithm does not output &#8869; with high probability. The only case in which the algorithm returns &#8869; is when L &gt; 30(2&#945;/k + 4/n). By Lemma 12 , the estimate L is within a constant factor of &#8741;p &#8242;&#8242; &#8741; 2 2 with probability at least 0.94:</p><p>Combining Lemma 28 with Markov's inequality, the following holds with probability at least 0.95:</p><p>Therefore, by union bound, we have that L is not more than 20 times the expected value of &#8741;p &#8242;&#8242; &#8741; 2 2 with probability at least 0.91, and the probability of returning &#8869; in this case is at most 0.09.</p><p>Next, we show that the algorithm does not output reject with high probability when p = q. Conditioned on assumption (1), the algorithm only rejects if the tester of Lemma 25 rejects. This occurs with probability at most 0.25 when p = q.</p><p>Finally, we show that the algorithm does not return accept when d TV (p, q) &gt; &#949;. In this case, the algorithm only accepts if the tester of Lemma 25 accepts, which happens with probability at most 0.25.</p><p>Therefore, the algorithm outputs a valid answer with probability 0.75 conditioned on the assumptions. Taking a union bound, the algorithm outputs a valid answer with probability 0.68 overall.</p><p>Sample Complexity: By assumption (1), we draw O(k) flattening samples, O(&#8467;) estimation samples, and O(s) test samples from both p and q. Let n &#8242;&#8242; = O(n + k) be the domain size of p &#8242;&#8242; . Then the parameters must satisfy the following constraints:</p><p>By Lemma 25, the sensitivity of the test statistic is</p><p>And by Lemma 28, we have</p><p>Finally, to simplify the constraint in Eq. ( <ref type="formula">31</ref>), we note that the equation implies two constraints on k:</p><p>If both of the above hold and &#8467; = k, the parameters always satisfy Eq. ( <ref type="formula">31</ref>). Note that the first constraint dominates if and only if &#958; = o(log n/ &#8730; n). We are now ready to describe the sample complexity. We will consider the following cases:</p><p>Case 1: &#949; = o(n -1/4 ). In this case we run the non-augmented private tester, whose sample complexity is given by Lemma 29. We have</p><p>Therefore, n 2/3 /&#949; 4/3 is not the dominating term, and the sample complexity can be written as</p><p>which matches our lower bound.</p><p>Case 2: &#949; = &#8486;(n -1/4 ) and &#949; 2 &#958; = o(n -1 ). Once again, we run the non-augmented tester. By our assumption,</p><p>Rearranging terms, we have n/&#949; 2 = o(1/&#958; 3 ). Consequently,</p><p>Therefore, n 2/3 /&#949; 4/3 is not the dominating term. The sample complexity is</p><p>which matches our lower bound.</p><p>Case 3: &#949; = &#8486;(n -1/4 ), &#949; 2 &#958; = &#8486;(n -1 ), and</p><p>In this case, we run the augmented tester. We set</p><p>and</p><p>Therefore, &#8710;(Z) = &#920;(1), and s satisfies Eq. ( <ref type="formula">33</ref>). By our assumptions, we have the following facts:</p><p>, which satisfies Eq. ( <ref type="formula">31</ref>). In this case, the overall sample complexity is equal to Eq. ( <ref type="formula">35</ref>). Each of the terms in this upper bound appear in our lower bound, so the sample complexity is optimal.</p><p>Case 4: &#949; = &#8486;(n -1/4 ), &#949; 2 &#958; = &#8486;(n -1 ), and the following holds:</p><p>In this case, we run the augmented tester. The &#8730; n log n/ &#8730; &#958; term dominates each term in Eq. ( <ref type="formula">35</ref>). Therefore, we set &#8467; = k = &#920;( &#8730; n log n/ &#8730; &#958;), and</p><p>Similar to the previous case, this setting satisfies all three constraints. The sample complexity is</p><p>term appears in our lower bound, our sample complexity will be off by a factor of O(&#949; &#8226; log n) compared to the lower bound.</p><p>Case 5: &#949; = &#8486;(n -1/4 ), &#949; 2 &#958; = &#8486;(n -1 ), and &#8730; n log n/ &#8730; &#958; = &#8486;(n). In this case, we run the augmented tester. We set &#8467;</p><p>We can bound each of these terms using our assumptions. Since &#8730; n log n/&#958; = &#8486;(n), we must have &#958; = O(log n/ &#8730; n). Using these facts, we can bound s:</p><p>Therefore, the overall sample complexity is O(log 2 n/&#958; + log n/(&#949;&#958;)). Once again, this is within a factor of O(&#949; &#8226; log 2 n + log n) of our lower bound.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.4. Private Testing of &#8467; 2 Norm</head><p>To determine whether the two-step flattening worked, we must (privately) test the &#8467; 2 norm of the flattened distribution p &#8242;&#8242; . The standard &#8467; 2 tester <ref type="bibr">(Goldreich and Ron, 2011;</ref><ref type="bibr">Aliakbarpour et al., 2024)</ref> works by computing the number of collisions between elements in its sample set. This algorithm has the following guarantee:</p><p>Lemma 31 <ref type="bibr">(Goldreich and Ron (2011)</ref>; <ref type="bibr">Aliakbarpour et al. (2024)</ref>) Let &#948; &#8712; (0, 1) and p be a distribution over <ref type="bibr">[n]</ref>. Let E be a multiset of &#8467; = O ( &#8730; n log(1/&#948;)) samples from p. For each i &#8712; [n], define &#8467; i as the number of instances of element i in E. Let</p><p>Then with probability at least 1 -&#948;,</p><p>The statistic above has high sensitivity; intuitively, if a large number of samples fall in the same bucket (i, j, m), changing a single instance of element i could affect a large number of collisions. To avoid this, we will derandomize this tester by taking</p><p>where r is the string of random bits used to choose the bucket when generating a sample from p &#8242;&#8242; given a sample from p &#8242; , and E is a multiset (the estimation set) of Poi(&#8467;) flattening samples from p &#8242; . Each of these samples is a pair (i, j). Rather than sample the third coordinate to generate a sample from p &#8242;&#8242; , we will consider the expected number of collisions over all such samplings, conditioned on E. In the result below, we give a closed-form expression for L.</p><p>Lemma 32 [Lemma 10, restated] Let k i,j and &#8467; i,j be the number of instances of element (i, j) in the flattening and estimation sets F and E respectively. For each i &#8712; [n], let b i be the number of buckets created for element i by the first flattening step. Then</p><p>k i,j + 1 (39)</p><p>Proof Fix k i,j and &#8467; i,j . Recall that element (i, j) is divided into b i,j = k i,j + 1 buckets. Define &#8467; i,j,m as the number of instances of bucket (i, j, m) in the estimation set. Since b i,j and &#8467; i,j are both fixed, &#8467; i,j,m &#8764; Bin(&#8467; i,j , 1/b i,j ), where the randomness comes only from r. We have the following:</p><p>We can now write the expectation as</p><p>1 &#8467; 2 n i=1 E r &#63726; &#63728; b i j=1 b i,j m=1 &#8467; i,j,m 2 k i , &#8467; i &#63737; &#63739; = 1 &#8467; 2 n i=1 b i j=1 b i,j m=1 E r &#8467; 2 i,j,m -&#8467; i,j,m 2 k i , &#8467; i = 1 &#8467; 2 n i=1 b i j=1 b i,j m=1 &#8467; i,j 2b i,j + &#8467; 2 i,j -&#8467; i,j 2b 2 i,j -&#8467; i,j 2b i,j = 1 &#8467; 2 n i=1 b i j=1 b i,j &#8226; &#8467; 2 i,j -&#8467; i,j 2b 2 i,j = 1 &#8467; 2 n i=1 b i j=1 &#8467; 2 i,j -&#8467; i,j 2b i,j = 1 &#8467; 2 n i=1 b i j=1 &#8467; i,j 2 k i,j + 1 (41)</p><p>In general, the sensitivity of L might be quite high. In the worst case, we might draw no instances of element (i, j) in F but &#920;(&#8467;) instances in E, giving a sensitivity of &#920;(1). However, note that the sensitivity is considerably lower if the flattening and estimation sets are similar (i.e., no element has a much higher frequency in E than in F ). The following lemma formalizes this intuition.</p><p>Lemma 33 Suppose that there exists A &#8805; 0 such that for all i &#8712; [n] and j &#8712; [b i ],</p><p>Then the sensitivity of L is bounded by</p><p>Proof Assume that X and X &#8242; are fixed datasets which differ in only one sample (an instance of (i, j) in X is replaced by an instance of (i &#8242; , j &#8242; ) in X &#8242; ). The extra instance can only change the contribution from (i, j) and (i &#8242; , j &#8242; ). Let k i,j and &#8467; i,j represent the number of instances of (i, j) in the the flattening and estimation sets of X respectively. Let k &#8242; i,j and &#8467; &#8242; i,j represent the number of instances of (i, j) in the flattening and estimation sets of X &#8242; . We will bound the difference for a single term; by symmetry, doubling the bound gives the overall sensitivity.</p><p>Case 1: The extra instance of (i, j) falls in the flattening set F . In this case, &#8467; i,j = &#8467; &#8242; i,j and k i,j = k &#8242; i,j + 1 &#8805; 1. As &#8467; i,j /(k i,j + 1) &#8804; A &#8226; &#8467;/k and k i,j &#8805; 1, &#8467; i,j /k i,j &#8804; 2A &#8226; &#8467;/k. Therefore,</p><p>Case 2: The extra instance of i falls in the estimation set E, in which case k i,j = k &#8242; i,j and &#8467; i,j = &#8467; &#8242; i,j + 1. Then we have</p><p>(&#8467; 2 -&#8467;)(k i,j + 1)</p><p>Combining the two cases proves the lemma.</p><p>For now, we assume Eq. ( <ref type="formula">42</ref>) holds, and thus that the sensitivity obeys the bound of Eq. ( <ref type="formula">43</ref>) (in Appendix C.5, we show how to transform any dataset into one that satisfies this property for A = &#920;(log n)). The next task is to show that under this assumption, we can estimate &#8741;p &#8242;&#8242; &#8741; 2 2 to within a constant multiplicative factor.</p><p>Lemma 34 [Lemma 12, restated] Let E be a set of Poi(&#8467;) estimation samples from p, and L be the derandomized &#8467; 2 2 norm estimator given in Eq. (38). Let A = 12 log(n/0.05). For a given value of &#958; &gt; 0, define</p><p>Suppose k = kp + kq &#8804; 100k, that Eq. (43) holds, and that</p><p>for some sufficiently large constants C 1 , C 2 . Then</p><p>Proof First, we show that the magnitude of the Laplace noise is not too large. Since k &#8804; 100k, the domain size of p &#8242;&#8242; is at most n &#8242;&#8242; &#8804; 200k + 3n, and &#8741;p &#8242;&#8242; &#8741; 2 &#8805; 1/ &#8730; 200k + 3n. Using the pdf of the Laplace distribution and Eq. ( <ref type="formula">47</ref>), we have Pr L -L &gt; &#8741;p &#8242;&#8242; &#8741; 2 2 4 = exp -&#8741;p &#8242;&#8242; &#8741; 2 2 &#958; 4&#8710;(L) &#8804; exp -&#958; 4(200k + 3n)&#8710;(L) &#8804; 1/100 (48)</p><p>Next, we show that the derandomized statistic L concentrates around the true &#8467; 2 2 norm of p &#8242;&#8242; . From <ref type="bibr">Goldreich and Ron (2011)</ref>, we have</p><p>The variance of L can also be bounded using the result of <ref type="bibr">Goldreich and Ron (2011)</ref> and the law of total variance:</p><p>2 (50) By Chebyshev's inequality, we obtain the following bound: Pr L -&#8741;p &#8242;&#8242; &#8741; 2 2 &gt; &#8741;p &#8242;&#8242; &#8741; 2 2 4 &#8804; Var L &#8741;p &#8242;&#8242; &#8741; 4 2 /16 &#8804; 32 &#8467; 2 1/2 &#8226; &#8741;p &#8242;&#8242; &#8741; 2 &#8804; 64 &#8730; 200k + 3n &#8467; &#8804; 0.05 (51) (The second to last inequality is true for all &#8467; &gt; 2, and the last is true for &#8467; &#8805; 1280 &#8730; 200k + 3n.) Applying a union bound, the total error is bounded by L -&#8741;p &#8242;&#8242; &#8741; 2 2 &#8804; L -L + L -&#8741;p &#8242;&#8242; &#8741; 2 2 &#8804; &#8741;p &#8242;&#8242; &#8741; 2 2 4 + &#8741;p &#8242;&#8242; &#8741; 2 2 4 = &#8741;p &#8242;&#8242; &#8741; 2 2 2 (52) with probability at least 0.94, as desired. C.5. Extending the Domain of The Private Closeness Tester</p><p>From Lemma 33, it is clear that as long as Equation <ref type="formula">42</ref>holds, the sensitivity is low. We will use the mapping technique given in <ref type="bibr">Aliakbarpour et al. (2019)</ref> to ensure that our dataset always has this property. Let A &#8805; 2. Define X as the set of all datasets (over domain <ref type="bibr">[n]</ref>) and X * as the subset of X which satisfies the property:</p><p>where, as before, &#8467; i and k i represent the number of occurrences of i &#8712; [n] in the testing and flattening parts of X, respectively. If X &#8712; X * , we can add minimal noise to L and release a private statistic L which is close to L with high probability. The issue arises when X / &#8712; X * . In this case, we use a mapping to transform X into another dataset Y &#8712; X such that the mapping from X to Y is differentially private. We do not worry about the tester's correctness in this case; the goal is merely to release a private statistic.</p><p>Lemma 35 There exists a randomized mapping that takes X, X &#8242; &#8712; X to Y, Y &#8242; &#8712; X * respectively with the following properties:</p><p>&#8226; If X &#8712; X * , then Y = X</p><p>&#8226; If the Hamming distance between X and X &#8242; is 1, there exists a coupling C between the random outputs of the mapping Y and Y &#8242; , where for any (Y, Y &#8242; ) &#8764; C, the Hamming distance between Y and Y &#8242; is at most 4.</p><p>Proof The proof follows the idea of <ref type="bibr">(Aliakbarpour et al., 2019, Lemma C.5)</ref>, with the required modifications to match our definition of X * . Given a flattening set F and an estimation set L, the goal is to replace elements of F until &#8467; i /(k i + 1) &#8804; A &#8226; &#8467;/k for all i. For each element i, we need r i (X) extra copies in F , where</p><p>Construct a multiset R with r i (X) copies of i. To avoid violating the property, we must not remove more than s i (X) copies of each i, where</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>&#169; 2025 M. Aliakbarpour, A. Burudgunte, C. Canonne &amp; R. Rubinfeld.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_1"><p>Note that the equivalence between uniformity and identity testing of<ref type="bibr">Diakonikolas (2016)</ref>;<ref type="bibr">Goldreich (2020)</ref> carries over to the differentially private setting.</p></note>
		</body>
		</text>
</TEI>
