arXiv:2611.02808cs.DSNov 2026

Manuscript Offprint

arXiv:2611.02808

Sketching in Regression: Sketchy in Practice?

Somarddha Das, Soupayan Das Gupta, Koustav Goswami

Abstract

The Johnson-Lindenstrauss (JL) lemma and its extensions provide tools for solving the L2L_2 regression problem in high-dimensional settings with n>dn > d, by transforming a subspace of Rn\mathbb{R}^n to a subspace of Rm\mathbb{R}^m, (where m<nm < n) while approximately preserving the norms of elements of the subspace. In this paper, we study the theoretical guarantees made by various JL-based subspace embeddings critically and concretely to gauge their practical applicability. We derive concrete versions of results on subspace embeddings in the literature to establish lower bounds on the reduced dimension as well as to concretely analyze the complexity of the Fast JL, OSNAP Transforms among other embeddings. These analyses suggest that guaranteeing substantial computational savings while maintaining the accuracy of the sketched solution requires data dimensions larger than those typically encountered in practice. We also see that, for practically necessary accuracy requirements or for sparsity requirements for computational gain, existing theoretical guarantees lead to substantially large reduced dimensions. This leads to very stringent data requirements for establishing guarantees of any kind.

Keywords: Johnson-Lindenstrauss Lemma, Subspace Embeddings, Linear Regression

1 Introduction

Linear regression is one of the oldest and most fundamental problems in statistics. Given nn data points (yi,xi)(y_i, x_i) with yi∈Ry_i \in R, xi∈Rdx_i \in R^d the task is to find β\beta which minimizes the sum of squares

∑i=1n(yi−xiTβ)2.\sum_{i=1}^{n}(y_i - x_i^T \beta)^2.

Let Y∈RnY \in \mathbb{R}^n be the data vector for the yy-values or responses and X∈Rn×dX \in \mathbb{R}^{n \times d} be the data matrix with each row equal to xiTx_i^T. We can reformulate the regression problem as that of finding the vector in the column space closest to YY, i.e, to find

β^:=arg⁡min⁡β∈Rd∥Y−Xβ∥22\hat{\beta} := \arg \min_{\beta \in \mathbb{R}^d} \|Y - X\beta\|_2^2

Throughout the paper we make the following standard assumption in the statistical theory of linear regression as well as numerical linear algebra. (See Rao (1973), Golub and Van Loan (2013))

Assumption 1.1. XX is of full column rank, with n>dn > d.

The computational cost of calculating β^\hat{\beta} explicitly has a complexity of O(nd2)O(nd^2), which is concretely derived in later sections. A problem of interest is to reduce the computational complexity of calculating β^\hat{\beta}. When nn and dd are moderately sized, β^\hat{\beta} can be calculated explicitly by standard numerical approaches such as applying QR decomposition to the normal equations (see Golub and Van Loan (2013)). However the complexity becomes too costly with large values of nn and dd, as is seen in modern datasets.

To tackle this, first-order iterative optimization procedures are used instead of the direct factorization approach for large datasets. Gradient Descent is a standard iterative procedure for optimization problems. However, gradient descent suffers from slower convergence rates, particularly when the matrix is ill-conditioned or has multicollinearity.

For large, sparse matrices, where matrix-vector multiplications are efficient, Krylov subspace methods are seen to be more efficient. One approach is applying the Conjugate Gradient(CG) method to the normal equations. The Least Squares with QR-factorization (LSQR) method (Paige and Saunders (1982)), based on the Golub-Kahan bidiagonalization process, improves on the CG method and guarantees a monotonic reduction of the residual ∥Y−Xβ^n∥\|Y - X\hat{\beta}_n\| with each iteration, making it robust. Building on this, the LSMR algorithm (Fong and Saunders (2011)) was introduced to monotonically minimize the norm of the gradient ∥XT(Y−Xβ^n)∥\|X^T(Y - X\hat{\beta}_n)\| rather than the residual. This property makes LSMR advantageous for highly ill-conditioned problems, as the monotonic gradient reduction gives more stable early termination. The reader is encouraged to see Golub and Van Loan (2013) for further details.

For large datasets, however, all of these methods have a necessary O(nd)O(nd) complexity in each iteration, required for matrix-vector multiplications, which can become prohibitive with increasing number of iterations to reach a desired tolerance level. This motivates the use of randomized dimensionality reduction techniques, to reduce the complexity of operations.

The original paper by Johnson and Lindenstrauss (1984) gives one of the most fundamental techniques of dimension reduction while approximately preserving distances. We state it in the form given in Dasgupta and Gupta (2003).

Theorem 1.2 (Johnson-Lindenstrauss Theorem). For any 0<ϵ<10 < \epsilon < 1 and any integer nn, let kk be a positive integer such that

k≥4(ϵ2/2−ϵ3/3)−1ln⁡n.(1)k \geq 4(\epsilon^2/2 - \epsilon^3/3)^{-1} \ln n. \tag{1}

Then for any set VV of nn points in Rd\mathbf{R}^d, there is a map f:Rd→Rkf: \mathbf{R}^d \to \mathbf{R}^k such that for all u,v∈Vu, v \in V,

(1−ϵ)∥u−v∥2≤∥f(u)−f(v)∥2≤(1+ϵ)∥u−v∥2.\left(1 - \epsilon\right)\|u - v\|^2 \leq \|f(u) - f(v)\|^2 \leq (1 + \epsilon)\|u - v\|^2.

Furthermore, this map can be found in randomized polynomial time.

A comprehensive survey of the Johnson-Lindenstrauss Lemma, its variants, and its applications can be found in Freksen (2021). In this paper, we mainly consider its application in linear regression.

Subspace Embedding is an extension of this idea where we approximately preserve distances between points in an entire subspace and not just a finite set. The main idea is to construct a random linear map Π∈Rm×n\Pi \in R^{m \times n}. The maps thus constructed without the knowledge of the subspace they preserve are called oblivious subspace embeddings.

Definition 1.1. A random matrix Π∈Rm×n\Pi \in R^{m \times n} is called a (ϵ,δ,d)(\epsilon, \delta, d) oblivious subspace embedding (OSE) if for any dd dimensional subspace T⊆RnT \subseteq R^n it holds that

P(∀x∈T,(1−ϵ)∥x∥≤∥Πx∥≤(1+ϵ)∥x∥)≥1−δ\mathbb{P}(\forall x \in T, (1 - \epsilon)\|x\| \leq \|\Pi x\| \leq (1 + \epsilon)\|x\|) \geq 1 - \delta

Significant work has been done to speed up the computation of the linear regression problem using subspace embeddings. In order to speed up computation we need to multiply by Π\Pi fast and a popular way to do that is to take Π\Pi to be a sparse matrix. We denote by ss the number of non-zero entries in each column of the matrix Π\Pi. Fast JL Transforms were first introduced in 2006 by Ailon and Chazelle (2009) and later, Sarlós (2006) gave an algorithm using it to speed up the computation of the linear regression problems. Later, Nelson and Nguyen (2013) and Clarkson and Woodruff (2017) introduced various kinds of sparse embeddings to further accelerate the computation developing algorithms to solve linear regression using matrices of sparsity 1. Another question of interest is how small the embedding dimension mm can be made. It is interesting to note that the dimension requirement of the classical JL lemma is optimal upto some constants as shown by Larsen and Nelson (2017). For oblivious subspace embeddings, Nelson and Nguyễn (2014) show that if ϵ,δ<1/3\epsilon, \delta < 1/3 then m=Ω(min(n,d2))m = \Omega(min(n, \frac{d}{2})). Furthermore, Li and Liu (2022) has shown that if s=1s = 1 then m=Ω(d2c2δ)m = \Omega(\frac{d^2}{c^2\delta}). Chenakkod et al. (2025) showed an embedding attaining optimal dimension with s=O~(1/ϵ)s = \tilde{O}(1/\epsilon) non zero entries per column.

References (38)