Sketching the Krylov subspace: faster computation of the entire ridge regularization path

Yifei Wang, Mert PilanciJournal of Supercomputing 2023

TL;DR

This paper introduces a novel algorithm, IHS-BIN, that significantly speeds up the computation of the entire ridge regularization path. By leveraging randomized sketching techniques and a binomial decomposition of the gradient descent path, IHS-BIN achieves near-linear time complexity, outperforming existing methods, especially for large-scale problems.

What Problem Does This Paper Address?

Ridge regression is a fundamental technique in machine learning and statistics, widely used for tasks like regularization and feature selection. A crucial aspect of using ridge regression is determining the optimal regularization parameter ($\lambda$). This often involves evaluating the model's performance across a range of $\lambda$ values, known as the regularization path. For large datasets, computing this entire path can be computationally prohibitive, especially when a fine-grained search over $\lambda$ is required (e.g., for hyperparameter tuning via cross-validation). Existing methods, while effective, often have super-linear or even quadratic time complexities with respect to the data dimensions or the number of $\lambda$ values, making them inefficient for massive datasets.

Methods

The core contribution of this paper is the Iterative Hessian Sketch with Binomial Decomposition (IHS-BIN) algorithm. The authors build upon the Iterative Hessian Sketch (IHS) method, which uses randomized sketching to approximate solutions to least-squares problems.

Here's a breakdown of their approach:

  • Binomial Decomposition of Gradient Descent: They analyze the gradient descent update rule for ridge regression and express the solution as a polynomial in $\lambda$. This polynomial can be efficiently computed using a binomial expansion.
  • Randomized Sketching: To handle large matrices, they employ randomized sketching techniques. This involves projecting the data matrix onto a lower-dimensional subspace using a sketching matrix $S$. This reduces the computational cost associated with matrix operations.
  • Iterative Hessian Sketch (IHS) Adaptation: The IHS method is adapted to work with the binomial decomposition. This allows for efficient computation of the necessary matrix inversions and updates, even for a wide range of $\lambda$ values.
  • Adaptive Sketching Dimension: A practical method is proposed to adaptively estimate the sketching dimension, further optimizing performance by tailoring the sketch size to the problem's effective dimensionality.
  • Extensions: The method is extended to handle under-determined problems and matrix-valued ridge regression.

Datasets

The authors evaluate their method on a variety of datasets:

  • Randomly generated data: Used to test the algorithm's performance and compare it with baselines under controlled conditions.
  • Real-sim: A dataset used for evaluating performance on simulated real-world scenarios.
  • CIFAR10: Used for matrix-valued ridge regression with a kernel matrix.
  • Avazu's Click-through Prediction: A large-scale dataset for evaluating performance on massive data.
  • MNIST: Used with quadratic feature embedding.
  • NIPS 2003 Feature Selection Challenge (gisette): A benchmark dataset for evaluating performance.
  • RCV1: A benchmark collection for text categorization research.
  • 10-K Corpus (E2006-tfidf): Another dataset for text categorization.

The paper does not introduce new benchmark datasets but rather uses established ones to demonstrate the effectiveness of their proposed algorithm.

Key Insights and Ideas

  • Polynomial Approximation is Key: The insight that the ridge regression solution can be represented as a polynomial in $\lambda$ is crucial. This allows for efficient computation of the entire regularization path by evaluating this polynomial for different $\lambda$ values, rather than re-solving the problem from scratch for each $\lambda$.
  • Sketching for Scalability: Randomized sketching is not just a computational trick; it's essential for making ridge regression path computation tractable for modern large-scale datasets. The paper shows how to integrate sketching effectively within the polynomial evaluation framework.
  • Effective Dimension Matters: The performance and required sketching dimension are strongly tied to the "effective dimension" of the data. The adaptive estimation of this dimension is a practical advancement that makes the method more robust.
  • IHS-BIN Outperforms: The consistent performance gains across various datasets, especially for large $T$ (number of $\lambda$ values), highlight the practical significance of the proposed method.

Key Results

The paper demonstrates significant improvements in computational efficiency:

  • Near-Linear Time Complexity: IHS-BIN achieves a computational complexity of $O(Td)$ for computing the entire ridge regularization path, which is a substantial improvement over existing methods that can be $O(Td^2)$ or $O(T \cdot \text{nnz}(A))$ (where $\text{nnz}(A)$ is the number of non-zero elements in $A$).
  • Speedup: Numerical experiments show that IHS-BIN is significantly faster than standard baselines (SVD, native solvers, CG) on medium and large-scale problems. For instance, on the Avazu dataset, IHS-BIN is shown to be considerably faster than CG.
  • Accuracy: The train and test loss curves from IHS-BIN overlap with those of other solvers, indicating that the method yields accurate solutions.
  • Effective for Large $T$: The algorithm is particularly effective when the number of regularization parameter values ($T$) is large, which is common in hyperparameter tuning.

Limitations and Future Work

  • Medium-Size Data Matrices with High Effective Dimensions: The authors note that for medium-sized data matrices with high effective dimensions, direct methods like SVD might still be more effective. This suggests a trade-off between sketching-based methods and direct methods depending on data characteristics.
  • Potential for Further Optimization: While the paper presents significant improvements, there's always room for further optimization in sketching techniques and adaptive dimension selection.
  • Transfer Learning and Deep Feature Embedding: The authors suggest that their method can be valuable for tuning linear layers in deep learning models and for transfer learning, which could be a direction for future research.
  • Investigating Other Sketching Matrices: While they tested various sketching matrices, exploring their impact on performance and theoretical guarantees could be a future avenue.

Summary updated

BibTeX
@article{wang2023sketching,
  author = {Yifei Wang and Mert Pilanci},
  title = {{Sketching the Krylov subspace: faster computation of the entire ridge regularization path}},
  journal = {Journal of Supercomputing},
  year = {2023},
  doi = {10.1007/s11227-023-05309-w},
}
Figure