Skip to main content
QUICK REVIEW

[Paper Review] McKernel: A Library for Approximate Kernel Expansions in Log-linear Time

J. de Curtò, I. de Zarzà|arXiv (Cornell University)|Feb 27, 2017
Stochastic Gradient Optimization TechniquesComputer Science49 references4 citations
TL;DR

McKernel proposes a C++ library for approximate kernel expansions using randomized feature maps, enabling log-linear time computation via optimized Fast Walsh-Hadamard transforms. It achieves state-of-the-art performance on MNIST and Fashion-MNIST comparable to deep learning, using only thousands of trainable parameters while maintaining theoretical rigor and scalability.

ABSTRACT

McKernel introduces a framework to use kernel approximates in the mini-batch setting with Stochastic Gradient Descent (SGD) as an alternative to Deep Learning. Based on Random Kitchen Sinks [Rahimi and Recht 2007], we provide a C++ library for Large-scale Machine Learning. It contains a CPU optimized implementation of the algorithm in [Le et al. 2013], that allows the computation of approximated kernel expansions in log-linear time. The algorithm requires to compute the product of matrices Walsh Hadamard. A cache friendly Fast Walsh Hadamard that achieves compelling speed and outperforms current state-of-the-art methods has been developed. McKernel establishes the foundation of a new architecture of learning that allows to obtain large-scale non-linear classification combining lightning kernel expansions and a linear classifier. It travails in the mini-batch setting working analogously to Neural Networks. We show the validity of our method through extensive experiments on MNIST and FASHION MNIST [Xiao et al. 2017].

Motivation & Objective

  • Address the computational and storage bottlenecks of kernel methods in large-scale machine learning by enabling efficient, approximate kernel expansions.
  • Provide a drop-in replacement for deep neural networks that retains the theoretical soundness of kernel methods while scaling to large datasets.
  • Develop a highly optimized, cache-friendly, SIMD-parallelized implementation of Fast Walsh-Hadamard transforms to accelerate kernel feature computation.
  • Enable mini-batch training with stochastic gradient descent (SGD) for scalable, differentiable feature generation suitable for linear classifiers.
  • Establish a new learning architecture combining compositional kernel expansions with linear models, offering a theoretically grounded alternative to deep learning.

Proposed method

  • Use Random Kitchen Sinks-based feature maps to approximate shift-invariant kernels, mapping input features into a high-dimensional space via random projections and trigonometric nonlinearities.
  • Apply a cache-optimized, SIMD-accelerated Fast Walsh-Hadamard transform (FWHT) to compute the feature map efficiently, outperforming state-of-the-art FWHT libraries.
  • Introduce a pseudo-random permutation and hashing to compactly represent the feature map, requiring only one floating-point number per input dimension.
  • Construct the feature vector as $ ilde{x} = ext{mckernel}(x) $, where $ ilde{x} $ is obtained by padding the input to the next power of two, applying the FWHT, and applying a nonlinear activation $ ext{sin}( heta), ext{cos}( heta) $.
  • Train a linear classifier via SGD on the transformed features using the softmax output $ ext{softmax}(W ilde{x} + b) $, with end-to-end optimization of weights $ W $ and bias $ b $.
  • Ensure deterministic behavior across training and inference by fixing the random seed for feature generation, enabling reproducible experiments.

Experimental results

Research questions

  • RQ1Can kernel methods be scaled to large-scale machine learning tasks with computational efficiency comparable to deep neural networks?
  • RQ2Can a fast, cache-optimized implementation of the Fast Walsh-Hadamard transform outperform existing state-of-the-art libraries in kernel feature computation?
  • RQ3Does a kernel expansion framework using randomized features achieve performance comparable to deep learning on non-linear benchmark datasets like MNIST and Fashion-MNIST?
  • RQ4Can the proposed method maintain high accuracy while reducing the number of trainable parameters to the order of thousands, unlike deep networks with millions of parameters?
  • RQ5To what extent can the architecture of modern deep networks be reinterpreted as a composition of kernel expansions with learnable parameters?

Key findings

  • McKernel achieves state-of-the-art performance on MNIST and Fashion-MNIST, matching or exceeding deep learning models in accuracy while using only thousands of trainable parameters.
  • The library enables log-linear time computation of kernel expansions through a highly optimized, cache-friendly Fast Walsh-Hadamard transform implementation that outperforms existing libraries like Spiral.
  • On the MNIST dataset, the RBF-Matérn kernel with 32,768 training samples and 8,192 test samples achieved high accuracy in full-batch learning, with performance improving with increasing kernel expansions.
  • In mini-batch training with 60,000 training and 10,000 test samples, the RBF-Matérn kernel with $ au = 40 $, $ ho = 1.0 $, and 20 epochs achieved comparable performance to deep learning models.
  • The number of trainable parameters scales as $ C imes (2 imes [S]_2 imes E + 1) $, where $ C $ is the number of classes, $ [S]_2 $ is the next power of two, and $ E $ is the number of kernel expansions, enabling compact and efficient models.
  • The framework supports deterministic, reproducible behavior across training and inference by fixing the random seed for feature generation, ensuring consistent results.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.