NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Revisiting Memory Efficient Kernel Approximation: An Indefinite Learning Perspective

Simon Heilig, Maximilian Münch, Frank-Michael SchleifarXiv 2021

Abstract

Memory Efficient Kernel Approximation (MEKA) provides a scalable solution for large-scale kernel learning by exploiting block-wise structures in similarity matrices. However, its traditional formulation is limited to shift-invariant kernels and frequently produces indefinite matrices, leading to convergence failures in standard optimization solvers. This paper introduces a spherical data projection to extend MEKA to non-stationary kernels and a computationally efficient Lanczos-based spectrum shift to correct indefiniteness. Our approach ensures numerical stability and high accuracy while maintaining a minimal memory footprint, as demonstrated across various real-world and synthetic datasets.

Introduction

Kernel-based machine learning algorithms, such as Support Vector Machines (SVMs), offer robust performance but face significant scaling challenges. The primary bottleneck is the $n \times n$ kernel matrix, which requires $O(n^2)$ memory and computation—costs that become prohibitive for large datasets. While MEKA was developed to address this by leveraging data clustering to create block-wise approximations, the original framework suffered from two critical flaws: a narrow focus on shift-invariant kernels (e.g., Gaussian RBF) and a tendency to produce indefinite matrices with negative eigenvalues. Since most optimization solvers require positive semi-definite (PSD) matrices, these violations often result in unstable or failed training processes.

Methodology

Spherical Projection for Non-Stationary Kernels

To broaden the applicability of MEKA, we introduce a spherical projection step. By mapping input data onto a unit sphere, non-stationary kernels—such as polynomial or Extreme Learning Machine kernels—can be treated as shift-invariant. This normalization reveals the underlying block-diagonal structure of the similarity measures, allowing MEKA’s clustering-based approximation to function effectively across a wider array of kernel types.

The clustering of data in the input space reveals a distinct block-wise structure in the kernel matrix, which is further clarified through normalization.

Lanczos-based Shift Correction

Addressing indefiniteness is crucial for reliable learning. We employ a "spectrum shift" by adding a small value to the matrix diagonal to ensure all eigenvalues are non-negative. To maintain efficiency, we utilize the Lanczos iteration to identify the exact minimum eigenvalue required for the shift. Because Lanczos only requires matrix-vector products—which MEKA can compute without ever explicitly forming the full $n \times n$ matrix—this correction preserves the $O(nk)$ memory complexity.

Analysis of Indefiniteness

A key contribution of this work is the debunking of the "rare event" myth regarding PSD violations. Our analysis shows that negative eigenvalues are a frequent byproduct of the MEKA approximation process. As the target rank of the approximation increases to capture more detail, the number of negative eigenvalues often grows, making automated correction essential for production-grade stability.

Experimental analysis showing that as the target rank increases, the number of negative eigenvalues typically rises, necessitating robust spectrum correction.

Experimental Results

We evaluated the enhanced MEKA framework on six datasets, including real-world benchmarks like spambase, gesture, and pendigit. The results highlight several key improvements:

  • Stability: The original MEKA implementation (M1) frequently failed to converge due to indefiniteness. Our corrected version (M2) achieved successful convergence in every test case.
  • Accuracy and Compression: M2 maintains high classification accuracy while using a fraction of the memory required for the full kernel matrix. For the pendigit dataset, M2 achieved 87.79% accuracy using only ~2.18% of the full matrix memory. On the gesture dataset, memory usage was reduced to a staggering 0.18% while remaining functionally accurate.

Conclusion and Future Work

By combining spherical projection with Lanczos-based correction, we have transformed MEKA into a more versatile and stable tool for large-scale learning. While the projection can occasionally cause cluster overlap, the gains in stability and kernel support are significant. Future research will focus on preserving additional kernel properties, such as non-negativity, during the least-squares approximation of off-diagonal blocks.

Summary updated

Abstract

Matrix approximations are a key element in large-scale algebraic machine learning approaches. The recently proposed method MEKA (Si et al., 2014) effectively employs two common assumptions in Hilbert spaces: the low-rank property of an inner product matrix obtained from a shift-invariant kernel function and a data compactness hypothesis by means of an inherent block-cluster structure. In this work, we extend MEKA to be applicable not only for shift-invariant kernels but also for non-stationary kernels like polynomial kernels and an extreme learning kernel. We also address in detail how to handle non-positive semi-definite kernel functions within MEKA, either caused by the approximation itself or by the intentional use of general kernel functions. We present a Lanczos-based estimation of a spectrum shift to develop a stable positive semi-definite MEKA approximation, also usable in classical convex optimization frameworks. Furthermore, we support our findings with theoretical considerations and a variety of experiments on synthetic and real-world data.
BibTeX
@misc{heilig2021revisiting,
  author = {Simon Heilig and Maximilian Münch and Frank-Michael Schleif},
  title = {{Revisiting Memory Efficient Kernel Approximation: An Indefinite Learning Perspective}},
  year = {2021},
  eprint = {2112.09893},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.09893},
}
Figure