Kernel Ridge Regression via Partitioning

Rashish Tandon, Si Si, Pradeep Ravikumar, Inderjit S. DhillonarXiv 2016

Abstract

Kernel Ridge Regression (KRR) is a powerful non-linear modeling technique, yet its $O(n^3)$ time complexity and $O(n^2)$ memory requirements render it impractical for large-scale datasets. While traditional "divide-and-conquer" strategies utilize random data splitting to mitigate these costs, they often suffer from high approximation errors by forcing a global kernel fit. This paper introduces a novel Divide-and-Conquer KRR (DC-KRR) framework that employs spatial partitioning—specifically via clustering—to train independent local models. We demonstrate that this approach not only provides significant computational speedups but also improves statistical accuracy by enabling piece-wise functional approximations. Our results show that DC-KRR achieves minimax optimal generalization rates and outperforms both global KRR and random-split alternatives on various real-world benchmarks.

Introduction

Kernel methods are a cornerstone of non-parametric statistics, offering the flexibility to model complex, non-linear relationships. However, the computational burden of Kernel Ridge Regression (KRR) remains a significant barrier. The requirement to compute and invert a kernel matrix scales cubically with the number of samples ($n$), making it prohibitive for modern datasets containing hundreds of thousands of observations.

To address this, researchers typically resort to divide-and-conquer strategies. The standard approach involves randomly partitioning the data into $m$ subsets, training a KRR model on each, and averaging the results. While computationally efficient, this "global averaging" assumes the underlying function can be well-represented by a single kernel across the entire input space. If the true function is highly complex or non-stationary, this global approximation leads to significant statistical error. This paper proposes a shift from random splitting to spatial partitioning, leveraging the local structure of data to improve both efficiency and predictive performance.

Methodology: DC-KRR via Spatial Partitioning

The proposed DC-KRR method replaces random data distribution with a structured spatial division. The algorithm proceeds in three distinct phases:

  1. Divide (Partitioning): The input space is divided into $m$ disjoint regions. Rather than arbitrary splits, the authors utilize clustering algorithms (such as k-means or kernel k-means) to ensure that the partitions reflect the underlying distribution of the data.
  2. Conquer (Local Training): For each partition, a separate and independent KRR model is trained. Crucially, each local model only uses the data points located within its specific cluster, drastically reducing the size of the kernel matrix for each sub-problem.
  3. Predict: To predict the output for a new test point, the algorithm identifies which partition the point belongs to and queries only the corresponding local KRR model.

Theoretical Foundation

To provide mathematical rigor, the authors introduce the "Goodness of Partition" assumption. This metric serves as a surrogate to measure how effectively a clustering strategy preserves the "effective dimensionality" of the data. Under this framework, the authors prove that DC-KRR achieves minimax optimal generalization rates, providing a theoretical guarantee that localized fitting does not come at the cost of statistical consistency.

Experimental Evaluation

The effectiveness of DC-KRR was evaluated using a combination of synthetic toy datasets and large-scale real-world data from the UCI Repository.

Synthetic Tests

The authors designed three toy datasets using mixtures of Gaussians with specific response functions: piece-wise constant, piece-wise Gaussian, and sine waves. These tests confirmed that spatial partitioning allows the model to capture local variations that global models or random-split models often smooth over.

Real-World Performance

The method was tested on datasets including house, air, cpusmall, Pole, CT Slice, and Road, with sample sizes ranging from 404 to over 347,000. Key findings include:

  • Computational Efficiency: On the Pole dataset (12,000 samples), standard KRR required approximately 1,088 seconds. In contrast, DC-KRR completed the task in just 11.8 seconds. On the Road dataset (347,899 samples), where standard KRR failed due to memory constraints, DC-KRR successfully trained in roughly 78 seconds.
  • Predictive Accuracy: DC-KRR consistently yielded lower Test Root Mean Square Error (RMSE) compared to random-splitting methods. Notably, on datasets like house and air, DC-KRR actually outperformed the "Whole-KRR" model trained on the full dataset, demonstrating the statistical advantage of piece-wise approximation.

Discussion and Key Insights

The Piece-wise Advantage

The primary insight of this work is that piece-wise fitting can be superior to global fitting. By partitioning the input space, DC-KRR effectively fits a localized kernel function to each region. This reduces the approximation error when the true underlying function is too complex for a single global kernel to capture efficiently.

Speed-Accuracy Win-Win

In machine learning, there is often an inherent trade-off between computational speed and statistical precision. DC-KRR represents a rare exception where the strategy used to scale the algorithm (partitioning) also serves to improve its generalization capabilities. By focusing on local data structures, the model avoids the "averaging out" effect seen in random-split divide-and-conquer methods.

Clustering vs. Voronoi Partitioning

While localized KRR has been attempted using Voronoi diagrams (VP-KRR), the authors demonstrate that standard clustering (k-means) is superior. Voronoi partitioning often results in highly unbalanced clusters, where one partition contains the bulk of the data, thereby negating the computational benefits. K-means produces more balanced sets, leading to up to a 10x speedup over VP-KRR while maintaining or improving accuracy.

Conclusion

DC-KRR via spatial partitioning offers a robust solution to the scaling problems of kernel methods. By moving away from random data splits and toward structured, cluster-based partitioning, the authors provide a framework that is both faster and more accurate than traditional KRR implementations. Future research may extend these spatial divide-and-conquer principles to other kernel-based learning algorithms, potentially uncovering similar dual advantages in computational and statistical performance.

Summary updated

BibTeX
@misc{tandon2016kernel,
  author = {Rashish Tandon and Si Si and Pradeep Ravikumar and Inderjit S. Dhillon},
  title = {{Kernel Ridge Regression via Partitioning}},
  year = {2016},
  eprint = {1608.01976},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1608.01976},
}
Figure