# Moment-Controlled Mutation

- ID: 528
- Canonical URL: https://synthcore.org/idea/528/moment-controlled-mutation
- API JSON: https://synthcore.org/api/idea/528.json
- API Markdown: https://synthcore.org/api/idea/528.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2607.02171](https://arxiv.org/abs/2607.02171)
- Category: training
- Solves: stability, accuracy, generalization
- ML areas: optimizer, fine-tuning, training-dynamics
- Math tags: probability, statistics, dynamical-systems, stochastic-processes
- Ratings: usefulness 6/10; difficulty 6/10; novelty 7/10

## Idea description

Use the paper's mean and variance dynamics to control exploration in a population of neural-network adapters. Estimate local reward curvature from the current candidates, then choose mutation strength so selection contracts diversity only when the reward landscape is locally reliable. Increase diffusion when reward noise or selection causes population collapse.

## Mathematical statement

For a normalized policy distribution \(\phi(P,t)\), define its mean \(\mu=\int P\phi(P)dP\) and variance \(\sigma^2=\int(P-\mu)^2\phi(P)dP\). Multiplying the replicator-mutation equation by \(P\) and \((P-\mu)^2\) gives \(\dot\mu=\kappa\operatorname{Cov}(P,R)\) and \(\dot\sigma^2=\kappa\operatorname{Cov}((P-\mu)^2,R)+2D\), where \(\kappa=\tilde\lambda_T\rho\), \(R(P)\) is reward, and \(D\) is diffusion. Under a locally quadratic reward \(R(P)\approx R(\mu)+R'(\mu)(P-\mu)+\tfrac12R''(\mu)(P-\mu)^2\) and a Gaussian policy population, the paper obtains \(\dot\mu\approx\kappa\sigma^2R'(\mu)\) and \(\dot\sigma^2\approx\kappa R''(\mu)\sigma^4+2D\). Negative curvature contracts variance, positive curvature expands it, and mutation supplies a guaranteed additive diversity contribution. For vector adapter parameters \(z\in\mathbb R^d\), use diagonal covariance and estimate curvature coordinatewise from weighted candidate rewards.

## Key formulas

- $$\frac{d\mu}{dt}=\kappa\,\operatorname{Cov}_{\phi}(P,R(P))$$
- $$\frac{d\sigma^2}{dt}=\kappa\,\operatorname{Cov}_{\phi}((P-\mu)^2,R(P))+2D$$
- $$\dot\mu\approx\kappa\sigma^2R'(\mu),\qquad \dot\sigma^2\approx\kappa R''(\mu)\sigma^4+2D$$
- $$D_t=\operatorname{clip}\left(D_{\min}+\gamma\,\widehat{\operatorname{Var}}(r),\;D_{\min},D_{\max}\right),\qquad \widehat{R''}=\frac{\sum_i w_i(r_i-\bar r)((z_i-\mu)^2-C)}{\sum_i w_i((z_i-\mu)^2-C)^2+\epsilon}$$

## Implementation notes

1. Integration point: modify the mutation or noise line of a population-based LoRA or prompt-tuning optimizer. Keep N candidate vectors z_i, normalized weights w_i, EMA rewards r_i, weighted mean mu=sum_i w_i z_i, and diagonal covariance C=sum_i w_i(z_i-mu)^2. The backbone remains frozen. 2. Pseudocode: after scoring candidates, compute bar_r=sum_i w_i r_i and q_i=(z_i-mu)^2-C elementwise. Estimate local curvature per coordinate with R2_hat=sum_i w_i(r_i-bar_r)q_i/(sum_i w_i q_i^2+epsilon). Estimate reward uncertainty using repeated evaluation on a small probe batch or the weighted residual variance v_r=sum_i w_i(r_i-bar_r)^2. Set D_j=clip(D_min+gamma v_r/(1+abs(R2_hat_j)),D_min,D_max). Apply selection w_i <- softmax(log w_i+kappa(r_i-bar_r)); then mutate z_i,j <- z_i,j+sqrt(2D_j Delta_t)xi_i,j. If C_j falls below a target C_min, enforce D_j <- max(D_j,(C_min-C_j)/(2 Delta_t)), reflecting the +2D term in the variance equation. Reduce D only when R2_hat<0 and effective sample size exceeds N/2. 3. The moment equations and diffusion contribution are taken from the paper; reward, curvature, and noise estimates are empirical. Clip curvature estimates because finite populations make fourth-moment estimates noisy. 4. First experiment: train rank-2 or rank-4 LoRA adapters with N=16 on CIFAR-100 using a frozen ViT-Tiny. Compare fixed Gaussian mutation, AdamW, and moment-controlled mutation at equal candidate evaluations. Log validation accuracy, covariance trace, effective sample size, reward variance, and mutation magnitude. Success is higher final accuracy or faster accuracy growth without population collapse; a secondary success signal is stable covariance near the target rather than abrupt zero diversity or unbounded exploration.

## Verification

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: harms
- Verdict: Built a NumPy MVP implementing weighted selection, coordinatewise curvature/noise-based diffusion, diversity-floor enforcement, and a fixed-diffusion control. The moment equations were numerically verified: mean and variance-selection relative errors were 0.14% and 0.16%, while the diffusion variance increment matched 2DΔt within 0.00002. Across 8 seeds, moment control improved final mean reward (-0.292 vs -0.341) and stayed closer to target covariance (absolute error 0.0205 vs 0.0448), although fixed diffusion had better mean best-candidate reward (-0.120 vs -0.152); this is a promising small toy signal, not evidence of a general optimizer win.

### Mechanism check

- Verdict: Built a NumPy MVP implementing weighted selection, coordinatewise curvature/noise-based diffusion, diversity-floor enforcement, and a fixed-diffusion control. The moment equations were numerically verified: mean and variance-selection relative errors were 0.14% and 0.16%, while the diffusion variance increment matched 2DΔt within 0.00002. Across 8 seeds, moment control improved final mean reward (-0.292 vs -0.341) and stayed closer to target covariance (absolute error 0.0205 vs 0.0448), although fixed diffusion had better mean best-candidate reward (-0.120 vs -0.152); this is a promising small toy signal, not evidence of a general optimizer win.
- Confidence: 7/10
- Limitations: This is a noisy synthetic quadratic-vector population, not CIFAR-100, LoRA, or a frozen ViT. The supplied curvature estimator was approximately factor-of-two mis-scaled for an exact Gaussian quadratic: estimate -1.136 versus true curvature -2.3. The MVP follows the supplied estimator formula rather than correcting it. No FLOP-normalized neural-network comparison, hyperparameter sweep, or larger-population test was performed.

### Practical benchmark

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

## Artifacts

- [bench_report.json](https://synthcore.org/code/1372/bench_report.json)
- [moment_controlled_mutation.py](https://synthcore.org/code/1372/moment_controlled_mutation.py)
- [report.md](https://synthcore.org/code/1372/report.md)
- [report_bench_2026-09-04T173828.md](https://synthcore.org/code/1372/report_bench_2026-09-04T173828.md)
- [results/fixed_repetitions.json](https://synthcore.org/code/1372/results/fixed_repetitions.json)
- [results/moment_repetitions.json](https://synthcore.org/code/1372/results/moment_repetitions.json)
- [results/summary.json](https://synthcore.org/code/1372/results/summary.json)
- [stage2_bench.py](https://synthcore.org/code/1372/stage2_bench.py)
- [Download all files as ZIP](https://synthcore.org/download/1372)

## Disclaimer

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