Gain-Weighted Cluster Co-Design
Implementation & benchmark of arXiv:2607.16985 — Cluster-Based Distributed Small-Signal Stability Certificates for Grid-Forming Inverter Networks
Source paper: Cluster-Based Distributed Small-Signal Stability Certificates for Grid-Forming Inverter Networks arXiv:2607.16985 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Use small-gain diagnostics to jointly learn module normalization and a communication partition rather than imposing a fixed global spectral constraint. Clusters should be formed around high-gain feedback loops, because grouping weakly related modules cannot improve the certificate and only adds bookkeeping.
Formulas
Mathematical statement
Let Gamma be the nonnegative matrix of measured inter-module gains and let d_i>0 be normalization weights. Diagonal scaling produces the normalized gain matrix Gamma_d=D^{-1}Gamma D, where D=diag(d_1,...,d_n). Its worst local certificate is mu(d)=max_i sum_j gamma_ij d_j/d_i. For a partition P of nodes into clusters S_a, define g_ab as the maximum product of gains over paths from cluster S_b to cluster S_a. A partition can tighten a decentralized certificate only when the problematic high-gain channels are internalized; otherwise the same failing cycle remains visible at the cluster level. The weights d_i are parameterized as d_i=exp(q_i), and q_i are optimized jointly or alternately with the neural parameters.
Implementation notes
Integrate this method into a block-sparse transformer, mixture-of-experts router, or modular recurrent model. Begin with a fixed number of modules and expose the communication pattern through an adjacency mask. Every K training steps, estimate Gamma from block JVPs on a calibration minibatch. Parameterize normalization as d_i=exp(q_i), take five to twenty gradient steps on q to reduce mu(exp(q)), and then greedily merge the pair of modules with the largest symmetric feedback score s_ij=log(gamma_ij+delta)+log(gamma_ji+delta), subject to a maximum cluster size. Within each cluster enumerate cycles up to length four; across clusters compute maximum-gain paths using dynamic programming on log gains, capped at path length L. During ordinary training add the displayed barrier and boundary penalties, but recompute the graph less frequently than model weights. Quantities computed from the paper are the diagonal gain normalization, cycle/path conditions, and the requirement that a partition must internalize failure-causing channels; quantities estimated empirically are JVP gains and path maxima. First cheap experiment: train a six-block residual MLP on CIFAR-10 with deliberately amplified cross-block residual couplings, comparing fixed singleton clusters, random clusters, and gain-weighted greedy clusters. Sweep coupling strength c. The prediction is that the singleton certificate fails when the worst cycle product exceeds 1, while a useful partition improves the certified margin only after every edge in that dominant cycle lies within one cluster. Random partitions should not show this transition.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Inconclusive
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 self-contained gain-weighted cluster co-design toy implementation covering diagonal gain normalization, symmetric feedback-score greedy merging, and dominant-cycle visibility. The math checks passed: optimized mu matched the predicted cycle gain with maximum absolute error 1.18e-8, imbalance invariance error was 9.27e-9, and the c=1 stability boundary plus clustering transition were confirmed across sweeps. This is a real mechanism-level effect, but not evidence of improved neural task loss or runtime.
- Agent confidence
- 9/10
- Baseline
- Singleton and fixed random partitions left the dominant cycle boundary gain at c^3: 0.125, 0.729, 1.0, 1.331, and 3.375 for c=0.5, 0.9, 1.0, 1.1, and 1.5.
- Idea
- Greedy gain-weighted partition [[0,1,2],[3,4,5]] internalized the dominant cycle for every sweep value, reducing its cross-cluster boundary gain from c^3 to 0.0. Diagonal normalization matched the predicted optimum c with max error 1.18e-8 and removed imbalance dependence with max error 9.27e-9.
Limitations: No block-sparse transformer, recurrent model, CIFAR-10 training, JVP gain estimation, learned q during neural optimization, path dynamic programming, communication cost, wall-clock speed, memory, or task-loss comparison was tested. The cluster result is a graph-level certificate/visibility demonstration and does not reduce the full spectral radius of the original graph.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.16985)
Ahead of the baseline (−5.5%) but not statistically significant (p=0.778, wins 4 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0132
- Idea mean
- 0.0125
- Effect (Δ)
- -0.0007 (−5.5%; negative = idea better)
- Wins
- 4 / 8 paired seeds
- p-value
- 0.778 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±40.8%
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
Only the matched standard dynamics track was tested; no tabular, vision, sequence, or custom track was run. The gain estimator uses input-gradient proxies rather than full block JVPs, clustering is used as a regularization signal rather than an actual sparse communication architecture, and the experiment used a small 400/200 dataset with 5 epochs. The idea and baseline were not forced onto identical execution devices because the canonical baseline train_model may select CUDA while the intervention used CPU for stability.
How to run: cd /home/maxwelhelp/all/math2nn/experiments/exp1042_gain-weighted-cluster-co-design && /home/maxwelhelp/main/bin/python3 bench_experiment.py > bench_report.json
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Implemented gain-weighted co-design for the standard dynamics track using the shared rnn_small architecture, learned exponential timestep normalization, measured model gradients, and greedy gain-based clustering. The idea reduced mean test MSE from 0.0131815 to 0.0124626, but the paired permutation test gave delta=-0.0007189 and p=0.778, hence no significant win. The mechanism signature was confirmed: normalized observed mu=17.1707 versus unscaled mu=18.1659, a 5.48% reduction, but this did not establish improved neural task performance.
- Baseline
- Best lr=0.003; full 8-seed test MSE mean=0.0131814581, std=0.0064111947; per-seed=[0.01743450, 0.00642413, 0.02289337, 0.00446576, 0.01008942, 0.00904593, 0.01367798, 0.02142058]. Baseline sweep means: lr 0.001=0.26463024, 0.003=0.01280444, 0.006=0.01357241.
- Idea
- Best lr=0.003; full 8-seed test MSE mean=0.0124626068, std=0.0066104955; per-seed=[0.01393847, 0.00607969, 0.00940709, 0.00654941, 0.01659300, 0.00961433, 0.00987420, 0.02764466]. Idea sweep means: lr 0.001=0.26719950, 0.003=0.00899367, 0.006=0.01068951. Paired delta=-0.0007188513, 4/8 wins, permutation p=0.778.
Benchmark result
Ahead of the baseline (−5.5%) but not statistically significant (p=0.778, wins 4 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0132
- Idea mean
- 0.0125
- Effect (Δ)
- -0.0007 (−5.5%; negative = idea better)
- Wins
- 4 / 8 paired seeds
- p-value
- 0.778 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±40.8%
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
Only the matched standard dynamics track was tested; no tabular, vision, sequence, or custom track was run. The gain estimator uses input-gradient proxies rather than full block JVPs, clustering is used as a regularization signal rather than an actual sparse communication architecture, and the experiment used a small 400/200 dataset with 5 epochs. The idea and baseline were not forced onto identical execution devices because the canonical baseline train_model may select CUDA while the intervention used CPU for stability.
How to run: cd /home/maxwelhelp/all/math2nn/experiments/exp1042_gain-weighted-cluster-co-design && /home/maxwelhelp/main/bin/python3 bench_experiment.py > bench_report.json
Artifacts
- bench_experiment.py 4.2 KB View Raw
- bench_report.json 2.5 KB View Raw
- experiment.py 5.4 KB View Raw
- report.md 1.6 KB View
- report_bench_2026-08-31T120247.md 5.0 KB View
- results.json 5.2 KB View Raw