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

Implicit Kernel Learning

Chun-Liang Li, Wei-Cheng Chang, Youssef Mroueh, Yiming Yang, Barnabás Póczos

Abstract

Kernels are powerful and versatile tools in machine learning and statistics. Although the notion of universal kernels and characteristic kernels has been studied, kernel selection still greatly influences the empirical performance. While learning the kernel in a data-driven way has been investigated, in this paper we explore learning the spectral distribution of the kernel via implicit generative models parametrized by deep neural networks. We call our method Implicit Kernel Learning (IKL). The proposed framework is simple to train, and inference is performed via sampling random Fourier features. We investigate two applications of the proposed IKL as examples, including generative adversarial networks with MMD (MMD GAN) and standard supervised learning. Empirically, MMD GAN with IKL outperforms vanilla predefined kernels on both image and text generation benchmarks; using IKL with Random Kitchen Sinks also leads to substantial improvement over existing state-of-the-art kernel learning algorithms on popular supervised learning benchmarks.

Introduction

In kernel-based machine learning, the choice of the kernel function is paramount. Kernels define the similarity measure between data points, and a poor choice can lead to suboptimal performance. Traditionally, practitioners rely on predefined kernels like Gaussian or Polynomial kernels, often selected through heuristics or cross-validation. Existing kernel learning approaches, such as Multiple Kernel Learning (MKL) or explicit spectral modeling (e.g., Spectral Mixture kernels), often impose rigid parametric assumptions on the spectral distribution of the kernel.

Implicit Kernel Learning (IKL) addresses these limitations by leveraging the expressivity of deep neural networks to learn the kernel's spectral distribution implicitly. Instead of assuming a specific functional form, IKL uses a generative model to sample frequencies that best represent the underlying data distribution.

Methodology

The foundation of IKL lies in Bochner’s Theorem, which establishes a correspondence between stationary kernels and spectral distributions. A stationary kernel $k(x, y) = k(x-y)$ is the Fourier transform of a positive measure $P(\omega)$.

IKL models this spectral distribution using an implicit generative model $h_\psi(\nu)$, where $\nu$ is noise sampled from a simple distribution (e.g., isotropic Gaussian). The kernel is then defined as an expectation over these generated frequencies: $$k(x, y) = \int e^{i\omega^T(x-y)} dP(\omega) \approx \mathbb{E}_{\nu \sim p(\nu)} [\cos(\omega^T(x-y))]$$ where $\omega = h_\psi(\nu)$.

In practice, we approximate this expectation using Random Fourier Features (RFF). By sampling a finite set of frequencies from the learned generator, we can transform input data into a feature space where linear methods can be applied. To ensure stability and prevent the spectral distribution from "exploding" into high-frequency noise, we introduce a variance constraint on the generator's output, ensuring the resulting kernel remains Lipschitz continuous.

Experimental Results

The authors evaluated IKL in two primary settings: generative modeling via MMD GANs and supervised classification.

Generative Modeling

In MMD GANs, the kernel defines the distance between the generated and real data distributions. By learning the kernel alongside the generator, IKL provides a more adaptive and informative training signal. On the CIFAR-10 dataset, MMD GAN with IKL achieved an Inception Score of 6.876, surpassing standard Gaussian (6.726) and Rational Quadratic (6.785) kernels. Qualitative results across CIFAR-10, CelebA, and LSUN demonstrate the model's ability to generate high-quality, diverse images.

Qualitative samples generated by MMD GAN with IKL across CIFAR-10, CelebA, and LSUN datasets.

Text Generation and Robustness

IKL was also applied to character-level text generation using the Google Billion Words dataset. The method achieved a JS-4 divergence of 0.372, significantly lower than competing kernel methods. This indicates that the learned kernel captures the structural nuances of text more effectively than fixed kernels.

Comparison of JS-4 divergence over training iterations for text generation. IKL consistently achieves lower divergence than Gaussian and Rational Quadratic (RQ) kernels.

Furthermore, IKL demonstrated superior robustness in high-dimensional supervised learning tasks. While standard RFF performance typically degrades as input dimensionality increases, IKL maintains accuracy by focusing on the most informative spectral components.

Conclusion

Implicit Kernel Learning represents a significant step forward in kernel methods by replacing manual selection and rigid parametric modeling with flexible, neural-network-based spectral learning. By bridging the gap between classical kernel machines and modern generative modeling, IKL offers a powerful framework for both supervised and unsupervised tasks. Future work may extend this approach to non-stationary kernels and explore deeper integrations with Bayesian inference.

Summary updated

BibTeX
@inproceedings{li2019implicit,
  author = {Chun-Liang Li and Wei-Cheng Chang and Youssef Mroueh and Yiming Yang and Barnabás Póczos},
  title = {{Implicit Kernel Learning}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2019},
  url = {https://openreview.net/forum?id=aA3SmMCIgbp},
}
Figure