Fast Relative-Error Approximation Algorithm for Ridge Regression

Shouyuan Chen, Yang Liu, Michael R. Lyu, Irwin King, Shengyu Zhang

Abstract

Ridge regression is a fundamental tool in machine learning, but its $O(n^2p)$ computational cost becomes prohibitive in high-dimensional regimes where the number of features $p$ far exceeds the number of samples $n$. We present a novel algorithm that provides the first relative-error approximation guarantee for the output weight vector $\|\tilde{x} - x^*\|_2 \le \epsilon \|x^*\|_2$ in sub-quadratic time. Our approach utilizes a hybrid sketching strategy combining sparse embeddings and Subsampled Randomized Hadamard Transformations (SRHT). Empirical evaluations on synthetic and real-world datasets demonstrate significant speedups—up to 4.1x on the DOROTHEA dataset—with minimal loss in classification accuracy.

Introduction

In modern data science, datasets often feature millions of dimensions, such as in genomics or web clickstream analysis. For these "wide" matrices ($p \gg n$), standard ridge regression solvers are bottlenecked by an $O(n^2p + n^3)$ complexity. While previous randomized methods aimed to approximate the objective value, they lacked guarantees on the accuracy of the resulting weight vector $x^*$. This is a critical deficiency for applications requiring model interpretability.

This paper addresses this gap by introducing a fast sketching algorithm with a vector-level relative-error guarantee. By focusing on reducing the feature dimension $p$ rather than the sample size $n$, the method is specifically tailored for the high-dimensional challenges prevalent in bioinformatics and text mining.

Methodology: Hybrid Sketching Strategy

The core of the proposed algorithm is an Oblivious Subspace Embedding (OSE) that preserves the geometric properties of high-dimensional data in a lower-dimensional "sketch." To balance computational efficiency and sketch compactness, we employ a two-stage hybrid strategy:

  1. Sparse Embedding: A very sparse random matrix is applied to the data. This step is extremely efficient, with a cost proportional to the number of non-zero entries in the data matrix $A$.
  2. Subsampled Randomized Hadamard Transformation (SRHT): The output of the sparse embedding is further compressed using SRHT. While denser and more computationally intensive, SRHT produces a much smaller final sketch.

The resulting sketching matrix $S = \Phi_{\text{srht}}\Phi_{\text{sparse}}$ allows the algorithm to run in $\tilde{O}(\text{nnz}(A) + n^3/\epsilon^2)$ time, requiring only two passes over the original data.

Experimental Evaluation

The algorithm was tested against synthetic data ($n=500, p=50,000$) and real-world benchmarks including ARCENE (10k features) and DOROTHEA (100k features).

Figure 1: Classification error rate comparison between sketching, sampling, and projection methods against the standard exact solver.

As shown in Figure 1, the proposed sketching method quickly converges to the standard error rate as the sketch size increases, outperforming simple sampling techniques.

Figure 2: Comprehensive performance metrics including speedup factor, relative error, cosine similarity, and objective suboptimality as a function of sketch size.

Figure 2 highlights the trade-offs involved. While the speedup factor decreases as the sketch size (and thus accuracy) increases, the relative error and objective suboptimality drop sharply. On the DOROTHEA dataset, the algorithm achieved a 4.1x speedup over exact solvers while maintaining a relative error below 10%.

Discussion and Conclusion

The primary contribution of this work is the shift from objective-value guarantees to vector-level guarantees, ensuring that the learned parameters are reliable. The composition of different sketching methods proves to be a powerful technique for optimizing the speed-accuracy trade-off.

However, some limitations remain. The $O(n^3)$ scaling factor means that for datasets where both $n$ and $p$ are extremely large, additional sample-side sketching would be required. Furthermore, the two-pass requirement may limit applicability in strictly streaming environments. Future work could explore single-pass variants and automated parameter tuning for the sketch size $t$.

Summary updated

BibTeX
@inproceedings{chen2015fast,
  author = {Shouyuan Chen and Yang Liu and Michael R. Lyu and Irwin King and Shengyu Zhang},
  title = {{Fast Relative-Error Approximation Algorithm for Ridge Regression}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2015},
}
Figure