DP-PCA: Statistically Optimal and Differentially Private PCA
Abstract
We study the canonical statistical task of computing the principal component from n i.i.d.
data in d dimensions under ( ε, δ ) -differential privacy.
Although extensively studied in literature, existing solutions fall short on two key aspects: ( i ) even for
Gaussian data, existing private algorithms require the number of samples n to scale super-linearly with d , i.e., n = Ω( d 3 / 2 ) , to obtain non-trivial results while non-private PCA requires only n = O ( d ) , and ( ii ) existing techniques suffer from a non-vanishing error even when the randomness in each data point is arbitrarily small.
We propose DP-PCA, which is a single-pass algorithm that overcomes both limitations.
It is based on a private minibatch gradient ascent method that relies on private mean estimation to add minimal noise required to ensure privacy by adapting to the geometry of a given minibatch of gradients.
For sub-Gaussian data, we provide nearly optimal statistical error rates even for n =
˜
O
( d ) .
Furthermore, we provide a lower bound showing that sub-Gaussian style assumption is necessary in obtaining the optimal error rate.
Introduction
Principal Component Analysis (PCA) is a fundamental statistical tool with multiple applications including dimensionality reduction, data visualization, and noise reduction.
Naturally, it is a key part of most standard data analysis and ML pipelines.
However, when applied to data collected from numerous individuals, such as the U.S. Census data, outcome of PCA might reveal highly sensitive personal information.
We investigate the design of privacy preserving PCA algorithms and the involved privacy/utility tradeoffs, for computing the first principal component, that should serve as the building block of more general rank- k PCA
Differential privacy (DP) is a widely accepted mathematical notion of privacy introduced in [21], which is a standard in releasing the U.S. Census data [2] and also deployed in commercial systems [72, 25, 27].
A query to a database is said to be ( ε, δ ) -differentialy
private if a strong adversary who knows all other entries but one cannot infer that one entry from the query output, with high confidence.
The parameters ε and δ restricts the confidence as measured by the Type-I and II errors [49].
Smaller values of ε ∈ [0 , ∞ ) and δ ∈ [0 , 1] imply stronger privacy and plausible deniability for the participants.
For non-private PCA with n i.i.d.
samples in d dimensions, the popular Oja’s algorithm (provided in
Algorithm 1) achieves the optimal error of sin(ˆ v, v 1 ) =
˜Θ( (cid:112) d/n ) , where the error is measured by the sine function of the angle between the estimate, ˆ v , and the principal component, v 1 , [45].
For differentially private PCA, there is a natural fundamental question: what is the extra cost we pay in the error rate for ensuring ( ε, δ ) -DP?
We introduce a novel approach we call DP-PCA (Algorithm 3) and show that it achieves an error bounded by sin(ˆ v, v ) =
˜ O ( (cid:112) d/n + d/ ( εn )) for sub-Gaussian-like data defined in Assumption 1, which is a broad class of light-tailed distributions that includes Gaussian data as a special case.
The second term characterizes the cost of privacy and this is tight; we prove a nearly matching information theoretic lower bound showing that no ( ε, δ ) -DP algorithm can achieve a smaller error.
This significantly improves upon a long line of existing private algorithms for PCA, e.g., [14, 9, 38, 36, 23].
These existing algorithms are analyzed for fixed and non-stochastic data and achieve sub-optimal error rates of O ( (cid:112) d/n + d 3 / 2 / ( εn )) even in the stochastic setting we consider.
A remaining question is whether the sub-Gaussian-like assumption, namely Assumption A.4, is necessary or if it is an artifact of our analysis and our algorithm.
It turns out that such an assumption on the lightness of the tail is critical; we prove an algorithmic independent and information theoretic lower bound (Theorem 5.4) to show that, without such an assumption, the cost of privacy is lower bounded by Ω( (cid:112) d/ ( εn )) .
This proves a separation of the error depending on the lightness of the tail.
We start with the formal description of the stochastic setting in Section 2 and present Oja’s algorithm for non-private PCA.
Our first attempt in making this algorithm private in Section 3 already achieves near-optimal error, if the data is strictly from a Gaussian distribution.
However, there are two remaining challenges that we describe in detail in Section 4: ( i ) the excessive number of iterations of
Private Oja’s Algorithm (Algorithm 2) prevents using typical values of ε used in practice, and ( ii ) for general sub-Gaussian-like distributions, the error does not vanish even when the noise in the data (as measured by a certain fourth moment of a function of the data) vanishes.
The first challenge is due to the analysis that requires amplification by shuffling [24] that is restrictive.
The second is due to its reliance on gradient norm clipping [1] that does not adapt to the geometry of the current gradients.
This drives the design of DP-PCA in Section 5 that critically relies on two techniques to overcome each challenge, respectively.
First, minibatch SGD (instead of single sample SGD) significantly reduces the number iterations, thus obviating the need for amplification by shuffling.
Next, private mean estimation (instead of gradient norm clipping and noise adding) adapts to the geometry of the problem and adds the minimal noise necessary to achieve privacy.
The main idea of this geometry adaptive stochastic gradient update is explained in detail in Section 6, along with a sketch of a proof.
Notations.
For a vector x ∈ R d , we use ∥ x ∥ to denote the Euclidean norm.
For a matrix X ∈ R d × d , we use ∥ X ∥ 2 = max ∥ v ∥ =1 ∥ Xv ∥ 2 to denote the spectral norm.
We use I d to denote d × d identity matrix.
For n ∈ Z + , let [ n ] := { 1 , 2 , . . . , n } .
Let S d − 1denote the unit d -sphere of ℓ 2 , i.e.,
S d − 1:= { x ∈ R d : ∥ x ∥ = 1 } .
˜ O
() hides logarithmic factors in n , d , and the failure probability ζ .
Problem formulation and background on DP
Typical PCA assumes i.i.d.
data { x i ∈ R d } from a distribution and finds the first eigenvector of Σ = E
[( x i − E
[ x i ])
( x i − E
[ x i ])
⊤ ] ∈ R d × d .
Our approach allows for a more general class of data { A i ∈ R d × d } that recovers the standard case when A i =
( x i − E
[ x i ])
( x i − E
[ x i ]) ⊤ .
Assumption 1 ( (Σ , { λ i } di =1 , M, V, K, κ, a, γ 2 ) -model) .
Let A 1 , A 2 , . . .
, A n ∈ R d × d be a sequence of (not necessarily symmetric) matrices sampled independently from the same distribution that satisfy the following with PSD matrices Σ ∈ R d × d and H u ∈ R d × d , and positive scalar parameters
M, V, K , κ , a , and γ 2 :
A.1.
Let Σ :=
E [ A i ]
, for a
symmetric positive semidefinite (PSD) matrix Σ ∈ R d × d , λ i denote the
i -th largest eigenvalue of Σ , and κ :=
λ 1 / ( λ 1 − λ 2 )
A.2.
∥
A
i − Σ ∥ 2 ≤ λ 1 M almost surely, A.3.
max (cid:8)(cid:13)(cid:13) E (cid:2)
( A i − Σ)( A i − Σ) ⊤ (cid:3)(cid:13)(cid:13) 2 , (cid:13)(cid:13) E (cid:2)
( A i − Σ) ⊤ ( A i − Σ) (cid:3)(cid:13)(cid:13) 2 (cid:9) ≤ λ 21 V ,
A.4.
max
[Equation]
∥ =1 ,
[Equation]
E
[Equation]
(cid:18)(cid:16)
[Equation]
H [Equation] 2 (cid:17) 1 / (2 a ) (cid:19)(cid:21) ≤ 2 , where H u :=
(1 /λ 21 ) E
[( A i − Σ) uu ⊤ ( A i − Σ) ⊤ ] .
We denote γ 2 := max ∥ u
∥ =1 ∥
H u ∥ 2 .
The first three assumptions are required for PCA even if privacy is not needed.
The last assumption provides a Gaussian-like tail bound that determines how much noise we need to introduce in the algorithm for ( ε, δ ) -DP.
The following lemma is useful in the analyses.
Lemma 2.1.
Under A.1 and A.4 in Assumption 1, for any unit vector u , v , with probability 1 − ζ ,
[Equation]
2.1 Oja’s algorithm
In a non-private setting, the following streaming algorithm introduced in [69] achieves optimal sample complexity as analyzed in [45].
It is a projected stochastic gradient ascent on the objective defined on the empirical covariance: max ∥ w ∥ =1 (1 /n ) (cid:80) ni
=1 w ⊤ A i w .
Algorithm 1: (Non-private) Oja’s Algorithm
Central to our analysis is the following error bound on Oja’s Algorithm from [45].
Theorem 2.2 ([45, Theorem 4.1]) .
Under Assumptions A.1-A.3, suppose the step size η t = α ( λ 1 − λ 2 )( ξ + t ) for some α > 1 / 2 and ξ := 20 max (cid:0)
[Equation]
If T > ξ then there exists a constant C > 0 such that Algorithm 1 outputs w T achieving w.p. 1 − ζ ,
[Equation]
2.2 Background on Differential Privacy
Differential privacy (DP), introduced in [21], is a de facto mathematical measure for privacy leakage of a database accessed via queries.
It ensures that even an adversary who knows all other entries cannot identify with a high confidence whether a person of interest participated in a database or not.
Definition 2.3 (Differential privacy [21]) .
Given two multisets S and S ′ , we say the pair ( S, S ′ ) is neighboring if | S \ S ′ | + | S ′ \ S | ≤ 1 .
We say a stochastic query q over a dataset S satisfies ( ε, δ ) -differential
privacy for some ε > 0 and δ ∈ (0 , 1) if P ( q ( S ) ∈
A )
≤ e ε P ( q ( S ′ )
∈ A )
+ δ for all neighboring ( S, S ′ )
and all subset A of the range of q .
Small values of ε and δ ensures that the adversary cannot identify any single data point with high confidence, thus providing plausible deniability.
We provide useful DP lemmas in Appendix B. Within our stochastic gradient descent approach to PCA, we rely on the Gaussian mechanism to privatize each update.
The sensitivity of a query q is defined as ∆ q :=
sup neighboring ( S,S ′ )
∥ q ( S ) − q
S ′ )
∥ .
Lemma 2.4 (Gaussian mechanism [22]) .
For a query q with sensitivity ∆ q , ε ∈ (0 , 1) , and δ ∈ (0 , 1) , the Gaussian mechanism outputs q ( S ) + N (0 , (∆ q ( (cid:112) 2 log(1 .
25 /δ ))
/ε )
2 I d ) and achieves ( ε, δ ) -DP.
This is a special case of a family of output perturbation mechanisms which includes the Laplace mechanism [21] and stair-case mechanisms [34].
The latter is shown to be optimal in one-dimension [35] and for hypothesis testing under local DP [48].
Another mechanism we frequently use is the private histogram learner of [56], whose analysis is provide in Appendix B, along with various composition theorems to provide end-to-end guarantees.
2.3 Comparisons with existing results in private PCA
We briefly discuss the most closely related work and provide more previous work in Appendix A.
Most existing results assume a fixed data under a deterministic setting where each sample has a bounded
Algorithm
Input: S =
{ A i ∈ R d × d } ni =1 , privacy ( ε, δ ) , learning rates { η t } nt = 1 Randomly permute S and choose w 0 uniformly at random from the unit sphere 2 Set DP noise multiplier: α ← C ′ log( n/δ ) / ( ε √ n ) 3 Set clipping threshold:
β ← Cλ 1 √ d ( Kγ log a ( nd/ζ ) + 1) 4 for t=1, 2, ..., n do
Sample z t ∼ N (0 , I d ) w ′ t ← w t − 1 + η t clip β ( A t w t − 1 ) + 2 η t βαz t where clip β ( x ) = x · min { 1 , β ∥ x ∥ 2 } w t ← w ′ t / ∥ w ′ t ∥ 8 Return w n norm, ∥ x i ∥ ≤ β , and the goal is to find the top eigenvector of ˆΣ :=
(1 /n ) (cid:80) ni
=1 ( x i − ˆ µ )( x i − ˆ µ ) ⊤ for the empirical mean ˆ µ .
For the purpose of comparisons, consider Gaussian x i ∼ N (0 , Σ) with ∥ x i ∥ ≤ β = O ( (cid:112) λ 1 d log( n/ζ )) for all i ∈ [ n ] with probability 1 − ζ .
The first line of approaches in [9, 14, 23] is a Gaussian mechanism that outputs PCA( (cid:98) Σ + Z ) , where Z is a symmetric matrix with i.i.d.
Gaussian entries with a variance (( β 2 /nε )
(cid:112) 2 log(1 .
25 /δ )) 2 to ensure ( ε, δ ) -DP.
The tightest result in [23, Theorem 7] achieves
[Equation]
with high probability, under a strong assumption that the spectral gap is very large: λ 1 − λ 2 = ω ( d 3 / 2 (cid:112) log(1 /δ ) / ( εn )) .
In a typical scenario with λ 1 =
O
(1) , this requires a large sample size of n = ω ( d 3 / 2 /ε ) .
Since this Gaussian mechanism does not exploit the statistical properties of i.i.d.
samples, the second term in this upper bound is larger by a factor of d 1 / 2 compared to the proposed DP-PCA (Corollary 5.2).
The error rate of Eq.
(3) is also achieved in [38, 36] by adding
Gaussian noise to the standard power method for computing the principal components.
When the spectral gap, λ 1 − λ 2 , is smaller, it is possible to trade-off the dependence in κ and the sampling ratio d/n , which we do not address in this work but is surveyed in Appendix A.
First attempt: making Oja’s Algorithm private
Following the standard recipe in training with DP-SGD, e.g., [1] and a recent work [75], we introduce
Private Oja’s Algorithm in Algorithm 2.
At each gradient update, we first apply gradient norm clipping to limit the contribution of a single data point and next add an appropriately chosen Gaussian noise from Lemma 2.4 to achieve ( ε, δ ) -DP, end-to-end.
The choice of clipping threshold β ensures that, with high probability under our assumption, we do not clip any gradients.
The choice of noise multiplier α ensures ( ε, δ ) -DP.
One caveat in streaming algorithms is that we access data n times, each with a private mechanism, but accessing only a single data point at a time.
To prevent excessive privacy loss due to such a large number of data accesses, we apply a random shuffling in line 1 Algorithm 2, in order to benefit from a standard amplification by shuffling [24, 29].
This gives an amplified privacy guarantee that allows us to add a small noise proportional to α
= O (log( n/δ ) / ( ε √ n )) .
Without the shuffle amplification, we will instead need a larger noise scaling as α = O (log( n/δ ) /ε ) , resulting in a suboptimal utility guarantee.
However, this comes with a restriction that the amplification holds only for small values of ε =
O ( (cid:112) log( n/δ ) /n ) .
Our first contribution in the proposed DP-PCA (Algorithm 3) is to expand this range to ε
=
O (1) , which includes the practical regime of interest ε ∈ [1 / 2 , 5] .
Lemma 3.1 (Privacy) .
If ε =
O ( (cid:112) log( n/δ ) /n ) and the noise multiplier is chosen to be α = Ω (log( n/δ ) / ( ε √ n )) , then Algorithm 2 is ( ε, δ ) -DP.
Under Assumption 1, we select gradient norm clipping threshold β such that no gradient exceeds β .
Lemma 3.2 (Gradient clipping) .
Let β
= Cλ 1 √ d ( Kγ log a ( nd/ζ ) + 1) for some constant C > 0 .
Then with probability 1 − ζ , ∥
A t w t − 1 ∥ ≤ β for any fixed w t − 1 independent of A t , for all t ∈ [ n ] .
We provide proofs of both lemmas and the next theorem in Appendix D. When no clipping is applied, we can use the standard analysis of Oja’s Algorithm from [45] to prove the following utility guarantee.
Theorem 3.3 (Utility) .
Given n i.i.d.
samples { A i ∈ R d × d } ni =1 satisfying Assumption 1 with parameters (Σ , M, V, K, κ, a, γ 2 ) , if
[Equation]
with a large enough constant, then there exists a positive universal constant c 1 and a choice of learning rate η t that depends on ( t, M , V , K , a , λ 1 , λ 1 − λ 2 , n , d , ε , δ ) such that Algorithm 2 with a choice of ζ = 0 .
01 outputs w n that achieves with probability 0 . 99 ,
[Equation]
where (cid:101) O ( · ) hides poly-logarithmic factors in n , d , 1 /ε , and log(1 /δ ) and polynomial factors in K .
The first term in Eq.
(5) matches the non-private error rate for Oja’s algorithm in Eq.
(2) with α = O (log n ) and T = n , and the second term is the price we pay for ensuring ( ε, δ ) -DP.
Remark 3.4.
For a canonical setting of a Gaussian data with A i
= x i x
⊤ i and x i ∼ N (0 , Σ) , we have, for example from [70, Lemma 1.12],
that M = O ( d log( n )) , V = O ( d ) , K = 4 , a = 1 , and γ 2 =
O (1) .
Theorem 3.3 implies the following error rate:
[Equation]
Comparing to a lower bound in Theorem 5.3, this is already near optimal.
However, for general distributions satisfying Assumption 1, Algorithm 2 (in particular the second term in Eq.
(5)) can be significantly sub-optimal.
We explain this second weakness of Private Oja’s Algorithm in the following section (the first weakness is the restriction on ε
=
O ( (cid:112) log( n/δ ) /n ) ).
Two remaining challenges
We explain the two remaining challenges in Private Oja’s Algorithm and propose techniques to overcomes these challenges that lead to the design of DP-PCA (Algorithm 3).
First challenge: restricted range of ε = O ( (cid:112) log( n/δ ) /n ) .
This is due to the large number, n , of iterations that necessitates the use of the amplification by shuffling in Theorem D.1.
We reduce the number of iterations with minibatch SGD.
For T
=
O (log 2 n ) and t = 1 , 2 , . .
, T , we repeat
[Equation]
where z t ∼ N (0 , I d ) and the minibatch size is B =
⌊ n/T ⌋ .
Since the dataset is accessed only
T =
O (log 2 n ) times, the end-to-end privacy is analyzed with the serial composition (Lemma B.3) instead of the amplification by shuffling.
This ensures ( ε, δ ) -DP for any ε =
O (1) , resolving the first challenge, and still achieves the utility guarantee of Eq.
Second challenge: excessive noise for privacy.
This is best explained with an example.
Example 4.1 (Signal and noise separation) .
Consider a setting with A i
= x
i x ⊤ i and x i
= s i
+ n i where s i
= v with probability half
and s i = − v otherwise for a unit norm vector v and n i ∼
N (0 , σ 2 I ) .
We want to find the principal component of Σ = E
[ x i x ⊤ i ] =
vv ⊤ + σ
I , which is v .
This construction decomposes the signal and the noise.
For A i = vv
⊤ + s i n ⊤ i + n i s ⊤ i + n i n ⊤ i , the signal component is determined by vv ⊤ that is deterministic due to the sign cancelling.
The noise component is s i n ⊤ i + n i s ⊤ i + n i n ⊤ i which is random.
We can control the Signal-to-Noise Ratio (SNR), 1 /σ 2 , by changing σ 2 , and we are particularly interested in the regime where σ 2 is small.
As we are interested in σ 2 < 1 , this satisfies Assumption 1 with λ 1 = 1 + σ 2 , λ 2 = σ 2 , V = O ( dσ 2 ) ,
K
= O (1) , a = 1 , and γ 2 = σ 2 .
Substituting this into Eq.
(5) , Private Oja’s Algorithm achieves
[Equation]
where we are interested in σ 2 < 1 .
Input: S =
{ A i } ni =1 , ( ε, δ )
, batch size B ∈ Z
+ , learning rates { η t } ⌊ n/B ⌋ t = , probability ζ ∈ (0 , 1)
Choose w 0 uniformly at random from the unit sphere 2 for t = 1 , 2 , . .
, T =
⌊ n/B ⌋ do
Run Private Top Eigenvalue Estimation (Algorithm 4) with ( ε/ 2 , δ/ 2) -DP and failure probability ζ/ (2 T ) on { A B ( t − 1)+ i w t − 1 } ⌊ B/ 2 ⌋ i =1 .
Let the returned estimation be ˆ Λ t > 0 .
Run Private Mean Estimation (Algorithm 5) with ( ε/ 2 , δ/ 2) -DP, failure probability ζ/ (2 T ) , and the estimated eigenvalue 2ˆΛ t on (cid:8) A B ( t − 1)+ ⌊ B/ 2 ⌋ + i w t − 1 (cid:9) i ∈⌊ B/ 2 ⌋ .
Let the returned mean gradient estimate be ˆ g t ∈ R d .
w
[Equation]
t ← w
[Equation]
+
[Equation]
ˆ g
[Equation]
, w
[Equation]
∥ 6 Return w T
This is problematic since the second term, due to the DP noise, does not vanish as the randomness σ 2 in the data decreases.
We do not observe this for Gaussian data where signal and noise scale proportionally as shown below.
We reduce the noise we add for privacy, by switching from a simple norm clipping, that adds noise proportional to the norm of the gradients, to private estimation, that only requires the noise to scale as the range of the gradients, i.e. the maximum distance between two gradients in the minibatch.
The toy example above showcases that the range can be arbitrarily smaller than the maximum norm (Fig. 1).
We want to emphasize that although the idea of using private estimation within an optimization has been conceptually proposed in abstract settings, e.g., in [51], DP-PCA is the first setting where ( i ) such separation between the norm and the range of the gradients holds under any statistical model, and hence ( ii ) the long line of recent advances in private estimation provides significant gain over the simple DP-SGD [1].
Differentially Private Principal Component Analysis (DP-PCA)
Combining the two ideas of minibatch SGD and private mean estimation, we propose DP-SGD.
We use minibatch SGD of minibatch size B =
O ( n/ log 2 n ) to allow for larger range of ε
= O (1) .
We use Private Mean Estimation to add an appropriate level of noise chosen adaptively according to
Private Eigenvalue Estimation.
We describe details of both sub-routines in Section 6.
We show an upper bound on the error achieved by DP-PCA under an appropriate choice of the learning rate.
We provide a complete proof in Appendix E.1 that includes the explicit choice of the learning rate η t in Eq.
(67), and a proof sketch is provided in Section 6.1.
Theorem 5.1.
For ε ∈ (0 , 0 . 9) , DP-PCA guarantees ( ε, δ ) -DP for all S , B , ζ , and δ .
Given n i.i.d.
samples { A i ∈ R d × d } ni =1 satisfying Assumption 1 with parameters (Σ , M, V, K, κ, a, γ 2 ) , if n
[Equation]
with a large enough constant and δ ≤ 1 /n , then there exists a positive universal constant c 1 and a choice of learning rate η t that depends on ( t, M , V , K , a , λ 1 , λ 1 − λ 2 , n , d , ε , δ ) such that
T =
⌊ n/B ⌋ steps of DP-PCA in Algorithm 3 with choices of ζ = 0 .
01 and B = c 1 n/ (log n ) 2 , outputs w T such that with probability 0 .
[Equation]
where (cid:101) O ( · ) hides poly-logarithmic factors in n , d , 1 /ε , and log(1 /δ ) and polynomial factors in K .
We further interpret this analysis and show that ( i ) DP-PCA is nearly optimal when the data is from a Gaussian distribution by comparing against a lower bound (Theorem 5.3); and ( ii ) DPPCA significantly improves upon the private Oja’s algorithm under Example 4.1.
We discuss the necessity of some of the assumptions at the end of this section, including how to agnostically find the appropriate learning rate scheduling.
Near-optimality of DP-PCA under Gaussian distributions.
Consider the case of i.i.d.
samples { x i } ni =1 from a Gaussian distribution from Remark 3.4.
Corollary 5.2 (Upper bound; Gaussian distribution) .
Under the hypotheses of Theorem 5.1 and { A i = x
i x ⊤ i } ni =1 with Gaussian random vectors x i ’s, after T = n/B steps, DP-PCA outputs w T that achieves, with probability 0 . 99 ,
[Equation]
We prove a nearly matching lower bound, up to factors of (cid:112) λ 1 /λ 2 and (cid:112) log(1 /δ ) .
One caveat is that the lower bound assumes pure -DP with δ = 0 .
We do not yet have a lower bound technique for approximate DP that is tight, and all known approximate DP lower bounds have gaps to achievable upper bounds in its dependence in log(1 /δ ) , e.g., [5, 62].
We provide a proof in Appendix C.1.
Theorem 5.3 (Lower bound; Gaussian distribution) .
Let M ε be a class of ( ε, 0) -DP estimators that map n i.i.d.
samples to an estimate ˆ v ∈ R d .
A set of Gaussian distributions with ( λ 1 , λ 2 ) as the first and second eigenvalues of the covariance matrix is denoted by P ( λ 1 ,λ 2 ) .
For d>c where c > 0 is some absolute constant, there exists a universal constant C > 0 such that
[Equation]
Comparisons with private Oja’s algorithm.
We demonstrate that DP-PCA can significantly improve upon Private Oja’s Algorithm with Example 4.1, where DP-PCA achieves an error bound of sin( w T , v 1 ) =
˜ O (cid:0) σ (cid:112) d/n + σd (cid:112) log(1 /δ ) / ( εn ) (cid:1) .
As the noise power σ 2 decreases DP-PCA achieves a vanishing error, whereas Private Oja’s Algorithm has a non-vanishing error in Eq.
This follows from the fact that the second term in the error bound in Eq.
(10) scales as γ , which can be made arbitrarily smaller than the second term in Eq.
(5) that scales as ( γ + 1) .
Further, the error bound for DP-PCA holds for any ε =
O (1) , whereas Private Oja’s Algorithm requires significantly smaller ε
=
O ( (cid:112) log( n/δ ) /n ) .
Remarks on the assumptions of Theorem 5.1.
We have an exponential dependence of the sample complexity in the spectral gap, n ≥ exp( κ 2 ) .
This ensures we have a large enough T =
⌊ n/B ⌋ to reduce the non-dominant second term in Eq.
(2), in balancing the learning rate η t and T (which is explicitly shown in Eqs.
69 and (70) in the Appendix).
It is possible to get rid of this exponential dependence at the cost of an extra term of ˜ O ( κ 4 γ 2 d 2 log(1 /δ ) /
( εn ) 2 ) in the error rate in Eq.
(10), by selecting a slightly larger T = cκ 2 log 2 n .
A Gaussian-like tail bound in Assumption A.4 is necessary to get the desired upper bound scaling as ˜ O
( d (cid:112) log(1 /δ )
/ ( εn )) in Eq.
11, for example.
The next lower bound shows that without such assumptions on the tail, the error due to privacy scales as Ω( (cid:112) d ∧ log(1 /δ ) / ( εn )) .
We believe that the dependence in δ is loose, and it might be possible to get a tighter lower bound using [52].
We provide a proof and other lower bounds in Appendix C.
Theorem 5.4 (Lower bound without Assumption A.4) .
Let M ε be a class of ( ε, δ ) -DP estimators that map n i.i.d.
samples to an estimate ˆ v ∈ R d .
A set of distributions satisfying Assumptions A.1–A. with M =
˜ O
( d + (cid:112) nε/d ) , V = O ( d ) and γ =
O (1) is denoted by ˜ P .
For d ≥ 2 , there exists a universal constant C > 0 such that
[Equation]
Currently, DP-PCA requires choices of the learning rates, η t , that depend on possibly unknown quantities.
Since we can privately evaluate the quality of our solution, one can instead run multiple instances of DP-PCA with varying η t =
c 1 / ( c 2 + t ) and find the best choice of c 1 > 0 and c 2 > 0 .
Let w T ( c 1 , c 2 ) denote the resulting solution for one instance of { η t =
c 1 / ( c 2 + t ) }
Tt =1 .
We first set a target error ζ .
For each round i = 1 , . . .
, we will run algorithm for ( c 1 , c 2 ) =
[2 i − 1 , 2 − i +1 ] × [2 − i +1 , 2 − i +2 . . .
, 2 i − 1 ] and ( c 1 , c 2 ) =
[2 − i +1 , 2 − i +2 . . .
, 2 i − 1 ] ×
[2 i − 1 , 2 − i +1 ] , and compute each sin( w T ( c 1 , c 2 ) , v 1 ) privately, each with privacy budget ε i =
ε
i +1 (2 i − 1) , δ i =
δ 2 i +1 (2 i − 1) .
We terminate the algorithm once there there is a w T ( c 1 , c 2 ) satisfies sin( w T ( c 1 , c 2 ) , v 1 ) ≤ ζ .
It is clear that this search meta-algorithm terminate in logarithmic round, and the total sample complexity only blows up by a poly-log factor.
Private mean estimation for the minibatch stochastic gradients
DP-PCA critically relies on private mean estimation to reduce variance of the noise required to achieve ( ε, δ ) -DP.
We follow a common recipe from [56, 50, 54, 8, 15].
First, we privately find an approximate range of the gradients in the minibatch (Alg. 4).
Next, we apply the Gaussian mechanism to the truncated gradients where the truncation is tailored to the estimated range (Alg. 5).
Step 1: estimating the range.
We need to find an approximate range of the minibatch of gradients in order to adaptively truncate the gradients and bound the sensitivity.
Inspired by a private preconditioning mechanism designed for mean estimation with unknown covariance from [53], we propose to use privately estimated top eigenvalue of the covariance matrix of the gradients.
For details on the version of the histogram learner we use in Alg. 4 in Appendix E.2, we refer to [61, Lemma D.1].
Unlike the private preconditioning of [53] that estimates all eigenvalues and requires n = (cid:101) O ( d 3 / 2 log(1 /δ ) /ε )
samples, we only require the top eigenvalue and hence the next theorem shows that we only need n = (cid:101)
O ( d log(1 /δ ) /ε ) .
Theorem 6.1.
Algorithm 4 is ( ε, δ ) -DP.
Let g i
=
A i u for some fixed vector u , where A i satisfies A. and A.4 in Assumption 1 such that the mean is E [ g i ] =
Σ u and the covariance is E [( g i − Σ u )( g i − Σ u ) ⊤ ] = λ 21 H u .
With a large enough sample size scaling as
[Equation]
= O
[Equation]
Algorithm 4 outputs ˆΛ achieving ˆΛ ∈ (cid:2) (1 / √ 2) λ 21 ∥ H u ∥ 2 , √ 2 λ 21 ∥
H u ∥ 2 (cid:3) with probability 1 − ζ , where the pair ( K > 0 , a > 0) parametrizes the tail of the distribution in A.4 and ˜ O ( · ) hides logarithmic factors in B, d, 1 /ζ, log(1 /δ ) , and ε .
We provide a proof in Appendix E.2.
There are other ways to privately estimate the range.
Some approaches require known bounds such as σ 2min ≤ λ 21 ( H u ) ii ≤ σ 2max for all i ∈
[ d ] [56], and other agnostic approaches are more involved such as instance optimal universal estimators of [17].
Step 2: Gaussian mechanism for mean estimation.
Once we have a good estimate of the top eigenvalue from the previous section, we use it to select the bin size of the private histogram and compute the truncated empirical mean.
Since truncated empirical mean has a bounded sensitivity, we can use Gaussian mechanism to achieve DP.
The algorithm is now standard in DP mean estimation, e.g., [56, 50].
However, the analysis is slightly different since our assumptions on g
i ’s are different.
For completeness, we provide the Algorithm 5 in Appendix E.3.
The next lemma shows that the Private Mean Estimation is ( ε, δ ) -DP, and with high probability clipping does not apply to any of the gradients.
The returned private mean, therefore, is distributed as a spherical Gaussian centered at the empirical mean of the gradients.
This result requires that we have a good estimate of the top eigenvalue from Alg.
4 such that ˆΛ ≃ λ 21 ∥ H u ∥ 2 .
This analysis implies that we get an unbiased estimate of the gradient mean (which is critical in the analysis) with noise scaling as ˜ O
( λ 1 γ (cid:112)
d log(1 /δ ) / ( εB )) , where γ 2 = max u : ∥ u ∥ =1 ∥
H u ∥ 2 (which is critical in getting the tight sample complexity in the second term of the final utility guarantee in Eq.
We provide a proof in Appendix E.3.
Lemma 6.2.
For ε ∈ (0 , 0 . 9) and any δ ∈ (0 , 1) , Algorithm 5 is ( ε, δ ) -DP.
Let g i
=
A i u for some fixed vector u , where A i satisfies A.1 and A.4 in Assumption 1 such that the mean is E [ g i ] =
Σ u and the covariance is E [( g i − Σ u )( g i − Σ u ) ⊤ ] = λ 21 H u .
If ˆΛ ∈ [ λ 21 ∥
H u ∥ 2 / √ 2 , √ 2 λ 21 ∥
H u ∥ 2 ] , δ ≤ 1 /B , and B = Ω(( (cid:112)
d log(1 /δ )
/ε ) log( d/ ( ζδ )))
then, with probability 1 − ζ , g i ∈
¯ g + (cid:104) − 3 K (cid:112) ˆΛ log a ( Bd/ζ ) , 3 K (cid:112) ˆΛ log a ( Bd/ζ ) (cid:105) d for all i ∈
[ B ] .
6.1 Proof sketch of Theorem 5.
We choose B = Θ( n/ log 2 n ) such that we access the dataset only T = Θ(log 2 n ) times.
Hence we do not need to rely on amplification by shuffling.
To add Gaussian noise that scales as the standard deviation of the gradients in each minibatch (as opposed to potentially excessively large mean of the gradients), DP-PCA adopts techniques from recent advances in private mean estimation.
Namely, we first get a private and accurate estimate of the range from Theorem 6.1.
Using this estimate, ˆΛ ,
Private Mean Estimation returns an unbiased estimate of the empirical mean of the gradients, as long as no truncation has been applied as ensured by Lemma 6.2.
This gives
[Equation]
for z t ∼ N (0 , I ) and β t = 8 K
[Equation]
Using rotation invariance of spherical
Gaussian random vectors and the fact that ∥ w t − 1 ∥ = 1 , we can reformulate it as
[Equation]
This process can be analyzed with Theorem 2.2 with ˜ A t substituting A t .
Discussion
Under the canonical task of computing the principal component from i.i.d.
samples, we show the first result achieving an optimal error rate.
This critically relies on two ideas: minibatch SGD and private mean estimation.
In particular, private mean estimation plays a critical role in the case when the range of the gradients is significantly smaller than the norm; we achieve an optimal error rate that cannot be achieved with the standard recipe of gradient clipping.
Assumption A.4 can be relaxed to heavy-tail bounds with bounded k -th moment on A i , in which case we expect the second term in Eq.
(10) to scale as O ( d ( (cid:112) log(1 /δ )
/εn )
1 − 1 /k ) , drawing analogy from a similar trend in a computationally inefficient DP-PCA without spectral gap [62, Corollary 6.10].
When a fraction of data is corrupted, recent advances in [84, 58, 46] provide optimal algorithms for
PCA.
However, existing approach of [62] for robust and private PCA is computationally intractable.
Borrowing ideas from robust and private mean estimation in [61], one can design an efficient algorithm, but at the cost of sub-optimal sample complexity.
It is an interesting direction to design an optimal and robust version of DP-PCA.
Our lower bounds are loose in its dependence in log(1 /δ ) .
Recently, a promising lower bound technique has been introduced in [52] that might close this gap.
There are two ways to extend our framework to general rank- r PCA, whose analyses are promising research directions.
First, applying Hotelling’s deflation method [40], we can iteratively find the PCA components one by one, by alternating our DP-PCA and deflation.
For example, in one step of the iteration, we only update the current iterate vector in the directions orthogonal to all the previously found PCA components.
Repeating this steps gives the estimates of the top principal components.
Secondly, we can directly apply Oja’s algorithm.
We keep track of a r -dimensional subspace in the
Oja’s update rule for PCA, and perform QR decomposition to keep the iterates on the Grassmannian manifold.
It might be possible to extend the analysis of [42] to analyze the private version.
Acknowledgments and Disclosure of Funding
This work is supported in part by Google faculty research award and NSF grants CCF-1705007,
CNS-2002664, IIS-1929955, DMS-2134012, CCF-2019844 as a part of NSF Institute for Foundations of Machine Learning (IFML), CNS-2112471 as a part of NSF AI Institute for Future Edge Networks and Distributed Intelligence (AI-EDGE).
A Related work
Our work builds upon a series of advances in private SGD [51, 7, 6, 28, 60, 80, 41] to make advance in understanding the tradeoff of privacy and sample complexity for PCA.
Such tradeoffs have been studied extensively in canonical statistical estimation problems of mean (and covariance) estimation and linear regression.
Private mean estimation.
As one of the most fundamental problem in private data analysis, mean estimation is initially studied under the bounded support assumptions, and the optimal error rate is now well understood.
More recently, [5] considered the private mean estimation problem for k -th moment bounded distributions where the support of the data is unbounded and provided minimax error bound in various settings.
[56] studied private mean estimation from Gaussian sample, and obtained an optimal error rate.
There has been a lot of recent interests on private mean estimation under various assumptions, including mean and covariance joint estimation [50, 8], heavy-tailed mean estimation [54], mean estimation for general distributions [30, 74], distribution adaptive mean estimation [12], estimation for unbounded distribution parameters [53], mean estimation under pure differential privacy [39], local differential privacy [18, 19, 32, 47], user-level differential privacy [26],
Mahalanobis distance[10] and robust and differentially private mean estimation [61, 59, 62].
Private linear regression The goal of private linear regression is to learn a linear predictor of response variable y from a set of examples { x i , y i } ni =1 while guarantee the privacy of the examples.
Again, the work on private linear regression can be divided into two categories: deterministic and randomized.
In the deterministic setting where the data is deterministically given without any probabilistic assumptions, significant advances in DP linear regression has been made [77, 57, 68, 16, 7, 83, 31, 67, 82, 71].
In the randomized settings where each example { x i , y i } is drawn i.i.d.
from a distribution [66], [20] proposes an exponential time algorithm that achieves asymptotic consistency.
[13] provides an efficient and minimax optimal algorithm under sub-Gaussian design and nearly identity covariance assumptions.
Very recently, [62] for the first time gives an exponential time algorithm that achieves minimax risk for general covariance matrix under sub-Gaussian and hypercontractive assumptions.
[75] gives the first computationally efficient algorithm to achieve nearly optimal risk using DP-SGD with adaptive clipping.
Private PCA without spectral gap.
There is a long line of work in Private PCA [37, 38, 36, 9, 14, 55, 23, 4].
We explain the closely related ones in Section 2.3, with analysis when the covariance matrix has a spectral gap.
When there is no spectral gap, one can still learn a principal component.
However, since the principal component is not unique, the error is typically measured in how much of the variance is captured in the estimated direction: 1 − ˆ v ⊤ Σˆ v/ ∥ Σ ∥ .
[14] introduces an exponential mechanism (from [64]) which samples an estimate from a distribution f (cid:98) Σ (ˆ v ) =
(1 /C )
exp { (( εn ) /c 2 )ˆ v ⊤ (cid:98) Σˆ v } , where C is a normalization constant to ensure that the pdf integrates to one.
This achieves a stronger pure DP, i.e., ( ε, 0) -DP, but is computationally expensive; [14] does not provide a tractable implementation and [55] provides a polynomial time implementation with time complexity at least cubic in d .
This achieves error rate 1 − ˆ v ⊤ Σˆ v/ ∥ Σ ∥ =
˜ O
( d 2 / ( εn )) in [14, Theorem 7], which, when there is a spectral gap, translates into
[Equation]
(16) with high probability.
Closest to our setting is the analyses in [62, Corollary 6.5] that proposed an exponential mechanism that achieves 1 − ˆ v ⊤ Σˆ v/ ∥ Σ ∥ =
˜ O
( (cid:112) d/n +( d +log(1 /δ ))
/ ( εn )) with high probability under ( ε, δ ) -DP and Gaussian samples, but this algorithm is computationally intractable.
This is shown to be tight when there is no spectral gap.
When there is a spectral gap, this translates into
[Equation]
Distributed PCA.
In distributed PCA, the dataset is stored across different local servers [43, 44, 81, 33].
[43, 44, 81] consider differentially private distributed PCA under the assumption that the examples are deterministic and have norms bounded by a fixed and known constant.
The algorithms appeared in [43, 44, 81] are based on the Gaussian mechanism [23] on local server and an aggregator in the central server.
The resulting utility guarantees are the same as those from [23], which are discussed in Section 2.3.
B Preliminary on differential privacy
Lemma B.1 (Stability-based histogram [56, Lemma 2.3]) .
For every K ∈ N ∪ ∞ , domain Ω , for every collection of disjoint bins B 1 , . . .
, B K defined on Ω , n ∈ N , ε ≥ 0 , δ ∈ (0 , 1 /n ) , β > 0 and α ∈ (0 , 1) there exists an ( ε, δ ) -differentially
private algorithm M : Ω n → R K such that for any set of data X 1 , . . .
, X n ∈ Ω n
[Equation] [Equation]
p
[Equation]
˜ p K
[Equation]
X 1 , . . .
, X
[Equation] [Equation]
[Equation]
then,
[Equation]
Since we focus on one-pass algorithms where a data point is only accessed once, we need a basic parallel composition of DP.
Lemma B.2 (Parallel composition [65]) .
Consider a sequence of interactive queries { q k } Kk =1 each operating on a subset S k of the database and each satisfying ( ε, δ ) -DP.
If S k ’s are disjoint then the composition ( q 1 ( S 1 ) , q 2 ( S 2 ) , . .
, q K ( S K )) is ( ε, δ ) -DP.
We also utilize the following serial composition theorem.
Lemma B.3 (Serial composition [22]) .
If a database is accessed with an ( ε 1 , δ 1 ) -DP mechanism and then with an ( ε 2 , δ 2 ) -DP mechanism, then the end-to-end privacy guarantee is ( ε 1 + ε 2 , δ 1 + δ 2 ) -DP.
When we apply private histogram learner to each coordinate, we require more advanced composition theorem from [49].
Lemma B.4 (Advanced composition [49]) .
For ε ≤ 0 .
9 , an end-to-end guarantee of ( ε, δ ) -differential privacy is satisfied if a database is accessed k times, each with a ( ε/ (2 (cid:112) 2 k log(2 /δ )) , δ/ (2 k )) - differential private mechanism.
C Converse results
When privacy is not required, we know from Theorem 2.2 that under Assumptions A.1-A.3, we can achieve an error rate of ˜ O
( κ (cid:112) V/n ) .
In the regime of V = O ( d ) and κ = O (1) , n = O ( d ) samples are enough to achieve an arbitrarily small error.
The next lower bounds shows that we need n =
O ( d 2 ) samples when ( ε = O (1) , 0) -DP is required, showing that private PCA is significantly more challenging than a non-private PCA, when assuming only the support and moment bounds of assumptions A.1-A.3.
We provide a proof in Appendix C.3.
Theorem C.1 (Lower bound without Assumption A.4) .
Let M ε be a class of ( ε, 0) -DP estimators that map n i.i.d.
samples to an estimate ˆ v ∈ R d .
A set of distributions satisfying Assumptions A.1–A. with M = O
( d log n ) and V
= O ( d ) is denoted by ˜ P ( λ 1 ,λ 2 ) .
There exists a universal constant
C > 0 such that
[Equation]
We next provide the proofs of all the lower bounds.
C.1 Proof of Theorem 5.3 on the lower bound for Gaussian case
Our proof is based on following differentially private Fano’s method [3, Corollary 4].
Theorem C.2 (DP Fano’s method [3, Corollary 4]) .
Let P denote family of distributions of interest and θ : P → Θ denote the population parameter.
Our goal is to estimate θ from i.i.d.
samples x 1 , x 2 , . . .
, x n ∼ P ∈ P .
Let ˆ θ ε be an ( ε, 0) -DP estimator.
Let ρ : Θ × Θ → R + be a pseudo-metric on parameter space Θ .
Let V be an index set with finite cardinality.
Define P V =
{ P v , v ∈ V} ⊂ P be an indexed family of probability measures on measurable set ( X , A ) .
If for any v ̸ = v ′ ∈ V , 1.
[Equation] [Equation]
then
[Equation]
For our problem, we are interested in Gaussian P Σ and metric ρ ( u, v )
=
sin( u, v ) .
Using Theorem C.2, it suffices to construct such indexed set V and the indexed distribution family P V .
We use the same construction as in [78, Theorem 2.1] introduced to prove a lower bound for the (non-private) sparse PCA problem.
The construction is given by the following lemma.
Lemma C.3 ([78, Lemma 3.1.2]) .
Let d > 10 .
For α ∈ (0 , 1] , there exists V α ⊂ S d − 1and an absolute constant c 1 > 0 .
0233 such that for every v ̸ = v ′ ∈
V α , α/ √ 2 ≤ ∥ v − v ′
∥ 2 ≤ √ 2 α and log( |V α | ) ≥ c 1 d .
Fix α ∈ (0 , 1] .
For each v ∈ V α , we define Σ v = ( λ 1 − λ 2 ) vv ⊤ + λ 2 I d
and P v = N (0 , Σ v ) .
It is easy to see that Σ v has eigenvalues λ 1 > λ 2 = · · · = λ n .
The top eigenvector of Σ v is v .
Using
Lemma F.4, we know for any v ̸ = v ′ ∈ V ,
[Equation]
Using [78, Lemma 3.1.3], we know
[Equation]
Using Pinsker’s inequality, we have
[Equation] [Equation]
Now we set α :
[Equation]
Combining all cases, it follows from Theorem C.2 and d > 10 that there exists a constant C such that
[Equation]
(ˆ v ( S ) , v 1 (Σ))] ≥ C min (cid:32)(cid:32)(cid:114)
[Equation]
C.1.1 Proof of Lemma C.
We first point out that Lemma C.3 is a special case of [78, Lemma 3.1.2].
Here is the original statement from [78].
Lemma C.4 ([78, Lemma 3.1.2]) .
Define B pq ( R q ) =
(cid:110) θ ∈ R p : (cid:80) pj
=1 | θ j | q ≤ R q (cid:111) .
Let ¯ R q =
R q − 1 ≥ 1 and p ≥ 5 .
There exists a finite subset Θ ϵ ⊂ S p − 1∩ B pq ( R q ) and an absolute constant c > 0 such that every distinct pair θ 1 , θ 2 ∈ Θ
ϵ satisfies
[Equation]
and
[Equation]
for all q ∈ [0 , 1] and ϵ ∈ (0 , 1] .
Assume d ≥ 10 and set q = 0 and R q =
d 8 + 1 .
Lemma C.4 implies that there exists a finite subset
V α ⊂ S d − 1∩ B dq (cid:0) d 8 + 1 (cid:1) and an absolute constant c such that for v ̸ = v ′ ∈
V α satisfies
[Equation] [Equation]
and
[Equation]
For completeness, we also provide a direct proof of Lemma C.3, following the proof strategy of
Lemma C.4.
The following lemma is a variant of classic Varshamov-Gilbert bounds that appeared in [63, Lemma 4.10].
A similar lemma can be also found in [3, Lemma 6].
Lemma C.5 ([63, Lemma 4.10]) .
Let l be a positive integer that is at most k/ 4 .
Then there exists a subset Θ ⊂ { 0 , 1 } k and absolute constant c ′ > 0 .
233 such that
For any w ∈ Θ , ∥ w ∥
=
l , 2.
For any w ̸ = w ′ ∈ Θ , ∥ w − w ′ ∥ 0 ≥ l/ 2 , 3. log( | Θ | ) ≥ c ′ l log( k/l ) .
For d ≥ 10 , let k = d − 1 and l be an integer between 1 and ( d − 1) / 4 .
We will choose l later.
Let Θ be such a set that satisfies the conditions in Lemma C.5.
Now for α ∈ (0 , 1] , we construct V α .
Define f : { 0 , 1 } d − 1 → R d as follows.
[Equation]
Let
V
[Equation] [Equation]
[Equation]
It is easy to see that
[Equation]
For any v ̸ = v ′ ∈
V α , if v = f ( w ) and v ′ =
f ( w ′ ) , we know
[Equation] [Equation]
where the last inequality follows from the fact that ∥ w − w ′ ∥ 0 ≤ 2 l .
Note that above inequalities hold for any l between 1 and ( d − 1) / 4 .
Let l = ( d − 1) / 8 .
Then we have
[Equation]
for any d ≥ 2 .
C.2 Proof of Theorem 5.
We first construct an indexed set V and indexed distribution family P V such that x i x ⊤ i satisfies A.1,
A.2 and A.3 in Assumption 1.
Our construction is defined as follows.
By [3, Lemma 6] , there exists a finite set V ⊂ S
d − 1, with cardinality |V| ≥ 2 d , such that for any v ̸ = v ′ ∈ V , ∥ v − v ′
∥ ≥ 1 / 2 .
Let f (0 , I d ) denotes the density function of N (0 , I d ) .
Let Q v be a uniform distribution on two point masses {±
α − 14 v } .
Let Q 0 be Gaussian distribution N (0 , I d ) .
For α ∈ (0 , 1] , we construct
P v :=
(1 − α ) Q 0 + αQ v .
It is easy to see that P v is a distribution over R d with the following density function.
[Equation]
The mean of P v is 0 .
The covariance of P v is Σ v = (1 − α )
I d + √ αvv ⊤ .
The top eigenvalue is λ 1 = 1 − α + √ α , the top eigenvector is v , and the second eigenvalue is λ 2 = 1 − α .
And κ = O ( α − 1 / 2 ) .
If x = α − 1 / 4 v , then ∥ xx ⊤ − Σ v ∥ 2 = O ( α − 1 / 2 ) .
If x ∼ N (0 , I d ) , we know ∥ xx ⊤ − Σ v ∥ 2 = O ( d ) .
This implies P v satisfies A.2 in Assumption 1 with M =
O (( d + α − 1 / 2 ) log( n )) for n i.i.d.
samples.
It is easy to see that ∥ E [( xx ⊤ − Σ v )( xx ⊤ − Σ v ) ⊤ ]
∥ 2 = O ( d ) .
This means P v satisfies A.3 in
Assumption 1 with V =
O ( d ) .
By the fact that E [ ⟨ x, u ⟩ 2 ] =
O (1) and E [ ⟨ x, u ⟩ 4 ]
= O (1) for any unit vector u , we have γ 2 = ∥
E [( xx ⊤ − Σ v ) uu ⊤ ( xx ⊤ − Σ v ) ⊤ ] ∥ 2 = O (1) for any unit vector u .
Our proof technique is based on following lemma.
Lemma C.6 ([5, Theorem 3]) .
Fix α ∈ (0 , 1] .
Define P v = (1 − α ) Q 0 + αQ v for v ∈ V such that such that ρ ( θ ( P v ) , θ ( P v ′ )) ≥ 2 t .
Let ˆ θ be a ( ε, δ ) differentially private estimator.
Then,
[Equation]
Set ρ ( θ ( P v ) , θ ( P v ′ ))
=
sin( v, v ′ ) /κ .
By Lemma F.4, ρ (
[Equation]
P v ) , θ ( P v ′ )) ≥
∥ v − v ′
∥ /κ
= Ω( √ α ) .
Lemma C.6 implies
[Equation] [Equation]
For d ≥
[Equation]
we know 2 d − 1 ≥ e d/ 2 .
We choose α = min
[Equation]
This implies
[Equation]
So we have there exists a constant C such that
[Equation]
C.3 Proof of Theorem C.
Similar to the proof of Theorem 5.3, we use DP Fano’s method in Theorem C.2.
It suffices to construct an indexed set V and indexed distribution family P V such that x i x ⊤ i satisfies A.1, A.
and
A.3 in Assumption 1.
Our construction is defined as follows.
Let λ 1 > λ 2 > 0 .
By Lemma C.3, there exists a finite set V α ⊂ S d − 1, with cardinality |V
α | = 2 Ω( d ) , such that for any v ̸ = v ′ ∈ V α , α/ √ 2 ≤ ∥ v − v ′
∥ ≤ √ 2 , where α :=
(cid:112) λ
2 /λ 1 .
Let f (0 ,S ) denotes the density function of N (0 , S ) .
We construct P v over R d for v ∈ V α with the following density function.
[Equation]
otherwise .
[Equation] [Equation]
The mean of P v is 0 .
The covariance of P v is Σ v :=
( λ 1 − λ 2 ) vv ⊤ + λ 2 I d .
It is easy to see that the top eigenvalue is λ 1 , the top eigenvector is v , and the second eigenvalue is λ 2 .
If x = √ dλ 1 v , then ∥ xx ⊤ − Σ v ∥ 2 = ∥
( dλ 1 − λ 1 + λ 2 ) − λ 2 I d ∥ 2 =
O ( dλ 1 ) .
If x ∼
N (0 , λ 2 1 − 1 − λ 2 /λ 1 d
I d ) , by the fact that λ 2 1 − 1 − λ 2 /λ 1 d ≤ λ 1 , we know ∥ xx ⊤ − Σ v ∥ 2 ≤ O ( dλ 1 ) .
This implies P v satisfies A.2 in Assumption 1 with M =
O ( d log( n )) for n i.i.d.
samples.
Similarly, ∥ E [( xx ⊤ − Σ v )( xx ⊤ − Σ v ) ⊤ ] ∥ 2 ≤ ∥ d ( λ 21 − λ 1 λ 2 ) vv ⊤ + dλ 2 λ 1 + 3Σ v Σ ⊤ v ∥ 2 = O ( dλ 21 ) .
This means P v satisfies A.3 in Assumption 1 with V
= O ( d ) .
For v ̸ = v ′ ∈
V α , we have D TV ( P v , P v ′ )
= (1 − λ 2 /λ 1 ) /d .
By Lemma F.4, sin( v, v ′ ) ≥
∥ v − v ′
∥ / √ 2 ≥ ( (cid:112) λ 2 /λ 1 ) / 2 .
By Theorem C.2, there exists a constant C such that inf
[Equation]
(cid:115)
[Equation] [Equation]
(cid:33)
[Equation]
D The analysis of Private Oja’s Algorithm
We analyze Private Oja’s Algorithm in Algorithm 2.
D.1 Proof of privacy in Lemma 3.
We use following Theorem D.1 to prove our privacy guarantees.
Theorem D.1 (Privacy amplification by shuffling [29, Theorem 3.8]) .
For any domain D , let
R ( i ) : S (1) × · · · × S ( i − 1)
× D → S ( i ) for i ∈ [ n ] (where S ( i ) is the range space of R ( i ) ) be a sequence of algorithms such that R ( i ) ( z 1: i − 1 , · ) is an ( ε 0 , δ 0 )
-DP local randomizer for all values of auxiliary inputs z 1: i − 1 ∈ S (1) × · · · × S ( i − 1) .
Let A S : D n → S (1) × · · · × S ( n ) be the algorithm that given a dataset x 1: n ∈ D n , samples a uniform random permutation π over [ n ] , then sequentially computes z i
= R ( i ) ( z 1: i − 1 , x
π ( i ) ) for i ∈ [ n ] and outputs z 1: n .
Then for any δ ∈ [0 , 1] such that ε 0 ≤ log (cid:16)
[Equation]
(cid:17) , A s is ( ε, δ + O ( e ε δ 0 n )) -DP, where
[Equation]
Let R ( t ) ( w t − 1 , A π ( t ) ) :
= w t .
Let ε 0 = √ 2log(
[Equation] [Equation]
We show R ( t ) ( w t − 1 , · ) is an ( ε 0 , δ 0 )
-DP local randomizer.
If there is no noise in each update step, the update rule is
[Equation]
[Equation]
The sensitivity of w ′ t is 2 βη t with respect to a difference in A t .
By Gaussian mechanism in Lemma 2.
and post processing property of local differential privacy, we know w t is ( ε 0 , δ 0 )
-DP local randomizer.
Assume that ε 0 =
[Equation]
≤ 12 .
By Theorem D.1, for ˆ δ ∈ [0 , 1] such that ε 0 ≤ log (cid:16) n 16log(
[Equation]
) (cid:17) , Algorithm 2 is (ˆ ε, ˆ δ + O ( e ˆ ε δ 0 n ))
-DP and for some constant c 1 > 0 ,
[Equation] [Equation]
for some absolute constant c 2 > 0 .
Set ˆ δ = δ/ 2 , δ
=
c
3 δ/ ( e ˆ ε n ) for some c 3 > 0 and α = C ′ log( n/δ ) / ( ε √ n ) .
We have
[Equation]
For any ε ≤ 1 , by Eq.
(52), there exists some sufficiently large C ′ >
such that ˆ ε ≤ ε .
Recall that we assume ε 0 =
[Equation]
≤ 12 .
This means ε =
O ( (cid:113) log( n/δ ) n ) .
D.2 Proof of clipping in Lemma 3.
Let z t =
A t w t − 1 .
Let µ t :=
E [ z t ] = Σ w t − 1 .
By Lemma 2.1, we know for any ∥ v ∥ = 1 , with probability 1 − ζ ,
[Equation]
Applying union bound over all basis vectors v ∈ { e 1 , . .
. , e d } and all samples, we know with probability 1 − ζ , for all j ∈ [ d ] and t ∈ [ n ] | z t,j | ≤
[Equation]
1 log
[Equation]
+
[Equation]
This implies that with probability 1 − ζ , for all t ∈ [ n ] , we have
[Equation]
D.3 Proof of utility in Theorem 3.
Lemma 3.2 implies that with probability 1 − O ( ζ ) , Algorithm 2 does not have any clipping.
Under this event, the update rule becomes
[Equation]
where β
= ( Kγ log a ( nd/ζ ) + 1) λ 1 √ d and each entry in G t ∈ R
d
×
d is i.i.d.
sampled from standard
Gaussian N (0 , 1) .
This follows form the fact that ∥ w t − 1 ∥ = 1 and G t w t − 1 ∼ N (0 , I d ) .
Let B t =
A t + 2 αβG t .
We show B t satisfies the three conditions in Theorem 2.2 ([45, Theorem 4.12]).
It is easy to see that E [ B t ] = Σ from Assumption A.1.
Next, we show upper bound of max (cid:8)(cid:13)(cid:13) E (cid:2) ( B t − Σ)
( B t − Σ) ⊤ (cid:3)(cid:13)(cid:13) 2 , (cid:13)(cid:13) E (cid:2) ( B t − Σ)
⊤ ( B t − Σ) (cid:3)(cid:13)(cid:13) 2 (cid:9) .
We have
[Equation]
=
[Equation]
where the last inequality follows from Lemma F.3 and C 2 > 0 is an absolute constant.
Let (cid:101) V :=
V λ 21 + 4 α 2 β 2 C 2 d .
Similarly, we can show that (cid:13)(cid:13) E (cid:2) ( B t − Σ)
⊤ ( B t − Σ) (cid:3)(cid:13)(cid:13) 2 ≤ (cid:101) V .
By Lemma F.2, we know with probability 1 − ζ , for all t ∈
[ T ] ,
[Equation]
Let (cid:102)
M
[Equation]
=
[Equation]
Under the event that ∥ B t − Σ ∥ 2 ≤ (cid:102) M for all t ∈ [ n ] , we apply Theorem 2.2 with a learning rate η t = h ( λ 1 − λ 2 )( ξ + t ) where
[Equation]
Then Theorem 2.2 implies that with probability 1 − ζ ,
[Equation]
for some positive constant C .
[Equation] [Equation]
, the above bound implies
[Equation]
where ˜ ξ = ( ξ/n ) 2 , and ˜
[Equation]
For ζ = O (1) and K
= O (1) , selecting h
= c log n
[Equation]
and assuming
[Equation]
with large enough positive constants c
[Equation]
and C
[Equation]
we have ˜ ξ ≤ 1 and d ˜ ξ α ≤ 1 /n 2 .
Hence it is sufficient to have
[Equation]
, with a large enough constant.
E The analysis of DP-PCA
We provides the proofs for Theorem 5.1, Theorem 6.1, and Lemma 6.2 that guarantees the privacy and utility of DP-PCA.
E.1 Proof of Theorem 5.1 on the privacy and utility of DP-PCA
From Theorem 6.1 we know that Alg.
4 returns ˆΛ satisfying 2ˆΛ ≥ λ 21 ∥ H u ∥ 2 with high probability.
Then, from Lemma 6.2, we know that with high probability Alg 5 returns an unbiased estimate of the gradient mean with added Gaussian noise.
Under this case, the update rule becomes
[Equation]
where β t =
8 K
[Equation]
, ˆΛ t denote the estimated eigenvalue of covariance of the gradients at t -th iteration, and each entry in G t ∈ R
d × d is i.i.d.
sampled from standard Gaussian
N (0 , 1) .
This follows form the fact that ∥ w t − 1 ∥ = 1 and G t w t − 1 ∼ N (0 , I d ) .
Let β :=
[Equation]
such that β ≥ β t , which follows from the fact that ˆΛ ≤ √ 2 λ 21 ∥ H u ∥ 2 ≤ √ 2 λ 21 γ 2 (Theorem 6.1 and Assumption A.4).
Let B t =
(1 /B )
(cid:80) Bi
=1 A B ( t − 1)+ i + β t G t .
We show B t satisfies the three conditions in Theorem 2.2 ([45, Theorem 4.12]).
It is easy to see that E [ B t ] = Σ from Assumption A.1.
Next, we show upper bound of max
[Equation]
B t
[Equation]
(cid:3)(cid:13)(cid:13) 2 (cid:9) .
We have
[Equation]
B
[Equation] [Equation]
where the last inequality follows from Lemma F.3 and C 2 > 0 is an absolute constant.
Let (cid:101) V :=
V λ 21 /B + β 2 C 2 d .
Similarly, we can show that (cid:13)(cid:13) E (cid:2) ( B t − Σ)
⊤
[Equation]
B t − Σ)
[Equation] [Equation]
(cid:101) V .
By Lemma F. and Lemma F.2, we know with probability 1 − ζ , for all t ∈
[ T ] ,
[Equation]
Let (cid:102) M :=
C
[Equation]
1 log( dT/
[Equation]
B + (cid:113)
[Equation]
21 log( dT/
[Equation]
) B + β (cid:16) √ d
+ (cid:112) log( T/ζ ) (cid:17)(cid:19) .
Under the event that ∥ B t − Σ ∥ 2 ≤ (cid:102) M for all t ∈
[ T ] , we apply Theorem 2.2 with a learning rate η t = α ( λ 1 − λ 2 )( ξ + t )
where
[Equation]
Then Theorem 2.2 implies that with probability 1 − ζ ,
[Equation]
68) for some positive constant C .
Using n = BT and Eq.
(66), the above bound implies sin
[Equation]
69) where ˜ ξ = ( ξ/T )
[Equation]
and
[Equation]
For ζ = O (1) and K
= O (1) , selecting α = c log n , T = c ′ (log n ) 2 , and assuming log n ≥ λ 21 / ( λ 1 − λ 2 ) 2 and n
[Equation]
with large enough positive constants c , c ′ , and C , we have ˜ ξ ≤ 1 and d ˜ ξ α ≤ 1 /n 2 .
Hence it is sufficient to have
[Equation]
with a large enough constant.
E.2 Algorithm and proof of Theorem 6.1 on top eigenvalue estimation
Input: S = { g i } Bi
=1 , ( ε, δ ) -DP, failure probability ζ 1 Let ˜ g
i ← g 2 i − g 2 i − 1 for i ∈ 1 , 2 , . . .
, ⌊ B/ 2 ⌋ .
Let ˜ S
= { ˜ g i } ⌊ B/ 2 ⌋ i = 2 Partition ˜ S into k = C 1 log(1 / ( δζ )) /ε
subsets and denote each dataset as G j ∈ R d × b , where each dataset is of size b =
⌊ B
/ 2 k ⌋ 3 Let λ ( j ) 1 be the top eigenvalue of (1 /b )
G j G ⊤ j for ∀ j ∈ [ k ] 4 Partition [0 , ∞ ) into Ω ← (cid:8) . . .
, (cid:2) 2 − 2 / 4 , 2 − 1 / 4 (cid:1) (cid:2) 2 − 1 / 4 , 1 (cid:1) (cid:2) 1 , 2 1 / 4 (cid:1) , (cid:2) 2 1 / 4 , 2 2 / 4 (cid:1) , . . .
(cid:9) ∪ { [0 , 0] } 5 Run ( ε, δ ) -DP histogram learner of Lemma B.1 on { λ ( j ) 1 } kj =1 over Ω 6 if all the bins are empty then Return ⊥ 7 Let [ l, r ] be a non-empty bin that contains the maximum number of points in the DP histogram 8 Return ˆΛ = l
Taking the difference ensures that ˜ g
i is zero mean, such that we can directly use the top eigenvalue of (1 /b )
G j G ⊤ j for j ∈ [ k ] .
We compute a histogram over those k top eigenvalues.
This histogram is privatized by adding noise only to the occupied bins and thresholding small entries of the histogram to be zero.
The choice k = Ω(log(1 /ζ ) /ε ) ensures that the most occupied bin does not change after adding the DP noise to the histograms, and k = Ω(log(1 /δ )
/ε ) is necessary for handling unbounded number of bins.
We emphasize that we do not require any upper and lower bounds on the eigenvalue, thanks to the private histogram learner from [11, 56] that gracefully handles unbounded number of bins.
The privacy guarantee follows from the privacy guarantee of the histogram learner provided in
Lemma B.1.
For utility analysis, we follow the analysis of [53, Theorem 3.1].
The main difference is that we prove a smaller sample complexity sine we only need the top eigenvalue, and we analyze a more general distribution family.
The random vector ˜ g
i is zero mean with covariance 2 λ 21 H u ∈ R d × d , where H u = E
[( A i − Σ) uu ⊤ ( A i − Σ) ⊤ ] /λ 21 , and ˜ g i satisfies with probability 1 − ζ ,
[Equation]
72) which follows from Lemma 2.1.
Applying union bound over all basis vectors v ∈ { e 1 , . .
. , e d } , we know with probability 1 − ζ ,
[Equation]
We next show that conditioned on event E = {∥ ˜ g
[Equation]
≤
[Equation]
Kλ
[Equation]
(cid:112) d ∥ H u ∥ 2 log a ( d/ζ ) } , the covariance
E [˜ g i ˜ g
⊤ i |E ] is close to the true covariance E [˜ g i ˜
g
⊤ i ]
= 2 λ 21 H u .
Note that
[Equation]
We next show the empirical covariance (1 /b ) (cid:80) bi =
˜
g
i ˜ g
⊤ i concentrates around 2 λ 21 H u .
First of all, using union bound on Eq.
(72), we have with probability 1 − ζ , for all i ∈
[ b ] and j ∈ [ d ] ,
[Equation]
Under the event that | ˜ g ij | ≤ 2 Kλ 1 (cid:112) ∥
H u ∥ 2 log a ( nd/ζ ) for all i ∈ [ b ] , j ∈ [ d ] , [79, Corrollary 6.20] together with Eq.
(73) implies
[Equation]
The above bound implies that with probability 1 − ζ ,
[Equation]
This means if b = Ω( K 2 d log( dk/ζ ) log 2 a ( bdk/ζ )) , then with probability 1 − ζ , for all j ∈ [ k ] , (1 − 2 1 / 8 ) λ
∥ H u ∥ 2 ≤ λ ( j )≤ (1 + 2 1 / 8 ) λ 21 ∥
H u ∥ 2 .
This means all of λ ( j )must be within 2 1 / 4 λ
∥ H u ∥ 2 interval.
Thus, at most two consecutive buckets are filled with λ ( j ) 1 .
By private histogram from Lemma B.1, if k ≥ log(1 / ( δζ )) /ε , one of those two bins are released.
The resulting total multiplicative error is bounded by 2 1 / 2 .
E.3 Algorithm and proof of Lemma 6.2 on DP mean estimation
Algorithm 5: Private Mean Estimation [56, 50]
Input: S = { g i } Bi
=1 , ( ε, δ ) , target error α , failure probability ζ , approximate top eigenvalue ˆΛ 1 Let τ = 2 1 / 4 K (cid:112) ˆΛ log a (25) .
2 for j=1, 2, ..., d do
Run ( ε 4 √ 2 d log(4 /δ ) , δ 4 d ) -DP histogram learner of Lemma B.1 on { g ij } i ∈
[ B ] over Ω = {· · · , ( − 2 τ, − τ ] , ( − τ, 0] , (0 , τ ] , ( τ, 2 τ ] , (2 τ, 3 τ ] · · · } .
Let [ l h ] be the bucket that contains maximum number of points in the private histogram
Truncate the j -th coordinate of gradient { g i } i ∈
[ B ] by
[Equation]
of g i .
˜
[Equation]
B
[Equation] [Equation]
The histogram learner is called d times, each with ( ε/ (4 (cid:112) 2 d log(4 /δ )) , δ/ (4 d )) -DP guarantee, and the end-to-end privacy guarantee is ( ε/ 2 , δ/ 2) from Lemma B.4 for ε ∈ (0 , 0 . 9) .
The sensitivity of the clipped mean estimate is ∆ = √ d 6 K (cid:112) ˆΛ log a ( Bd/ζ ) .
Gaussian mechanism with covariance (2∆ (cid:112) 2 log(2 .
5 /δ ) /ε )
2 I d satisfy ( ε/ 2 , δ/ 2) -DP from Lemma 2.4 for ε ∈ (0 , 1) .
Putting these two together, with serial composition of Lemma B.3, we get the desired privacy guarantee.
The proof of utility follows similarly as [61, Lemma D.2].
Let I l
=
( l (cid:112) ˆΛ , ( l + 1) (cid:112) ˆΛ] .
Denote the population probability of j -th coordinate at I l as h j,l = P ( g ij ∈
I l ) .
Denote the empirical probability as ˆ h j,l = 1 B (cid:80) Bi
=
I ( g ij ∈ I l ) .
Denote the private empirical probability being released as ˜ h
j,l .
Fix j ∈ [ d ] .
Let I k be the bin that contains the µ j .
Then we know [ µ j − Kλ 1 (cid:112)
∥
H u ∥ 2 log a (25) , µ j +
Kλ 1 (cid:112) ∥
H u ∥ 2 log a (25)] ⊆
[ µ j − τ, µ j + τ ] ⊂ ( I k − 1 ∪ I k ∪ I k +1 ) .
By Lemma 2.1, we know
P ( | g ij − µ j | ≥ τ ) ≤ P ( | g ij − µ j | ≥ Kλ 1 (cid:112) ∥
H u ∥ 2 log a (25)) ≤ 0 . 04 .
This means h ( k − 1) ,j + h k,j + h ( k +1) ,j ≥ 0 .
96 and min( h ( k − 1) ,j , h k,j , h ( k +1) ,j ) ≥ 0 .
By Dvoretzky-Kiefer-Wolfowitz inequality and an union bound over j ∈ [ d ] , we have that with probability 1 − ζ , max j,l | h j,l − ˆ h j,l | ≤ (cid:112) log( d/ζ ) /B .
Using Lemma B.1, if B = Ω(( (cid:112)
d log(1 /δ )
/ε ) log( d/ ( ζδ ))) , with probability 1 − ζ , we have max j,l | ˜
h j,l − ˆ h j,l | ≤ 0 .
Thus, with our assumption on B , we can make sure with probability 1 − ζ , max j,l | ˜ h j,l − h j,l | ≤ 0 .
Then we have min( h ( k − 1) ,j , h k,j , h ( k +1) ,j ) − 0 .
01 ≥ 0 .
31 ≥ 0 .
+ 0 .
01 ≥ max l ̸
= k − 1 ,k,k 1 h j,l + 0 . 01 .
This implies with probability 1 − ζ , the algorithm must pick one of the bins from I k − 1 , I k , I k
+1 .
This means | ¯ g j − µ j | ≤ 2 τ ≤ 2 1 .
5 Kλ 1 (cid:112) ∥
H u ∥ 2 log a (25) .
By tail bound of Lemma 2.1, we know for all j ∈ [ d ] and i ∈
[ B ] , | g ij − ¯ g j | ≤ | g ij − µ j | + | ¯ g j − µ j | ≤ 3 Kλ 1 (cid:112)
∥
H u ∥ 2 log a ( Bd/ζ ) .
This completes our proof.
F Technical lemmas
Lemma F.1.
Let x ∈ R d ∼ N (0 , Σ) .
Then there exists universal constant C such that with probability 1 − ζ ,
[Equation]
Proof.
Let ˜ x := Σ − 1 / 2 x .
Then ˜ x is also a Gaussian with ˜ x ∼ N (0 , I d ) .
By Hanson-Wright inequality ( [76, Theorem 6.2.1]), there exists universal constant c > 0 such that with probability 1 − ζ ,
[Equation]
Lemma F.2 ([76, Theorem 4.4.5]) .
Let G ∈ R
d
×
d be a random matrix where each entry G ij is i.i.d.
sampled from standard Gaussian N (0 , 1) .
Then there exists universal constant C > 0 such that with probability 1 − 2 e − t 2 , ∥ G ∥ 2 ≤ C ( √ d + t ) for t > 0 .
Lemma F.3.
Let G ∈ R
d
×
d be a random matrix where each entry G ij is i.i.d.
sampled from standard
Gaussian N (0 , 1) .
Then we have ∥ E [ GG ⊤ ] ∥ 2 ≤ C 2 d and ∥ E [ G ⊤ G ] ∥ 2 ≤ C 2 d .
Proof.
By Lemma F.2, there exists universal constant C 3 > 0 such that
[Equation]
Then
[Equation]
where C 2 is an absolute constant.
The proof for the second claim follows similarly.
Lemma F.4.
Let x, y ∈ S
d − 1.
Then
[Equation] [Equation]
If ∥ x − y ∥ 2 ≤ 2 , then
[Equation]
The following lemma follows from matrix Bernstein inequality [73].
Lemma F.5.
Under A.1, A.2, and A.3, in Assumption 1, with probability 1 − ζ ,
[Equation]