F AST R EGRESSION FOR S TRUCTURED I NPUTS
A BSTRACT
We study the (cid:96) p regression problem, which requires ﬁnding x ∈ R d that minimizes (cid:107)
Ax − b (cid:107) p for a matrix A ∈ R n × d and response vector b ∈ R n .
There has been recent interest in developing subsampling methods for this problem that can outperform standard techniques when n is very large.
However, all known subsampling approaches have run time that depends exponentially on p , typically, d O ( p ) , which can be prohibitively expensive.
We improve on this work by showing that for a large class of common structured matrices , such as combinations of low-rank matrices, sparse matrices, and Vandermonde matrices, there are subsampling based methods for (cid:96) p regression that depend polynomially on p .
For example, we give an algorithm for (cid:96) p regression on Vandermonde matrices that runs in time O ( n log 3 n + ( dp 2 ) 0 .
5+ ω · polylog n ) , where ω is the exponent of matrix multiplication.
The polynomial dependence on p crucially allows our algorithms to extend naturally to efﬁcient algorithms for (cid:96) ∞ regression, via approximation of (cid:96) ∞ by (cid:96) O (log n ) .
Of practical interest, we also develop a new subsampling al-
gorithm for (cid:96) p regression for arbitrary matrices, which is simpler than previous approaches for p ≥ 4 .
I NTRODUCTION
Given a matrix A ∈ R n × d and a vector b ∈ R n , the goal of linear regression is to ﬁnd a vector x ∈ R d such that Ax is as close as possible to b .
In approximate (cid:96) p linear regression in particular, we seek to ﬁnd ˜ x ∈ R d such that, for some approximation parameter ε > 0 ,
[Equation]
Here for a vector y ∈ R n , (cid:107) y (cid:107) p
=
( (cid:80) ni
=1 | y i | p ) 1 /p .
(cid:96) p regression is central in statistical data analysis, and has numerous applications in machine learning, data science, and applied mathematics (Friedman et al., 2001; Chatterjee & Hadi, 2006).
There are a number of algorithmic approaches to solving (cid:96) p regression.
For example, we can directly apply iterative methods like gradient descent or stochastic gradient descent.
Alternatively, we can use iteratively reweighted least squares, which reduces the regression problem to solving poly( d ) linear systems (Adil et al., 2019b;a).
Both the above approaches require repeated passes over the matrix A , so while their runtimes are typically linear in nd , or more generally on the time to multiply the matrix A by a vector, that factor is multiplied by other parameters, such as the number of iterations to convergence.
An alternative approach, which can lead to faster running time when n is large, is to apply “sketch-and-solve” methods.
This approaches begins with an inexpensive subsampling step, which selects a subset of rows in A to produce a smaller matrix M with poly (cid:0) d, 1 ε , log n (cid:1) (cid:28) n rows.
M can be written as
M = SA where S is a row sampling and rescaling matrix.
The goal is for (cid:107) SAx − Sb (cid:107) p to be a good approximation to (cid:107)
Ax − b (cid:107) p for all x ∈ R d .
If this the case, then an approximate solution to the original (cid:96) p regression problem can be obtained by solving the subsampled problem, which has smaller size, thus allowing for more efﬁcient computation.
The standard approach to subsampling for (cid:96) p regression is to sample rows with probability proportional to their so-called (cid:96) p Lewis weights (Cohen & Peng, 2015).
Unfortunately, for general inputs
A , (cid:96) p Lewis weight sampling requires O (cid:0) d max(1 ,p/ 2) (cid:1) rows, and it can be shown that no subsampling method can take fewer than d O ( p ) (Li et al., 2021).
This means that sampling is only helpful in the limited regime where n (cid:29) d p/ 2 .
However, there are many applications in which the matrix
A has additional structure, which can be leveraged to design more efﬁcient algorithms.
For example, Vandermonde matrices are used in the polynomial regression problem, which has been studied for over 200 years (Gergonne, 1974) and has applications to machine learning (Kalai et al., 2008), applied statistics (MacNeill, 1978), and computer graphics (Pratt, 1987).
The goal is to ﬁt a signal, which is measured at time points t 1 , . . .
, t n using a degree d polynomial.
This problem can be formulated as (cid:96) p regression with a Vandermonde feature matrix A , whose i th row a i is of the form [1 , t i , ( t i ) 2 , . . .
, ( t i ) d − 1 ] .
Regression problems with Vandermonde matrices also arise in the settings of Fourier-constrained function ﬁtting (Avron et al., 2019) and Toeplitz covariance estimation (Eldar et al., 2020).
Notably, (Shi & Woodruff, 2019) leverages the structure of Vandermonde matrices to more quickly build a subsampled matrix M given any Vandermonde matrix A than would be possible for a general input.
Their method does not change how many rows are in the matrix M , so the overall algorithm still incurs an exponential dependence in p .
So while the approach is a helpful improvement for Vandermonde regression where p is small, this leaves an infeasible runtime for important problems like (cid:96) ∞ regression, which can be approximated by (cid:96) p regression for p
=
O (log n ) .
1. O UR C ONTRIBUTIONS
We ﬁrst show that for (cid:96) p regression on Vandermonde matrices, it is possible to reduce the size of the subsampled matrix M to depend polynomially instead of exponentially on p .
Theorem 1.1.
Given ε ∈ (0 , 1) and p ≥ 1 , a Vandermonde matrix A ∈ R n × d , and b ∈ R n , there exists an algorithm that uses O (cid:0) n log 3 n (cid:1) + d 0 .
5+ ω poly (cid:0) 1 ε , p, log n (cid:1) time to compute a sampling matrix S ∈ R m × n with m =
O (cid:16) p 2 d ε 3 log 2 n (cid:17) rows so that with high probability, for all x ∈ R d , (1 − ε ) (cid:107)
Ax − b (cid:107) p ≤ (cid:107) SAx − Sb (cid:107) p ≤ (1 + ε ) (cid:107)
Ax − b (cid:107) p , and then to return a vector (cid:98) x ∈ R d such that (cid:107) A (cid:98) x − b (cid:107) p ≤ (1 + ε ) min x ∈ R d (cid:107)
Ax − b (cid:107) p .
The best known previous work required at least Ω( n log 2 n + d p/ 2 · poly(1 /ε )) time (Shi &
Woodruff, 2019).
This has an exponential dependence in p , while our algorithm has just a polynomial dependence.
Building on Theorem 1.1, we observe that to obtain a (1 + ε ) -approximation to the fundamental problem of (cid:96) ∞ polynomial regression, it sufﬁces to consider (cid:96) p regression for p =
O (cid:16) log nε (cid:17) .
Since our results have polynomial dependence on p rather than exponential, we thus obtain the ﬁrst subsampling guarantees for Vandermonde (cid:96) ∞ regression.
Theorem 1.2.
Given ε ∈ (0 , 1) , a Vandermonde matrix A ∈ R n × d , and b ∈ R d , there exists an algorithm that uses O (cid:0) n log 3 n (cid:1) + d 0 .
5+ ω poly (cid:0) 1 ε , log n (cid:1) time to compute a sampling matrix
S ∈ R m × n with m =
O (cid:0) dε 5 log 4 n (cid:1) such that
with high probability, for all x ∈ R d ,
[Equation]
and then to return a vector (cid:98) x ∈ R d such that (cid:107) A (cid:98) x − b (cid:107) ∞ ≤ (1 + ε ) min x ∈ R d (cid:107)
Ax − b (cid:107) ∞ .
To the best of our knowledge, this is the ﬁrst known dimensionality reduction for (cid:96) ∞ regression with provable guarantees for any (nontrivial) input matrix.
We summarize these results in Table 1.
Our second contribution is to show that improved sampling bounds for (cid:96) p regression can be extended to a broad class of inputs, beyond Vandemonde matrices.
We introduce the following deﬁnition to capture the “true dimension” of regression problems for structured input matrices.
Deﬁnition 1.3 (Rank of Regression Problem) .
Given an integer p ≥ 1 and a matrix A ∈ R n × d , suppose there exists a matrix M ∈ R n × t and a ﬁxed function f : R d → R t so that for all x ∈ R d , |(cid:104) a i , x (cid:105)| p = |(cid:104) m i , f ( x ) (cid:105)| .
Then we call the minimal such t the rank of the (cid:96) p regression problem .
[Table]
Reference
[Table]
[Table]
Shi & Woodruff, 2019)
[Table]
Our Results
Theorems 1.1 and 1.2 rely on the following key structural property that we prove about the p -fold tensor product of rows of the Vandermonde matrix.
Lemma 1.4.
For integer p ≥ 1 , the rank of the (cid:96) p regression problem on a Vandermonde matrix
A ∈ R n × d is O ( dp ) .
Lemma 1.4 implies that the (cid:96) p loss function for a row of a Vandermonde matrix can potentially be expressed as a linear combination of O ( dp ) variables even though the entries of the measurement vector b can be arbitrary.
By comparison, the (cid:96) p loss function for a row a i of a general matrix A is |(cid:104) a i , x (cid:105)
− b i | pp can only be expressed as a linear combination of O ( pd p ) variables, corresponding to each of the d k k -wise products of coordinates of x , for each k ∈ [ p ] .
As a corollary of
Lemma 1.4, Theorems 1.1 and 1.2 obtain a small coreset for (cid:96) p regression (as well as (cid:96) ∞ regression) on a Vandermonde matrix, which can thus be used as a preconditioner for (cid:96) p regression.
We generalize Lemma 1.4 to similar guarantees for (cid:96) p regression on a matrix A that is the sum of a low-rank matrix K and an s -sparse matrix S that has at most s non-zero entries per row.
Thus using the notion of the rank of the regression problem for such a matrix A , we obtain the following guarantee:
Theorem 1.5.
Given ε ∈ (0 , 1) and p ≥ 1 , a rank k matrix K ∈ R n × d and a s -sparse matrix
S ∈ R n × d so that A :=
K + S , and b ∈ R n , there exists an algorithm that uses O (cid:0) nk ω − 1 (cid:1) + n poly (cid:0) 2 p , d s , k p , s p , 1 ε , log n (cid:1) time to compute a sampling matrix T ∈ R m × n containing m =
O (cid:16) pd s ( k + s ) p ( s + p ) εlog 2 ( pn ) (cid:17) rows so that with high probability, for all x ∈ R d , (1 − ε ) (cid:107)
Ax − b (cid:107) p ≤ (cid:107) TAx − Tb (cid:107) p ≤ (1 + ε ) (cid:107)
Ax − b (cid:107) p , and then to return a vector (cid:98) x ∈ R d such that (cid:107) A (cid:98) x − b (cid:107) p ≤ (1 + ε ) min x ∈ R d (cid:107)
Ax − b (cid:107) p .
Further, if the low-rank factorization of K is given explicitly, then this runtime can be improved to n poly (cid:0) 2 p , d s , k p , s p , 1 ε , log n (cid:1) .
Similarly, we obtain efﬁcient guarantees for (cid:96) p regression on a matrix A that is the sum of a Vandermonde matrix V and a sparse matrix S that has at most s non-zero entries per row.
Theorem 1.6.
Given ε ∈ (0 , 1) and p ≥ 1 , a Vandermonde matrix V ∈ R n × d and an s -sparse matrix S ∈ R n × d such that A := V + S , and b ∈ R n , there exists an algorithm that uses
O (cid:0) n log 3 n + poly (cid:0) p 2 d, d s , s p , log n, 1 ε (cid:1)(cid:1) time to compute a sampling matrix T ∈ R m × n with m =
O (cid:16) p 2 d s +1 s p ( s + p ) εlog 2 ( pn ) (cid:17) rows, so that with high probability for all x ∈ R d , (1 − ε )
(cid:107)
Ax − b (cid:107) p ≤ (cid:107) TAx − Tb (cid:107) p ≤ (1 + ε ) (cid:107)
Ax − b (cid:107) p , and then to return a vector (cid:98) x ∈ R d such that (cid:107) A (cid:98) x − b (cid:107) p ≤ (1 + ε ) min x ∈ R d (cid:107)
Ax − b (cid:107) p .
Surprisingly, our methods even yield practical algorithms for general matrices with absolutely no structure .
Although the rank of the (cid:96) p regression problem for general matrices is O ( d p ) , we still obtain the optimal sample complexity (see (Li et al., 2021) for a lower bound) of roughly O (cid:0) d p/ 2 (cid:1) .
Furthermore, an advantage of our approach is that we only need to perform (cid:96)
q Lewis weight sampling for q ∈ [1 , 4] and there are known efﬁcient iterative methods for computing the (cid:96) q Lewis weights for q ∈ [1 , 4] , e.g., see Section 2.1 of this paper or Section 3 in (Cohen & Peng, 2015).
By contrast, previous methods relied on computing general (cid:96) p weights for p > 4 , which, prior to the recent work of (Fazel et al., 2021), required solving a large convex program, e.g., through semideﬁnite programming, see Section 4 in (Cohen & Peng, 2015).
Finally, we experimentally validate our theory on synthetic data.
In particular, we consider matrices and response vectors that are motivated by existing lower bounds for subsampling and sketching methods.
For Vandermonde regression, our experiments demonstrate that the number of rows needed is polynomial in p , reinforcing how structured matrices outperform the worst-case bound.
For unstructured matrix (cid:96) p regression, we demonstrate that our (cid:96) q Lewis Weight subsampling scheme is effective and accurate.
1. O VERVIEW OF OUR T ECHNIQUES
Our algorithmic contributions rely on two key observations, which we describe below.
For the sake of presentation, we assume p is an integer in this overview, though we handle arbitrary real values of p in the subsequent algorithms and analyses.
Reduced rank of the (cid:96) p regression problem on structured inputs.
The ﬁrst main ingredient is the simple yet powerful observation that the rank of the (cid:96) p regression problem on structured inputs such as Vandermonde matrices A ∈ R n × d does not need to be the O ( d p ) rank of the (cid:96) p regression problem on general matrices.
For a general matrix, (cid:104) a i , x (cid:105) p for an integer p can be rewritten as a linear combination (cid:80) α
i y i of O
( d p ) terms, where each coefﬁcient α i is a p -wise product of entries of the row vector a i ∈ R d and similarly each y i is a p -wise product of entries of the vector x ∈ R d .
However, when A is a Vandermonde matrix, then the j -th entry of a i is simply A j − 1 i, 2 .
Thus each coefﬁcient in (cid:104) a i , x (cid:105) p can be written as a linear combination of 1 , A i, 2 , ( A i, 2 ) 2 , . . .
, ( A i, 2 ) p ( d − 1) and so we can express (cid:104) a i , x (cid:105) p as a linear combination of O ( dp ) variables rather than O ( d p ) variables.
We can similarly show that the rank of the (cid:96) p regression problem on rank k
-matrix A is O
( k p ) by writing each row a i as a linear combination of basis vectors v 1 , . .
. , v k .
Then, using the Hadamard
Product-Kronecker Product mixed-product property, we can rewrite (cid:104) a i , x (cid:105) p as a linear combination of p -wise products of the variables (cid:104) v 1 , x (cid:105) , . . .
, (cid:104) v k , x (cid:105) , i.e., a linear combination of O ( k p ) variables rather than O ( d p ) variables.
It follows that the rank of the (cid:96) p regression problem on a matrix A whose rows have at most s non-zero entries is O
( d s s p ) by noting that (1) there are (cid:0) ds (cid:1) =
O ( d s ) sparsity patterns and that (2) for a ﬁxed sparsity pattern, the rank of the induced matrix is at most s , which induces a linear combination of O ( s p ) variables for the (cid:96) p regression problem.
These decomposition techniques can also be generalized to show that the rank of the (cid:96) p regression problem is low on matrices A such that A =
K + V , A = K + S or A = V + S , where K is a low-rank matrix, V is a Vandermonde matrix, and S is a sparse matrix.
However, we remark that although the observation that the rank of the (cid:96) p regression problem on structured inputs can be low, this itself does not yield an algorithm for (cid:96) p regression.
This is because the loss function is |(cid:104) a i , x (cid:105) − b
i | p rather than (cid:104) a i , x (cid:105) p and there can be n possible different values of b i across all i ∈ [ n ] .
Rounding and truncating the measurement vector: a novel algorithmic technique.
Thus, the second main ingredient is manipulating the measurement vector b ∈ R n so that the loss function can utilize the low-rank property of the (cid:96) p regression problem on structured inputs.
A natural approach would be to round the entries of b , say to the nearest power of (1 + ε ) .
Unfortunately, such a rounding approach would roughly preserve (cid:107) b (cid:107) p up to a multiplicative (1 + ε ) factor, but it would not preserve (cid:107)
Ax − b (cid:107) p .
For example, suppose (cid:104) a i , x (cid:105)
=
b i = N for some arbitrarily large value N .
Then |(cid:104) a i , x (cid:105)− b i | p = 0 , but if b i were rounded to (1+ ε ) N , we would have |(cid:104) a i , x (cid:105)− b i | p =
ε p N p , which can be arbitrarily large.
The lesson from this counterexample is that when b i is signiﬁcantly larger than (cid:104) a i , x (cid:105) − b
i , any rounding technique can be arbitrarily bad because (cid:107) b (cid:107) p can be signiﬁcantly larger than OPT :=
min x ∈ R d (cid:107)
Ax − b (cid:107) p .
On the other hand, if (cid:107) b (cid:107) p is a constant factor approximation to OPT, then the previous counterexample cannot happen because either (1) b i is large relative to (cid:107) b (cid:107) p and (cid:104) a i , x (cid:105) cannot be too close to b i so that rounding b
i will not signiﬁcantly affect the difference (cid:104) a i , x (cid:105) − b i or (2)
b i is small relative to (cid:107) b (cid:107) p and so any rounding of b i will not affect the contribution of the i -th row of A in the overall loss.
Thus our task is reduced to manipulating the input so that (cid:107) b (cid:107) p = O ( OPT ) .
To that end, we note that if (cid:107) A ˜ x − b (cid:107) p =
O ( OPT ) for a vector ˜ x ∈ R d , then by a triangle inequality argument, we have that the residual vector b (cid:48) =
b − A ˜ x ∈ R d satisﬁes (cid:107) b (cid:48) (cid:107) p
= O ( OPT ) .
Namely, we show that to ﬁnd such a vector ˜ x , it sufﬁces by triangle inequality to ﬁnd a subspace embedding for A , i.e., a matrix M ∈ R m × d with m (cid:28) n such that
[Equation]
for some constant C ∈ (0 , 1) .
Typically, such a matrix M can be found by sampling the rows of A according to their (cid:96) p Lewis weights to generate a matrix with m =
O (cid:0) d max(1 ,p/ 2) (cid:1) rows.
However, using our observation that the rank of the (cid:96) p regression problem on structured inputs can be low, we can sample O ( dp ) rows of A with probabilities proportional to their (cid:96) q Lewis weights, where q = p 2 r for an integer r such that 2 r ≤ p < 2 r +1 .
Crucially, we can ﬁnd such a vector ˜ x without reading the coordinates of b since we only require to read the rows of A to perform Lewis weight sampling in this phase.
Thus we can efﬁciently ﬁnd a residual vector b (cid:48) such that (cid:107) b (cid:48) (cid:107) p
= O ( OPT ) .
Partitioning the matrix into groups.
We then round the entries of b (cid:48) to obtain a vector b (cid:48)(cid:48) with at most (cid:96) :
= O (cid:16) log nε (cid:17) unique values, truncating all entries that are less in magnitude than
[Equation]
n ) to zero instead.
We now solve the (cid:96) p regression problem min x ∈ R d (cid:107)
Ax − b (cid:48)(cid:48) (cid:107) p by partitioning the rows of A into (cid:96) groups G 1 , . .
, G (cid:96) based on their corresponding values of b (cid:48)(cid:48) .
The main point is that all rows in each group G k have the same entry t k in b (cid:48)(cid:48) .
Thus we can again observe that |(cid:104) a i , x (cid:105)− t k | p can be written as a linear combination of O (cid:0) p 2 d (cid:1) variables and therefore use (cid:96) q Lewis weight sampling (for the same q ) to reduce each group G k down to O (cid:16) p 2 d ε 2 log d (cid:17) rows.
Since there are (cid:96) =
O (cid:16) log nε (cid:17) groups, then there are roughly O (cid:0) p 2 d (cid:1) total rows that have been sampled across all the groups.
It follows from the decomposition of the (cid:96) p loss function across each group that the matrix T formed by these rows is a coreset for the (cid:96) p regression problem.
Therefore, by solving the (cid:96) p regression problem on T , which has signiﬁcantly smaller dimension than the original input matrix A , we obtain a vector (cid:98) x with the desired property that
[Equation]
Practical (cid:96) p regression for arbitrary matrices.
We now describe a practical procedure for (cid:96) p regression on general matrices that avoids the necessity for convex programming to approximate the (cid:96) p Lewis weights for p > 4 .
We ﬁrst pick an integer r such that p 2 r ∈ [2 , 4) .
By the same structural argument as in Lemma 1.4, we can tensor product each row a i of A with itself 2 r times, thus obtaining an extended matrix of size n × d (cid:48) , where d (cid:48)
=
d 2 r , independent of the entries in b .
We then (cid:96) p/ 2 r Lewis weight sample on the extended matrix, using the iterative method in Figuresince p 2 r < 4 rather than solving a convex program for (cid:96) p Lewis weight sampling for p > 4 .
Since p 2 r ∈ [2 , 4) , it follows from Theorem 2.3 that Lewis weight sampling requires roughly ( d (cid:48) )
p/ 2 rows.
Thus we obtain a matrix with O (cid:16) ( d 2 r ) p/ 2 r +1 (cid:17)
=
O (cid:0) d p/ 2 (cid:1) rows, from which we can compute a residual vector b (cid:48) such that (cid:107) b (cid:48)
(cid:107) p
=
O ( OPT ) , where OPT :=
min x ∈ R d (cid:107)
Ax − b (cid:107) p .
We then round and truncate the entries of b (cid:48) using the subroutine RoundTrunc to obtain a vector b (cid:48)(cid:48) , which allows us to partition the rows of A and the entries of b (cid:48)(cid:48) into O (cid:16) log nε (cid:17) groups.
Due to the constant values of b (cid:48)(cid:48) in each group, we can again (cid:96) p/ 2 r Lewis weight sample on an extended matrix using an iterative method and ﬁnally solve the (cid:96) p regression problem on the subsequent rows that have been sampled.
We give our algorithm in full in Algorithm 3.
(cid:96) p R EGRESSION FOR V ANDERMONDE M ATRICES 2. P RELIMINARIES ON L EWIS W EIGHT S AMPLING
There are a number of known sampling distributions for dimensionality reduction for the (cid:96) p regression problem, such as the (cid:96) p leverage scores, e.g., (Cormode et al., 2018;
Dasgupta et al., 2008) and the (cid:96) p sensitivities, e.g., (Clarkson et al., 2019; Braverman et al., 2020; 2021; Musco et al., 2021); in this paper we focus on the (cid:96) p Lewis weights, e.g., (Cohen & Peng, 2015; Durfee et al., 2018; Chen & Derezinski, 2021; Parulekar et al., 2021).
Deﬁnition 2.1 ( (cid:96) p Lewis Weights, (Cohen & Peng, 2015)) .
Given a matrix A ∈ R n × d and p ≥ 1 , the (cid:96) p Lewis weights w 1 ( A ) , . . .
, w n ( A ) are the unique quantities that satisfy
[Equation]
for all i ∈ [ n ] , where W ∈ R n × n is the diagonal matrix with W i,i = w i ( A ) for all i ∈ [ n ] .
Deﬁnition 2.2 (Lewis Weight Sampling) .
For an input matrix A ∈ R n × d and m samples, let the sampling matrix S ∈ R m × n be generated by independently setting each row of S to be the i -th standard basis vector multiplied by (cid:16)
[Equation]
Theorem 2.3 ( (cid:96) p Subspace
Embedding from Lewis Weight Sampling, (Cohen & Peng, 2015)) .
For any A ∈ R n × d , let the matrix S ∈ R m × n be generated from Lewis weight sampling with [Equation]
=
[Equation]
(cid:17) , where γ = 2 for p ∈ [1 , 2] and γ = 5 for p > 2 .
Then with probability at least 1 − δ , we have that simultaneously for all x ∈ R d ,
[Equation]
Since the Lewis weights are implicitly deﬁned, it may not be clear how to compute them exactly.
In fact, it sufﬁces to compute constant factor approximations to the Lewis weights.
(Cohen & Peng, 2015) show that for p ≤ 4 , there exists a simple iterative approach to compute a constant factor approximation to the (cid:96) p Lewis weights in input sparsity time, which we present in Figure 1.
[Equation] [Equation]
n ] .
t = 1 , . .
, T
p At a high level, the correctness of Figure 1 follows from Banach’s ﬁxed point theorem and the fact that the subroutine LewisIterate is a contraction mapping, because | 2 /p − 1 | < 1 for p < 4 (Cohen & Peng, 2015).
However, for p ≥ 4 , Figure 1 no longer works.
Instead, prior to the recent work of (Fazel et al., 2021), approximating (cid:96) p Lewis weights for p > 4 seems to require solving the convex program
[Equation] det [Equation] ) , subject to (cid:88)
[Equation]
and setting w i = ( a (cid:62) i Qa ) p/ 2 .
Unfortunately, this is often infeasible in practice, and we could not obtain empirical results using it.
Therefore, a nice advantage of our algorithms, both for structured and unstructured matrices, is that we only use (cid:96) q Lewis weight sampling for q ≤ [1 , 4) , even if p ≥ 4 , whereas previous algorithms required using (cid:96) p Lewis weight sampling for p > 4 .
2. A LGORITHM AND A NALYSIS
We ﬁrst describe the general framework of our algorithm for efﬁcient (cid:96) p regression, so that given
A ∈ R n × d and b ∈ R d , the goal is to approximately compute OPT := min x ∈ R d (cid:107)
Ax − b (cid:107) p .
Recall that in order to apply our structural results, we ﬁrst require a measurement vector b (cid:48)(cid:48) with a small number of distinct entries.
We obtain b (cid:48)(cid:48) by ﬁrst ﬁnding a constant factor approximation, i.e., ˜ x ∈ R d such that (cid:107) A ˜ x − b (cid:107) p ≤ O ( OPT ) .
We can (cid:96) p Lewis weight sample the rows of A to do this, but the time to solve the subsequent polynomial regression problem would have exponential dependence on p , due to Theorem 2.3.
Instead, we use our structural properties to implicitly create a matrix M from A with fewer than d p columns and then (cid:96) p/ 2 r Lewis weight sample the rows of
A , where r is the integer that satisﬁes 2 r ≤ p < 2 r +1 , and then we solve the (cid:96) p regression problem on the sampled rows of A and entries of b to obtain ˜ x .
We set b (cid:48) to be the residual vector b − A ˜ x so that (cid:107) b (cid:48) (cid:107) p
= O ( OPT ) .
We then use the procedure RoundTrunc , i.e., as in Algorithm 1, which sets the entries of b (cid:48) that are the smallest in magnitude to zero, and rounds the remaining entries of b (cid:48) to the nearest power of (1 + ε ) .
Input: Vector b ∈ R n , accuracy parameter ε >
Output: Vector x ∈ R n that is a rounded and truncated version of b 1: M ← max i ∈ n | b i | 2: for i = 1 to i = n do 3: p i ← (cid:98) log 1+ ε | b i |(cid:99) 4: x i ← (1 + ε ) p i · sign( b i ) 5: if | x i | ≤ Mn 5 then 6: x i ←7: return x
Since (cid:107) b (cid:48) (cid:107) p
=
O ( OPT ) , it then follows by triangle inequality that it sufﬁces to approximately solve the (cid:96) p regression problem on the vector b (cid:48)(cid:48) instead.
We partition the rows of A into groups
G 1 , . .
, G (cid:96) based on the values of b (cid:48)(cid:48) and perform (cid:96)
p/ 2 r Lewis weight sampling again on an implicit matrix that we create from the rows of each group.
Here we leverage our theory about the rank of the (cid:96) p regression problem for structured inputs.
It then sufﬁces to solve the (cid:96) p regression problem on the matrix formed by the sampled rows across all the groups.
[Table]
Input
A ∈ R n b ε >
Output: (cid:98) b (cid:107) p ≤ (
O ε ) min x ∈ R d (cid:107)
Ax − b (cid:107) p
(cid:46) p r
d
p
sampling
ﬁnd a set S
O
d
[ n
n
corresponding rescaling
be the corresponding submatrix of A with indices in S ,
scaled accordingly
submatrix
to ﬁnd
k of O (cid:16) d (cid:48)(cid:48) ε 2 log d (cid:48)(cid:48) (cid:17) indices in [ n ] and rescaling factors.
We show in the supplementary material that Algorithm 2 satisﬁes the guarantees of Theorem 1.1.
Moreover, because Theorem 1.1 has polynomial dependence on p rather than exponential dependence, we obtain the ﬁrst known sublinear size coreset for the important problem of (cid:96) ∞ regression.
We use the following structural property.
Lemma 2.4.
Let x ∈ R n and p = Ω (cid:16) log nε (cid:17) .
Then (cid:107) x (cid:107) ∞ ≤ (cid:107) x (cid:107) p ≤ (1 + ε ) (cid:107) x (cid:107) ∞ .
Lemma 2.4 implies that to solve (cid:96) ∞ regression, we can instead solve (cid:96) p regression for p
= Ω (cid:16) log n ε (cid:17) .
Then Theorem 1.2 follows from the fact that even for p = Ω (cid:16) log n ε (cid:17) , the matrix T in Algorithm 2 satisﬁes
[Equation]
for all x ∈ R d .
Hence, we can solve the (cid:96) p regression problem on the smaller matrix T to solve the (cid:96) ∞ regression on A .
The results of Theorem 1.1 can be further extended to matrices with block Vandermonde structure.
Corollary 2.5.
Given ε ∈ (0 , 1) and p ≥ 1 , A ∈ R n × dq , and b ∈ R d , suppose A =
[ A 1 | . . .
| A q ] for Vandermonde matrices
A 1 , . . .
, A q ∈ R n × d .
Then there exists an algorithm that, with high probability, returns a vector (cid:98) x ∈ R d such that
[Equation]
using O (cid:0) T ( A )( dp )
q − 1 log n + poly(( dp ) q log n, 1 /ε ) (cid:1) time, where T ( A ) is the runtime of multiplying the matrix A by an arbitrary vector.
For q = 2 , this can be further optimized to
O (cid:0) nd ω 2 / 2 − 1 + poly(( dp ) 2 , log n, 1 /ε ) (cid:1) time, where O ( n ω 2 ) is the time to multiply an n × n matrix with an n × n 2 matrix, so that ω 2 ∈ [3 , 4] .
We obtain similar algorithms for noisy low-rank matrices and noisy Vandermonde matrices, i.e.,
Theorem 1.5 and Theorem 1.6.
We defer presentation and justiﬁcation for these results to the supplementary material.
[Table]
corresponding submatrix
A
indices
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
corresponding submatrix and t k be the
of
corresponding to G k
ﬁnd
1 ε
p/
in [ n ]
rescaling
Finally, we describe in Algorithm 3 a practical approach for (cid:96) p regression for arbitrary matrices without requiring any structural assumptions .
Theorem 2.6.
Algorithm 3 outputs a vector (cid:98) x such that (cid:107) A (cid:98) x − b (cid:107) p ≤ (1 + ε ) min (cid:107)
Ax − b (cid:107) p .
The runtime of Algorithm 3 is T ( n, d p/ 2 ) + poly (cid:0)
d p/ 2 , log n, 1 ε (cid:1) , where T ( n, d p/ 2 ) is the time to multiply a matrix of size n × d p/ 2 by a vector of length
d
p/ 2 .
Theorem 2.6 achieves the same optimal sample complexity as previous (cid:96) p Lewis weight algorithms of roughly d p/ 2 .
However, the main advantage of Algorithm 3 is that it performs (cid:96) q Lewis weight sampling for some q ∈ [2 , 4) , which is quite efﬁcient because we can use an iterative method rather than solving a convex program.
[Figure]
E MPIRICAL V ERIFICATION
We provide empirical evidence to validate our core statistical claim about Vandermonde regression: that the relative error ε achieved by (cid:96) p/ 2 r Lewis Weight subsampling is polynomial in p , and not exponential in p .
More precisely, we compute the gap between the error achieved from exact (cid:96) p
Vandermonde regression and the error achieved from the subsampled regression:
[Equation]
Our theory tells us that ( ε empirical ) 3 ≤ ˜ O (cid:16) dp 2 m (cid:17) , where m is the total number of subsampled rows.
The prior work on unstructured matrices instead suggests ( ε empirical ) c ≤ ˜ O (cid:16) d
O ( p ) m (cid:17) (Shi &
Woodruff, 2019).
So, to visually distinguish these two settings, we look at the logarithm of both sides:
[Equation]
In particular, our work suggests a logarithmic dependence on p , while the prior work suggests a linear dependence on p .
To validate our theory, we plot log( ε empirical ) versus p and m on synthetic data.
Speciﬁcally, we generate n = 25 , 000 i.i.d.
N (0 , 1) times samples to form a Vandermonde matrix V with d =columns, then compute the polynomial q ( t ) =
t 10 at each time sample, add N (0 , 10 10 ) additive noise, and save the corresponding values in b .
We then compute ε empirical for this (cid:96) p regression problem.
Notably, in order to compute (cid:98) x , we omit the rounding procedure in our code, since the rounding is designed for worst-case inputs.
Instead, we simply compute (cid:98) x by solving min x (cid:107) (cid:98) Vx − (cid:98) b (cid:107) p where (cid:98) V and (cid:98) b are computed by sampling and rescaling V and b with the (cid:96)
p/ 2 r Lewis Weights.
Figure 2 shows the result of these experiments, which were run in Julia 1.6.1, on Windows 10 with an Intel i7-7700K CPU and 16Gb RAM.
In Figure 2a, we ﬁx m = 1000 and vary p ∈ [2 , 25] .
The trendline of Lewis Weight sampling clearly better ﬁts a logarithmic model, as opposed to a linear model.
This reinforces our analysis by showing that the dependence on p is notably sub-exponential, beating the known bounds for (cid:96) p subsampling on unstructured matrices.
As a benchmark, we compare our Lewis Weight sampling method to uniform sampling.
The noise in b is large enough that most rows of A have little information about the underlying polynomial q ( t ) .
Lewis weight sampling takes avoids these rows, while uniform sampling does not, explaining why uniform sampling is much weaker in Figure 2a.
Further, in Figure 2b, we ﬁx p = 6 and vary m ∈ [100 , 3000] , showing that Lewis Weight sampling outperforms uniform sampling across both m and p .
In Appendix C, we demonstrate similar results for unstructured matrix regression, validating the analysis of Theorem 2.6.
B ROADER I MPACT
This work is focused on improving the runtime of algorithms for (cid:96) p regression on structured inputs, and can allow users to more efﬁciently solve regression problems on large datasets.
The problem we study is abstracted away from speciﬁc ethical and unethical applications of (cid:96) p regression.
So, with the assumption that the research and data science communities will focus on ethical applications while avoiding unethical ones , we believe that the beneﬁts of our algorithmic results outweigh the negative risks.
A M ISSING P ROOFS FROM S ECTION
In this section we give the missing proofs from Section
A. (cid:96) p R EGESSION ON V ANDERMONDE M ATRICES
We ﬁrst prove a simple statement that shows a “good” solution to the (cid:96) p regression problem on a subspace embedding SA is also a “good” solution to the original input matrix A .
Lemma A.1.
Let S be a sampling and rescaling matrix such that
[Equation]
for all x ∈ R d .
Let OPT = min x ∈ R d (cid:107)
Ax − b (cid:107) p and let x ∈ R
d be any vector for which (cid:107) SAx −
Sb (cid:107) p ≤ 5 OPT.
Then with probability at least 0 .
[Equation]
Proof.
Let x ∗ be a minimizer of (cid:107)
Ax − b (cid:107) p so that OPT = (cid:107)
Ax ∗ − b (cid:107) p .
We will prove the claim by contrapositive, so we ﬁrst suppose that (cid:107)
Ax − b (cid:107) p ≤ 12 OPT.
Then by the triangle inequality,
[Equation]
SAx
[Equation]
Sb
[Equation]
Sb (cid:107) p .
Since 1112 (cid:107) SAx (cid:107) p ≤ (cid:107) Ax (cid:107) p ≤ 1312 (cid:107) SAx (cid:107) p for all x ∈ R d , then (cid:107) SAx
[Equation]
Sb
[Equation] [Equation]
A
[Equation]
x
[Equation]
p − (cid:107) SA
[Equation]
− Sb (cid:107) p .
By the triangle inequality,
[Equation]
Note that by Jensen’s inequality, E [ (cid:107) SAx ∗
[Equation]
Sb
[Equation]
p ] ≤ OPT, so that by Markov’s inequality,
[Equation]
Thus with probability at least 0 . 8 ,
[Equation]
Thus if (cid:107)
Ax − b
[Equation]
p ≤ 12 OPT, then
[Equation]
as desired.
Before justifying the correctness of Algorithm 2, we ﬁrst recall the following algorithm for efﬁcient (cid:96) p subspace embeddings.
Theorem A.2.
(Shi & Woodruff, 2019)
Given ε ∈ (0 , 1) and p ∈ [1 , 2] , a Vandermonde matrix A ∈ R n × d , and b ∈ R d , let T ( A ) be the time it takes to perform matrix-vector multiplication, i.e., compute Av for an arbitrary v ∈ R d .
There exists an algorithm that uses
O ( T ( A ) log n + d q · poly(1 /ε )) time, where q = ω for p ∈ [1 , 4) and q = p/ 2 + C for some ﬁxed constant C > 0 for p > 4 , and with high probability, returns ˜ x ∈ R d such that
[Equation]
We now justify the correctness of Algorithm 2.
Lemma A.3.
Given ε ∈ (0 , 1) and p ≥ 1 , a Vandermonde matrix A ∈ R n × d , and b ∈ R d , then with high probability, Algorithm 2 returns a vector (cid:98) x ∈ R d such that
[Equation]
Proof.
Consider Algorithm 2 and let r be an integer so that 2 r ≤ p < 2 r +1 .
Note that
[Equation]
Since A is Vandermonde, then
[Equation]
where each y j is a ﬁxed function of the coordinates of x .
Notably, the ﬁxed function is the same across all i ∈ [ n ] .
Hence, the (cid:96) 2 r subspace embedding problem on an input Vandermonde matrix
A ∈ R n × d can be reshaped as a constrained (cid:96) 1 subspace embedding problem on an input Vandermonde matrix of size n × (2 r ( d − 1) + 1) .
Thus, for (cid:96) p regression with p ∈
[2 r , 2 r +1 ) , we have
[Equation]
p
[Equation]
which is a constrained (cid:96) p/ 2 r regression problem on an input Vandermonde matrix M of size n × (2 r ( d − 1) + 1) .
By Theorem A.2, we can use (cid:96) p/ 2 r Lewis weight sampling to ﬁnd a matrix M (cid:48) such that
[Equation]
for all y ∈ R 2 r ( d − 1)+1 with high probability.
Note that by the above argument, if we take the matrix
A (cid:48) corresponding to the scaled rows of A that are sampled by M (cid:48) , then we also have
[Equation]
and thus
[Equation]
for all x ∈ R d +1 with high probability.
Thus by Lemma A.1, we can ﬁnd a vector ˜ x such that
[Equation]
We use the subroutine RoundTrunc to create the vector b (cid:48)(cid:48) which is the vector with all entries of b (cid:48) rounded to the nearest power of (1 + ε ) , starting at the maximum entry of b (cid:48) in absolute value, and stopping after we are 1 poly( n ) times that, and replacing all remaining entries with 0 .
By the triangle inequality, we have
[Equation]
for any x ∈ R d +1 .
Note that b (cid:48)(cid:48) has discretized the values of b (cid:48) into (cid:96) =
O (cid:16) log nε (cid:17) possible values.
We partition the rows of A into (cid:96) groups G 1 , . . .
, G (cid:96) , based on the corresponding values of b (cid:48)(cid:48) .
Suppose that for a group G k , the corresponding values of b (cid:48)(cid:48) are all t k .
Then we have
[Equation]
Since A is Vandermonde, for each i ∈ G k ,
[Equation]
for some ﬁxed values t k, 1 , t k, 2 , . . .
that can be computed from t k , where again each y j can be a different function of the coordinates of x .
In particular, there can be 2 r choices for the exponent of t k .
For a ﬁxed choice of the exponent of t k , the exponent of a i, 2 can range from 0 to 2 r ( d − 1) .
Hence, the (cid:96) 2 r regression problem on a submatrix of an input Vandermonde matrix A ∈ R n × d with the same ﬁxed measurement values , i.e., the corresponding coordinates of b (cid:48)(cid:48) are all the same, can be reshaped to a constrained (cid:96) 1 regression problem on an input Vandermonde matrix with 2 2 r ( d − 1)+ columns times a (2 2 r ( d − 1) + 1) × (2 2 r ( d − 1) + 1) diagonal matrix.
Hence, by invoking Theorem A.2 to sample rows of M corresponding to their (cid:96) p/ 2 r Lewis weights in the submatrix induced by the rows of G k , we obtain a sampling matrix T k such that with high probability,
[Equation]
where v k corresponds to the vector b (cid:48)(cid:48) that is set to zero outside of coordinates whose values are t k .
Note that by the above argument, then we also have
[Equation]
with high probability.
Summing over all k , we have
[Equation]
with high probability.
Let T be the sampling matrix so that T = T 1 ◦ . . .
◦ T (cid:96) , so that (cid:80) k (cid:107) T k
Ax − T k v k (cid:107) pp = (cid:107) TAx − Tb (cid:48)(cid:48)
(cid:107) pp .
Observe that (cid:107)
Ax − b (cid:48)(cid:48) (cid:107) pp
=
(cid:80) k (cid:80) i ∈ G k |(cid:104) a i , x (cid:105)
− t k | p .
Hence,
[Equation]
[Table]
and thus
[Equation]
Thus we can compute a vector (cid:98) x ∈ R d such that
[Equation]
Before analyzing the time complexity of Algorithm 2, we ﬁrst recall the following algorithms for
Vandermonde matrix-vector multiplication and approximate (cid:96) p regression.
Theorem A.4 (Vandermonde Matrix-Vector Multiplication Runtime, e.g., Table 1 in (Gohberg &
Olshevsky, 1994)) .
The runtime of computing Ax for a Vandermonde matrix A ∈ R n × d and a vector x ∈ R d for d ≤ n is O (cid:0) n log 2 n (cid:1) .
Theorem A.5 (Approximate (cid:96) p Regression Runtime) .
(Adil et al., 2019b)
Given A ∈ R n × d and p ≥ [2 , ∞ ) , there exists an algorithm that makes O (cid:0) √ n log nε (cid:1) calls to a linear system solver and computes a vector ˜ x such that
[Equation]
We now analyze the runtime of Algorithm 2.
Lemma A.6.
Algorithm 2 runs in O (cid:0) n log 3 n (cid:1) + d 0 .
5+ ω poly (cid:0) 1 ε , p, log n (cid:1) time.
Proof.
Observe that Algorithm 2 has three main bottlenecks for runtime.
Since we only need to
Lewis weight sample from the extended matrices, we do not need to explicitly form them, which would otherwise require Ω( ndp 2 ) time just to list to entries.
Hence the ﬁrst bottleneck is performing the Lewis weight sampling procedure on the extended matrices.
The second bottleneck is solving the (cid:96) p regression problem on the ﬁnal subsampled matrix.
The only remaining procedure is rounding and truncating the coordinates of b ∈ R n to form a vector b (cid:48)(cid:48) ∈ R n using the procedure RoundTrunc and then forming the groups G 1 , . .
, G (cid:96) , which clearly takes O ( n ) arithmetic operations combined.
We thus analyze each of the three main runtime bottlenecks.
First observe that the extended matrix M is a Vandermonde matrix with O (cid:0) dp 2 (cid:1) columns.
(Cohen & Peng, 2015) show that O (log n ) matrix-vector multiplication operations can be done to compute approximate Lewis weights for the purposes of (cid:96) p Lewis weight sampling.
By Theorem A.4, each matrix-vector multiplication uses time O (cid:0) n log 2 n (cid:1) .
Hence computing the extended matrix M uses
O (cid:0) n log 3 n (cid:1) time.
Similarly, the extended matrix for each group G k is the product of a Vandermonde matrix with O (cid:0) dp 2 (cid:1) columns and a diagonal matrix.
Thus by Theorem A.4, the extended matrices for all the groups G k can be formed using O (cid:0) n log 3 n (cid:1) time in total.
Since each Vandermonde matrix has O (cid:0) dp 2 (cid:1) rows, then observe that each group G k samples
O (cid:16) dp 2 ε 2 log d (cid:17) rows and there are (cid:96)
=
O (cid:0) 1 ε log n (cid:1) such groups k ∈ [ (cid:96) ] .
Thus the resulting subsampled matrix has O (cid:16) dp 2 ε 3 log 2 n (cid:17) rows for d ≤ n .
To approximately solve the (cid:96) p regression problem, Theorem A.5 notes that for p ≥ 2 and a subsampled matrix of size O (cid:16) dp 2 ε 3 log 2 d (cid:17) , we require only O (cid:16) p √ d ε 3 / 2 log n log dε (cid:17) calls to a linear system solver.
Moreover, on an iteration t of the (cid:96) p regression algorithm of (Adil et al., 2019a) used in Theorem A.5, the linear system solves the equation x t ← ( A (cid:62) R T A ) − 1 A (cid:62) R t b for a diagonal matrix R T .
Each linear system solve can be done in d ω poly (cid:0) 1 ε , p, log n (cid:1) time.
Hence, the total time to approximately solve the (cid:96) p regression problem is d 0 .
5+ ω poly (cid:0) 1 ε , p, log n (cid:1) .
Therefore, the total runtime is O (cid:0) n log 3 n (cid:1) + d 0 .
5+ ω poly (cid:0) 1 ε , p, log n (cid:1) .
Lemma 2.4.
Let x ∈ R n and p = Ω (cid:16) log n ε (cid:17) .
Then (cid:107) x (cid:107) ∞ ≤ (cid:107) x (cid:107) p ≤ (1 + ε ) (cid:107) x (cid:107) ∞ .
Proof.
For any vector x ∈ R d , we have
[Equation]
Since (1 + ε ) 3 /eps >
e for all ε > 0 , then (1 + ε ) p > n for p = Ω (cid:16) log nε (cid:17) .
Therefore, n 1 /p · max i
[Equation]
n
[Equation]
Corollary 2.5.
Given ε ∈ (0 , 1) and p ≥ 1 , A ∈ R n × dq , and b ∈ R d , suppose A =
[ A 1 | . . .
| A q ] for Vandermonde matrices
A 1 , . . .
, A q ∈ R n × d .
Then there exists an algorithm that, with high probability, returns a vector (cid:98) x ∈ R d such that
[Equation]
, using O (cid:0) T ( A )( dp ) q − 1 log n + poly(( dp ) q log n, 1 /ε ) (cid:1) time, where T ( A ) is the runtime of multiplying the matrix A by an arbitrary vector.
For q = 2 , this can be further optimized to
O (cid:0) nd ω 2 / 2 − 1 + poly(( dp ) 2 , log n, 1 /ε ) (cid:1) time, where O ( n ω 2 ) is the time to multiply an n × n matrix with an n × n 2 matrix, so that ω 2 ∈ [3 , 4] .
Proof.
Recall that a key part in the proof of Theorem 1.1 was to ﬁrst the (cid:96) 2 r regression on a Vandermonde matrix with dimension R n × d to (cid:96) 1 regression on a Vandermonde matrix with dimension R n × (2 r ( d − 1)+1) , where 2 r ≤ p < 2 r +1 .
For a matrix A with block Vandermonde structure, we can similarly write
[Equation]
where again each y j is a ﬁxed function of the coordinates of x .
Thus we can reshape the (cid:96) 2 r regression problem on a matrix A with dimension R n × dq with block Vandermonde structure to an (cid:96) 1 regression problem on a matrix ˜
A with dimension R n × (2 r ( d − 1))
q +1 .
Moreover, we can further reshape ˜
A into the concatenation of ( dp ) q − 1 Vandermonde matrices, where each Vandermonde matrix has columns that are geometrically growing in a i, 2 but are multiplied by all ( dp ) q − 1 products (cid:81) q − 1 k =
[Equation]
a p k i, 2+ kd , where p k ∈ [ dp ] .
We can now use matrix-vector multiplication on each of the ( dp ) q − 1 Vandermonde matrices.
Thus by Theorem A.2, we can (cid:96) 1 Lewis weight sample from the rows of the reshaped ˜ A , using
O (cid:0) T ( A )( dp ) q − 1 log n + ( dp ) ωq (cid:1) time.
We can similarly write ( (cid:104) a i , x − t k (cid:105) )
2 r for each t k among the discretized values of the updated b vector as a sum of (2 r ( d − 1))
q + 1 terms that are all products of powers of the bases a i, 2 , a i, 2+ d , . .
and a variables y j , as in the proof of Theorem 1.1.
Thus we can partition the (cid:96) 2 r regression problem into (cid:96) =
O (cid:16) log nε (cid:17) instances of a constrained (cid:96) 1 regression problem on ( dp ) q − 1 Vandermonde matrices, each with at most 2 r ( d − 1))
q +columns.
To approximately solve the (cid:96) p regression problem, we can thus sample rows by their (cid:96) p/ 2 r Lewis weights, as in Theorem 1.1.
Since there are up to ( dp ) q − 1 Vandermonde matrices, each with at most 2 r ( d − 1))
q + 1 columns, then by Theorem A.2, the total time required is
O (cid:0) T ( A )( dp ) q − 1 log n + ( dp ) ωq · poly(log n, 1 /ε ) (cid:1) .
We remark that for the special case of q = 2 , (Sa et al., 2018) noted an efﬁcient bivariate matrix multiplication algorithm of (N¨usken & Ziegler, 2004; Kedlaya & Umans, 2011).
Theorem A.7.
(N¨usken & Ziegler, 2004; Kedlaya & Umans, 2011;
Sa et al., 2018)
Given a q -variate polynomial f
( X 1 , . . .
, X q ) such that each variable has degree at most d − 1 and N = d q distinct points x ( i ) =
( x ( i ) 1 , . . .
, x ( i ) q ) for i ∈ [ N ] , there exists an algorithm that uses O (cid:0) d ω 2 ( q − 1) / 2+1 (cid:1) time to output the vector ( f ( x (1)) , . . .
, f ( x ( N ))) , where O ( n ω 2 ) is the time to multiply an n × n matrix with an n × n 2 matrix, so that ω 2 ∈ [3 , 4] .
The case of a matrix-vector product for q = 2 corresponds to the evaluation of d 2 points in Theorem A.7.
Thus we need to repeat the algorithm in Theorem A.7 a total of nd 2 times to handle all n rows in the input matrix.
Since each instance of the algorithm uses O (cid:0) d w 2 / 2+1 (cid:1) time, the total time for the matrix-vector product is O (cid:0) nd ω 2 / 2 − 1 (cid:1) , rather than the na¨ıve O ( nd ) time (recall that ω 2 ∈ [3 , 4] ).
Corollary A.8.
Given ε ∈ (0 , 1) and p ≥ 1 , A ∈ R n × 2 d , and b ∈ R d , suppose A =
[ A 1 |
A 2 ] for
Vandermonde matrices
A 1 , A 2 ∈ R n × d .
Then there exists an algorithm that with high probability returns a vector (cid:98) x ∈ R d such that
[Equation]
using O (cid:0) nd ω 2 / 2 − 1 + poly(( dp ) 2 , log n, 1 /ε ) (cid:1) , where O ( n ω 2 ) is the time to multiply an n × n matrix with an n × n 2 matrix.
A. (cid:96) p R EGESSION ON O THER S TRUCTURED I NPUT
S
R n
most s non-
per
that A = K + S
measurement vector
parameter
>
[Table] [Table]
A to a matrix M with dimension n × O (cid:0) d s ( k + s ) 2 r (cid:1) so that each entry M i,j is the coefﬁcient of the j -th term in the tensor decomposition of a ⊗ 2 r i .
p
2 r
weight sampling on M to ﬁnd a set S of O
( d (cid:48)
log d (cid:48) ) indices in [ n ] and rescaling factors, for d (cid:48)
O
d s ( k + s ) 2 r
Let
be the corresponding submatrix of A with indices in S and scaled accordingly.
[Table]
[Table] [Table]
Partition the
of
into groups G
, G (cid:96) , each containing all rows with the same value of b (cid:48)(cid:48) 8: Let G k be the corresponding submatrix and t k be the coordinate of b (cid:48)(cid:48) corresponding to G k for each k ∈ [ (cid:96) ] .
9: Use (cid:96) p/ 2 r -Lewis weight sampling on [ G k ; t k ] to ﬁnd a set S (cid:48) k of O (cid:16) d (cid:48)(cid:48)
ε 2 log d (cid:48)(cid:48) (cid:17) indices in [ n ] and rescaling factors, where d (cid:48)(cid:48)
=
O (cid:0) pd s ( k + s ) 2 r (cid:1) .
10: Let T k be the corresponding sampling and rescaling matrix for S (cid:48) k .
11: T ←
12: Compute
13: return
Lemma A.9.
Given ε ∈ (0 , 1) and p ≥ 1 , a matrix A ∈ R n × d such that A = K + S for a rank k matrix K and an s -sparse matrix S , and b ∈ R d , there exists an algorithm that with high probability, returns a vector (cid:98) x ∈ R d such that
[Equation]
Proof.
The proof is similar to Lemma A.3.
We once again let r be an integer so that 2 r ≤ p < 2 r + and observe that (cid:88) i ∈ [ n ] |(cid:104) a i ,
[Equation]
(cid:105)| p = (cid:88) i ∈ [ n ] | ( (cid:104)
a
[Equation]
(cid:105)
[Equation]
Since K is a low-rank matrix, then for all k i , we can write
[Equation]
for a ﬁxed set of basis vectors v 1 , . . .
, v k ∈ R d .
Hence we have
[Equation]
Since S has sparsity s , then we can further write
[Equation]
where e 1 , . .
e d denote the elementary vectors.
By the Hadamard Product-Kronecker Product mixed-product property, we have
[Equation]
where each y k ∈ { α i, 1 v 1 , . .
, α i,k v k , β i, 1 e i 1 , . .
, β i,s e i,s } for i ∈ [2 r ] .
Thus for a ﬁxed set of elementary vectors e i 1 , . . .
, e i s , there are ( k + s ) 2 r possible values for the tensor product ( y 1 ⊗ . . .
y 2 r ) .
Since there are (cid:0) ds (cid:1) choices for the elementary vectors e i 1 , . .
, e i s , then there are at most ( Cd s ( k + s ) 2 r ) possible values for the tensor product for an absolute constant C > 0 .
Therefore, the (cid:96) p subspace embedding problem on A ∈ R n × d can be reshaped as a constrained (cid:96) p/ 2 r subspace embedding problem on an input matrix of size n × ( Cd s ( k + s ) 2 r ) .
Hence for (cid:96) p regression with p ∈
[2 r , 2 r +1 ) , we have
[Equation]
which is a constrained (cid:96) p/ 2 r regression problem on a matrix M of size n × ( Cd s ( k + s ) 2 r ) whose entries can be determined from the decomposition of each row of A .
Using (cid:96) p/ 2 r Lewis weight sampling, Theorem A.2 implies that we can ﬁnd a matrix M (cid:48) such that
[Equation]
for all y ∈ R
( Cd s ( k + s ) 2 r ) with high probability.
By Lemma A.1, we can thus compute a vector ˜ x such that
[Equation]
We again set b (cid:48)
=
b − A ˜ x and deﬁne OPT = min x ∈ R d (cid:107)
Ax − b (cid:107) p , so that
[Equation]
Let b (cid:48)
=
b − A ˜ x and OPT = min x ∈ R d (cid:107)
Ax − b (cid:107) p , so that
[Equation]
Let b (cid:48)(cid:48) be the vector with all entries of b (cid:48) rounded to the nearest power of (1 + ε ) , starting at the maximum entry of b (cid:48) in absolute value, and stopping after we are 1 poly( n ) of that and replacing all remaining entries with 0 .
By the triangle inequality, we have
[Equation]
, for any x ∈ R d +1 .
Since the coordinates of b (cid:48)(cid:48) can have (cid:96) =
O (cid:16) log nε (cid:17) possible distinct values, we can partition the rows of A into (cid:96) groups, G 1 , . .
, G (cid:96) , based on the corresponding values of b (cid:48)(cid:48) .
Let t m be the corresponding value of b (cid:48)(cid:48) for all rows in a group G m , so that
[Equation]
By the above argument, we have for each i ∈ G k ,
[Equation]
where (1) B i,j are entries of a matrix B with 2 r Cd s ( k + s ) 2 r columns that can be computed from A , (2) t m, 1 , t m, 2 , . .
. are ﬁxed values that can be computed from m k , and (3) each y j is a ﬁxed function of the coordinates of x .
Notably, B is the matrix formed by the concatenation of the coefﬁcients of the decomposition of the α -fold tensor product of the row into the α -fold tensor products of the lowrank and sparse basis elements, for each α = 0 , . . .
, p .
By comparison, the matrix M previously deﬁned in this proof is only the decomposition for α = p .
Hence, the (cid:96) 2 r regression problem on a submatrix of A ∈ R n × d the same coordinate of b (cid:48)(cid:48) , can be reshaped as a constrained (cid:96) 1 regression problem on a matrix with 2 r Cd s ( k + s ) 2 r columns.
The remainder of the proof follows from the same grouping argument as Theorem 1.1.
We apply
Theorem A.2 by sampling rows of B corresponding to their (cid:96) p/ 2 r Lewis weights in the submatrix induced by the rows of G m , we obtain a matrix T m such that with high probability,
[Equation]
where v m is the vector restricted to the coordinates of b (cid:48)(cid:48) that are equal to t m .
Conditioning on the above inequality holding, it follows that
[Equation]
Therefore by summing over all m ∈ [ (cid:96) ] , we have that with high probability,
[Equation]
∈ G m |(cid:104) a i , x (cid:105) − t m | p ≤ (1 + ε ) (cid:88) m (cid:107) T m Ax − T m v m (cid:107) pp .
For T = T 1 ◦ . . .
◦ T (cid:96) , we have (cid:80) m (cid:107) T m Ax − T m v m (cid:107) pp = (cid:107)
Tx − b (cid:48)(cid:48) (cid:107) pp .
Since (cid:107) Ax − b (cid:48)(cid:48) (cid:107) pp = (cid:80) m (cid:80) i ∈
G m |(cid:104) a i , x (cid:105) − t m | p , then (1 − ε )
[Equation]
TAx − Tb (cid:48)(cid:48) (cid:107) pp ≤ (cid:107)
Ax − b (cid:48)(cid:48) (cid:107) pp ≤ (1 + ε ) (cid:107) TAx −
Tb
(cid:48)(cid:48) (cid:107) pp .
Therefore for p ≥ 1 , (1 − ε ) (cid:107) TAx − Tb (cid:48)(cid:48) (cid:107) p ≤ (cid:107)
Ax − b (cid:48)(cid:48) (cid:107) p ≤ (1 + ε ) (cid:107) TAx − Tb (cid:48)(cid:48)
(cid:107) p .
Because (cid:96) =
O (cid:16) log nε (cid:17) and (cid:80) O
( T ( G k ))
=
O ( T ( A )) , we can compute a vector (cid:98) x ∈ R d such that
[Equation]
min
[Equation]
Lemma
A.10.
Given the low-rank factorization of
K ,
[Table] [Table]
Proof.
We analyze the runtime of Algorithm 4.
First note that we can compute the extended matrix in time O ( n (( k + 1) p d s s p )) to perform the (cid:96) p/ 2 r Lewis weight sampling, where we recall that r is the unique integer such that 2 r ≤ p < 2 r +1 .
To perform Lewis weight sampling on the extended matrix, we require matrix-vector multiplication, which requires time O ( nk ) for a low-rank matrix and time O ( ns ) for a matrix whose rows have at most s nonzero entries.
After the ﬁrst iteration of Lewis weight sampling, we can round and truncate the coordinates of b ∈ R n to form a vector b (cid:48)(cid:48) ∈ R n using the procedure RoundTrunc and then forming the groups G 1 , . . .
, G (cid:96) , which clearly takes O ( n ) arithmetic operations combined.
Once the groups are formed, we can compute the extended matrix in time O ( n (( k + 1) p d s s p )) and perform (cid:96) p/ 2 r
Lewis weight sampling on each group, which takes O ( nk + ns ) total time across all groups.
To approximately solve the resulting (cid:96) p regression problem formed by the subsampled rows, we require poly (cid:0) d s , k p , s p , 1 ε (cid:1) time.
Therefore, the total runtime is n poly (cid:0) 2 p , d s , k p , s p , 1 ε , log n (cid:1) .
Theorem 1.5 then follows from Lemma A.9 and Lemma A.10.
Theorem 1.6 is achieved through similar analysis for a noisy Vandermonde matrix.
In particular, it follows from the same proof structure as Lemma A.3 by showing for 2 r ≤ p < 2 r +1 , the (cid:96) 2 r subspace embedding problem on
A = V + S for a given Vandermonde matrix V ∈ R n × d and a sparse matrix S ∈ R n × d can be reshaped as a constrained (cid:96) 1 subspace embedding problem on an input Vandermonde matrix of size n × d (cid:48) , where d (cid:48) =
( d s )( s p )( pd ) .
B A PPLICATIONS TO P OLYNOMIAL R EGRESSION
In the polynomial regression problem, the goal is to ﬁnd a degree d polynomial ˆ q such that
[Equation]
where ε > 0 is an accuracy parameter given as input and (cid:107)·(cid:107)
pp is the (cid:96) p norm to the p th power, (cid:107) g (cid:107) pp
=
(cid:82)− 1 | g ( t ) | p dt .
The polynomial regression problem is a fundamental problem in statistics, computational mathematics, machine learning, and more.
The problem has been studied as early as the 19th century with the work of Legendre and Gauss on least squares polynomial regression and has applications in learning half-spaces (Kalai et al., 2008), solving parametric PDEs (Hampton &
Doostan, 2015), and surface reconstruction (Pratt, 1987).
Given the ﬂexibility to choose query locations x 1 , . . .
, x s , we can consider the polynomial regression problem as an active learning or experimental design problem.
Thus we would like to minimize the number of queries s , as a function of the approximation degree d , the norm p , and the accuracy parameter ε , to ﬁnd ˆ q .
Observe that d +1 queries are obviously necessary, but also that d +1 queries sufﬁce when f can be exactly ﬁt by a degree d polynomial, by using direct interpolation.
In general, however, in the case when min q :deg( q ) ≤ d (cid:107) q ( t ) − f ( t ) (cid:107) pp (cid:54) =
we require s > d + 1 queries.
Our
Vandermonde (cid:96) p regression results can be used to give the ﬁrst result showing that for all p ≥ 1 , d exp( O ( p )) · poly (cid:0) 1 ε (cid:1) queries sufﬁce to obtain a (1 + ε ) -approximation to the best polynomial ﬁt.
We require the following structural theorem reducing the (cid:96) p polynomial regression problem to a problem of solving (cid:96) p regression on Vandermonde matrices:
Theorem B.1.
(Kane et al., 2017; Meyer et al., 2021)
Suppose s 1 , . . .
, s n 0 are drawn uniformly from [ − 1 , 1] .
Let A ∈ R n 0 × ( d +1) be the associated Vandermonde matrix, so that A i,j = s j − 1 i .
Let n 0 =
exp
( O ( p ))
˜ O (cid:0) 1 ε 2+2 p d 5 (cid:1) and let b ∈ R n 0 be the evaluations of f , so that b i =
f ( s i ) .
Then with probability 1112 , the sketched solution ˆ x = argmin x (cid:107)
Ax − b (cid:107) p satisﬁes
[Equation]
Theorem B.1 states that we can uniformly sample exp( O ( p )) · poly (cid:0) d, 1 ε (cid:1) points from [ − 1 , 1] .
We can then form an (cid:96) p regression problem by using the evaluation each of the polynomial bases at the sampled points to form the design matrix A and querying the underlying signal f at the sampled points to form the measurement vector b .
Theorem B.1 says that the optimal solution ˆ x = argmin x (cid:107) Ax − b (cid:107) p is a (1 + ε ) -approximation to the best ﬁt degree d polynomial.
We can na¨ıvely approximately solve the (cid:96) p regression on the Vandermonde matrix A and the measurement vector b by standard (cid:96) p regression techniques such as Lewis weight sampling, which would result in total query complexity exp
( O ( p ))
˜ O (cid:0) 1 ε 2+2 p d 5 (cid:1) .
However, we can instead note that Lemma 1.4 implies we can instead solve an (cid:96) q regression problem on a Vandermonde matrix with O ( dp ) columns for q ∈ [1 , 2] .
Crucially for q ∈ [1 , 2] , there exist active (cid:96) q regression algorithms that only require reading ˜ O
( d ) · poly (cid:0) 1 ε (cid:1) entries of b :
Theorem B.2.
(Musco et al., 2021)
Given p ∈ [1 , 2] and an input matrix A ∈ R n × d , there exists an algorithm that reads ˜ O
( d ) · poly (cid:0) 1 ε (cid:1) entries of b and with probability at least 0 .
99 , outputs ˜ x such that
[Equation]
Hence by Theorem B.2, we can approximately solve the (cid:96) q regression on a Vandermonde matrix with dp rows by reading ˜ O ( dp ) · poly (cid:0) 1 ε (cid:1) entries of b .
By Lemma 1.4, the approximate solution will also be a (1+ ε ) -approximation to the optimal (cid:96) p regression on the Vandermonde matrix A .
By
Theorem B.1, the approximate solution will also form the coefﬁcient vector of a polynomial that is a (1 + ε ) -approximation to the polynomial (cid:96) p regression problem.
Therefore, we obtain the following guarantees for the polynomial regression problem:
Theorem B.3.
For any degree d and norm p ≥ 1 , there exists an algorithm that queries f at s = dp poly (cid:0) log( dp ) , 1 ε (cid:1) points and outputs a degree d polynomial (cid:98) q ( t ) such that
[Equation]
with probability at least 23 .
The previous-best algorithm (Kane et al., 2017; Meyer et al., 2021) for (cid:96) p polynomial regression sampled O ( d 5 ) points uniform from [ − 1 , 1] and then used standard (cid:96) p regression algorithms that required reading the signal at all O ( d 5 ) sampled points, for a total query complexity of O ( d 5 ) .
By comparison, Theorem B.3 only has linear dependency in d due to the structural property of
Lemma 1.4.
Since Ω( d ) queries are clearly necessary, our result settles the dependency of d in the query complexity for (cid:96) p polynomial regression for all d and all p ≥ 1 .
C A DDITIONAL E XPERIMENTS
In this section, we experimentally verify that (cid:96) p/ 2 r Lewis Weight sampling works for unstructured matrices.
We take a similar approach as in Section 3 to verify that (cid:96) p/ 2 r Lewis Weight sampling is correct for (cid:96) p regression on unstructured matrices.
For this test, we ﬁx n = 25 , 000 , d = 10 , and p = 6 , while varying m ∈ [1 , 1000] .
We let A = (cid:2) G 1 0
G 2 (cid:3) where G 1 ∈ R 100 × 6 and G 2 ∈
R 24 , 900 × 4 are i.i.d.
N (0 , 1) matrices.
To generate b , we sample a vector x ∈ R 10 whose ﬁrstentries are N (0 , 100 2 ) and remaining 4 entries are N (0 , 1) , and let b
=
Ax + z where z ∈ R 25 ,is a N (0 , 1) iid vector.
We generate this matrix A and response vector b just once and run (cid:96) p/ 2 r Lewis Weight sampling many times, so the variance in the plot comes only from the random sampling algorithms.
Note that we again omit the rounding procedure on b .
Figure 3 shows the result of this test, and we clearly see that the error shrinks quickly in m for our algorithm.
This approach is much more practical than the prior Lewis Weight approximation method for unstructured matrices when p > 4 .
That approach required solving a non-linearly constrained SDP O (log n ) times (Cohen & Peng, 2015), while our method requires only a Gaussian sketch matrix and the standard Lewis Weight Iteration, which converges very quickly.
Since b is so large on its ﬁrst 100 entries, it is important for any subsampling algorithm to sample at least 6 of the ﬁrst 100 rows.
Uniform sampling picks none of these rows until m ≈ 25000100 = 250 , which is why uniform sampling fails to converge to a good solution for small m .
Lewis weight sampling instead gives much higher priority to the ﬁrst 100 rows, avoiding any issue.
This is why the the gap between Lewis Weight sampling and uniform sampling is so large for this experiment.
[Figure]
D A DDITIONAL R ELATED W ORK
As previously mentioned, subspace embeddings are common tools used to approximately solve (cid:96) p regression.
Given an input matrix A ∈ R n × d , a subspace embedding is a matrix M ∈ R m × d with m (cid:28) n such that
[Equation]
for all x ∈ R d .
Thus given an instance of (cid:96) p regression, where the goal is to minimize (cid:107) Ax − b (cid:107) p , we can set B =
[ A ; b ] , compute a subspace embedding for B , and then solve a constrained (cid:96) p regression problem on the smaller matrix B .
A subspace embedding of a matrix A ∈ R n × d can be formed by sampling rows of A with probabilities proportional to their (cid:96) p leverage scores, e.g., (Cormode et al., 2018;
Dasgupta et al., 2008) their (cid:96) p sensitivities, e.g., (Clarkson et al., 2019; Braverman et al., 2020; 2021; Musco et al., 2021); or their (cid:96) p Lewis weights, e.g., (Cohen & Peng, 2015; Durfee et al., 2018;
Chhaya et al., 2020; Chen & Derezinski, 2021; Parulekar et al., 2021; Meyer et al., 2021).
In any of these cases, the resulting matrix M will contain a subset of rows of A that are rescaled by a function of their sampling probability, as to give an unbiased estimate of the actual (cid:96) p mass.
In addition to sampling methods, sketching is a common approach for subspace embeddings.
In these cases, the subspace embedding M is formed by setting M = RA for some (often random) matrix
R ∈
R m × n .
The advantage of sketching over sampling is that sometimes R can be computed oblivious to the structure of A , whereas the sampling probabilities for each of the above distributions ( (cid:96) p leverage scores, (cid:96) p sensitivities, and (cid:96) p Lewis weights) are data dependent and thus require a pass over the matrix A .
The sketching matrix can be generated from a family of random matrices whose entries are Cauchy random variables for p = 1 , e.g., (Sohler & Woodruff, 2011;
Meng &
Mahoney, 2013; Clarkson et al., 2016), or sub-Gaussian random variables for p = 2 , e.g., (Sarl´os, 2006; Nelson & Nguyen, 2013; Clarkson & Woodruff, 2013).
More generally, exponential random variables can be used for p ≥ 2 , though the number of rows m in the resulting sketch matrix now has a polynomial dependency in n (Woodruff & Zhang, 2013).
A line of recent works has studied the tradeoffs between oblivious linear sketches, sampling-based algorithms, and other sketches for (cid:96) p subspace embeddings (Wang & Woodruff, 2019; Li et al., 2021).
In this paper, we focus on sampling-based algorithms for (cid:96) p regression due to preservation of structure when the input matrix
A itself has structure.