Commutant-gated spectral loss
Implementation & benchmark of arXiv:2608.04903 — A commutant gate for spectral fitting through symmetry forced degeneracy
Source paper: A commutant gate for spectral fitting through symmetry forced degeneracy arXiv:2608.04903 ⓘ · analyzed Aug 31, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace per-eigenvector spectral supervision on symmetry-forced multiplets by a projector-trace target determined from the operator family's commutant. Use individual eigenvalue or eigenvector targets only outside detected forced blocks, avoiding arbitrary basis choices and exploding gradients at protected crossings.
Formulas
Mathematical statement
For observed Hermitian operators M_a in C^{n x n}, the linear commutant is C = {C : [C,M_a] = 0 for every a}, where [C,M_a] = C M_a - M_a C. Compute it as the nullspace of the linear map C -> ([C,M_1], ..., [C,M_K]). If C_1, ..., C_r is a Hermitian basis of the commutant, compute its center Z(C) = {Z in C : [Z,C_b] = 0 for every b}. A generic Hermitian element Z of this center has eigenspaces defining structural symmetry blocks and orthogonal projectors P_s. These blocks are determined algebraically rather than by accidental eigenvalue gaps. For an observable A, the block target is tr(P_s A) divided by rank(P_s), whereas a simple-level target is v_i^* A v_i. Proposition 2 gives the instability of the latter: the derivative with respect to a model parameter theta is 2 Re sum over k not equal to i of (v_i^* A v_k)(v_k^* (partial_theta M) v_i)/(lambda_i-lambda_k). At a protected crossing coupled by B = partial_theta M, the gap is 2 times the absolute value of theta_break times the absolute value of v_j^* B v_i, plus O(theta_break^2), so the ungated gradient scales as 1 divided by theta_break. The proposed loss uses block traces for forced sectors and per-level observables for simple sectors.
Implementation notes
First integrate the method as the spectral supervision loss for a network f_phi(x) that predicts a Hermitian matrix M_hat_phi(x) and, optionally, an observable A_hat_phi(x). Do not differentiate through individual eigenvectors for symmetry-forced blocks. If the symmetry is fixed across the dataset, compute the gate once; otherwise recompute it every few epochs from reference operators. For pseudocode, vectorize a complex matrix C into real and imaginary coordinates, construct a real linear constraint matrix L encoding vec(C M_a - M_a C) = 0, and compute L = U Sigma V transpose. Retain right singular vectors with singular value below tau_comm, reshape them into a commutant basis C_b, and Hermitian-symmetrize each basis element. Construct a second constraint matrix encoding vec(Z C_b - C_b Z) = 0, compute its nullspace, draw a random Hermitian linear combination Z of the resulting basis, and eigendecompose Z = Q diag(z) Q conjugate-transpose. Group eigenvalues of Z within tau_center and form P_s = Q_s Q_s conjugate-transpose. During each training step, eigendecompose M_hat. For forced blocks compute tr(P_s A_hat) divided by rank(P_s); for simple sectors compute v_i conjugate-transpose A_hat v_i. Add squared errors to the appropriate reference targets. The mathematical quantities are the two nullspaces, the center element, and the projectors. Estimate tau_comm from known operator noise, initially using c times the estimated noise standard deviation times square root of n, and sweep c. The first experiment should use an MLP predicting 8 by 8 Hermitian matrices in a synthetic two-sector family with a tunable protected crossing. Compare ordinary eigenvector loss, fixed epsilon gap regularization, and this gated loss. Record gradient norms near the crossing, NaN rate, final observable error, and robustness under additive operator noise. Success requires bounded gradients and accurate block observables at the crossing without sacrificing per-level accuracy away from it.
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 commutant and center nullspace extraction, projector construction, and gated block-trace targets in commutant_gate.py. The toy verification confirmed the predicted inverse-gap gradient law exactly (log-log slope -1.000, ratios 1.0 across six gaps), recovered rank-2 forced sectors with zero commutation error, and showed rotation and internal-splitting sensitivity below 1.2e-16 and 0 respectively. This demonstrates the proposed mechanism, though it is not yet a neural-network training win.
- Agent confidence
- 9/10
- Baseline
- Simple-eigenvector observable gradient increased from 10.0 to 3333.33 as gamma decreased from 1e-1 to 3e-4, a 333.3x amplification matching the predicted 1/gamma scaling.
- Idea
- Commutant-gated projectors recovered two rank-2 sectors; block targets were invariant under internal basis rotation (1.11e-16 max error) and unchanged under tested internal splittings (0.0 max change).
Limitations: No MLP training experiment, equal-step loss comparison, additive-noise robustness sweep, CUDA test, finite-epsilon regularization baseline, or large-scale numerical conditioning analysis was performed. The verification uses an exactly known two-sector synthetic family and fixed projectors.
How to run: python3 run_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.04903)
Beats the tuned baseline by 56.7% (p=0.0081, wins 8 / 8 paired seeds; metric: lower is better).
- Benchmark
- Operator_spectral_regression
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 0.0327
- Idea mean
- 0.0142
- Effect (Δ)
- -0.0185 (−56.7%; negative = idea better)
- Wins
- 8 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±5.5%
- Mechanism
- Not confirmed ✗
- Practical effect
- Helps
- Baseline tuning
- swept over 6 configs
The benchmark used a synthetic custom operator-regression task rather than a built-in track because none contained matrix spectral supervision. The mechanism signature probe was inconclusive due to zero measured gradients, and no additive-noise robustness sweep or larger architectures were tested.
How to run: python3 run_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Worked ✓
Agent confidence: 8/10
Implemented a structurally matched custom operator-spectral regression track and trained identical MLP systems differing only in eigenvector versus commutant-projector supervision. Across 8 paired seeds, the gated system achieved lower test MSE (0.01415708 vs 0.03270364), with delta_mean=-0.01854656 and permutation p=0.0081, satisfying the harness criterion. The trained-model mechanism signature was not confirmed because the measured probe gradients were all numerically zero, so the observed win is supported by task performance rather than the inverse-gap signature.
- Baseline
- Test MSE mean 0.03270364 ± 0.00165882; best config lr=0.003, epochs=18, lambda=0.3.
- Delta mean
- -0.018546562525443733
- Idea
- Test MSE mean 0.01415708 ± 0.00050650; best shared-grid config selected from lr={0.001,0.003,0.009}, lambda={0.3,1.0}, epochs=18.
- Idea wins
- 8
- N pairs
- 8
- P value
- 0.0081
Benchmark result
Beats the tuned baseline by 56.7% (p=0.0081, wins 8 / 8 paired seeds; metric: lower is better).
- Benchmark
- Operator_spectral_regression
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 0.0327
- Idea mean
- 0.0142
- Effect (Δ)
- -0.0185 (−56.7%; negative = idea better)
- Wins
- 8 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±5.5%
- Mechanism
- Not confirmed ✗
- Practical effect
- Helps
- Baseline tuning
- swept over 6 configs
The benchmark used a synthetic custom operator-regression task rather than a built-in track because none contained matrix spectral supervision. The mechanism signature probe was inconclusive due to zero measured gradients, and no additive-noise robustness sweep or larger architectures were tested.
How to run: python3 run_bench.py
Artifacts
- bench_report.json 2.9 KB View Raw
- commutant_gate.py 2.5 KB View Raw
- operator_track.py 1.1 KB View Raw
- report.md 1.5 KB View
- report_bench_2026-08-31T210537.md 4.9 KB View
- results.json 0.9 KB View Raw
- run_bench.py 3.9 KB View Raw
- run_experiment.py 3.2 KB View Raw