sgld: Stochastic Gradient Langevin Dynamics (SGLD) optimization

View source: R/optimizer.R

sgldR Documentation

Stochastic Gradient Langevin Dynamics (SGLD) optimization

Description

Stochastic Gradient Langevin Dynamics (SGLD) optimization

Usage

sgld(stepsize = 0.001, temperature = 1)

Arguments

stepsize

base stepsize

temperature

non-negative Langevin temperature

Details

SGLD adds Gaussian noise to vanilla SGD updates:

x_{t+1} = x_t - \eta_t \nabla U(x_t) + \sqrt{2 T \eta_t}\,\xi_t, \quad \xi_t \sim \mathcal{N}(0, I)

where T is temperature. The implementation applies this component-wise using the current effective stepsize.

Value

a list of control variables for optimization (used in control_opt function)


ngme2 documentation built on May 20, 2026, 9:10 a.m.