Data-dependent compression of random features for large-scale kernel approximation

Raj Agrawal, Trevor Campbell, Jonathan H. Huggins, Tamara Broderick

Abstract

Kernel methods offer the flexibility to learn complex relationships in modern, large data sets while enjoying strong theoretical guarantees on quality. Unfortunately, these methods typically require significant computational resources. This paper introduces a data-dependent method to compress a large set of random features into a much smaller, weighted subset using "Hilbert coresets." By selecting features that best approximate the kernel matrix on a small sample of data pairs, the authors achieve exponential compression—reducing the number of required features from $J_+$ to $O(\log J_+)$—while maintaining state-of-the-art performance on datasets with over 50 million observations.

Introduction

Kernel methods are a powerful tool for non-parametric machine learning, capable of learning complex, non-linear relationships. However, they suffer from a "cubic problem": training typically scales as $O(N^3)$ in time and $O(N^2)$ in space, where $N$ is the number of data points. For modern datasets with millions of rows, this complexity is prohibitive.

Existing solutions like Random Feature Maps (RFMs) are data-independent and simple but often require a massive number of features ($J_+$) to achieve high accuracy. Conversely, the Nyström method is data-dependent and more feature-efficient but becomes expensive in high-dimensional spaces. This paper addresses the gap: achieving the simplicity and high-dimensional scaling of RFMs with the feature-efficiency of data-dependent methods.

Methods: Up-Project then Compress

The proposed framework consists of two main steps:

  1. Up-projection: Generate a large set of $J_+$ random features (e.g., standard Random Fourier Features).
  2. Compression via Coresets: Instead of using all $J_+$ features, the selection of a subset is treated as an optimization problem. The goal is to find a small, weighted subset of $J$ features that minimizes the Frobenius norm error of the kernel matrix approximation.

To maintain computational feasibility, the optimization is performed on a small sample of data pairs ($S$) rather than the entire dataset. Greedy optimization algorithms, such as Frank-Wolfe or Greedy Iterative Geodesic Ascent (GIGA), are used to iteratively select the most impactful features. Crucially, $J_+$ features are only computed for the small sample $S$ during the selection phase; the final $J$ features are then computed for the full dataset.

Key Insights

  • Exponential Compression: Theoretically, only $O(\log J_+)$ features are needed to match the statistical guarantees of the original $J_+$ features, allowing for order-of-magnitude reductions in feature counts.
  • Data-Dependence: By using a small "sketch" of the data (the $S$ pairs), the algorithm selects features relevant to the specific dataset's geometry.
  • Sparsity: The coreset approach yields a sparse feature set, leading to faster training and smaller memory footprints for downstream tasks.
  • The Phase Transition in $S$: Experiments show that a relatively small number of data pairs (around 10,000) is sufficient to guide the compression effectively.

Experimental Results

The method, termed RFM-GIGA, was evaluated on several large-scale benchmarks, including MNIST, Sensorless, and the 50-million-row Criteo dataset.

Relative Frobenius error comparison across four datasets.

As shown in the error analysis, RFM-GIGA consistently achieves lower kernel approximation error than standard RFMs and Johnson-Lindenstrauss (JL) compression across various datasets. This reduction in approximation error translates directly to improved downstream performance.

Test accuracy comparison across four datasets.

In classification tasks, RFM-GIGA provides higher test accuracy with fewer features compared to baseline methods. On the HIGGS dataset, the authors demonstrated that $10^5$ features could be compressed to approximately 2,000 with negligible loss in quality. On the massive Criteo dataset, the method maintained high performance while being significantly faster than JL-based alternatives.

Conclusion and Future Work

While RFM-GIGA offers significant improvements, it still depends on the quality of the initial "up-projected" features. Future work may involve combining this approach with variance reduction techniques or applying coreset logic to the Nyström method to further optimize the initial feature generation phase.

Reference: Agrawal, R., Campbell, T., Huggins, J., & Broderick, T. (2019). Data-dependent compression of random features for large-scale kernel approximation. Proceedings of the 22nd International Conference on Artificial Intelligence and Statistics (AISTATS).

Summary updated

BibTeX
@inproceedings{agrawal2019data,
  author = {Raj Agrawal and Trevor Campbell and Jonathan H. Huggins and Tamara Broderick},
  title = {{Data-dependent compression of random features for large-scale kernel approximation}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2019},
  url = {https://openreview.net/forum?id=6mOdNVcRx1L},
}
Figure