{
 "artifacts": [
  {
   "name": "experiment.py",
   "url": "https://synthcore.org/code/391/experiment.py"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/391/report.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/391/results.json"
  }
 ],
 "category": "dynamics",
 "description": "Add a sensitivity-aware stability monitor and regularizer to an RNN, neural state-space model, or linearized sequence model. Instead of evaluating the model at many perturbed inputs or parameter settings, estimate how each perturbation changes the dominant eigenvalues of the local hidden-state Jacobian, then penalize perturbations predicted to push eigenvalues toward the unit circle. This should improve long-horizon behavior while identifying a quantitative perturbation radius at which instability is expected.",
 "download_zip": "https://synthcore.org/download/391",
 "formulas_latex": [
  "$$\\frac{\\partial z}{\\partial p}=-J^{-1}\\frac{\\partial g}{\\partial p},\\qquad J=\\frac{\\partial g}{\\partial z}.$$",
  "$$\\frac{d\\lambda_i}{dp}=\\frac{w_i^{\\mathsf H}\\left(\\frac{\\partial A}{\\partial p}\\right)v_i}{w_i^{\\mathsf H}v_i},\\qquad Av_i=\\lambda_i v_i,\\quad w_i^{\\mathsf H}A=\\lambda_i w_i^{\\mathsf H}.$$",
  "$$m=1-\\rho(A),\\qquad \\rho(A)=\\max_i|\\lambda_i|,$$",
  "$$\\hat{\\delta}_c=\\min_i\\frac{1-|\\lambda_i|}{\\left|\\operatorname{Re}\\left(e^{-\\mathrm{i}\\arg\\lambda_i}\\frac{d\\lambda_i}{dp}q\\right)\\right|}.$$"
 ],
 "id": 1552,
 "implementation": "1. Exact integration point: use a recurrent cell, diagonal-plus-low-rank state-space model, or neural state-space predictor. During training, select representative hidden states from each minibatch and form the local Jacobian A = partial f_theta / partial h using automatic differentiation, Jacobian-vector products, or an explicit matrix for small hidden dimensions. Treat p as a low-dimensional perturbation such as input mean, input variance, recurrent gain, normalization scale, or a connectivity-mask amplitude. 2. Pseudocode: compute A; obtain the k eigenvalues closest to the unit circle and their left and right eigenvectors; estimate partial A / partial p using finite differences A(p plus epsilon) and A(p minus epsilon), or second-order autodiff; calculate each d lambda_i / d p with the eigenvector formula; compute m and delta_hat_c; add a penalty for m below a target m_0 and optionally a squared sensitivity penalty; backpropagate the task loss plus this penalty. 3. Computed versus estimated: eigenvalues and eigenvectors are computed locally, while derivatives of A may initially be estimated with two additional Jacobian evaluations. The crossing radius is a first-order prediction and must be checked by explicitly recomputing eigenvalues after perturbation. 4. First cheap experiment: compare vanilla tanh RNNs and sensitivity-regularized RNNs on Copy Memory and adding problems with identical hidden size and optimizer. Sweep recurrent-gain and input-statistics perturbations after training. The falsifiable signature is that the measured dominant-eigenvalue crossing occurs within 20 percent of delta_hat_c for sufficiently small perturbations, while the regularized model has a larger median predicted crossing radius and delayed long-horizon error explosion. Also plot the dominant eigenvalue modulus against perturbation size; the initial slope should match the sensitivity estimate.",
 "math_summary": "Let the neural state update be h_(t+1) = f_theta(h_t, u_t), and let A(h_t,u_t) = partial f_theta / partial h be its local state-transition Jacobian. Let lambda_i be a simple eigenvalue of A, with right eigenvector v_i and left eigenvector w_i satisfying A v_i = lambda_i v_i and w_i^H A = lambda_i w_i^H. For a scalar perturbation p, the first-order eigenvalue sensitivity is d lambda_i / d p = [w_i^H (partial A / partial p) v_i] / [w_i^H v_i]. If the operating point z is constrained by g(z,p) = 0, implicit differentiation gives partial z / partial p = -J^(-1)(partial g / partial p), where J = partial g / partial z. Define the discrete-time spectral margin m = 1 - rho(A), where rho(A) is the largest eigenvalue modulus. Along perturbation direction q, estimate the first-order crossing radius delta_hat_c as the smallest ratio between the distance 1 - abs(lambda_i) and the radial eigenvalue drift induced by q. Penalize small margins and large sensitivities.",
 "math_tags": [
  "dynamical-systems",
  "control-theory",
  "spectral-theory",
  "linear-algebra",
  "numerical-analysis"
 ],
 "ml_areas": [
  "rnn",
  "ssm",
  "optimizer",
  "training-dynamics",
  "regularization"
 ],
 "paper": {
  "arxiv_id": "2607.28764",
  "arxiv_url": "https://arxiv.org/abs/2607.28764",
  "summary_what_math_gives_to_ml": "The paper offers a constructive sensitivity pipeline: perturbations in operating conditions or network parameters are propagated through an operating-point Jacobian and then mapped to shifts in closed-loop eigenvalues. Its transferable asset is the first-order eigenvalue perturbation formula, which estimates stability degradation without recomputing eigenvalues at every perturbed operating point. For recurrent or state-space neural networks, the same mechanism can provide a cheap local robustness certificate for how input statistics, layer gains, or connectivity changes move hidden-state eigenvalues. The most direct implementation is a sensitivity-aware spectral-margin regularizer and trust-region controller whose predicted instability boundary is validated against explicit perturbed rollouts.",
  "title": "Sensitivity-Based System Strength Assessment: Mapping Power Flow and Network Topology Perturbations to System Eigenvalues",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 6,
  "novelty": 7,
  "usefulness": 8
 },
 "solves": [
  "stability",
  "accuracy"
 ],
 "title": "Eigenvalue-Sensitivity Stability Margin",
 "url": "https://synthcore.org/idea/1552/eigenvalue-sensitivity-stability-margin",
 "verification": {
  "peer_reviewed": false,
  "stage1_mechanism_check": {
   "worked": false,
   "confidence": 8,
   "verdict": "Built an eigenvalue-sensitivity module with exact local eigensensitivity, finite-difference validation, crossing-radius sweeps, and a CUDA-capable tanh-RNN regularization comparison. The core derivative formula worked extremely well, and the median predicted crossing radius was within 7.7% of the measured crossing, satisfying the stated 20% signal. However, inverse-gain and linear-margin scaling were not confirmed (CV 18.97% and 9.08%), and the RNN comparison was mixed: the idea increased predicted radius from 0.155 to 0.194 and reduced nominal/noise-2 output error, but worsened the gain-perturbed output error and maximum hidden norm, so there is no reliable demonstrated stability win.",
   "metrics": {
    "baseline": "RNN rho=0.8661, predicted crossing radius=0.1545, nominal output tail MSE=0.0877, gain+8% tail MSE=0.2020, noise-2 tail MSE=0.3497",
    "idea": "RNN rho=0.8372, predicted crossing radius=0.1944, nominal output tail MSE=0.0534, gain+8% tail MSE=0.1377, noise-2 tail MSE=0.2915; toy derivative relative error=1.56e-10, median crossing-radius relative error=7.71%, gain-scaling CV=18.97%, margin-scaling CV=9.08%"
   },
   "how_to_run": "python3 experiment.py",
   "files": [
    "experiment.py",
    "results.json",
    "run.log"
   ],
   "limitations": "Only one small tanh-RNN task and one random seed were tested; no Copy Memory benchmark, FLOP-normalized study, repeated-seed statistics, explicit operating-point perturbation distribution, or long-horizon task accuracy metric was evaluated. The training regularizer uses differentiable spectral-radius evaluations at two recurrent gains rather than a full eigenvector-sensitivity penalty for every perturbation direction."
  },
  "status": "mechanism_failed",
  "status_label": "Mechanism failed",
  "updated_at": "2026-08-31T10:53:46",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)",
  "verification_axes": {
   "benchmark_mechanism": {
    "confirmed": null,
    "tested": false
   },
   "practical_benchmark": {
    "beats_baseline": null,
    "tested": false
   },
   "toy_mechanism_gate": {
    "confirmed": false,
    "tested": true
   }
  }
 }
}
