Faster Ridge Regression via the Subsampled Randomized Hadamard Transform

Yichao Lu, Paramveer S. Dhillon, Dean P. Foster, Lyle H. UngarNeurIPS 2013

Overview

In modern data science, particularly in fields like genetics or text processing, we frequently encounter "Big Data" scenarios where the number of features ($p$) far exceeds the number of observations ($n$). Ridge Regression (RR) is the gold standard for these high-dimensional problems because it effectively prevents overfitting by penalizing large weights.

However, Ridge Regression suffers from a severe scaling problem. The standard approach to solving it in high dimensions is to work in the "dual space," which involves calculating a matrix of similarities between observations. This step incurs a computational cost of $O(n^2 p)$. When $p$ is in the millions, this becomes a massive bottleneck. Simply picking a few random features to speed up the process is risky; if the important "signal" is hidden in just one or two discarded features, the model will fail completely.

To address this, researchers have introduced SRHT-DRR (Subsampled Randomized Hadamard Transform - Dual Ridge Regression). By using a mathematical transformation to "smear" information across all features before subsampling, the algorithm reduces computational complexity from $O(n^2 p)$ to $O(np \log n)$ with a negligible loss in accuracy.

The SRHT-DRR Method

The core idea behind SRHT-DRR is to "precondition" the data so that every feature carries a small piece of the overall signal, making uniform random sampling safe and effective. The algorithm follows three main steps:

  1. Randomized Hadamard Transform (RHT): The design matrix $X$ is multiplied by a randomized Walsh-Hadamard matrix. This acts as a "frequency domain" transformation that uniformizes the data, ensuring no single "high leverage" feature dominates the signal.
  2. Subsampling: Because the signal is now evenly spread out, the algorithm can safely discard the vast majority of the features, keeping only a small subset ($p_{subs} \approx n$).
  3. Dual Solve: Finally, Ridge Regression is solved on this much smaller, transformed matrix.

Because the Hadamard transform has a recursive structure (similar to a Fast Fourier Transform), it can be computed rapidly in $O(np \log n)$ time, bypassing the $O(np^2)$ required for general matrix multiplication.

Key Insights

  • The "Smearing" Intuition: Random projections act as a statistical safety net. Rotating the data into a new coordinate system ensures information isn't concentrated in a few columns, making uniform random sampling robust.
  • Bounded Risk Inflation: The authors mathematically prove that the "risk" (error) of their fast SRHT-DRR version is only slightly higher than the true, slow Ridge Regression solution. The risk increases by a factor related to the ratio of the matrix's rank to the number of subsampled features.
  • RR vs. PCA: While Principal Component Analysis (PCA) is a common dimension reduction technique, it uses a "keep-or-kill" approach that can be slow and statistically inconsistent when $p \gg n$. Ridge Regression's "shrinkage" approach is generally more stable in these extreme settings.

Experimental Results

The authors evaluated SRHT-DRR on both synthetic datasets ($p = 8,192$) and the real-world UCI ARCENE dataset (200 samples, 10,000 mass-spectrometry features for cancer classification).

Synthetic Data Performance: In synthetic tests, SRHT-DRR achieved error rates nearly identical to the exact Ridge Regression solution while requiring only a fraction of the computational cost.

MSE/Risk vs. Relative Computational Cost on synthetic data.

Real-World Performance (ARCENE): On the ARCENE dataset, SRHT-DRR outperformed both standard PCA and Randomized PCA in accuracy. Remarkably, it achieved this while requiring only ~18% of the computational effort of the full dual RR solution.

Classification Error vs. Relative Computational Cost on the ARCENE dataset.

Overall, the results demonstrate that if the data matrix is full rank, sampling just $O(n)$ features is sufficient to maintain high accuracy.

Limitations and Future Work

While highly effective, the method has a few minor constraints:

  • Power of Two: The standard SRHT requires the number of features $p$ to be a power of 2. The authors currently handle this by padding the matrix with zeros.
  • Fixed Design: The theoretical proofs are currently limited to the "fixed design" setting (where features are considered fixed). Extending these proofs to "random design" settings remains an area for future work.

Looking forward, the authors suggest that this preconditioning and subsampling approach could be adapted for other statistical methods, such as Logistic Regression, further expanding its utility for massive-scale classification tasks.

Summary updated

BibTeX
@inproceedings{lu2013faster,
  author = {Yichao Lu and Paramveer S. Dhillon and Dean P. Foster and Lyle H. Ungar},
  title = {{Faster Ridge Regression via the Subsampled Randomized Hadamard Transform}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2013},
  url = {https://openreview.net/forum?id=H1VpFuW_ZH},
}
Figure