Kernel-based machine learning methods, such as Support Vector Machines, are renowned for their ability to learn complex, non-linear patterns. However, they inherently suffer from the "curse of support": as the amount of training data increases, the model size grows proportionally, making it painfully slow to train and test on large-scale datasets.
To circumvent this, researchers often use Random Feature Maps (RFM). RFMs approximate a complex kernel by mapping data into a fixed-dimensional Euclidean space where a simple, highly efficient linear classifier can be used. Unfortunately, for polynomial kernels—which are widely used in computer vision and natural language processing—existing RFM techniques are often rank-deficient. This means that even if data is projected into a massive 4,000-dimensional space, the resulting vectors might only effectively utilize a tiny fraction of that space, wasting both memory and processing power.
This paper introduces CRAFTMaps (Compact RAndom Feature Maps), a method designed to make kernel-based machine learning both faster and more accurate by rethinking how we approximate these non-linear functions and directly addressing the rank-deficiency problem.
The "Up/Down" Projection Strategy
To solve the inefficiencies of standard RFMs, the authors propose a counter-intuitive two-step projection strategy:
- Up-Projection ($d \to D$): The input data (dimension $d$) is first mapped non-linearly to a much higher dimension $D$. This step is explicitly designed to "maximally capture" the underlying eigen-structure and geometry of the exact kernel.
- Down-Projection ($D \to E$): Because the massive $D$-dimensional space contains redundancies (rank-deficiency), a linear Johnson-Lindenstrauss (JL) projection is used to compress it down to a compact dimension $E$ (where $E < D$).
While projecting data into a massive space just to shrink it back down seems paradoxical, the non-linear "up" step is necessary to capture the kernel's geometry, while the linear "down" step preserves that geometry while stripping away the "empty" dimensions.
To make this computationally feasible for massive datasets, CRAFTMaps employ Structured Random Matrices, specifically the Subsampled Randomized Hadamard Transform (SRHT). Instead of standard matrix multiplication—which scales at $O(n^3)$—the Hadamard structure allows for $O(n \log n)$ operations, akin to a Fast Fourier Transform.
Key Insights: Fixing the "Spike at Zero"
A major diagnostic finding in the paper is the weight distribution of learned features. In previous RFM methods, a histogram of the learned weights reveals a massive spike at zero, indicating that the vast majority of features are "dead" and contributing nothing to the model.
As shown above, CRAFTMaps effectively spread the information more evenly across the available dimensions, eliminating this zero-spike and drastically improving the rank of the kernel matrix. Furthermore, the authors provide a new theoretical error analysis proving that CRAFTMaps' accuracy is independent of the input dimensionality ($d$), marking a significant theoretical improvement over prior work.
Performance and Results
The authors evaluated CRAFTMaps across a wide variety of standard benchmarks, including image classification (MNIST, CIFAR-100, USPS, COIL100) and general machine learning tasks (IJCNN, ADULT, PASCAL, PENDIGITS).
- Superior Reconstruction: CRAFTMaps consistently achieved a lower Normalized Root Mean Square Error (NRMSE) in approximating kernels compared to standard RFM and Tensor Sketching across all tested datasets.
- Accuracy at Scale: On the massive MNIST8M dataset, CRAFTMaps achieved a highly competitive test error of 0.91%, outperforming alternative approximation schemes.
- Computational Efficiency: By utilizing compact features, the cost of computing the Hessian matrix—a core component of many optimization algorithms—is reduced by a factor of $(D/E)^2$. In practical terms, this efficiency allowed the model to train on millions of data points in a single pass.
Limitations and Future Work
While highly effective, CRAFTMaps currently require the user to commit to a specific polynomial kernel (choosing parameters $q$ and $r$) prior to training. The authors suggest that "kernel alignment"—learning the optimal kernel parameters dynamically during the projection process—is a promising direction for future research. Additionally, while the paper focuses heavily on polynomial kernels, adapting this "up-down" framework to other popular choices, such as the Radial Basis Function (RBF) kernel, remains an open area for exploration.
Summary updated