F AST R EGRESSION FOR S TRUCTURED I NPUTS
Anonymous authors
Paper under double-blind review
A BSTRACT
L p Regression on Structured Inputs is an important problem in data analysis and machine learning where we ﬁnd a vector x ∈ R d that minimizes (cid:107)
Ax − b (cid:107) p for a structured matrix A ∈ R n × d and response vector b ∈ R n .
Unfortunately, for many common classes of matrices, sampling-based algorithms for approximately solving L p regression require runtime that is exponential in p , e.g., d O ( p ) , which is prohibitively expensive.
We show that for a large class of structured inputs, such as combinations of low-rank matrices, sparse matrices, and Vandermonde matrices,
L p regression can be approximately solved using runtime that is polynomial in p .
For example, we show that L p regression on Vandermonde matrices can be approximately solved using time O ( T ( A ) log n +( dp ) ω · polylog n ) , where T ( A ) is the time to multiply Ax for an arbitrary vector x ∈ R d , and ω is the exponent of matrix multiplication.
The polynomial dependence on p also crucially allows our algorithms to extend naturally to sublinear time algorithms for L ∞ regression.
Of independent interest, we develop a new algorithm for solving L p regression for arbitrary matrices, which is signiﬁcantly faster in practice for every 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 that best ﬁts A to b .
However for d < n , the linear system is overconstrained and thus there may not exist a vector x such that Ax = b .
Thus the L p regression problem seeks to ﬁnd a vector ˜ x ∈ R d such that
[Equation]
for some approximation parameter ε > 0 .
Here for a vector y ∈ R n , (cid:107) y (cid:107) pp
=
(cid:80) ni
=1 | y i | p .
The L p regression problem is a central question in statistical data analysis that has numerous applications in machine learning, data science, and applied mathematics (Friedman et al., 2001; Chatterjee &
Hadi, 2006) and thus has received a considerable amount of attention.
A direct way to solve
the
L p regression problem is to use an iterative solver (Adil et al., 2019b;a) that makes poly( n ) calls to a linear system solver.
However, the linear system solver uses time poly( n, d ) , which can be prohibitively slow for n (cid:29) d .
Therefore, a standard approach for L p regression is to ﬁrst sample a number of rows of A down to a smaller matrix M that generally has poly (cid:0) d, 1 ε , log n (cid:1) rows by generating a sampling and rescaling matrix S such that M = SA and (cid:107) SAx − Sb (cid:107) p is a “good” approximation to (cid:107)
Ax − b (cid:107) p for all x ∈ R d .
Subsequently, an iterative solver can now be used on M , which serves as a proxy for the original problem but has smaller input size, thus allowing for more efﬁcient computation.
Unfortunately, to handle worst-case inputs, M requires sampling O (cid:0) d max(1 ,p/ 2) (cid:1) rows, so that not only is the overall runtime exponential in p , but also the sampling is only helpful if n (cid:29) d p/ 2 .
Fortunately, there are many applications in which the design matrix
A is known to have additional structure that 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 recently motivated by applications to machine learning (Kalai et al., 2008), applied statistics (MacNeill, 1978), and computer graphics (Pratt, 1987) .
The goal is to ﬁt a continuous signal, which can be measured at time choices t 1 , . . .
, t n to form a measurement vector b ∈ R n , using the best degree d polynomial whose coefﬁcients can be represented by the vector x ∈ R d +1 .
Thus, entry A i,j of the feature matrix
A is the value of the j -th polynomial basis at time t
i
so that the problem has been restated as the L p regression problem with a Vandermonde matrix A , where the entries of each row a i form a sequence 1 , t i , ( t i ) 2 , . .
, ( t i )
d − 1 for some parameter t i .
Regression problems with Vandermonde matrices also arise in the settings of Fourier ﬁtting (Avron et al., 2019) and Toeplitz covariance estimation (Eldar et al., 2020).
Shi & Woodruff (2019) show that for Vandermonde matrices A , the time used to compute the smaller subsampled matrix M can be improved upon the na¨ıve approach by using fast Vandermonde matrix-vector multiplication.
However, the number of rows of M is still exponential in p so that unfortunately, the runtime of the iterative solver for L p regression still uses time exponential in p , which sufﬁces for small p but crucially does not obtain any improvements for the important problem of L ∞ regression.
1. O UR C ONTRIBUTIONS
We ﬁrst show that for L p regression on Vandermonde matrices and its noisy perturbations, the size of the subsampled matrix M and therefore the runtime of the iterative solver only needs polynomial dependence in p .
Theorem 1.1.
Given ε ∈ (0 , 1) and p ≥ 1 , a Vandermonde matrix A ∈ R n × d , and b ∈ R d , there exists an algorithm that creates 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,
[Equation]
, for all x ∈ R d .
The algorithm uses O (cid:0) n log 2 n (cid:1) + p 3 d 3 / 2 poly (cid:0) 1 ε , log n (cid:1) total time and with high probability, returns a vector (cid:98) x ∈ R d such that
[Equation]
The best known previous work has runtime either (1) O (cid:0) n log 2 n + d q · poly(1 /ε )
(cid:1) time (Shi &
Woodruff, 2019), where q = ω ∈ [2 , 3) is the exponent for matrix multiplication for p ∈ [1 , 4] and q = p/ 2 + C for some ﬁxed constant C > 0 for p > 4 , which has an exponential dependence in p , or (2) using poly( n ) solves on the n × d linear system Adil et al.
(2019b;a).
By contrast, our work only has a polynomial dependence on p .
In fact, we show that to obtain a (1 + ε ) -approximation to the fundamental problem of L ∞ regression, it sufﬁces to consider L p regression for p
= O (cid:16) log nε (cid:17) and since our results have polynomial dependence on p rather than exponential, we obtain sublinear size coresets for L ∞ 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 2 n (cid:1) + d 3 / 2 poly (cid:0) 1 ε , log n (cid:1) time that computes a sampling matrix
S ∈ R m × n with m =
d poly (cid:0) 1 ε , log n (cid:1) such that with high probability,
[Equation]
for all x ∈ R d .
In particular,
[Equation]
To the best of our knowledge, this is the ﬁrst known dimensionality reduction for L ∞ regression with provable guarantees for any (nontrivial) input matrix.
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 ,
[Equation]
Then we call t the rank of the L p regression problem .
Our result relies on the following key structural property that we prove about the p -fold tensor product of rows of the Vandermonde matrix.
[Table]
Our Results
Lemma 1.4.
For integer p ≥ 1 , the rank of the L p regression problem on a Vandermonde matrix
A ∈ R n × d is O ( dp ) .
Lemma 1.4 implies that the L 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 L 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 product of coordinates of x , for each k ∈ [ p ] .
As a corollary of Lemma 1.4, we obtain a small coreset for L p regression (as well as L ∞ regression) on a Vandermonde matrix, which can thus be used as a preconditioner.
We summarize these results in Table 1.
We generalize Lemma 1.4 to similar guarantees for L p regression on a matrix A that is the sum of a low-rank matrix L and a sparse matrix S that has at most s non-zero entries per row.
Theorem 1.5.
Given ε ∈ (0 , 1) and p ≥ 1 , a matrix A ∈ R n × d such that A = K + S for a rank k matrix K and a s -sparse matrix S , and b ∈ R d , there exists an algorithm that uses
O ( nk + ns ) + poly (cid:0) d s , k p , s p , 1 ε (cid:1) time, and with high probability, returns a vector (cid:98) x ∈ R d with
[Equation]
Similarly, we obtain efﬁcient guarantees for L 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 matrix A ∈ R n × d such that A = V + S for a
Vandermonde matrix V and an s -sparse matrix S , and b ∈ R d , there exists an algorithm that uses O (cid:0) T ( A )) log n + poly (cid:0) p 2 d, d s , s p , log n, 1 ε (cid:1)(cid:1) time and with high probability, returns a vector (cid:98) x ∈ R d such that
[Equation]
Surprisingly, our methods even yield practical algorithms for general matrices with absolutely no structure .
Although the rank of the L 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, the advantage of our approach is that we now only need to perform L q Lewis weight sampling for q ∈ [1 , 4] .
There are known efﬁcient iterative methods for computing the L q Lewis weights for q ∈ [1 , 4] , e.g., see Section 2.1 or Section 3 in Cohen & Peng (2015).
By contrast, previous methods relied on computing general L p weights for p > 4 , which 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 subexponential in p , reinforcing how structured matrices outperform the worst-case bound.
For unstructured matrix L p regression, we demonstrate that our L q Lewis Weight subsampling scheme is effective and accurate.
For instance, we can ﬁnd a near-optimal solution vector by solving the regression problem on just 2% of the input matrix’s rows.
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 L p regression problem on structured inputs.
The ﬁrst main ingredient is the simple yet powerful observation that the rank of the L 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 L 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 L 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 L 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 L p regression problem.
These decomposition techniques can also be generalized to show that the rank of the L 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 L p regression problem on structured inputs can be low, this itself does not yield an algorithm for L 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 L 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 L 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 L p regression problem on structured inputs can be low, we can sample O ( dp ) rows of A with probabilities proportional to their L 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 1 poly( n ) to zero instead.
We now solve the L 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 L 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 L p loss function across each group that the matrix T formed by these rows is a coreset for the L p regression problem.
Therefore, by solving the L 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 L p regression for arbitrary matrices.
We now describe a practical procedure for L p regression on general matrices that avoids the necessity for convex programming to approximate the L 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 L 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 L 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 L p/ 2 r Lewis weight sample on an extended matrix using an iterative method and ﬁnally solve the L p regression problem on the subsequent rows that have been sampled.
We give our algorithm in full in Algorithm 3.
L 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 L p regression problem, such as the L p leverage scores, e.g., (Cormode et al., 2018;
Dasgupta et al., 2008) and the L p sensitivities, e.g., (Clarkson et al., 2019; Braverman et al., 2020; Musco et al., 2021a); in this paper we focus on the L p Lewis weights, e.g., (Cohen & Peng, 2015; Durfee et al., 2018;
Chen &
Derezinski, 2021; Parulekar et al., 2021).
Deﬁnition 2.1 ( L p Lewis Weights, Cohen & Peng (2015)) .
Given a matrix A ∈ R n × d and p ≥ 1 , the L 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]
A
[Equation]
with probability w
[Equation]
Theorem 2.3 ( L 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]
(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 L p Lewis weights in input sparsity time, which we present in Figure 1.
[Equation]
a constant factor approximation
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, approximating L p Lewis weights for p > 4 seems to require solving the convex program
Q = argmax M det( M ) , subject to (cid:88)
i ( a (cid:62) i Ma ) p/ 2 ≤ d,
M (cid:23) 0 , 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 L q Lewis weight sampling for q ≤ [1 , 4) , even if p ≥ 4 , whereas previous algorithms required using L p Lewis weight sampling for p > 4 .
A LGORITHM AND A NALYSIS
We ﬁrst describe the general framework of our algorithm for efﬁcient L p regression, so that given
A ∈ R n × d and b ∈ R d , the goal is to approximately compute
[Equation]
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 L 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 L 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 L 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 + ε ) .
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 L p regression problem on the vector b (cid:48)(cid:48) instead.
We partition the rows of A into groups
G
, G (cid:96) based on the values of b (cid:48)(cid:48) and perform L 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 L p regression problem for structured inputs.
It then sufﬁces to solve the L p regression problem on the matrix formed by the sampled rows across all the groups.
accordingly
[Table] [Table]
accordingly
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 L ∞ 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 L ∞ regression, we can instead solve L 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 L p regression problem on the smaller matrix T to solve the
L ∞ 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.
Algorithm
Input: Matrix A ∈ R n × d , measurement vector b , accuracy parameter ε >
Output: (cid:98) x ∈ R with (cid:107) A (cid:98) x − b (cid:107) p ≤ (1 + ε ) min x ∈ R d (cid:107)
Ax − b (cid:107) p , parameter p
≥1: r ← (cid:98) log p (cid:99) −(cid:46) 2 r +1 ≤ p < 2 r +2 .
2: Extend A to a matrix M with dimension n × O (cid:0) d 2 r (cid:1) so that each row in M i is the 2 r -fold tensor product of a i reshaped into a d 2 r length vector.
3: Use L p/ 2 r -Lewis weight sampling on M to ﬁnd a set S of O (cid:0) d p/ 2 log
d (cid:1) indices in [ n ] and rescaling factors.
4: Let A (cid:48) be the corresponding submatrix of A with indices in S and scaled accordingly.
5: Compute ˜ x ≤ 5 min x ∈ R d (cid:107) A (cid:48)
x − b (cid:107) p .
6: b (cid:48) ← b − A ˜ x , b (cid:48)(cid:48) ← RoundTrunc ( b (cid:48) ) , (cid:96) ← O (cid:16) log nε (cid:17) 7: Partition the rows of A into groups G 1 , . . .
, 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) ] .
Use L p/ 2 r -Lewis weight sampling on [ G k ; t k ] to ﬁnd a set S (cid:48) k of O (cid:0) 1 ε 5 d p/ 2 log d (cid:1) indices in [ n ] and rescaling factors.
10: Let T k be the corresponding rows with indices in S (cid:48) k and scaled accordingly.
11: T ← [ T 1 ; . . .
; T k ] (cid:62) 12: Compute (cid:98) x ≤ (1 + ε ) min x ∈ R d (cid:107)
Tx − b (cid:107) p .
13: return (cid:98) x
Finally, we describe in Algorithm 3 a practical approach for L 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 ) is the time to multiply a matrix of size n × d p by a vector of length d p .
Theorem 2.6 achieves the same optimal sample complexity as previous L p Lewis weight algorithms of roughly d p/ 2 .
However, the main advantage of Algorithm 3 is that it performs L 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.
E MPIRICAL V ERIFICATION
We provide empirical evidence to validate our core statistical claim about Vandermonde regression: that the relative error ε achieved by L 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 L p
Vandermonde regression and the error achieved from the subsampled regression:
[Equation]
[Figure]
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 L 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 L 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 L 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 L 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 L 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 2.
A. L p R EGESSION ON V ANDERMONDE M ATRICES
We ﬁrst prove a simple statement that shows a “good” solution to the L 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]
− b (cid:107) p ≤ 12 OPT .
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]
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]
p .
By the triangle inequality,
[Equation]
Note that by Jensen’s inequality, E
[ (cid:107) SAx ∗ − Sb (cid:107) p ] ≤ OPT, so that by Markov’s inequality, Pr
[Equation] [Equation]
] ≤ 1 5 .
Thus with probability at least 0 . 8 ,
[Equation]
Ax [Equation] 5 OPT . Thus if (cid:107) Ax − b (cid:107) p ≤ 12 OPT, then
[Equation]
, as desired.
Before justifying the correctness of Algorithm 2, we ﬁrst recall the following algorithm for efﬁcient
L 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 L 2 r subspace embedding problem on an input Vandermonde matrix
A ∈ R n × d can be reshaped as a constrained L 1 subspace embedding problem on an input Vandermonde matrix of size n × (2 r ( d − 1) + 1) .
Thus, for L p regression with p ∈ [2 r , 2 r +1 ) , we have
[Equation]
which is a constrained L 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 L 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 [Equation] n ) times that, and replacing all remaining entries with 0 .
By the triangle inequality, we have
[Equation]
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 L 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 L 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 L p/ 2 r Lewis weights in the submatrix induced by the rows of G k , we obtain a matrix R k such that with high probability,
[Equation]
Note that by the above argument, if we take the matrix T k corresponding to the scaled rows of A that are sampled by R k , then we also have
[Equation]
with high probability.
Summing over all k , we have
[Equation]
with high probability.
Let T =
T 1 ◦ . .
◦ T (cid:96) , so that (cid:80) k (cid:107) T k x − t k (cid:107) pp = (cid:107)
[Equation]
− b (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]
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 L 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 L 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:16) n [Equation]
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
L 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 L 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 2 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 2 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 L 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
L 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 .
Thus by Theorem A.4, each linear system solve can be done in O (cid:16) dp 2 ε 3 log 4 n (cid:17) time for a Vandermonde matrix A .
Hence, the total time to approximately solve the L p regression problem is O (cid:16) p 3 d 3 / 2 ε 7 / 2 log 4 n log n ε (cid:17) .
Therefore, the total runtime is O (cid:16) n log 2 n + p 3 d 3 / 2 ε 7 / 2 log 4 n log nε (cid:17) .
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 (cid:107) x (cid:107) ∞ =
max i ∈ n | x i | ≤ (cid:32)(cid:88) i ∈ | x i | p (cid:33) 1 /p ≤ n 1 /p · max i ∈ n | x i | .
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 ∈ n | x i | ≤ (1 + ε ) max i ∈ n | x i | =
(1 + ε ) (cid:107) x (cid:107) ∞ .
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 L 2 r regression on a Vandermonde matrix with dimension R n × d to L 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 L 2 r regression problem on a matrix A with dimension R n × dq with block Vandermonde structure to an
L 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 [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 L 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 L 2 r regression problem into (cid:96) =
O (cid:16) log nε (cid:17) instances of a constrained
L 1 regression problem on ( dp ) q − 1 Vandermonde matrices, each with at most 2 r ( d − 1))
q +columns.
To approximately solve the L p regression problem, we can thus sample rows by their
L 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 ) time.
A.
L p R EGESSION ON
O THER S TRUCTURED I NPUT
(cid:46) submatrix of A indices
[-Use L p/ 2 r -Lewis weight sampling on [ G k ; t k ] to ﬁnd a set S (cid:48) k of O (cid:0) 
-]
S scaled accordingly
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)
[Equation]
| ( (cid:104) a i
[Equation]
| [Equation] i ∈ [ n ] | [Equation]
|
[Equation]
r .
Since K is a low-rank matrix, then for all k i , we can write k i
= k (cid:88)
j = α i,j v j , for a ﬁxed set of basis vectors v 1 , . . .
, v k ∈ R d .
Hence we have (cid:88) i ∈ [ n ] |(cid:104) a i , x (cid:105)| p
= (cid:88) i ∈ [ n ] (cid:12)(cid:12)(cid:12) (cid:12)(cid:12)(cid:12) (cid:42) s i + k (cid:88)
j = α
i,j v j , x (cid:43) 2 r (cid:12)(cid:12)(cid:12) (cid:12)(cid:12)(cid:12) p/ 2 r .
Since S has sparsity s , then we can further write (cid:88) i ∈ [ n ] |(cid:104) a i , x (cid:105)| p
= (cid:88) i ∈ [ n ] (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) (cid:12) (cid:42) s (cid:88)
j = β i,j e i j + k (cid:88)
j = α
i,j v j , x (cid:43) 2 r (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) (cid:12) p/ 2 r , 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 ( d + 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 ( d + s ) 2 r ) possible values for the tensor product for an absolute constant C > 0 .
Therefore, the
L p subspace embedding problem on A ∈ R n × d can be reshaped as a constrained L p/ 2 r subspace embedding problem on an input matrix of size n × ( Cd s ( d + s ) 2 r ) .
Hence for L p regression with p ∈ [2 r , 2 r +1 ) , we have
[Equation]
which is a constrained L p/ 2 r regression problem on a matrix M of size n × ( Cd s ( d + s ) 2 r ) whose entries can be determined from the decomposition of each row of A .
Using L 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 ( d + 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]
b (cid:48) (cid:107) p
= (cid:107) A ˜ x − b (cid:107) p ≤ 12 OPT .
Let b (cid:48)
=
b − A ˜ x and OPT = min x ∈ R d (cid:107)
Ax − b (cid:107) p , so that [Equation] A
[Equation]
− b
[Equation]
p ≤ 12 OPT . 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]
−
[Equation]
(cid:48)(cid:48) (cid:107)
[Equation]
(cid:107)
Ax
[Equation]
(cid:48) (cid:107)
[Equation]
12 ε OPT ≤
[Equation] [Equation] 12 ε ) (cid:107) Ax − b (cid:48)(cid:48) (cid:107) p , 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 , ( (cid:104) a i , x (cid:105) − t m ) 2 r = (cid:12) (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) − t
m
+ (cid:42) s (cid:88) j = β i,j e i j + k (cid:88) j = α i
[Equation]
j v j , x (cid:43) (cid:12) (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) 2 r = 2 r
Cd s ( d + s ) 2 r (cid:88)
j =
B i
[Equation] j t m [Equation] j y j , where (1) B i,j are entries of a matrix B with 2 r Cd s ( d + 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 L 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 L 1 regression problem on a matrix with 2 r Cd s ( d + 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 L p/ 2 r Lewis weights in the submatrix induced by the rows of G m , we obtain a matrix R m such that with high probability,
[Equation]
Conditioning on the above inequality holding, then by taking the matrix T m corresponding to the scaled rows of A that are sampled by R m , it follows that
[Equation]
Therefore by summing over all m ∈ [ (cid:96) ] , we have that with high probability,
[Equation]
i ∈
G m |(cid:104) a i , x (cid:105) − t m | p ≤ (1 + ε ) (cid:88) m (cid:107) T m x − t m (cid:107) pp .
For T = T 1 ◦ . . .
◦ T (cid:96) , we have (cid:80) m (cid:107) T m x − t 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
[Equation]
Therefore for p ≥ 1 ,
[Equation]
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]
Lemma A.10.
The runtime of Algorithm 4 is O ( pn p k + pns p ) + poly (cid:0) d s , k p , s p , 1 ε (cid:1) .
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 L 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 L p/ 2 r
Lewis weight sampling on each group, which takes O ( nk + ns ) total time across all groups.
To approximately solve the resulting L 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 O ( nk + ns ) + poly (cid:0) d s , k p , s p , 1 ε (cid:1) .
We obtain similar results for a noisy Vandermonde matrix.
Lemma A.11.
Given ε ∈ (0 , 1) and p ≥ 1 , a matrix A ∈ R n × d such that A = V + S for a
Vandermonde matrix V 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]
Lemma A.12.
The runtime of Algorithm 4 is O ( nk + ns ) + poly (cid:0) d s , pd, s p , 1 ε (cid:1) .
Theorem 1.6 then follows from Lemma A.11 and Lemma A.12.
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 L 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 L 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 L p polynomial regression problem to a problem of solving L p regression on Vandermonde matrices:
Theorem B.1.
Kane et al.
(2017); Meyer et al.
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 L 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 L p regression on the Vandermonde matrix A and the measurement vector b by standard L 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 L q regression problem on a Vandermonde matrix with O ( dp ) columns for q ∈ [1 , 2] .
Crucially for q ∈ [1 , 2] , there exist active L q regression algorithms that only require reading ˜ O
( d ) · poly (cid:0) 1 ε (cid:1) entries of b :
Theorem B.2.
Musco et al.
(2021b)
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 L 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 L 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 L 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]
[Figure]
The previous-best algorithm Kane et al.
(2017); Meyer et al.
(2021) for L p polynomial regression sampled O ( d 5 ) points uniform from [ − 1 , 1] and then used standard L 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 L p polynomial regression for all d and all p ≥ 1 .
C A DDITIONAL E XPERIMENTS
In this section, we experimentally verify that L p/ 2 r Lewis Weight sampling works for unstructured matrices.
We take a similar approach as in Section 3 to verify that L p/ 2 r Lewis Weight sampling is correct for {+L p regression on unstructured matrices. For this test, we ﬁx n = 25 , 000 , d = 10 , and p = 6 , while varying m ∈ [100 , 3000] . We let A = (cid:2) G 1 0 
 G 2 (cid:3) where G 1 ∈ R 50 × 4 and+}
G 2 ∈ R 24 , 950 × 6 are i.i.d.
N (0 , 1) matrices. The ﬁrst 50 entries of b are sampled from N (0 , 100 2 ) , while the rest of the entries are N (0 , 1) . To compute the Lewis Weights of the expanded matrix M , due to numerical instability, we cannot apply Lewis Weight iteration directly. Instead, we compute 10 steps of Lewis Weight Iteration on the random sketch MG , where G ∈ R ( d p/ 2 × 100) has i.i.d.
N (0 , 1) entries. We then subsample A and b with respect to these Lewis Weights, and directly solve L p regression on the subsampled matrices. 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. For instance, to achieve 2 . 5% error, taking m = 500 , or just 2% of the rows of A sufﬁces. Also note 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 50 entries, it is important for any subsampling algorithm to sample at least 4 of the ﬁrst 50 rows. Uniform sampling picks few (if any) of these rows, which is why uniform sampling fails to converge to a good solution, even for large m . Lewis weight sampling instead gives much higher priority to the ﬁrst 50 rows, avoiding any issue.
This is why the the gap between Lewis Weight sampling and uniform sampling is so large for this experiment.
D A DDITIONAL R ELATED W ORK
As previously mentioned, subspace embeddings are common tools used to approximately solve L 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 L 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 L 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 L p leverage scores, e.g., (Cormode et al., 2018;
Dasgupta et al., 2008) their L p sensitivities, e.g., (Clarkson et al., 2019; Braverman et al., 2020; Musco et al., 2021a); or their L 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 L 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 ( L p leverage scores, L p sensitivities, and L 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 L p subspace embeddings Wang & Woodruff (2019);
Li et al.
In this paper, we focus on sampling-based algorithms for L p regression due to preservation of structure when the input matrix
A itself has structure.