Faster Algorithms for High-Dimensional Robust Covariance Estimation
Yu Cheng, Ilias Diakonikolas, Rong Ge, David Woodruff
Introduction
In this paper, we study the outlier robust setting when a small constant fraction of our samples can be arbitrarily corrupted. We work in the following model of corruptions (see, e.g., [DKK+16]) that generalizes Huber’s contamination model ([Hub64]):
Recent work in TCS ([DKK+16, LRV16]) gave the first polynomial time robust estimators for a range of high-dimensional statistical tasks, including mean and covariance estimation. Since these initial papers ([DKK+16, LRV16]), a growing body of subsequent works have obtained polynomial-time robust learning algorithms for a variety of unsupervised and supervised high-dimensional models. (See Section 1.3 for more related work.)
It should be noted that the aforementioned robust estimators have already been useful in exploratory data analysis. Specifically, [DKK+17] evaluated the robust covariance estimators of [DKK+16] and [LRV16] to detect patterns in a well-known genetic dataset ([NJB+08]) in the presence of corruptions. Perhaps surprisingly, it was found that the robust algorithms developed for outperformed all previous approaches on this real dataset, essentially matching the setting where there are no corruptions at all.
Once a polynomial-time algorithm for a computational problem has been discovered, the next step is to focus on designing asymptotically faster algorithms for the problem – with linear time as the ultimate goal. We note that the aforementioned robust estimators ([DKK+16, LRV16]) are significantly slower than their non-robust counterparts (e.g., computing the empirical mean/covariance), hence may not be scalable when the dimension is very high. This raises the following natural question:
Can we design robust estimators that are as efficient as their non-robust analogues?
This direction was initiated in [CDG19] who gave a robust mean estimation algorithm with runtime , The notation hides logarithmic factors in its argument. nearly matching the runtime of computing the empirical mean (when is constant).
For the sake of direct comparison, we note that the filtering-based robust covariance estimator of [DKK+16] has runtime . On the other hand, the recursive dimension-halving estimator of [LRV16] requires SVD computations of a “covariance” matrix, hence has runtime , where is the exponent of matrix multiplication. (Plugging in the best-known value for ([Gal14]) gives a runtime of .)
We note that the runtime of our algorithm, while being super-linear, essentially matches the best-known runtime to compute the empirical covariance matrix (see Section 6.1). Moreover, we provide evidence (Section 6.2) that this runtime may be a bottleneck even for the weaker task of obtaining an implicit representation to the output (by reweighing the input samples). It should be noted that all known computationally efficient robust estimators fit in this framework.
Our first algorithmic result states that we can robustly estimate the covariance matrix of a high-dimensional Gaussian within multiplicative, dimension-independent error, with running time that almost matches that of computing the empirical covariance matrix.
We also develop a related robust covariance estimation algorithm (Algorithm 3) with additive error guarantee, whose running time does not depend on the condition number of .
We will prove Theorem 1.2 in Section 3.1 and Theorem 1.3 in Appendix B.1.
In Section 6, we provide evidence that the runtime of our algorithm may be difficult to improve. Specifically, we show that the best-known runtime for computing (or even approximating) the empirical covariance is . Moreover, even outputting a set of weights for the samples (such that the weighted empirical covariance works) seems to require time with current methods.
2 Our Approach and Techniques
Iterative Refinement.
The second difficulty is that existing robust mean estimation algorithms rely on the assumption that the distribution of the good data either has known covariance or unknown bounded covariance. By reducing covariance estimation to the mean estimation of , we run into the difficulty that the covariance of such vectors would correspond to the fourth order moments of the original variables . So, directly applying the mean estimation algorithms does not give our desired strong guarantees.
We establish two guarantees for the robust estimation of the mean of . In the first phase, we only use the fact that the covariance of is bounded. Repeating this will give a rough estimation of the covariance of . In the second phase, we use the fact that the current estimate is already very close to , therefore is very close to a standard Gaussian for the good samples. In this case, we need to open up the algorithm in [CDG19] and prove stronger robust estimation guarantees tailored for the specific distribution of . Our main algorithm (Algorithm 1) combines these two refinement steps to match the best-known robustness guarantees for covariance estimation.
Evidence of Hardness.
A natural way of improving the running time of non-robust covariance estimation is to try to approximate the product using oblivious sketching (see, e.g., [Woo14] for a survey) which works roughly as follows. One samples a random from a certain family of random matrices, and computes where has much fewer than rows. For structured random families of matrices, like fast JL matrices, can be computed very quickly. Then one instead computes with the guarantee that is small. Note that the matrix product can be performed more quickly if has a small number of rows. Unfortunately, for the guarantees we want, all known constructions of require rows. In fact, we prove an information-theoretic result that any oblivious sketching matrix must have rows in Lemma 6.1, thus ruling out this approach for achieving faster running time. Our proof uses arguments from communication complexity, arguing that such a family of sketching matrices would imply a better protocol for solving multiple copies of the Gap-Hamming communication problem.
Another way of trying to improve the runtime is to give an alternative definition of the problem: Instead of outputting a matrix that is close to , the algorithm outputs a set of nonnegative weights such that , , and . This bypasses the arguments above, since in the case of no corruption, we do not have to actually output and can just set for all . However, even for this relaxed version of the problem, we show that unless one can solve a certain “column norm” distinguishing problem faster than rectangular matrix multiplication, one cannot solve this problem faster than matrix multiplication time. This problem can be intuitively stated as follows: the good samples are drawn from , and the corrupted samples are drawn from a mean-zero Gaussian distribution with a very slight and known perturbation to the identity covariance matrix. One needs to identify a large fraction of these corrupted samples. Even though the covariance of the perturbed Gaussians is known, it is so slight that the norms of the corrupted samples are very similar to the uncorrupted ones. Therefore, one needs to measure these norms along certain directions, which requires computing a matrix product of the samples with a worst-case covariance matrix. We show that outputting the weights described above requires solving this problem, which we conjecture to be hard.
3 Related and Prior Work
Learning in the presence of outliers is an important goal in statistics and has been studied in the robust statistics community since the 1960s ([Hub64]). After several decades of work, a number of sample-efficient and robust estimators have been discovered. The reader is referred to ([DKK+16, LRV16]) for a detailed summary of this line of work. Until recently, all known computationally efficient high-dimensional estimators could only tolerate a negligible fraction of outliers. Recent work ([DKK+16, LRV16]) gave the first efficient robust estimators for basic high-dimensional unsupervised tasks. Since these works, there has been a flurry of research activity on robust learning algorithms in both supervised and unsupervised settings ([BDLS17, CSV17, DKK+17, DKS17, DKK+18, SCV18, DKS18b, DKS18a, HL18, KSS18, PSBR18, DKK+19, KKM18, DKS19, LSLC18, CDKS18]).
The most relevant prior work is that of [CDG19], initiating the direction of obtaining fast algorithms for robust high-dimensional estimation. For the problem of robust mean estimation, [CDG19] proposed a primal-dual approach – building on the convex programming approach of [DKK+16] – yielding an algorithm with runtime . This improved on the runtime of the iterative filtering method in [DKK+16]. Our algorithm uses the same primal-dual framework; however, we emphasize that a standard application of their framework would only lead to a runtime of . To obtain our improved runtime, we need to overcome a number of technical obstacles, as we explained in Section 1.2.
Preliminaries
Connections Between the Second and Fourth Moments of a Gaussian.
Fast Rectangular Matrix Multiplication.
We will frequently use fast rectangular matrix multiplication in our algorithms. Let -matrix multiplication time denote the time it takes to multiply an matrix with a matrix. It is forklore (see, e.g., [LR83]) that , , and matrix multiplications require the same number of arithmetic operations. More specifically, we use the algorithm proposed in [Gal12]. They obtained new upper bounds on matrix multiplication time. We use a special case of their result ().
We can compute -matrix multiplication in time . This implies that for and , we can multiply a matrix with an matrix in time .
To multiply a matrix with an matrix when , we split the matrices into blocks of size or , multiply each pair of matrices and then add the results together. The total running time is .
Transposition Principle for Matrix-Vector Multiplication.
The transposition principle (see, e.g., [Bor57, Fid73]) plays a central role in our faster implementation of positive SDP solvers. It states that matrix-vector multiplication by has almost exactly the same computational complexity as matrix-vector multiplication by .
Estimating the Covariance of a Gaussian Distribution
In this section, we present our key structural and computational lemmas, and use them to prove our main algorithmic results (Theorems 1.2 and 1.3).
We first present our algorithm (Algorithm 1) for robustly estimating the covariance of Gaussian distributions with multiplicative error guarantees. Algorithm 1 starts with an upper bound on the true covariance matrix , and iteratively compute more and more accurate upper bounds .
First we need a reasonable starting point before we can run any iterative refinement steps.
Consider the same setting as in Theorem 1.2. We can compute a matrix in time such that, with high probability, and .
We use two different iterative refinement steps (Lemmas 3.2 and 3.3), which correspond to the two loops in Algorithm 1. In the first phase (Lemma 3.2), we only have a crude upper bound on .
The first phase can only converge to a matrix with . In the second phase (Lemma 3.3), we already have a fairly accurate estimate of , so the refinement steps converge faster and eventually we can get to a matrix with .
Consider the same setting as in Theorem 1.2. Let for some universal constant . Given and with , we can compute in time an upper bound matrix and a hypothesis matrix such that, with high probability, for ,
We defer the proof of Lemma 3.1 to Appendix B, and the proofs of Lemmas 3.2 and 3.3 to Section 3.2. We first use these three lemmas to prove Theorem 1.2 (correctness and runtime of Algorithm 1).
For any integer , given the upper bound matrix , we can use Lemma 3.2 to obtain a better upper bound such that . Since , after iterations, we have a matrix with .
At this point we have a pretty accurate upper bound with , where . For any integer , given and , we can use Lemma 3.3 to obtain a better upper bound matrix such that , where . Similar to the previous step, after iterations, we have a matrix such that , where .
Finally, using Lemma 3.3 one more time with and , we can get a matrix with
We note that both Lemmas 3.2 and 3.3 hold with high probability, so we can take a union bound over the failure probabilities and conclude that with high probability all iterative refinement steps are successful, and therefore, we can return as our final answer.
Now we analyze the running time of Algorithm 1. We call Lemma 3.1 once to compute , which takes time . After that, we use two iterative refinement steps. The total number of iterations is . In each iteration, we invoke either Lemma 3.2 or 3.3. Since both lemmas run in time , the overall running time is . ∎
2 Implementing the Iterative Refinement Steps
In the first phase (Lemma 3.2), we only have a crude upper bound on . For any , we have , which implies (Lemma 2.1). Because has bounded covariance, we can use the following robust mean estimation algorithm from [CDG19].
In the second phase (Lemma 3.3), we use the fact that the current estimate is already very close to , therefore is very close to . In this case we need an algorithm with stronger robust estimation guarantees tailored for the specific distribution of .
It is worth noting that we cannot use these mean estimation algorithms in a black-box manner. This is because writing down the input explicitly takes time, and these algorithms run in time in dimensions. One of our main contributions is to show that it is possible to open up these algorithms and take advantage of the additional structures of our inputs (they all have the form ) to implement both algorithms to run in time .
We give a description of the algorithm for Lemma 3.4 in Appendix B.2 (Algorithm 5). We prove Lemma 3.5 and present the corresponding algorithm (Algorithm 2) in Section 4. In Section 5, we show that both algorithms can be implemented to run in time (Proposition 3.6). We first use Lemmas 3.4, 3.5, and Proposition 3.6 to prove the iterative refinement lemmas.
Given an upper bound on the true covariance matrix, we can rotate the input samples to compute . Let . Note that when , the random variable is drawn from a Gaussian distribution with covariance . Lemma 2.1 implies that, if , then . Therefore, is an -corrupted set of samples drawn from a distribution with bounded covariance, so we can apply Algorithm 5 to robustly estimate its mean.
Let . Using , we can prove the first part of the lemma,
As a result, we have that , or equivalently
Now is a better upper bound, which satisfies .
Since all the ’s have the form , Proposition 3.6 shows that Algorithms 5 has running time . Given the output of Algorithms 5, we can compute the new upper bound in time using a constant number of matrix additions and multiplications. ∎
Let and . We know that
By Lemma 2.1, we have . By standard concentration results, has exponential concentration about its mean in any direction. Therefore, is an -corrupted set of samples drawn from a distribution that satisfies the conditions in Lemma 3.5, and we can apply Algorithm 2 to robustly learn the mean of . By Lemma 3.5, we can compute a matrix such that
Let . Using , we can prove the first part of the lemma,
This gives a better upper bound such that .
We omit the running time analysis because it is identical to the one in the previous proof. ∎
Robust Mean Estimation Subroutines
We first present the robust mean estimation algorithm (Algorithm 2) that achieves Lemma 3.5.
There are two obstacles for applying the algorithmic framework of [CDG19] to our setting. First, the input samples ’s are -dimensional vectors. Writing down these vectors explicitly takes time . Therefore, we want to solve the SDPs (1) and (2) on input without computing them explicitly. We resolve this issue in Section 5 (Proposition 3.6).
Second, their algorithms have error for bounded-covariance distributions, and error for sub-gaussian distributions with identity covariance matrix. While we can directly use their result for bounded-covariance distributions for Lemma 3.4, we need to develop a new algorithm for Lemma 3.5. In Lemma 3.5, we have a distribution with exponential decaying tails, and we know its covariance is -close to the identity matrix. We want to robustly estimate its mean, with optimal error guarantees that depend on both and . We generalize the analysis of [CDG19] to handle this case. Lemma 3.5 is proved in Appendix B.3.
Faster Implementation of Robust Mean Estimation with Tensor Inputs
The bottleneck of both Algorithms 5 and 2 are solving SDPs (1) and (2). In this section, we prove Proposition 3.6, which states that when all input samples have the tensor-product form , we can solve these SDPs in time .
We first convert the SDPs (1) and (2) into packing/covering SDPs as follows.
Here is a binary search parameter that is between and . At the core of nearly-linear time width-independent SDP solvers (e.g., [ALO16, PTZ16]) is an application of matrix multiplicative weight update, where the algorithm maintains a weighted sum of the matrices. In iteration , we have , and we will update the weights based on the values of .
Let be PSD matrices given in factorized form . Consider the following pair of packing and covering SDPs:
We will approximate each and separately. Observe that and have the same block structure as the ’s. Due to the special structure of the bottom-right block, we can compute its contribution to and exactly. Therefore, we can focus on the top-left block. Moreover, because the goal is to compute a multiplicative approximation of the top-left block’s contribution to and , we can ignore the scalar . We prove the following lemma.
and we can compute via fast rectangular matrix multiplication (Lemma 2.2),
matrix-vector multiplication with or has the same running time by the Transposition Principle (Lemma 2.3 in Section 2)), and
multiplication with a diagonal matrix can be done in time .
We approximate using a similar approach: . Notice that the last line is precisely the squared norm of the -th column of . For the same reasons as in the previous case, we can compute this matrix in time . ∎
We can approximate with a matrix polynomial of , whose degree depends on the spectral norm of and the desired precision (see, e.g., [AK16]).
By Lemma 5.1, we only need to show that the required oracle algorithm can be implemented in time . We approximate and each separately. Given , we will compute the contribution from bottom-right block explicitly, and use Lemma 5.2 for the top-left block. The bottom-right block adds to , and for every , it adds to . ∎
Evidence of Hardness
In this section, we provide some evidence which suggests that the running time of our algorithm has near-optimal dependence on . We start by noting that our sample complexity is tight up to polylogarithmic factors, and this holds even when there is no corruption. For the rest of this section, we will assume both and are constants, and focus on the dependence on in the running time. Since the running time of our algorithm is dominated by -matrix multiplication time, faster matrix multiplication algorithms time will improve our running time.
In Section 6.1, we show that even when there are no corrupted samples, it is not known how to compute the empirical covariance matrix faster than -matrix multiplication time. We give a communication complexity lower bound that rules out all oblivious matrix sketching approaches.
In Section 6.2, to circumvent the difficulty raised in Section 6.1, we consider a weaker problem where the algorithm only need to find a set of good weights (instead of a matrix). We give a reduction to show that this problem is still at least as hard as some basic matrix computation question, which we do not know how to solve faster than -matrix multiplication time.
Our algorithm matches the running time of the best non-robust covariance estimation algorithm. When there are no corrupted samples and , with high probability, the empirical second-moment matrix is -close to the true covariance matrix in Frobenius norm. However, it is not known how to (approximately) compute this empirical second-moment matrix faster than matrix multiplication time.
For approximate matrix product of an matrix with , we want to choose a sketching matrix so that . Known results for approximate matrix product state that if has rows, then with probability at least , see, e.g., Section 2.2 of [Woo14] for a survey. In the context of Problem 1, letting , we have and . The error is then , and consequently must have rows for the error to be at most .
We can show that the argument above is almost tight for all oblivious sketches.
Let . There is no distribution over matrices , oblivious to the underlying input matrix , where , such that with probability at least , it holds that , where is a positive constant.
Suppose, to the contrary, there were such a distribution on matrices satisfying .
For , consider a uniformly random matrix . Then , and so for a random matrix from our family and a random input from this family of inputs, it holds that with probability at least , . By anti-concentration of the binomial distribution, with probability at least , at least a -fraction of the off-diagonal entries of have absolute value at least .
Consequently, for at least a -fraction of the entries in the bottom left submatrix of , we have the property that the entry has the same sign as in , and also the entries in are at least . Indeed, otherwise we would have with probability at least over the choice of and , and in particular there exists a fixed for which this holds with probability at least over the choice of , contradicting our assumption on the family of matrices .
Now consider the following two-player communication game with public shared randomness. Alice has the first columns of , denoted while Bob has the remaining columns of , denoted . The entries in the in the bottom left submatrix of are exactly the inner products between all columns of Alice and all columns of Bob. Suppose there were such a family of matrices as described above. Alice and Bob use the public coin to agree upon with no communication. Alice then computes , and rounds each entry to the nearest power of . Note all entries of need to be at most and rounding preserves up to additive . Therefore, we maintain the property that, at least a -fraction of the entries in the bottom left submatrix of have the same signs in and . Alice sends each of the rounded entries of , which is bits. Bob then computes and thus forms , from which he can compute . At this point, Bob can recover the sign of a uniformly random entry in the bottom left submatrix of with probability at least .
Notice that the sign of such an entry is the same as solving the Gap-Hamming communication problem under the uniform distribution: in this communication problem there are two players, Alice and Bob, who hold uniformly random vectors , respectively, and wish to decide if or . This problem requires randomized communication complexity [CR12]. Moreover, as shown by Braverman et al. [BGPW16], the information complexity of this problem is bits. In our setting, we can think of Alice as having independent instances , and Bob having an index as well as a vector and Bob wants to solve the Gap-Hamming problem on the pair . However, only Alice is allowed to speak, and she sends a single message to Bob, without knowing . By standard direct sum arguments in communication complexity [BR11] (see also [PSW14] where Gap-Hamming composed with the Index problem was used), the randomized one-way communication complexity of this problem is bits. However, the communication cost of our protocol is bits, which is a contradiction. Consequently, we must have , as desired. ∎
It is worth noting that this lower bound holds for any possible algorithm one can run on (i.e., the algorithm can do more than just computing ), so it is a stronger information-theoretic statement.
2 Finding Good Weights
To circumvent the difficulty of Problem 1, we could redefine our problem so that the algorithm does not need to output a matrix, instead it outputs a set of good weights such that . We will show that, even for this weaker problem of finding good weights, one still need to come up with faster algorithms for a basic matrix problem.
Consider the following instance. Let be an arbitrary matrix with orthonormal columns. Let the good distribution be , and the noise distribution is defined as
We draw samples from and samples from . The empirical covariance matrix of the mixed distribution is . Observe that , so the bad samples are distorting the empirical covariance matrix by more than we could tolerate.
Therefore, a natural way of distinguishing them is to compute , which requires -matrix multiplication time. We could compute the column norms of , where is a Johnson-Lindenstrauss matrix. However, must have rows to obtain -approximation, and therefore must have rows. Even if one uses a sparse matrix , one has that is a dense matrix, and it is unclear how to compute quickly.
Consider the same setting as in Problem 2. Given a set of weights such that , , and , we can solve Problem 2 in time.
For the rest of proof we assume the samples meet these conditions.
Let . Let and denote the total weights on and respectively. Since , by Cauchy-Schwarz,
Putting these two inequalities together, we get that . In other words, the average weight of a bad sample is .
Let . By Markov’s inequality, we have . Since and , again by Markov’s inequality, we get that and hence . ∎
Acknowledgments
This work was done in part while some of the authors were visiting the Simons Institute for the Theory of Computing. Ilias Diakonikolas was supported by NSF Award CCF-1652862 (CAREER) and a Sloan Research Fellowship. Rong Ge is supported by NSF Award CCF-1704656, CCF-1845171 (CAREER), a Sloan Research Fellowship, and a Google Faculty Research Award. David Woodruff was supported in part by Office of Naval Research (ONR) grant N00014-18-1-2562.
References
Appendix A Omitted Proofs from Section 2
If , then .
If and , then .
Let be the unique matrix such that . We have
Note that is a covariance matrix, so it is always symmetric and PSD. We can write as . Let and denote the maximum and minimum eigenvalues of . Let . The right hand side is equal to
For (i), by assumption , so we have .
For (ii), we know and . It follows that , and thus . ∎
Appendix B Omitted Proofs from Section 3
Let be the original set of good samples drawn from , and let be the corrupted samples. Let denote the set of samples with the smallest norm . We define .
We first show that with high probability. Since the adversary corrupts at most samples and we throw away samples, we are left with at least good samples in . We will use the fact that removing any -fraction of the good samples will not change the empirical covariance too much. Let so that if then . When , for any with , we have that with high probability,
We set to be a set of good samples in , i.e., for all . Let . We know that by definition, and by the above concentration inequality. Therefore,
Next we show that and . Let denote the largest eigenvalue of . Again let , we know that when , with high probability,
We assume this condition holds for the rest of the proof. As a result, for all . Since only corrupted samples can have larger norm, and we remove the samples with the largest norm, all samples in have norm at most . This gives an upper bound on the spectral norm of ,
This proves . Moreover, by the definition of condition number we know that , which implies .
We conclude the proof by noting that can be computed by multiplying a matrix with an matrix. This can be done in time by fast rectangular matrix multiplication (Lemma 2.2). ∎
Let us first prove the guarantee for the crude additive estimation.
Under the same setting as Theorem 1.3, there exists universal constant such that Algorithm 4 outputs an estimate that satisfies with high probability in time .
By Lemma 3.1, in Algorithm 4, we can compute such that . Lemma 3.2 allows us to iteratively compute such that . It follows that , and thus after iterations we have a matrix with . Using Lemma 3.2 with , we can get a matrix with . The running time follows from the running time of Lemmas 3.1 and 3.2. ∎
Suppose the constant hiding in the notation in Lemma B.1 is , we have the following immediate corollary of Lemma B.1.
In Algorithm 3, the matrix satisfies .
In Algorithm 3 we will choose and define to be the subspace where the eigenvalues of are at least . We can then show the following lemma:
In Algorithm 3, with high probability, the matrix satisfies
We assume the calls to compute are successful, which happens with high probability.
We continue to bound . Notice that by Corollary B.2,
Here the last step uses the fact when is small enough . ∎
We will now show that computed by Algorithm 3 has low additive error in the subspace .
In Algorithm 3, with high probability, the matrix satisfies
Moreover, if we consider as vectors of dimension equal to the dimension of , the algorithm runs in time .
We assume the calls for computing matrices are all successful, which happens with high probability.
Let , we know the covariance of these samples are exactly equal to .
In this case, by the guarantee of Theorem 1.2 we know
We can left and right multiply by and get
When is small enough this implies , therefore as desired we have
The only thing left to establish is the running time. To bound the running time we will show . Here we restrict the attention to the subspace , so if as dimension , is the ratio of the largest eigenvalue and the -th eigenvalue.
Let be the subspace of eigenvectors of with eigenvalue at most . We first show the following claim:
For any unit vector , .
Since , we will bound the contributions separately. Notice that for any , we have , therefore by Corollary B.2,
On the other hand, . Combining the two equations we get . The proof for is exactly the same except we use Lemma B.3. ∎
For any two subspaces and , one can check that
where is the angle between . Therefore we know for any vector , . This implies for every ,
This shows , so . ∎
Finally we give the guarantee for .
In Algorithm 3, with high probability, the matrix satisfies
We assume the calls to compute are successful, which happens with high probability.
Set . Let denote the covariance of . It is easy to check that . By Lemma B.2,
Combining these we have . Therefore by Lemma B.1 we know the estimation satisfies .
On the other hand, it is easy to check that , therefore we have
Finally we are ready to combine all the steps.
We will assume the four calls to Algorithm 1 and Algorithm 4 are all successful, which happens with high probability. The running time follows from Lemma B.1 and Lemma B.4. Now the resulting matrix looks like
By Lemmas B.3, B.4, B.5 we know for each one of these nine blocks the error is bounded by . Therefore, the entire matrix also has error at most . ∎
B.2 Robust Mean Estimation for Bounded-Covariance Distributions
We use the robust mean estimation algorithm for bounded-covariance distributions from [CDG19] to achieve Lemma 3.4.
We state this algorithm (Algorithm 5) to be self-contained.
Notice that Algorithm 5 is almost identical to Algorithm 2, except the stopping criteria in the “if” statement. Therefore, we can speed up Algorithm 5 using Proposition 3.6, as we do for Algorithm 2.
B.3 Robust Mean Estimation with Approximately Known Covariance
In this section, we prove the error guarantee part of Lemma 3.5, i.e., correctness of Algorithm 2. Note that we will not worry about running time here, so we can use the naive implementation of Algorithm 2 which runs in time . For the same reason, we ignore the additional structure in our input and focus on the mean estimation problem. For the rest of this section, we use to denote the dimensionality of the problem, and to denote the number of samples. (We have if we are trying to estimate the covariance matrix of a -dimensional Gaussian.)
We use to denote the input, which is a set of -dimensional -corrupted samples drawn from some ground-truth distribution . We know has covariance matrix with , and the goal is to estimate the unknown mean of . We first restate Lemma 3.5.
We use for the original set of good samples drawn from . After -fraction of the samples are corrupted, we use for the remaining good samples and for the corrupted samples. The input to the algorithm is . We have and . Let denote the convex hull of all uniform distributions over subsets of size :
Every weight vector correspond to a fractional set of samples.
By standard concentration results, we know that degree- polynomials of Gaussian random variables are exponentially concentrated around their mean.
To avoid dealing with the randomness of the good samples, we require the following deterministic conditions on the original set of good samples (which hold with high probability when when satisfies Definition B.6). For all , we require the following conditions to hold for and :
At a high level, they state that with high probability, the good samples are never too far from , and the empirical first and second moments of the good samples behave as we expect them to. More specifically, upper bounds the change in the mean when we remove any -fraction of the samples, and upper bounds the change in the second-moment matrix. The second-order condition follows from the fact that , the triangle inequality for the spectral norm, and with high probability for our choice of ,
We adapt the proof of [CDG19] to prove the following lemma, which holds for general distributions that satisfy the concentration bounds above.
Assume the concentration bounds (Conditions (8) and (9)) hold for the good samples with parameters and where . Let . Then Algorithm 2, with threshold in the “if” statement, will output a weight vector such that the weighted empirical mean satisfies for .
Lemma 3.5 follows immediately from Lemma B.7, because the output of Algorithm 2 has error as needed.
To prove Lemma B.7, we will show that the win-win analysis still holds in our setting by proving two structural lemmas. Lemma B.9 proves that a good primal solution for any guess will give an accurate weighted empirical mean. Lemma B.10 shows that we can use the top eigenvector of a near-optimal dual solution to move closer to by a constant factor.
First we prove a helper lemma. Lemma B.8 gives upper and lower bounds on the optimal value of the SDPs (1) and (2). For example, Lemma B.8 allows us to estimate how far is from from the optimal value of the SDPs.
In particular, when and , we can simplify the above as
One feasible primal solution is to set for all (and for all ):
We used Condition (8), since can be viewed as a weight vector on where .
One feasible dual solution is where . The dual objective value is the mean of the smallest -fraction of , which is at least
This is because the smallest entries in must include the smallest entries. Let for all and otherwise. Note that and , so can be viewed as a weight vector on with . Therefore we have
Next we show that a good primal solution for any guess will give an accurate estimate . Lemma B.9 proves the contrapositive statement: if the weighted empirical mean is far from , then no matter what our current guess is, cannot be a good solution to the primal SDP.
Fix any . If , then because is feasible and by Lemma B.8,
Therefore, for the rest of this proof, we can assume .
We project the samples along the direction of . Consider the unit vector . To bound from below the maximum eigenvalue, it is sufficient to show that
We first bound from below the contribution of the bad samples by . By triangle inequality,
The last line follows from our choice of , , and the good samples satisfy Condition (8). By Cauchy-Schwarz,
Since , we have .
We continue to lower bound the contribution of the good samples to the quadratic form by . By Condition (8),
In the last step, we used . Putting together the contribution of good and bad samples, we have . ∎
Lemma B.9 guarantees that, any solution to the primal SDP whose objective value is at most will give good weights, and this is independent of our current guess .
We now deal with the other possibility: the primal SDP has no good solution. Lemma B.10 shows that in this case, we can solve the dual SDP (2) and move closer to by a constant factor. We simplify the proof by assuming that we can solve the dual SDP exactly. This assumption is wlog as shown in [CDG19].
We know and . Without loss of generality, we can assume is symmetric.
Since the objective value is the average of the smallest entries of and one way to choose entries is to focus on the good samples, using Condition (8),
Therefore, we have .
We will continue to show that the top eigenvector of aligns with . Let denote the eigenvalues of , and let denote the corresponding eigenvectors. The conditions on implies that . We decompose and write it as where . Using these decompositions, we can rewrite .