Home

Awesome

Venue arXiv

Stochastic Marginal Likelihood Gradients using Neural Tangent Kernels (ICML'23)

In the paper, we derive lower bounds of the linearized Laplace approximation to the marginal likelihood that enable SGD-based hyperparameter optimization. The corresponding estimators and experiments are available in this repository.

Stochastic Marginal Likelihood Gradients using Neural Tangent Kernels.
Alexander Immer, Tycho F.A. van der Ouderaa, Mark van der Wilk, Gunnar Rätsch, Bernhard Schölkopf. In proceedings of ICML 2023.

Overview

Existing parametric boundsNTK-based stochastic bounds

Setup

We use python>=3.9 and rely on pytorch for the experiments. The basic dependencies are in requirements.txt but might have to be adjusted depending on GPU or CUDA support in the case of torch. The proposed marginal likelihood estimators are implemented in dependencies/laplace and dependencies/asdl and are forks of the respective packages laplace-torch and asdl with modifications for the NTK and lower-bound linearized Laplace marginal likelihood approximations as well as differentiability in asdl. To install these, move into dependencies/laplace and /asdl and install locally with pip install ..

Experiments

The experiments, with the exception for the illustrated bounds, rely on wandb for tracking and collecting results and might have to be set up separately (see bottom of main runner classification_image.py). The commands to reproduce individual experiments are:

Figures

To produce plots, we download the results from wandb so line 15 in generate_illustration_figures.py needs to be adjusted to the individual wandb account. The commands in the main function can be used selectively to produce plots and, by default, produce all of them given that all results are present in wandb.