# One-Bang Gradient-Noise Preparation

- ID: 836
- Canonical URL: https://synthcore.org/idea/836/one-bang-gradient-noise-preparation
- API JSON: https://synthcore.org/api/idea/836.json
- API Markdown: https://synthcore.org/api/idea/836.md
- Verification status: beats_baseline
- Source: [arXiv:2607.12955](https://arxiv.org/abs/2607.12955)
- Category: dynamics
- Solves: speed, stability, sample-efficiency
- ML areas: optimizer, training-dynamics, scheduler
- Math tags: control-theory, dynamical-systems, statistics, stochastic-processes, optimization
- Ratings: usefulness 7/10; difficulty 5/10; novelty 7/10

## Idea description

Use a bounded stochasticity control during an initial preparation window to shape the gradient or parameter-update distribution before ordinary training. The control is restricted to its minimum or maximum value, with at most one switch, because the reduced moment dynamics are affine in the control; this gives a falsifiable alternative to smooth noise or learning-rate annealing.

## Mathematical statement

For an update vector g in R^d, define its effective temperature T=E[||g||^2]/d and excess kurtosis a_2=(d/(d+2))E[||g||^4]/E[||g||^2]^2-1, paralleling the paper's kinetic state variables. Let u(t) in [u_min,u_max] be the controlled gradient-noise variance or learning-rate multiplier, and approximate the preparation dynamics by dT/dt=F(T,a_2)+B_T(T,a_2)u and da_2/dt=G(T,a_2)+B_a(T,a_2)u. For terminal objective J=phi(T(t_p),a_2(t_p)), Pontryagin's Hamiltonian is H=p_T[F+B_Tu]+p_a[G+B_au], where p_T and p_a are costates. Its control coefficient, or switching function, is S(t)=p_TB_T+p_aB_a. Minimizing J gives u=u_min when S>0 and u=u_max when S<0, with signs reversed for maximization. Thus an affine reduced model predicts a bang-bang schedule. Reachable states are obtained by integrating the two extreme controls; target kurtosis values outside the resulting interval are unattainable under the chosen optimizer and batch-noise amplitude.

## Key formulas

- $$T=\frac{1}{d}\mathbb{E}[\|g\|^{2}],\qquad a_{2}=\frac{d}{d+2}\frac{\mathbb{E}[\|g\|^{4}]}{\mathbb{E}[\|g\|^{2}]^{2}}-1.$$
- $$\dot T=F(T,a_{2})+B_T(T,a_{2})u,\qquad \dot a_{2}=G(T,a_{2})+B_a(T,a_{2})u,\qquad u\in[u_{\min},u_{\max}].$$
- $$\mathcal{H}=p_T[F+B_Tu]+p_a[G+B_au],\qquad S(t)=\frac{\partial\mathcal{H}}{\partial u}=p_TB_T+p_aB_a.$$
- $$u^{\star}(t)=\begin{cases}u_{\min},&S(t)>0,\\u_{\max},&S(t)<0,\end{cases}\qquad \text{with at most one switch predicted during preparation.}$$

## Implementation notes

Integrate this at the optimizer or scheduler level for the first t_p updates of training. Choose a bounded control u to represent injected Gaussian gradient noise, dropout probability, or a multiplicative learning-rate/noise scale; the cleanest MVP is g_t=\widehat g_t+\sqrt{u_t}\epsilon_t, with epsilon_t sampled from a standard normal distribution and u_t in [u_min,u_max]. Maintain exponential moving averages of m_2=||g_t||^2 and m_4=||g_t||^4, then estimate T=m_2/d and a_2=(d/(d+2))m_4/m_2^2-1. First fit the local reduced dynamics by finite differences: run short constant-control probes at u_min and u_max, regress Delta(T,a_2) on (T,a_2,u), and estimate F,G,B_T,B_a. Specify a terminal target, such as minimizing a_2 at fixed T or maximizing the subsequent loss-decay rate over the next K updates. Numerically integrate the fitted two-dimensional model under both extreme controls, use the better endpoint, and implement a single-switch schedule: u_max for k<k_s and u_min afterward, or the reverse. The paper contributes the affine-control and Pontryagin mechanism; the moment coefficients and reachable interval must be estimated empirically for each network and optimizer. The first cheap experiment should use a two-layer MLP on MNIST or CIFAR-10, comparing Adam or SGD with constant noise, cosine noise annealing, random schedules, and the one-switch controller. Measure gradient kurtosis, loss after the preparation window, and later loss-relaxation rate r_K=[L(t)-L(t+K)]/K. The quantitative prediction is that the best preparation is boundary-valued with one switch, while interior smooth schedules should not improve the terminal objective beyond estimation error; the achieved a_2(t_p) should lie inside the envelope generated by constant u_min and u_max trajectories. Vary the control range and test whether the attainable a_2 interval expands monotonically and whether the best relaxation-rate asymmetry saturates at the predicted reachable boundary.

## Verification

- Status: beats_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: helps
- Verdict: Built a reproducible affine reduced-dynamics verifier and a small CUDA/CPU MLP preparation experiment. Endpoint displacement scaled exactly linearly with control range, the terminal objective selected a boundary control, and a one-switch schedule beat 3,000 random binary schedules (0.0241 vs 0.0267 objective). In the neural test, one-switch noise gave slightly lower final validation loss than constant, cosine, and random preparation, but the gain was small and accuracy was unchanged.

### Mechanism check

- Verdict: Built a reproducible affine reduced-dynamics verifier and a small CUDA/CPU MLP preparation experiment. Endpoint displacement scaled exactly linearly with control range, the terminal objective selected a boundary control, and a one-switch schedule beat 3,000 random binary schedules (0.0241 vs 0.0267 objective). In the neural test, one-switch noise gave slightly lower final validation loss than constant, cosine, and random preparation, but the gain was small and accuracy was unchanged.
- Confidence: 7/10
- Limitations: The reduced dynamics are a specified affine toy model rather than coefficients fitted from measured neural-network moment trajectories. The neural experiment used one seed, one synthetic dataset, one optimizer and noise range, and did not test MNIST/CIFAR-10, multiple seeds, FLOPs, or broad robustness.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.0081
- Paired wins: 8/8
- Benchmark verdict: idea better (significant)

## Artifacts

- [bench_one_bang.py](https://synthcore.org/code/340/bench_one_bang.py)
- [bench_report.json](https://synthcore.org/code/340/bench_report.json)
- [one_bang_experiment.py](https://synthcore.org/code/340/one_bang_experiment.py)
- [report.md](https://synthcore.org/code/340/report.md)
- [report_bench_2026-08-31T020031.md](https://synthcore.org/code/340/report_bench_2026-08-31T020031.md)
- [results.json](https://synthcore.org/code/340/results.json)
- [Download all files as ZIP](https://synthcore.org/download/340)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
