Differentially Private Linear Sketches: Efﬁcient Implementations and Applications
Abstract
Linear sketches have been widely adopted to process fast data streams, and they can be used to accurately answer frequency estimation, approximate top K items, and summarize data distributions.
When data are sensitive, it is desirable to provide privacy guarantees for linear sketches to preserve private information while delivering useful results with theoretical bounds.
We show that linear sketches can ensure privacy and maintain their unique properties with a small amount of noise added at initialization.
From the differentially private linear sketches, we showcase that the state-of-the-art quantile sketch in the turnstile model can also be private and maintain high performance.
Experiments further demonstrate that our proposed differentially private sketches are quantitatively and qualitatively similar to noise-free sketches with high utilization on synthetic and real datasets.
Introduction
Data sketches are fundamental tools for data analysis, statistics, and machine learning [Cormode and
Yi, 2020].
Two of the most widely studied problems in data summaries are frequency estimation and quantile approximation.
Many real world applications need to estimate the frequency of each item in the database and understand the overall distribution of the database.
These applications include stream processing [Das et al., 2009, Bailis et al., 2017], database management [Misra and Gries, 1982,
Metwally et al., 2005, Zhao et al., 2022], caching [Zakhary et al., 2020], system monitoring [Gupta et al., 2016, Ivkin et al., 2019, Zhao et al., 2021], federated learning [Rothchild et al., 2020], among others.
On one hand, the motivation for data sketch algorithms is to efﬁciently process a large database and extract useful knowledge, since computing the exact information for a large amount of data is both time and memory intensive.
For instance, Munro and Paterson [1980] proved that to ﬁnd the true median of a database with n items using p sequential passes requires at least ⌦ ( n 1 /p ) memory.
On the other hand, to protect user-level privacy, privacy-preserving algorithms limit the disclosure of private information in the database so that an observer cannot infer much about an individual.
Recent works have shown that data sketches can be integrated with privacy-enhancing technologies to provide insightful information and preserve individual privacy at the same time [Cormode, 2022].
Differential privacy [Dwork et al., 2006] is a widely-accepted deﬁnition of privacy.
Recently, researchers have observed that some data sketches are inherently differentially private [Blocki et al., 2012, Smith et al., 2020], while many other data sketches need modiﬁcations to the algorithm to be differentially private.
In particular, a substantial amount of literature has focused on differentially private data sketches for tasks such as linear algebra [Upadhyay, 2014, Arora et al., 2018], cardinality estimation [Mir et al., 2011, Pagh and Stausholm, 2021, Dickens et al., 2022] and quantile approximation [Tzamos et al., 2020, Gillenwater et al., 2021, Alabi et al., 2022].
In this paper, we introduce new differentially private algorithms that support both insertions and deletions for frequency, top k, and quantile approximation.
While many data sketches assume an insertion-only model [Greenwald and Khanna, 2001, Shrivastava et al., 2004, Karnin et al., 2016] or a bounded-deletion model [Jayaram and Woodruff, 2018, Zhao et al., 2022, 2021], our algorithms build on top of linear sketches [Charikar et al., 2002, Cormode and Muthukrishnan, 2005] and operate in the turnstile model, which allows an arbitrary number of insertions and deletions into the database.
Earlier, researchers attempted to prove CountSketch [Charikar et al., 2002] itself preserves differential privacy, but the authors acknowledged that there are issues in the proof [Li et al., 2019].
Instead of proving that linear sketches, i.e., both Count-Min and CountSketch, are inherently differentially private, we add a small amount of Gaussian noise at their initialization to provide a privacy guarantee, while maintaining linear sketches’ original properties, providing high utility for frequency and top
K estimations, and keeping update and query algorithms unchanged.
We also demonstrate that our analysis provides the tight uniform bound (Section 3.1 and Appendix E).
In addition, we propose the ﬁrst differentially private quantile sketch in the turnstile model by leveraging the differentially private linear sketch.
Our differentially private sketches can be queried an arbitrary number of times without affecting privacy guarantees based on the post-processing immunity.
Following prior works [Choi et al., 2020, Smith et al., 2020], we assume ideal random hash functions exist, and this assumption can be replaced in practice by cryptographic hash functions [Dickens et al., 2022].
Preliminaries
Consider a database X
= { i t } t 2 [ N ] of N items that are drawn from a large universe of size U , such as IPv4 address of size 2 32 , and for each insert or delete operations, one item can be inserted into or deleted from the database X .
To support ordered statistic such as quantile, we assume that the universe is some ﬁnite totally ordered data universe.
Deﬁnition 2.1.
Given a database X , the frequency of an item x is f ( x ) =
P Nt =1 ⇡ ( i t = x ) where ⇡ returns 1 if i t is x , and 0 otherwise.
Deﬁnition 2.2.
Given a database X of items drawn from an ordered universe, the rank of an item x is R ( x ) = P Nt =1 ⇡ ( i t  x ) where ⇡ returns 1 if i t is less or equal to x and 0 otherwise.
Given the large size of N , calculating the actual statistics, such as frequency and quantile, is often hard, and hence most applications are satisﬁed with an approximation .
The randomized frequency estimation problem takes an accuracy parameter  and a failure probability  such that, for any item x , | b f ( x )  f ( x ) |   · N with high probability 1   , where b f ( x ) is the estimated frequency and f ( x ) is the true frequency [Cormode and Hadjieleftheriou, 2008].
In addition, the randomized quantile approximation problem also takes an accuracy parameter  and a failure probability  such that, for any item x , | b
R ( x )  R ( x ) |   · N with high probability 1   where b R ( x ) is the estimated rank and R ( x ) is the actual rank [Karnin et al., 2016].
2.1 Differential Privacy
Deﬁnition 2.3.
Databases X and X 0 are neighbors ( X ⇠ X 0 ), if they differ in at most one element.
Through this paper, we assume the update/replace deﬁnition of differential privacy instead of add/remove deﬁnition of differential privacy, in which one item in X is updated or replaced by another item in X {+
+}
[Vadhan, 2017].
Deﬁnition 2.4 (Differential Privacy [Dwork et al., 2006]) .
A randomized algorithm M satisﬁes ( ✏ ,  ) -differential privacy ( ( ✏ ,  ) -DP) if for all neighboring databases X , X 0 and for all possible events E in the output range of M , we have
[Equation]
When  = 0 , ✏ -DP is known as pure DP, and when  > 0 , ( ✏ ,  )-DP is known as approximate DP.
Deﬁnition 2.5 (Gaussian Mechanism [Dwork et al., 2006]) .
Deﬁne the ` 2 sensitivity of a function f : N X 7! R d as
[Equation]
The Gaussian mechanism M with noise level  is then given by
[Equation]
Speciﬁcally, the Gaussian mechanism is known to satisfy a stronger notion of privacy known as zeroconcentrated differential privacy (zCDP, deﬁned below); zCDP lies between pure and approximate
DP and can be translated into standard DP notations, as shown in Lemma 2.9.
Moreover, zCDP satisﬁes cleaner composition theorems, as shown in Lemma 2.7.
Deﬁnition 2.6 (zCDP
[Dwork and Rothblum, 2016, Bun and Steinke, 2016]) .
A randomized mechanism M satisﬁes ⇢ -Zero-Concentrated Differential Privacy ( ⇢ -zCDP), if for all neighboring databases
X, X 0 and all ↵ 2 (1 , 1 ) ,
[Equation]
where D ↵ is the Renyi divergence [Van Erven and Harremos, 2014].
Lemma 2.7 (Adaptive composition and Post Processing of zCDP
[Bun and Steinke, 2016]) .
Let
M : X n ! Y and M 0 :
X n ⇥ Y ! Z .
Suppose M satisﬁes ⇢ -zCDP and M {+0 satisﬁes ⇢ 
+}
-zCDP (as a function of its ﬁrst argument).
Deﬁne M 00 : X n ! Z by M 00 ( x ) =
M 0 ( x, M ( x )) .
Then Msatisﬁes ( ⇢ + ⇢ 0 )
-zCDP.
Lemma 2.8 (Privacy Guarantee of Gaussian mechanism [Dwork et al., 2014, Bun and Steinke, 2016]) .
Let f : N X 7! R d be an arbitrary d-dimensional function with ` 2 sensitivity  2 = sup neighboring X,X 0 k f ( X )  f
( X 0 )
k 2 .
Then for any ⇢ > 0 , Gaussian Mechanism with parameter {+ 
+} =  22 2 ⇢ satisﬁes ⇢ -zCDP.
Lemma 2.9 (Converting zCDP to DP [Bun and Steinke, 2016]) .
If M satisﬁes ⇢ -zCDP then M satisﬁes ( ⇢ +p ⇢ log(1 /  ) ,  ) -DP.
As we use exclusively Gaussian mechanisms and their composition in our proposed algorithms, our method actually satisﬁes ( ✏ ,  ) -DP guarantees with stronger parameters than what is implied by zCDP via techniques from [Balle and Wang, 2018, Dong et al., 2019], which reduces the ✏ parameter by a sizable fraction in typical parameter regimes.
We stick to zCDP for clarity and generality, because all our results would apply without changes if we modify the noise into other mechanisms satisfying zCDP, e.g., the Discrete Gaussian Mechanism [Canonne et al., 2020].
2.2 Revisiting Linear Sketches
Charikar et al.
[2002] proposed the CountSketch , a randomized algorithm that summarizes a database and solves the frequency estimation problem.
The CountSketch uses a d ⇥ w array of counters, i.e,
C[d, w], where all the counters are initialized to zero , and has two sets of independent hash functions h and g .
For each row r , the hash function h r maps input items uniformly onto { 1 , . . .
, w } and the hash function g r maps input items uniformly onto {  1 , +1 } .
For item x with value v 2 {  1 , +1 } , CountSketch updates d counters, one per each row, based on the hash values such that for a particular row r , g r ( x ) will be added or subtracted to the counter at the h r ( x ) th index depending on whether x is being inserted or deleted respectively, as shown in Algorithm 1.
Hence, the update time is O ( d ) .
To estimate the frequency of item x , CountSketch will output the median 1  r  d g r ( x ) · C [ r, h r ( x )] , as shown in Algorithm 2.
By updating each row’s counter based on the hashed value of either 1 or  1 and reporting the median for query, CountSketch provides an unbiased estimate.
To reduce the failure probability of bad estimations, d is set to O (log(1 /  )) and it uses O ( 1  log( 1  )) space to solve the frequency estimation problem.
Cormode and Muthukrishnan [2005] proposed the Count-Min sketch that shares the same initialization, update, and data structure as CountSketch.
Count-Min sketch also uses O ( 1  log( 1  )) space to solve the frequency estimation problem.
A major difference is that Count-Min sketch makes all hash functions in set g return positive 1.
As a result, to estimate the frequency of item x , Count-Min sketch returns min 1  r  d C [ r, h r ( x )] instead of the median, as shown in Algorithm 2.
In addition, it has the nice property of never underestimating item’s frequency.
Since linear sketches can approximate an item’s frequency accurately, they also solves the top K approximation problem by returning the K items associated with the highest estimated frequency.
Gilbert et al.
[2002] made the connection between frequency and quantiles, in which the quantile range can be decomposed into at most log U dyadic intervals [Cormode et al., 2019] and the sum of the estimated frequencies for these intervals gives the estimated rank.
Wang et al.
[2013] leveraged the unbiased property of CountSketch and proposed the Dyadic CountSketch (DCS) to estimate the frequencies of each dyadic interval.
For more speciﬁc details, Appendix B and [Cormode and Yi, 2020] provide a comprehensive analysis of quantile sketches.
Private Linear Sketches
In this section, we present new algorithms for differentially private linear sketches.
We highlight that our Private Count-Min and CountSketch only require a different initialization while they share the same update (Algorithm 1) and query (Algorithm 2) with the original Count-Min and CountSketch.
Therefore, the implementation of our algorithms is efﬁcient.
Below we show our private initialization.
In Algorithm 3, the set of arrays we use is C which consists of log(2 /  ) arrays with length 1 /  , which has the same space complexity as original Count-Min and CountSketch.
Recall that two neighboring databases X and X 0 differ by at most one item.
Therefore, after updating all the items respectively, for each corresponding array in C ( X ) and C ( X 0 ) , they differ by at most two elements and the difference is at most 1 .
Then the ` 2 -sensitivity of the set of arrays C is bounded by
[Equation]
By applying the Gaussian Mechanism (Deﬁnition 2.5), we can add independent Gaussian noises
N (0 ,  2 ) to each counter in C , where  = q [Equation] [Equation]
[Equation]
Due to the privacy guarantee of Gaussian
Mechanism (Lemma 2.8), it satisﬁes  22 2  2 = ⇢ -zCDP.
Deﬁne E (  ,  , ⇢ ) = r 2log 2  ⇢ · r log 4  log( 2  )  , for simplicity, we will use E in Algorithm 3 and the proof in Appendix A.
The private version of Count-Min can be derived by adding independent
Gaussian noises N ( E,  2 ) to each counter of C , while the private version of CountSketch can be derived by adding independent Gaussian noises N (0 ,  2 ) to each counter of C .
The private versions of Count-Min and CountSketch are derived by combining Algorithm 3, Algorithm 1, and Algorithm 2.
3.1 Main results about Private Count-Min and CountSketch
We present the privacy guarantee and utility analysis of our Private Count-Min and CountSketch below.
Recall that for each item x , we perform update as in Algorithm 1 and query as in Algorithm 2.
In addition, b f ( x ) is the output estimated frequency and f ( x ) is the actual frequency.
To provide a bound for the additional error due to DP, we deﬁne e f ( x ) to be the non-private estimated frequency (the output of the original Count-Min and CountSketch with the same set of hash functions).
We begin with the properties of Private Count-Min.
Note that all the proofs are deferred to Appendix A.
Theorem 3.1.
Private Count-Min satisﬁes ⇢
-zCDP regardless of the number of queries.
Furthermore, with probability 1   , the output b f ( x ) satisﬁes that
[Equation]
In addition, for each item x , with probability 1   ,
[Equation]
Comparison to Count-Min.
Comparing our Theorem 3.1 with the conclusion in [Cormode and
Muthukrishnan, 2005], our Private Count-Min preserves the nice property that the output will not underestimate the frequency with high probability.
Furthermore, within the most popular regime where the privacy budget ⇢ is a constant, the additional error bound due to differential privacy is independent of the size of database N , therefore it will become negligible as N goes large.
Justiﬁcation of our Gaussian noise.
Note that with high probability, all the noises we add ( E +  i,j ,  i,j ⇠ N (0 ,  2 ) ) will be non-negative.
Therefore, the noise we add and the original error induced by
Count-Min will directly sum up and lead to larger error in evaluation.
However, we claim that the additional E ensures that with high probability, for all item x , the output will not underestimate the actual frequency.
This nice property enables the good performance of our Private Count-Min when used in approximate top k task, as shown in Section 5.
Next, Theorem 3.2 shows the properties of Private CountSketch.
Theorem 3.2.
Private CountSketch satisﬁes ⇢
-zCDP regardless of the number of queries.
Furthermore, the frequency query from Private CountSketch is unbiased and with probability 1   ,
[Equation]
In addition, for each item x , with probability 1   ,
[Equation]
Comparison to CountSketch.
Comparing our Theorem 3.2 with the conclusion in [Charikar et al., 2002], our Private CountSketch preserves the nice property that the output will be an unbiased estimate of the frequency.
This property enables our use of Private CountSketch in quantile estimation below (Section 4).
Furthermore, within the most popular regime where the privacy budget ⇢ is a constant, the additional error bound due to differential privacy is independent of the size of database
N , thus it will become negligible as N goes large.
3.2 The Uniform Bound of Additional Error
Theorem 3.1 and Theorem 3.2 show a uniform bound sup x | b f ( x )  e f ( x ) |  O ( E ) for linear sketches, which upper bounds the additional error imposed on the estimated frequency due to Differential
Privacy guarantees.
To derive the point-wise bound for | b f ( x )  f ( x ) | , we combine our result with the point-wise bound for | [Equation]
[Cormode and Muthukrishnan, 2005, Charikar et al., 2002] (note it is straightforward to apply other analyses on the point-wise bound [Minton and Price, 2014,
Larsen et al., 2021] due to the triangle inequality).
Moreover, in Appendix E, we demonstrate that our analysis provides the tight uniform bound when items are drawn from a large universe.
In this section, we apply our Private CountSketch to state of the art quantile sketches in the turnstile model.
Our private Dyadic CountSketch can estimate all the quantiles accurately at the same time while ensuring differential privacy.
4.1 Revisiting DCS
In [Wang et al., 2013], it is shown that DCS can return all  -approximate quantiles with constant probability using space O [Equation]
⌘ .
More speciﬁcally, the sketch structure here consists of log U CountSketches, each CountSketch uses a counter arrays C , which is d ⇥ w counters.
The choice of d, w follows d = ⇥ [Equation] ⌘ and w = O ⇣q
[Equation] ⌘ .
4.2 Private DCS
In this work, we aim to estimate the quantiles accurately while preserving privacy.
We do this by replacing CountSketch with PrivateCountSketch, which bases on the same structure as CountSketch discussed above.
Given the privacy budget ⇢ , the privacy budget of each Private CountSketch is thus ⇢ 0 = ⇢ log U , due to composition of zCDP (Lemma 2.7).
The ` 2 -sensitivity of each Private
CountSketch is
[Equation]
To keep the whole algorithm ⇢ -zCDP, it sufﬁces to keep each CountSketch ⇢ 0zCDP (Lemma 2.7).
Therefore, Gaussian Mechanism (Deﬁnition 2.5) with =
O ⇣ log U log ⇣ log U  ⌘ / ⇢ ⌘ ensures ⇢
-zCDP (Lemma 2.8).
Similar to Lemma A.1, deﬁne
E
[Equation]
! , we can prove that with constant probability, all the Gaussian noises we add to all log U CountSketches are bounded by E (for simplicity, we use E to represent E (  , U ) ).
Conditioned on the high probability event above, we prove that for a ﬁxed quantile, the estimated quantile will be accurate with high probability.
As has been proven in Theorem 3.2, the output estimated frequency is unbiased for any item.
Therefore, similar to [Wang et al., 2013], for any item x (corresponding to a ﬁxed CountSketch), we have the output b f ( x ) of that CountSketch satisﬁes
[Equation]
By a union bound, with probability 1  log U ⇥ O ⇣
[Equation] = 1  O (  ) , for any item corresponding to this ﬁxed quantile, the error of CountSketch is bounded by 1 w · N + E .
Conditioned upon this event, by Hoeffding’s inequality, with probability 1  O ⇣  log U ⌘ , the sum of log U such independent errors is bounded by [Equation]
[Equation]
where E {+
+} =
O log U log ( log U  )
[Equation]
log U log [Equation]  ! .
To sum up, for a ﬁxed quantile, with probability 1  O (  ) , the estimating error is bounded by  · N + E 0 .
Finally, apply another union bound on the 1  different quantiles, with constant probability, all the quantiles are estimated accurately (within the error bound (2)).
Note that similar to [Wang et al., 2013], the failure probability here is a constant.
For any failure probability  , we can further increase d by a factor of log 1  to reduce this failure probability to  .
Take-away of Private DCS.
First, our Private DCS has a same space complexity as the original
DCS.
In addition, according to (2), the additional error bound is proportional to log U log 1  p ⇢ (ignoring log log terms), and independent to the size of database N .
In the most popular regime where the privacy budget ⇢ is a constant, the additional error bound only appears as lower order terms, which will become negligible as N goes large.
Evaluation
We have implemented DP linear sketches and DP DCS, and conducted extensive experiments to evaluated the privacy-utility trade-off of our proposed private sketches.
The implementations are written in Python with the advantage of fast prototyping and good readability.
The code for the following experiments can be found on Github 3 .
5.1 Data Sets
The experimental evaluation is conducted using both synthetic and real world data sets.
We consider the synthetic Zipf dataset Zipf [2016] with universe size of 2 16 and the source IP addresses from
CAIDA Anonymized Internet Trace 2015 dataset pas with universe size of 2 32 .
For each independent run in the experiments, we use an input database size N = 10 5 .
5.2 Metrics
In all experiments, we average the various metrics over 5 independent runs to minimize the measurement variance.
The metrics used in the experiments are:
Average Relative Error : Let the set denotes all unique items in the database. Average
Relative Error (ARE) is computed based on
in which [Equation]
F1 Score : F1 score is the harmonic mean of the precision and recall ( 2 · precision · recall precision + recall ).
Average Rank Error : For each evenly spaced quantile and its associated item, we average the distance between the true rank and estimated rank.
We use ARE to evaluate sketch performance on frequency estimation and F1 score to evaluate the sketch’s performance in identifying the top 10 items.
For quantile approximation, we consider the m evenly spaced quantiles and items.
For instance, if m = 1 , we consider the rank error for the median item; if m = 2 , we consider then average rank error for the 33 rd and 67 th percentile items.
Lower
ARE and average rank error, and higher F1 score indicate better approximation.
5.3 Private Linear Sketches Experiments
To evaluate the utility of DP linear sketches, we compare the average relative error (ARE) and F score for frequency estimation and identify the top 10 items, respectively.
As shown in Figure 1, the x-axis represents the space budget for each sketch (from 9.2 KB to 147.3 KB), and the y-axis denotes
ARE or F1 score.
The DP linear sketches use ⇢ 2 { 0 . 1 , 1 , 10 } in which lower ⇢ value indicates more noise need to be added, and all sketches assume  = 1% .
For frequency estimation, the performance of our private CountSketch with various privacy budgets is basically equivalent to the performance of the non-private CountSketch.
Under different space and privacy budgets, they have minimal difference in ARE for both Zipf and CAIDA datasets, meaning that, while providing strong privacy guarantee, the estimated frequencies are still very accurate.
The accurate estimation of private CountSketch is primarily due to the unbiased nature of CountSketch in which, by adding Gaussian noise, the private CountSketch still provides unbiased estimation for an item’s frequency as proved in Theorem 3.2.
As shown in both Figure 1(a) and Figure 1(b), the performance of private Count-Min degrades when the space budget increases or the privacy budget decreases.
This behavior is expected as the upper bound on the frequency error in Theorem 3.1 has a dependency on both  and ⇢ .
In order to preserve the property of not underestimating an item’s frequency, the private Count-Min sketch needs to add larger noise to each counter when the number of counters increases.
As a result, the estimated frequencies for low-frequency items become inﬂated and this in turn decreases the overall accuracy.
[Figure]
For approximate top 10 items, private CountSketch has similar performance to CountSketch.
Since both non-private and private CountSketch are unbiased, they may underestimate the frequency of true top K items and decrease the recall.
On the other hand, the property of no underestimation is desirable for approximate top K items.
In particular, non-private and private Count-Min sketch score high F1 scores for all datasets.
While providing privacy guarantees, private Count-Min achieve 1.
F1 scores for all space and all privacy budgets in Zipf dataset, as shown in Figure 1(c).
5.4 Private Quantile Sketch Experiments
[Figure]
To evaluate the utility of DP DCS, we compare the average rank error.
As shown in Figure 2, the x-axis represents the number of evenly spaced quantiles, and the y-axis denotes the average rank error.
The DP DCS use privacy budget ⇢ 2 { 0 . 1 , 1 , 10 } and all sketches assume  = 1% .
For the quantile approximation, we observe that the increase in the number of evenly spaced quantiles does not impact the average rank error, as shown in both Figure 2(a) and Figure 2(b).
Since the
CAIDA dataset universe size ( 2 32 ) is larger than Zipf dataset universe size ( 2 16 ), the average rank error in the CAIDA dataset is larger than the average rank error in the Zipf dataset.
As shown in
Equation (2), the error bound has a term depending on the universe size in which a large universe size leads to more error.
When the privacy budget decreases, the average rank error increases as more noise needs to be added.
Comparing DP DCS with strong privacy ( ⇢ = 0 . 1 ) to DCS, the increase in rank error is relatively small compared to the database size of 10 5 .
In addition, the desired rank error upper bound is  · N = 10 3 and all the rank errors are one order of magnitude lower.
Related Works
In this section, we discuss and compare our results to previous literature on Private Count-Min
Sketch [Mir et al., 2011, Melis et al., 2015, Ghazi et al., 2019], and the concurrent work on Private
CountSketch
[Pagh and Thorup, 2022].
In fact, Pagh and Thorup [2022] and us both independently discovered the same algorithm for Private CountSketch with differences in the theoretical analysis.
To the best of our knowledge, we are the ﬁrst to present a DP quantile sketch in the turnstile model.
Private Count-Min.
Mir et al.
[2011] proposed to add Laplace noise into the Count-Min Sketch estimator to derive the number of heavy hitters with Pan-Privacy [Dwork et al., 2010].
Similarly, Melis et al.
[2015] add independent Laplace noise to each counter of the sketch instead of the estimator.
However, adding Laplace noise breaks the nice property of never underestimation in Count-Min.
In contrast, our private Count-Min guarantees no underestimation with high probability.
[Ghazi et al., 2019] added one-sided binomial noise into each counter of the sketch to preserve the property of no underestimation.
However, using the Binomial mechanism inherently implies approximate differential privacy [Canonne et al., 2020].
In contrast, by using the Gaussian mechanism, our Private
Count-Min provides the stronger concentrated differential privacy guarantee.
Private CountSketch.
Pagh and Thorup [2022] and us both independently discovered the same algorithm for private CountSketch.
There is a major difference in the analysis and we believe both analyses are valuable, in which Pagh and Thorup [2022] focused on deriving a tight point-wise bound for | b f ( x )  f ( x ) | , while we focused on deriving a uniform bound for sup x | b f ( x )  e f ( x ) | .
Our uniform bound for sup x | b f ( x )  e f ( x ) | can derive the point-wise bound for | b f ( x )  f ( x ) | , by combining our result with any point-wise bound for | e f ( x )  f ( x ) | due to the triangle inequality.
[Pagh and Thorup, 2022] obtains a tighter point-wise bound by using concentration of median instead of triangle inequality.
However, Pagh and Thorup [2022]’s analysis can not imply the point-wise bound for | b f ( x )  e f ( x ) | .
More detailed comparisons are included in Appendix C.
Conclusion
In this work, we demonstrate that linear sketches can be made differentially private and provide useful information while maintaining their original properties by adding a small amount of Gaussian noise at initialization.
In addition, leveraging the private CountSketch, we propose the DP DCS for quantile approximation in the turnstile model.
DP DCS achieves low rank errors even for a large data universe.
Moreover, for all the proposed algorithms, when the privacy budget is constant, the additional error due to privacy is independent of the database size and the error will become negligible when the database grows larger.
Moreover, private linear sketches bring new opportunities for other statistical questions such as the private euclidean distance estimation [Stausholm, 2021] which can be calculate as the dot product of two private linear sketches.
As a result, we believe our proposed algorithms are efﬁcient and practical for real-world systems and enable these systems to perform data analysis and machine learning tasks privately.
Acknowledgments and Disclosure of Funding
This work is partially supported by gifts from Snowﬂake Inc and NSF grants CNS-1703560, CNS1815733 and CNS-2048091.
The authors thank Rasmus Pagh for a helpful discussion regarding their concurrent work [Pagh and Thorup, 2022].
The authors also thank Adam Smith for clarifying the mergeability in the inherently private Flajolet-Martin Sketch [Smith et al., 2020]. Checklist
For all authors... (a) Do the main claims made in the abstract and introduction accurately reﬂect the paper’s contributions and scope?
[Yes] Claims in abstract and introduction reﬂect our contributions.
(b) Did you describe the limitations of your work?
[Yes] In Theorem 3.1, the private CountMin frequency estimation’s additional error has a dependency of
q log
1  in order to keep the property of not underestimating item’s frequency.
Assume database size is ﬁxed, decreasing gamma will increase the average error.
Note the error is independent from the database size, and when database size grows, the error will become negligible.
(c) Did you discuss any potential negative societal impacts of your work?
[N/A] Apply our proposed algorithms to current systems will protect user privacy.
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] 2.
If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[Yes] (b) Did you include complete proofs of all theoretical results?
[Yes] We put some proves in Appendix A due to space limits 3.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] We will provide an url to our Github Repo once the paper is accepted.
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] We provide the parameters used for the experiments.
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[N/A] We didn’t use random seed (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[N/A] we didn’t use any external resources beside a macbook pro. 4.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[N/A]
We did not use existing assets.
(b) Did you mention the license of the assets?
[N/A] (c) Did you include any new assets either in the supplemental material or as a URL?
[N/A] (d) Did you discuss whether
and how consent was obtained from people whose data you’re using/curating?
[N/A] (e) Did you discuss whether the data you are using/curating contains personally identiﬁable information or offensive content?
[N/A] 5.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A]
We did not use crowdsourcing or conducted research with human subjects.
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]