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.
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 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
pendigitdataset, M2 achieved 87.79% accuracy using only ~2.18% of the full matrix memory. On thegesturedataset, 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