{
 "artifacts": [
  {
   "name": "bench_experiment.py",
   "url": "https://synthcore.org/code/1056/bench_experiment.py"
  },
  {
   "name": "bench_report.json",
   "url": "https://synthcore.org/code/1056/bench_report.json"
  },
  {
   "name": "experiment.py",
   "url": "https://synthcore.org/code/1056/experiment.py"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1056/report.md"
  },
  {
   "name": "report_bench_2026-09-01T232430.md",
   "url": "https://synthcore.org/code/1056/report_bench_2026-09-01T232430.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1056/results.json"
  },
  {
   "name": "spectral_edge.py",
   "url": "https://synthcore.org/code/1056/spectral_edge.py"
  },
  {
   "name": "summary.json",
   "url": "https://synthcore.org/code/1056/summary.json"
  }
 ],
 "category": "dynamics",
 "description": "Use the spectral edge of the effective recurrent Jacobian as an explicit control variable. Scale the recurrent coupling so that its largest effective eigenvalue remains a chosen distance below marginal stability, preserving long memory without allowing exploding states or gradients. The mechanism predicts a sharp change in correlation time and gradient persistence when the estimated edge crosses the critical value.",
 "download_zip": "https://synthcore.org/download/1056",
 "formulas_latex": [
  "$$\\rho(\\lambda)=\\frac{\\sqrt{4\\sigma^2-\\lambda^2}}{2\\pi\\sigma^2},\\qquad \\lambda_+=2\\sigma$$",
  "$$g_c\\lambda_+(J)=1,\\qquad g_c=\\frac{1}{\\lambda_+(J)}\\approx\\frac{1}{2\\sigma}$$",
  "$$C(t)\\propto(g\\lambda_+)^t=\\exp\\!\\left[-\\frac{t}{\\xi}\\right],\\qquad \\xi=-\\frac{1}{\\log(g\\lambda_+)}\\approx\\frac{1}{1-g\\lambda_+}$$",
  "$$g_{t+1}=\\operatorname{clip}\\left(g_t\\exp\\left[\\alpha\\left((1-\\varepsilon)-g_t\\widehat{\\lambda}_{+,t}\\right)\\right],g_{\\min},g_{\\max}\\right)$$"
 ],
 "id": 2744,
 "implementation": "Integrate the controller into a tanh RNN, linear state-space model, or residual sequence block immediately before recurrent multiplication: \\(h_{t+1}=\\phi(g_tWh_t+Ux_t+b)\\). At every training step, estimate the largest singular value or largest real eigenvalue of the local Jacobian with 3--5 power iterations using a fresh Gaussian probe. For tanh, use \\(J_t=D_tW\\), where \\(D_t=\\operatorname{diag}(\\phi'(g_tWh_t+Ux_t+b))\\). Use the estimate \\(\\widehat\\lambda_{+,t}\\) in the multiplicative update, with stop-gradient through the estimate. Pseudocode: initialize \\(g=0.9/\\widehat\\lambda_+\\); unroll one minibatch; compute Jacobian-vector products; run power iteration; update \\(g\\leftarrow g\\exp[\\alpha((1-\\varepsilon)-g\\widehat\\lambda_+)]\\); then backpropagate task loss and update network parameters. The paper supplies the spectral-edge mechanism and critical scaling; finite-width and nonlinear Jacobian edges must be estimated empirically. First test 256-unit tanh RNNs on copy memory and sequential MNIST, comparing standard orthogonal initialization, fixed spectral normalization, and the controller with \\(\\varepsilon\\in\\{0.05,0.1,0.2,0.4\\}\\). Measure hidden autocorrelation, gradient norm versus sequence length, loss, and estimated edge. The quantitative prediction is a stability boundary near \\(g\\widehat\\lambda_+=1\\): below one, correlation time follows \\(\\xi\\approx1/(1-g\\widehat\\lambda_+)\\); above one, state or gradient variance grows rapidly. The measured critical gain should agree with \\(1/\\widehat\\lambda_+\\) within approximately 20%, and the controller should hold the edge near \\(1-\\varepsilon\\).",
 "math_summary": "For a symmetric Wigner coupling matrix W with entry variance \\(\\sigma^2/n\\), the limiting eigenvalue density is \\(\\rho(\\lambda)=\\sqrt{4\\sigma^2-\\lambda^2}/(2\\pi\\sigma^2)\\) on \\([-2\\sigma,2\\sigma]\\), with upper spectral edge \\(\\lambda_+=2\\sigma\\). Consider linearized recurrent dynamics \\(\\delta h_{t+1}=gJ_t\\delta h_t\\), where \\(h_t\\in\\mathbb{R}^n\\) is the hidden state, \\(g\u003e0\\) is a controlled gain, and \\(J_t\\) is the local Jacobian excluding this gain. In the frozen symmetric approximation, marginal stability occurs at \\(g\\lambda_+(J)=1\\), so \\(g_c=1/\\lambda_+(J)\\), approximately \\(1/(2\\sigma)\\) for Wigner disorder. Below this threshold, the dominant correlation decays as \\(C(t)\\propto(g\\lambda_+)^t=\\exp(-t/\\xi)\\), with \\(\\xi=-1/\\log(g\\lambda_+)\\approx1/(1-g\\lambda_+)\\) near criticality. The controller maintains \\(g\\widehat{\\lambda}_+=1-\\varepsilon\\), where \\(\\widehat{\\lambda}_+\\) is an online estimate and \\(\\varepsilon\\in(0,1)\\) is the target stability margin.",
 "math_tags": [
  "statistical-mechanics",
  "random-matrix",
  "spectral-theory",
  "dynamical-systems",
  "bifurcations"
 ],
 "ml_areas": [
  "rnn",
  "ssm",
  "training-dynamics",
  "initialization",
  "optimizer"
 ],
 "paper": {
  "arxiv_id": "2608.26279",
  "arxiv_url": "https://arxiv.org/abs/2608.26279",
  "summary_what_math_gives_to_ml": "The paper identifies a nonstandard critical mechanism: in a large randomly coupled field system, critical behavior is controlled by the eigenvalue density near the spectral edge rather than by microscopic coupling details. For Wigner disorder, the correlation length diverges at criticality while susceptibility can remain finite, and the spherical model has a glass phase whose correlations remain pinned to their critical form. A direct neural-network transfer is to control the spectral edge of recurrent or deep-residual Jacobians, maintaining a prescribed distance from marginality to obtain long memory without unstable states or gradients. The mechanism yields a falsifiable transition in correlation time and gradient persistence when the effective edge crosses one.",
  "title": "Critical Properties and Glass Transitions in Randomly Coupled Fields",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 5,
  "novelty": 6,
  "usefulness": 8
 },
 "solves": [
  "stability",
  "accuracy",
  "generalization"
 ],
 "title": "Spectral-Edge Criticality Controller",
 "url": "https://synthcore.org/idea/2744/spectral-edge-criticality-controller",
 "verification": {
  "benchmark": {
   "track": "dynamics",
   "model": "rnn_small",
   "n_seeds": 8,
   "metric_direction": "lower is better",
   "comparison": {
    "baseline_mean": 0.0031333728547906503,
    "idea_mean": 0.0015523835318163037,
    "delta_mean": -0.0015809893229743466,
    "per_seed_diffs": [
     -0.0009722669492475688,
     -0.002670866437256336,
     0.0012197366449981928,
     -0.0025602002860978246,
     -0.003139118489343673,
     -0.0004906916292384267,
     -0.0020201934967190027,
     -0.0020143139408901334
    ],
    "idea_wins": 7,
    "n_pairs": 8,
    "p_value": 0.0324,
    "mde": 0,
    "mde_rel_pct": null,
    "verdict": "idea better (significant)",
    "system_worked": false
   },
   "baseline": {
    "best_cfg": {
     "epochs": 12,
     "lr": 0.006
    },
    "sweep": [
     {
      "cfg": {
       "epochs": 12,
       "lr": 0.001
      },
      "mean": 0.010470356093719602
     },
     {
      "cfg": {
       "epochs": 12,
       "lr": 0.003
      },
      "mean": 0.005202302592806518
     },
     {
      "cfg": {
       "epochs": 12,
       "lr": 0.006
      },
      "mean": 0.0028439466550480574
     }
    ],
    "full": {
     "mean": 0.0031333728547906503,
     "std": 0,
     "per_seed": [
      0.0017406052211299539,
      0.0037223200779408216,
      0.002092725830152631,
      0.0038201354909688234,
      0.0038962536491453648,
      0.0017676886636763811,
      0.0043351962231099606,
      0.0036920576822012663
     ],
     "n": 0
    }
   },
   "idea": {
    "mean": 0.0015523835318163037,
    "std": 0,
    "per_seed": [
     0.000768338271882385,
     0.0010514536406844854,
     0.0033124624751508236,
     0.0012599352048709989,
     0.0007571351598016918,
     0.0012769970344379544,
     0.002315002726390958,
     0.001677743741311133
    ],
    "n": 0
   },
   "mechanism_signature": {
    "confirmed": true,
    "observed_edge_mean": 0.899786445939283,
    "predicted_target": 0.9,
    "prediction": "controlled effective edge near target below 1",
    "relative_error": 0.0002372822896855463
   },
   "custom_track": null
  },
  "mechanism_confirmed": true,
  "peer_reviewed": false,
  "practical_verdict": "inconclusive",
  "stage1_mechanism_check": {
   "worked": true,
   "confidence": 8,
   "verdict": "Built a spectral-edge controller using power iteration on the local tanh Jacobian and verified the mechanism numerically. The toy sweep found the stability transition between effective edges 0.99 and 1.01, matched the predicted growth slope and correlation time to floating-point precision, and measured Wigner-edge/critical-gain scaling within 4.1%. The controller moved an initial effective edge of 2.0 to the target 0.9, but in the nonlinear recurrence it reduced gradient norm versus the fixed-gain baseline (0.00965 vs 0.219), so this is evidence for control and stability rather than a demonstrated performance win.",
   "metrics": {
    "baseline": "Nonlinear fixed gain: mean effective edge 0.9374, gradient norm 0.21897, final state norm 0.6652",
    "idea": "Online controller target 0.90: mean effective edge 0.9012, final gain 0.9507, gradient norm 0.009651, final state norm 0.5506; toy boundary crossing 0.99-1.01; Wigner edge and gain maximum relative errors 3.89% and 4.04%"
   },
   "how_to_run": "python3 experiment.py",
   "files": [
    "experiment.py",
    "spectral_edge.py",
    "results.json",
    "summary.json"
   ],
   "limitations": "No copy-memory, sequential-MNIST, or trained task experiment was run; the nonlinear test used one small fixed-input tanh recurrence and a symmetric normalized matrix. The toy correlation law uses the exact dominant eigenmode, so its near-zero error validates the formula but does not establish finite-width nonlinear task benefits."
  },
  "status": "mech_ok_no_baseline",
  "status_label": "Mechanism confirmed, baseline not beaten",
  "updated_at": "2026-09-01T23:24:30",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)"
 }
}
