vbll_loss

probly.losses.vbll_loss = <flextype.singledispatch.Flexdispatch object>

Compute the negative VBLL ELBO from [HWS24].

Routes to the variant-specific training objective based on the type of layer (e.g. the double-Jensen bound for a VBLLLayer or the generative Jensen bound for a GVBLLLayer). Use probly.method.vbll.find_vbll_layer() to retrieve the layer from a transformed predictor.

Parameters:
  • layer – The variational Bayesian last layer to fit.

  • features – Backbone features feeding the layer, shape (batch, in_features).

  • targets – Integer class labels, shape (batch,).

  • regularization_weight – Weight on the KL/regularization terms (typically 1 / dataset_size).

Returns:

A scalar tensor with the negative ELBO to minimize.

Examples using probly.losses.vbll_loss

Generative Variational Bayesian Last Layers on Two Moons

Generative Variational Bayesian Last Layers on Two Moons

G-VBLL on MNIST

G-VBLL on MNIST

Variational Bayesian Last Layers on Two Moons

Variational Bayesian Last Layers on Two Moons

Heteroscedastic Variational Bayesian Last Layers on Two Moons

Heteroscedastic Variational Bayesian Last Layers on Two Moons

Heteroscedastic VBLL on MNIST

Heteroscedastic VBLL on MNIST

VBLL on MNIST

VBLL on MNIST

Student-t Variational Bayesian Last Layers on Two Moons

Student-t Variational Bayesian Last Layers on Two Moons

Student-t VBLL on MNIST

Student-t VBLL on MNIST