△ Mechanism confirmed, baseline not beaten 2026

Sign-Reset PI Optimizer

Implementation & benchmark of arXiv:2607.14508 — A Distributed PI+Reset Scheme for Discrete-Time Economic Dispatch of A Grid-connected BESS Network

Usefulness7/10
Difficulty4/10
Novelty6/10

Source paper: A Distributed PI+Reset Scheme for Discrete-Time Economic Dispatch of A Grid-connected BESS Network arXiv:2607.14508 ⓘ · analyzed Aug 30, 2026

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

Idea description

Replace ordinary gradient descent or momentum with a discrete PI update whose integral gradient state is accumulated only while the gradient direction remains consistent. When the proportional gradient term changes sign, reset the integral state, preventing stale gradients from producing overshoot near minima or after sharp curvature changes.

Formulas

$$\theta_{k+1}=\theta_k-\eta\left(K_p g_k+K_i I_k\right),\qquad g_k=\nabla_\theta L(\theta_k)$$
$$I_{k+1}=\begin{cases}0,&\langle g_k,g_{k-1}\rangle<0\\I_k+g_k,&\langle g_k,g_{k-1}\rangle\ge 0\end{cases}$$
$$A_\lambda=\begin{bmatrix}1-\eta K_p\lambda&-\eta K_i\\\lambda&1\end{bmatrix},\qquad \rho(A_\lambda)<1\ \Leftarrow\ 0<K_i<K_p,\quad \eta\lambda(2K_p-K_i)<4$$

Mathematical statement

Let \(\theta_k\) be the parameter vector, \(g_k=\nabla_\theta L(\theta_k)\) the current gradient, \(K_p>0\) and \(K_i\ge 0\) controller gains, and \(I_k\) the integral state. The optimizer uses \(\theta_{k+1}=\theta_k-\eta(K_p g_k+K_i I_k)\). Define a sign-change event by \(r_k=1\) if \(\langle g_k,g_{k-1}\rangle<0\), and \(r_k=0\) otherwise. The reset controller sets \(I_{k+1}=0\) at a sign change and otherwise accumulates \(I_{k+1}=I_k+g_k\). For a scalar quadratic loss \(L(x)=\frac{\lambda}{2}x^2\), the no-reset dynamics have state matrix \(A_\lambda=\begin{bmatrix}1-\eta K_p\lambda&-\eta K_i\\\lambda&1\end{bmatrix}\). Schur stability requires the eigenvalues of this matrix to lie inside the unit disk; a sufficient Jury-condition form is \(0<K_i<K_p\) and \(\eta\lambda(2K_p-K_i)<4\). Resets create a hybrid system that truncates integral memory at gradient sign reversals.

Implementation notes

Integrate this as an optimizer on a small MLP or transformer block, initially without Adam-style adaptive normalization so that the control effect is identifiable. Maintain an integral tensor I with the same shape as the parameters, or more cheaply one integral scalar per layer. At every minibatch compute g=torch.autograd.grad(loss, parameters), flatten the gradients, and calculate c=dot(g_flat, previous_g_flat). If c<0, set every integral tensor to zero; otherwise update I=I+g. Apply theta -= eta*(Kp*g+Ki*I), then store detached g as the previous gradient. Add optional gradient clipping only after testing the unclipped dynamics. The paper supplies the PI-plus-reset mechanism and sign-triggered switching rule; curvature and gain calibration must be estimated empirically. First run a one-dimensional and 100-dimensional quadratic with known Hessian eigenvalue lambda, then train a 2-layer MLP on MNIST. Compare SGD, momentum, and PI-reset at matched gradient-evaluation cost. Increase eta until divergence. The no-reset quadratic should become unstable near eta_c=4/[lambda*(2*Kp-Ki)] for 0<Ki<Kp, within about 20 percent. The reset version should show lower overshoot, fewer large oscillations, and a smaller integral norm after each sign reversal. Report reset frequency, settling time to a fixed loss band, and final loss. Test global versus coordinatewise sign detection: the prediction is that global resets are more stable, while coordinatewise resets retain more speed in anisotropic problems.

Verification

Mechanism confirmed, baseline not beaten

Stage 1 · Toy mechanism gate: Passed ✓

Stage 2 · Mechanism transferred to benchmark: Confirmed ✓

Stage 2 · Practical benchmark result: Significantly worse ✗

Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works

Stage 1 — Mechanism check agent confidence 9/10

Built a sign-reset PI optimizer and reproducible toy/MLP experiments in experiment.py. The no-reset Jury stability boundary matched prediction exactly at eta=2.5, and the inverse-curvature boundary sweep matched eta*=4/[lambda(2Kp-Ki)] within 0.05%. Sign reversals reset the integral state as specified; resets improved settling in parts of the stable regime and the PI model outperformed SGD on the tiny synthetic MLP, but resets destabilized near-boundary cases and were not a universal stability win.

Agent confidence
9/10
Baseline
Toy no-reset PI: stable at eta=2.4 with settling step 80, but diverged above the predicted boundary; MLP SGD final loss 0.3270, accuracy 85.35%.
Idea
Toy reset PI: integral changed from 1.0 before the first reversal to 0.0 at reset; at eta=1.8 settling step 7 versus no-reset step 9; MLP PI-reset final loss 0.0121, accuracy 99.80% with 0 resets in this run. Near eta=2.4, reset diverged while no-reset settled, demonstrating the limitation.

Limitations: The neural experiment used a small synthetic two-moons dataset rather than MNIST, tested only global sign detection, and did not measure matched FLOPs, wall-clock speed, or larger-scale generalization. The MLP run had no sign reversals, so its improvement is PI accumulation rather than evidence of reset-specific benefit.

How to run: python3 experiment.py

Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.14508)

Significantly WORSE than the tuned baseline (+7.5%, p=0.0081, wins 0 / 8 paired seeds).

Benchmark
Tabular regression (Friedman)
Model
mlp_tiny
Paired seeds
8
Baseline mean
6.9946
Idea mean
7.5173
Effect (Δ)
0.5227 (+7.5%; negative = idea better)
Wins
0 / 8 paired seeds
p-value
0.0081 (permutation test, 20 000 shuffles)
Smallest detectable effect
±7.4%
Mechanism
Confirmed ✓
Practical effect
Hurts
Baseline tuning
swept over 20 configs
Limitations:

Only the registered tabular track was tested. Vision, sequence, and dynamics were not run. The experiment used 800 training samples, 300 test samples, 20 epochs, global rather than coordinatewise sign detection, and did not measure wall-clock speed or FLOPs.

How to run: python3 bench_pi.py

Verdict computed by deterministic test code from paired-seed statistics — not by the language model.

Stage 2 — Benchmark latest Failed ✗

Agent confidence: 9/10

Sign-Reset PI was tested on the registered built-in tabular track with the shared mlp_tiny architecture. Its best configuration was significantly worse than tuned momentum SGD on test MSE, despite frequent observed resets, so the system did not produce the promised benchmark win.

Baseline
Tuned momentum SGD: mean test MSE 6.9946147203445435 over 8 seeds.
Idea
Sign-Reset PI: mean test MSE 7.51734858751297 over 8 seeds; paired delta +0.5227338671684265; permutation p=0.0081; 0/8 paired wins; observed reset rate 0.6267857142857143.

Benchmark result

Significantly WORSE than the tuned baseline (+7.5%, p=0.0081, wins 0 / 8 paired seeds).

Benchmark
Tabular regression (Friedman)
Model
mlp_tiny
Paired seeds
8
Baseline mean
6.9946
Idea mean
7.5173
Effect (Δ)
0.5227 (+7.5%; negative = idea better)
Wins
0 / 8 paired seeds
p-value
0.0081 (permutation test, 20 000 shuffles)
Smallest detectable effect
±7.4%
Mechanism
Confirmed ✓
Practical effect
Hurts
Baseline tuning
swept over 20 configs
Limitations:

Only the registered tabular track was tested. Vision, sequence, and dynamics were not run. The experiment used 800 training samples, 300 test samples, 20 epochs, global rather than coordinatewise sign detection, and did not measure wall-clock speed or FLOPs.

How to run: python3 bench_pi.py

Artifacts

Implementation overview ⬇ Download all as ZIP 6 files · code, reports and structured results