Phase-Aware Bias-Energy Trust Region
Implementation & benchmark of arXiv:2608.18999 — A Sharp Joint Bias-Energy Envelope for Radial Clipping
Source paper: A Sharp Joint Bias-Energy Envelope for Radial Clipping arXiv:2608.18999 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Use the envelope's phase transition to choose whether clipping should primarily control update energy or preserve the raw gradient and reduce clipping bias. In the energy-dominated regime, regulate the retained update energy; in the bias-dominated regime, regulate the removed-gradient residual and monitor rare outliers explicitly.
Formulas
Mathematical statement
Let r = ||x|| divided by tau. The normalized joint clipping cost is beta r^2 for r <= 1 and alpha(r-1) + beta for r > 1 before applying the p-moment scaling. Maximizing the corresponding ratio over r produces a phase transition at alpha = p beta. When alpha <= p beta, the worst case occurs at r = 1 and K_p(alpha,beta) = beta. When alpha > p beta, the worst positive extremal radius is r_star = p(alpha-beta)/(alpha(p-1)), which is greater than 1, and K_p(alpha,beta) = (alpha/p) [alpha(p-1)/(p(alpha-beta))]^(p-1). The paper also gives the sharp pure-residual inequality ||x-C_tau(x)|| <= c_p tau^(1-p) ||x||^p, where c_p = (p-1)^(p-1)/p^p. These formulas provide a principled switch between controlling update energy and controlling clipping bias.
Implementation notes
Add a trust-region controller around a first-order optimizer. For each minibatch, compute gradient norm samples or layerwise norm samples, update M_hat for the chosen p, and calculate the empirical residual b = average(||g_i-c_i||) and empirical energy e = tau^(-1) average(||c_i||^2). Select alpha and beta according to the desired policy. Use alpha greater than p times beta when preserving gradient information is more important, and alpha less than or equal to p times beta when preventing large updates is more important. Compute the appropriate phase and K_p from the paper. Initialize tau using tau = (K_p M_hat/q)^(1/(p-1)). Then update it with a slow multiplicative controller: tau is replaced by tau times exp(eta times (e-e_target)) in the energy-dominated phase, or by tau times exp(eta times (b-b_target)) in the bias-dominated phase. Clamp the logarithmic update and tau itself for robustness. Apply the resulting tau globally or independently to parameter groups. The exact theorem determines the phase boundary, worst-case radius, and certificate; the targets and controller rate are empirical. First evaluate a 6-layer Transformer on WikiText-103 with synthetic Pareto gradient perturbations and without perturbations. Compare fixed clipping, adaptive percentile clipping, and the phase-aware controller. Measure validation perplexity, update-norm variance, clipping fraction, residual and energy costs, and recovery time after outlier batches. Success is lower perplexity or faster recovery at equal compute without increasing median update magnitude.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Significant win ✓
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
How to read this: The implementation beat the baseline, but the claimed mechanism did not reproduce at benchmark scale. The gain may come from another effect; treat the cause as unresolved.
Stage 1 — Mechanism check agent confidence 9/10
Built the phase-aware clipping controller and verified the paper's mechanism numerically. Across p=1.25, 1.5, and 2.0, the observed phase boundary matched alpha=p beta; in a focused p=1.5 sweep, the maximizer stayed at r=1 through alpha=1.5 and moved to the predicted r_star above it, with maximum radius error below 1.6e-4. The pure-residual extremum and tau scaling also matched c_p to numerical precision. In the toy optimizer, the controller reduced mean residual and median update magnitude, but had higher update variance and slightly worse final loss than fixed clipping, so this is mechanism confirmation rather than an overall optimization win.
- Agent confidence
- 9/10
- Baseline
- Fixed clipping: final_loss=3.42e-05, median_update=0.00340, update_std=0.0178, clip_fraction=0.261, mean_residual=1.364
- Idea
- Phase-aware: final_loss=4.37e-05, median_update=0.00302, update_std=0.0364, clip_fraction=0.0588, mean_residual=0.658, final_tau=1.411; phase and radius predictions matched with maximum radius error 1.6e-4
Limitations: Only a small synthetic quadratic experiment was run; no Transformer, WikiText-103, GPU benchmark, multiple-seed statistical study, or rigorous recovery-time comparison was tested. Controller targets and rates remain empirical.
How to run: python3 phase_aware.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.18999)
Beats the tuned baseline by 8.4% (p=0.0481, wins 7 / 8 paired seeds; metric: lower is better).
- Benchmark
- Tabular regression (Friedman)
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 8.0512
- Idea mean
- 7.3762
- Effect (Δ)
- -0.675 (−8.4%; negative = idea better)
- Wins
- 7 / 8 paired seeds
- p-value
- 0.0481 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±9.2%
- Mechanism
- Not confirmed ✗
- Practical effect
- Helps
- Baseline tuning
- swept over 15 configs
Only the registered tabular/Friedman regression track was tested; vision, sequence, dynamics, Transformer, WikiText-103, synthetic Pareto perturbations, and recovery-time comparisons were not tested. The benchmark used 400 training samples, 200 test samples, and 18 epochs. The mechanism controller saturated its tau clamp and missed its empirical energy target, so the significant task-metric win does not validate the proposed quantitative controller calibration.
How to run: python3 stage2_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Worked ✓
Agent confidence: 7/10
The phase-aware controller was implemented as a training-loop modification using the shared mlp_tiny model on the registered tabular optimizer track. It beat tuned fixed clipping on mean test MSE, 7 of 8 paired seeds, with delta_mean=-0.67497 and permutation p=0.04815, satisfying the benchmark's significant-win criterion. The mechanism signature was not confirmed because the energy target was not reached and tau saturated at 10.0.
- Baseline
- Fixed clipping best_cfg={lr:0.006,tau:0.5}, full mean MSE=8.051172316074371
- Idea
- Phase-aware best config={lr:0.006,tau0:0.5,eta:0.09}, mean MSE=7.376198410987854, delta=-0.6749739050865173, p=0.04815
Benchmark result
Beats the tuned baseline by 8.4% (p=0.0481, wins 7 / 8 paired seeds; metric: lower is better).
- Benchmark
- Tabular regression (Friedman)
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 8.0512
- Idea mean
- 7.3762
- Effect (Δ)
- -0.675 (−8.4%; negative = idea better)
- Wins
- 7 / 8 paired seeds
- p-value
- 0.0481 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±9.2%
- Mechanism
- Not confirmed ✗
- Practical effect
- Helps
- Baseline tuning
- swept over 15 configs
Only the registered tabular/Friedman regression track was tested; vision, sequence, dynamics, Transformer, WikiText-103, synthetic Pareto perturbations, and recovery-time comparisons were not tested. The benchmark used 400 training samples, 200 test samples, and 18 epochs. The mechanism controller saturated its tau clamp and missed its empirical energy target, so the significant task-metric win does not validate the proposed quantitative controller calibration.
How to run: python3 stage2_bench.py
Artifacts
- bench_report.json 5.8 KB View Raw
- phase_aware.py 7.3 KB View Raw
- report.md 1.5 KB View
- report_bench_2026-09-01T172236.md 8.0 KB View
- results.json 8.6 KB View Raw
- stage2_bench.py 9.7 KB View Raw