An Empirical Study on The Properties of Random Bases for Kernel Methods

Maximilian Alber, Pieter-Jan Kindermans, Kristof Schütt, Klaus-Robert Müller, Fei ShaNeurIPS 2017

Introduction

In the machine learning landscape, there has long been a divide between Kernel Methods and Neural Networks. Neural networks are inherently "adaptive," learning their internal representations (features) directly from data during training. Conversely, kernel methods (like Support Vector Machines) traditionally rely on a fixed "basis" or feature set that remains static regardless of the data.

To scale kernel methods to large datasets, researchers often employ Random Fourier Features—a technique that approximates complex kernels using a finite set of random numbers. However, these random features present two significant drawbacks: they require a massive number of features to achieve high accuracy, and they are "data-agnostic," ignoring the specific underlying patterns of the dataset.

This paper explores the middle ground between fixed kernel methods and adaptive neural networks. By treating kernel approximations as shallow neural networks, the authors ask: What happens if we stop treating the kernel basis as a fixed set of random numbers and start adapting it to the data? The results demonstrate that even simple data-dependent adaptations can make models significantly more compact and efficient, often rivaling deep learning performance while maintaining superior transferability.

Methodology: Four Levels of Adaptation

The researchers conceptualized kernel approximations as one-hidden-layer neural networks, allowing them to experiment with four distinct levels of feature adaptation:

  1. Random Basis (RB): The standard baseline where features are generated randomly and remain fixed.
  2. Unsupervised Adapted Basis (UAB): Features are optimized to better approximate the "true" mathematical kernel function based on the data's distribution, without utilizing class labels.
  3. Supervised Adapted Basis (SAB): Utilizing a technique called Kernel Target Alignment, this method nudges features so that data points with the same label are moved closer together in the feature space.
  4. Discriminatively Adapted Basis (DAB): Equivalent to standard neural network training, where both the features and the final classifier are optimized jointly to minimize prediction error.

These methods were tested across standard kernels (Gaussian) and kernels designed to mimic deep learning architectures (ArcCos kernels, which behave similarly to ReLU activation functions). The study evaluated these approaches on seven diverse datasets, including image recognition (MNIST, CIFAR10, USPS) and tabular data (Gisette, CoverType, Adult, Letter).

Key Insights and Results

The Power of Compactness and Efficiency

One of the most striking findings is that an adapted basis (UAB or SAB) can achieve the same approximation accuracy as a random basis (RB) using up to 100x fewer features. In almost every test, the "elbow" of the accuracy curve—the point where adding more features yields diminishing returns—occurred much earlier for adapted bases.

Performance comparison across datasets showing KAE and Accuracy vs. Number of Features.

This compactness is a massive advantage for deploying models on resource-constrained devices. For instance, on the CIFAR10 dataset, moving from a Random Basis (76.4% accuracy) to a Supervised Adapted Basis (79.0%) provided a significant performance boost, nearly matching fully discriminative neural networks while requiring a fraction of the parameters. Furthermore, unsupervised adaptation (UAB) was shown to fix the performance stalling often seen in "fast" structured kernel machines, making them highly viable.

The Transfer Learning Edge

While Discriminative adaptation (DAB) excels at specific tasks, it often overfits its features to that exact problem, hurting its ability to generalize to new domains. The authors discovered that Supervised Adaptation (SAB) retains its performance significantly better when features are transferred to a completely different task.

Transfer learning performance comparing Task 1 accuracy to a transferred Task 2.

Because SAB aligns the kernel with the target rather than purely minimizing a specific loss function, it captures the underlying "essence" of the data better than a pure neural network approach. In transfer learning tests on MNIST, the SAB method achieved the highest accuracy on the new task, outperforming the standard neural network approach (DAB), which suffered a performance drop when its features were frozen and moved.

Depth Requires Capacity

When experimenting with "Deep Kernels" (stacking multiple layers like ArcCos2 or ArcCos3), the authors found that for a small number of features, shallow models actually outperform deeper ones. Deeper models only begin to show their strength once they are provided with enough "capacity" (a sufficiently large number of features).

Limitations and Future Work

While adapting the basis makes the final model smaller and faster during inference, it introduces overhead. The training process becomes more complex and time-consuming compared to simply generating random numbers. Additionally, the adaptation methods (UAB/SAB) technically scale quadratically with the number of samples. Although the authors mitigated this using mini-batching, it remains a computational hurdle for truly massive datasets.

Looking forward, the authors suggest that exploring new ways to inject label information into the kernel—without losing the robust mathematical generalization properties inherent to kernel methods—is a highly promising path toward more efficient and adaptable AI systems.

Summary updated

BibTeX
@inproceedings{alber2017empirical,
  author = {Maximilian Alber and Pieter-Jan Kindermans and Kristof Schütt and Klaus-Robert Müller and Fei Sha},
  title = {{An Empirical Study on The Properties of Random Bases for Kernel Methods}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
  url = {https://openreview.net/forum?id=rJWKKvZOZS},
}
Figure