mod gle_langevin¶
- module gle_langevin¶
GLE-thermostatted Langevin dynamics as a simulated-annealing driver.
This is the colored-noise point of the algebra: a gradient-driven sampler whose Move slot is BAB Langevin dynamics and whose thermostat is the generalized Langevin equation (Ceriotti-Bussi-Parrinello) rather than a single white-noise friction. A white-noise thermostat critically damps one frequency, so an ill-conditioned objective – a wide spread of Hessian curvatures – has most modes far from critical and decorrelating slowly. The GLE shapes a frequency-dependent friction from a few auxiliary momenta, flattening the sampling efficiency across the curvature band, and the temperature is annealed so the trajectory settles into a basin. Conditioning is handled by the noise spectrum exactly as the
1/sqrt(D)proposal scale handles dimension; both are Move-slot transforms every driver could read.Variables
- const DEFAULT_GLE_OMEGA0: f64¶
Characteristic frequency used when local curvature does not yield a finite estimate.
Functions
-
fn estimate_gle_omega0<O, G>(obj: &O, grad: &G) -> f64¶
where
O: Objective<f64>,
G: Gradient<f64>
¶ Estimate the characteristic GLE frequency from local gradient curvature.
-
fn estimate_gle_preconditioner<O, G>(obj: &O, grad: &G, seed: u64, max_probes: usize) -> GlePreconditioner¶
where
O: Objective<f64>,
G: Gradient<f64>
¶ Estimate a diagonal coordinate preconditioner from local gradient curvature.
-
fn gle_langevin_adaptive_sa<O, G>(obj: &O, grad: &G, seed: u64, max_fevals: usize, dt: f64, n_epochs: usize, x0: Option<Array1<f64>>) -> GleLangevinResult¶
where
O: Objective<f64>,
G: Gradient<f64>
¶ Run GLE-Langevin annealing with a frequency estimated from the objective.
-
fn gle_langevin_preconditioned_sa<O, G>(obj: &O, grad: &G, seed: u64, max_fevals: usize, dt: f64, n_epochs: usize, x0: Option<Array1<f64>>, max_preconditioner_probes: Option<usize>) -> GleLangevinResult¶
where
O: Objective<f64>,
G: Gradient<f64>
¶ Run GLE-Langevin annealing with a diagonal adaptive coordinate transform.
-
fn gle_langevin_sa<O, G>(obj: &O, grad: &G, seed: u64, max_fevals: usize, omega0: f64, dt: f64, n_epochs: usize, x0: Option<Array1<f64>>) -> GleLangevinResult¶
where
O: Objective<f64>,
G: Gradient<f64>
¶ Run GLE-thermostatted Langevin annealing on
objwith gradientgrad.max_fevalsbounds the gradient evaluations (one per dynamics step).omega0is the characteristic frequency the fitted optimal-sampling drift is scaled to (it flattens the sampling efficiency across the configured band),dtthe timestep (clamped so the fastest band frequency is resolved), andn_epochsthe number of geometric temperature levels. Returns the best objective value at budget parity.
Structs and Unions
- struct GleLangevinResult¶
Result of a GLE-Langevin annealing run.
- best_pos: Vec<f64>¶
Best-seen position.
- best_val: f64¶
Best-seen objective value.
- n_evals: usize¶
Gradient evaluations consumed (the work unit at parity with the field).
- omega0: f64¶
Characteristic frequency used to scale the colored-noise drift.
- dt: f64¶
Timestep after resolving the upper end of the GLE frequency band.
- preconditioner_diag: Vec<f64>¶
Diagonal entries of the position-space preconditioning matrix.
- n_preconditioner_grads: usize¶
Gradient probes spent estimating the preconditioner.
- struct GlePreconditioner¶
Diagonal GLE preconditioner in transformed coordinates.
- scale: Array1<f64>¶
Coordinate scale
x_j = scale_j z_j.
- diag: Array1<f64>¶
Diagonal entries of the position-space preconditioner.
- omega0: f64¶
Characteristic transformed frequency.
- n_grads: usize¶
Gradient probes consumed by the estimate.