Zero-loss stratum Langevin optimizer
Implementation & benchmark of arXiv:2608.09840 — Langevin dynamics along the zero set of real-analytic potentials
Source paper: Langevin dynamics along the zero set of real-analytic potentials arXiv:2608.09840 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Add a dedicated near-zero-loss Langevin phase after ordinary training, with inverse temperature increased while the optimizer remains stochastic. The dynamics should preferentially spend time in high-dimensional or singular regions of the zero-training-loss set, providing a concrete mechanism for selecting solutions that are more robust to parameter perturbations and may generalize better.
Formulas
Mathematical statement
The paper studies the overdamped Langevin diffusion $$dX_t=-\beta\nabla V(X_t)\,dt+\sqrt{2}\,dB_t,$$ where \(X_t\in\mathbb R^d\) is the parameter state, \(V:\mathbb R^d\to[0,\infty)\) is a real-analytic potential, \(\beta>0\) is inverse temperature, and \(B_t\) is standard \(d\)-dimensional Brownian motion. The zero set is \(\mathcal Z=V^{-1}(0)\). In the large-\(\beta\) regime, trajectories starting on or near \(\mathcal Z\) concentrate near \(\mathcal Z\), and the limiting evolution is organized by strata indexed by a local learning coefficient and its multiplicity. The local Gibbs mass is asymptotically represented by $$Z_{x,r}(\beta)=\int_{\|\theta-x\|<r}e^{-\beta V(\theta)}\,d\theta\asymp C_{x,r}\,\beta^{-\lambda(x)}(\log\beta)^{m(x)-1},$$ where \(r\) is a neighborhood radius, \(C_{x,r}\) is a local constant, \(\lambda(x)\) is the local learning coefficient, and \(m(x)\) is its multiplicity. Smaller \(\lambda(x)\) means larger asymptotic Gibbs mass; for a regular zero manifold of dimension \(k\) in \(d\) dimensions, \(\lambda=(d-k)/2\), so higher-dimensional zero-loss regions are favored. The adaptation replaces \(V\) by the shifted nonnegative training loss \(L_\varepsilon(\theta)=\max\{L(\theta)-\varepsilon,0\}\), keeping the trajectory near the empirical zero-loss set while allowing stochastic exploration.
Implementation notes
(1) Integration point: modify the parameter update rather than the network forward pass. First train a small overparameterized model with AdamW or SGD until training loss is below a threshold \(\varepsilon\). Then run a second-stage optimizer on the same parameters. Use \(L_\varepsilon(\theta)=\max(L(\theta)-\varepsilon,0)\), so the gradient primarily prevents escape from the near-zero-loss set instead of continually driving the already-interpolating loss lower. Apply noise to trainable weights, excluding batch-normalization statistics and optionally excluding embeddings.
(2) Pseudocode:
train theta with AdamW until train_loss(theta) <= epsilon
for n in 1,...,N:
beta = beta_min * (beta_max / beta_min) ** min(n / N_beta, 1)
loss = max(train_loss(theta) - epsilon, 0)
g = grad(loss, theta)
xi = Normal(0, I)
theta = theta - eta * beta * g + sqrt(2 * eta) * xi
if n % eval_period == 0:
evaluate train_loss, validation_loss, and perturbation robustness
Here \(\eta\) is the discrete time step, \(\beta_n\) is annealed inverse temperature, and \(\xi_n\) is fresh standard Gaussian noise. Use layerwise noise normalization if isotropic parameter noise is numerically unstable.
(3) The mathematical quantities transferred directly are the drift/noise structure and concentration near \(\mathcal Z\). The local learning coefficient \(\lambda(x)\) is not assumed known. Estimate it diagnostically by drawing perturbations \(u_j\sim\mathcal N(0,\sigma^2I)\) around checkpoints and computing $$\widehat Z(\beta)=M^{-1}\sum_{j=1}^{M}\exp[-\beta L_\varepsilon(\theta+u_j)].$$ Fit the slope of \(\log\widehat Z(\beta)\) against \(\log\beta\); the negative slope estimates \(\lambda\) over a finite temperature range. Also measure local basin volume as the fraction of perturbations satisfying \(L(\theta+u_j)\leq\varepsilon+\delta\).
(4) First experiment: use a two-layer ReLU MLP on MNIST or CIFAR-10 with enough width to reach nearly zero training loss. Compare AdamW, constant-temperature SGLD, and the proposed zero-loss phase at equal optimizer steps and measured FLOPs. Sweep \(\beta_{min}\), \(\beta_{max}\), \(\varepsilon\), and noise step size. The expected signal is unchanged or slightly improved training loss, lower validation loss, higher perturbation robustness, and larger empirical near-zero-loss volume at equal compute. A stronger result would be improved validation accuracy after interpolation despite identical training accuracy. Falsification is no validation benefit, or substantial loss degradation, when the trajectory is still maintained below \(\varepsilon\).
Verification
Stage 1 · Toy mechanism gate: Failed ✗
Stage 2 · Mechanism transferred to benchmark: Not tested
Stage 2 · Practical benchmark result: Not run
Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built the zero-loss stratum Langevin optimizer and verified the underlying Gibbs mechanism numerically: isolated versus manifold zero sets produced observed learning coefficients 0.9999999999999997 and 0.5 versus predictions 1.0 and 0.5, the mass-ratio exponent was 0.5000000000000001 versus 0.5, and width scaling was -0.4999999999999996 versus -0.5. However, in the equal-budget digits MLP experiment the Langevin phase substantially degraded performance rather than improving robustness or generalization, so the proposed optimizer did not produce a practical win in this setup.
- Agent confidence
- 9/10
- Baseline
- AdamW: train loss 0.0296278, train accuracy 0.998515, test loss 0.0889683, test accuracy 0.971111, perturbed train loss 0.0324021.
- Idea
- AdamW plus 500 zero-loss Langevin steps: train loss 0.206331, train accuracy 0.922791, test loss 0.258167, test accuracy 0.913333, perturbed train loss 0.217161. Toy predictions matched: manifold lambda 0.5 observed 0.5; point lambda 1.0 observed 1.0; mass-ratio exponent 0.5 observed 0.5000000000000001; width exponent -0.5 observed -0.4999999999999996.
Limitations: Only the sklearn digits dataset and one small MLP/configuration were tested; no beta, epsilon, step-size, batch-size, architecture, or multi-seed sweep was performed. The analytic toy verification tests regular zero manifolds and isolated quadratic zeros, not singular varieties or multiplicity logarithmic factors. The implementation uses full-batch updates and isotropic noise on all trainable parameters.
How to run: python3 experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- artifacts/results.json 1.1 KB View Raw
- experiment.py 4.8 KB View Raw
- report.md 1.8 KB View