{
 "artifacts": [
  {
   "name": "bench_experiment.py",
   "url": "https://synthcore.org/code/1096/bench_experiment.py"
  },
  {
   "name": "bench_report.json",
   "url": "https://synthcore.org/code/1096/bench_report.json"
  },
  {
   "name": "experiment.py",
   "url": "https://synthcore.org/code/1096/experiment.py"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1096/report.md"
  },
  {
   "name": "report_bench_2026-09-02T005838.md",
   "url": "https://synthcore.org/code/1096/report_bench_2026-09-02T005838.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1096/results.json"
  }
 ],
 "category": "stability",
 "description": "For a complex-valued recurrent or state-space layer, construct a positive envelope by replacing each factor matrix with its entrywise modulus. The envelope provably upper-bounds every entry of the complex product and therefore gives a cheap conservative estimate of worst-case amplification, while a learned phase-cancellation term can exploit complex interference without allowing unstable growth.",
 "download_zip": "https://synthcore.org/download/1096",
 "formulas_latex": [
  "$$b_{ij}^{\\prime}=\\lvert w_{1}\\rvert+\\lvert w_{2}\\rvert+\\cdots+\\lvert w_{k}\\rvert\\geq\\lvert w_{1}+w_{2}+\\ldots+w_{k}\\rvert=\\lvert b_{ij}\\rvert$$",
  "$$|A_LA_{L-1}\\cdots A_1|\\;\\leq\\;|A_L|\\,|A_{L-1}|\\cdots |A_1|=:P$$",
  "$$|Ax|\\leq P|x|,\\qquad \\|A\\|_{\\infty}\\leq\\|P\\|_{\\infty},\\qquad \\rho(A)\\leq\\rho(P)$$",
  "$$\\mathcal{L}_{\\mathrm{env}}=\\max\\bigl(0,\\log\\rho(P)-\\log\\rho_{\\mathrm{target}}\\bigr)^2+\\beta\\,\\frac{\\|P\\|_1-\\|A\\|_1}{\\|P\\|_1+\\varepsilon}$$"
 ],
 "id": 2784,
 "implementation": "Integrate this into a complex-valued SSM or GRU-style recurrent layer whose transition over one chunk is factored as $A=A_L\\cdots A_1$, preferably using sparse triangular, diagonal, or low-rank factors so the envelope is cheap. At every optimizer step, compute the usual complex transition $A$ and, in parallel, compute $P=|A_L|\\cdots|A_1|$ using differentiable modulus operations. Use the following pseudocode: `P=I; A=I; for k in 1..L: A=A_k@A; P=abs(A_k)@P; y=A@x; v=random_positive_vector(); for j in 1..3: v=P@v; v=v/(norm(v,2)+eps); rhoP=(v@(P@v))/(v@v+eps); loss=task_loss(y,target)+lambda_stab*relu(log(rhoP)-log(rho_target))**2 + beta*(norm(P,1)-norm(A,1))/(norm(P,1)+eps); backprop(loss)`. The paper-derived quantities are the modulus product $P$, the componentwise inequality $|A|\\leq P$, and the spectral-radius upper-bound heuristic; the target radius, penalty weights, and number of power iterations are empirical choices. Begin with a 2-layer complex diagonal-plus-low-rank SSM on sequential MNIST or the adding problem, comparing unconstrained complex training, ordinary spectral normalization, and the envelope penalty at equal hidden size. Measure exploding-gradient frequency, validation loss, long-horizon rollout error, and wall-clock overhead. Success is fewer unstable runs and lower long-horizon error with less than 10% training overhead.",
 "math_summary": "The paper represents a matrix entry as a sum of weighted paths in a planar network. If $B$ is the complex matrix and $B_0$ is obtained by replacing every network parameter by its modulus, then each entry satisfies $|(B)_{ij}|\\leq (B_0)_{ij}$ because $B_{ij}=\\sum_{p:i\\to j}w_p$ and $(B_0)_{ij}=\\sum_{p:i\\to j}|w_p|$. For a product $A=A_L\\cdots A_1$, define the positive envelope $P=|A_L|\\cdots |A_1|$, where $|A_k|$ is entrywise modulus. Repeated application of the triangle inequality gives $|A|\\leq P$ entrywise. Consequently, for any vector $x$, $|Ax|\\leq P|x|$ componentwise, and any induced monotone norm obeys $\\|A\\|\\leq\\|P\\|$. Here $A_k$ are complex transition factors, $P$ is a nonnegative matrix, $x$ is an input or hidden state, and $\\rho(P)$ is the spectral radius of the envelope. Strict inequality can occur when different complex path weights have incompatible phases, so the envelope can distinguish safe cancellation from unsafe magnitude growth.",
 "math_tags": [
  "linear-algebra",
  "spectral-theory",
  "dynamical-systems"
 ],
 "ml_areas": [
  "ssm",
  "rnn",
  "regularization"
 ],
 "paper": {
  "arxiv_id": "2608.27939",
  "arxiv_url": "https://arxiv.org/abs/2608.27939",
  "summary_what_math_gives_to_ml": "The paper develops a constructive comparison between complex matrix products and positive real envelopes using weighted planar networks: replacing every parameter by its modulus turns path sums into sums of absolute path weights, yielding entrywise and minor-wise domination through the triangle inequality. The strict version shows that non-real phases can cause genuine cancellation in selected minors, while the positive envelope preserves all corresponding path contributions. This suggests phase-aware stability certificates and regularizers for complex-valued recurrent, state-space, or deep linear modules: maintain a nonnegative envelope whose growth bounds the complex computation, and explicitly control the gap between the two. The construction is most transferable when the layer is factored into sparse triangular or network-like matrices, where path contributions can be computed efficiently.",
  "title": "Entropy and domination for quasi-Hitchin representations",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 4,
  "novelty": 6,
  "usefulness": 7
 },
 "solves": [
  "stability",
  "accuracy",
  "speedup"
 ],
 "title": "Positive-envelope stability for complex state updates",
 "url": "https://synthcore.org/idea/2784/positive-envelope-stability-for-complex-state-updates",
 "verification": {
  "benchmark": {
   "track": "dynamics",
   "model": "factor_rnn",
   "n_seeds": 8,
   "metric_direction": "lower is better",
   "comparison": {
    "baseline_mean": 0.02109241997823119,
    "idea_mean": 0.022512523224577308,
    "delta_mean": 0.001420103246346116,
    "per_seed_diffs": [
     -0.013116732239723206,
     -0.002148926258087158,
     0.01849733293056488,
     0.02099579479545355,
     -0.0023912396281957626,
     -0.0034691421315073967,
     -0.001653352752327919,
     -0.005352908745408058
    ],
    "idea_wins": 6,
    "n_pairs": 8,
    "p_value": 0.78325,
    "mde": 0.009957143075416026,
    "mde_rel_pct": 47.20721038976311,
    "verdict": "no significant win",
    "system_worked": false
   },
   "baseline": {
    "best_cfg": {
     "beta": 0,
     "epochs": 18,
     "lr": 0.006
    },
    "sweep": [
     {
      "cfg": {
       "beta": 0,
       "epochs": 18,
       "lr": 0.0015
      },
      "mean": 0.11639470420777798
     },
     {
      "cfg": {
       "beta": 0,
       "epochs": 18,
       "lr": 0.003
      },
      "mean": 0.058107024524360895
     },
     {
      "cfg": {
       "beta": 0,
       "epochs": 18,
       "lr": 0.006
      },
      "mean": 0.026168195763602853
     }
    ],
    "full": {
     "mean": 0.02109241997823119,
     "std": 0.014265532680015599,
     "per_seed": [
      0.05811716988682747,
      0.019254598766565323,
      0.013698350638151169,
      0.01360266376286745,
      0.014953133650124073,
      0.012289082631468773,
      0.021011028438806534,
      0.015813332051038742
     ],
     "n": 8
    }
   },
   "idea": {
    "mean": 0.022512523224577308,
    "std": 0.012331270086282655,
    "per_seed": [
     0.04500043764710426,
     0.017105672508478165,
     0.03219568356871605,
     0.034598458558321,
     0.01256189402192831,
     0.008819940499961376,
     0.019357675686478615,
     0.010460423305630684
    ],
    "n": 8
   },
   "mechanism_signature": {
    "config": {
     "beta": 0.02,
     "epochs": 18,
     "lr": 0.006,
     "target": 0.92
    },
    "confirmed": true,
    "max_component_violation": -0.35021981596946716,
    "max_observed_ratio": 0.7172038555145264,
    "metric": 0.04500043764710426,
    "observed_envelope_row_sum": 2.4505488872528076,
    "observed_sum_P": 65.28011322021484,
    "observed_sum_abs_A": 45.71932601928711,
    "predicted_bound": "nonpositive violation",
    "track_structure": "controlled pendulum multi-step dynamics",
    "wall_seconds": 27.75654865699471
   },
   "custom_track": null
  },
  "mechanism_confirmed": true,
  "peer_reviewed": false,
  "practical_verdict": "inconclusive",
  "stage1_mechanism_check": {
   "worked": true,
   "confidence": 9,
   "verdict": "Built a complex two-factor recurrent transition with a differentiable positive envelope, numerical verification, and a matched CUDA training benchmark. The mechanism manifested: across 5,000 random products the maximum entrywise-bound violation was 0, phase-cancellation ratios matched |cos(theta/2)| to floating-point precision, and scalar growth thresholds matched predictions. The envelope model also showed slightly lower long-rollout RMSE with controlled envelope radius, though this is only a small single-seed signal.",
   "metrics": {
    "baseline": "train loss 9.113e-09; long-rollout RMSE 1.019e-04; unstable steps 0; rho(A)=0.481; rho(P)=1.366; 14.04 s",
    "idea": "train loss 8.538e-09; long-rollout RMSE 9.614e-05; unstable steps 0; rho(A)=0.602; rho(P)=0.636; 14.91 s; 6.2% overhead"
   },
   "how_to_run": "python3 experiment.py",
   "files": [
    "experiment.py",
    "results.json",
    "run.log",
    "run2.log",
    "run3.log"
   ],
   "limitations": "Only one small synthetic complex recurrence and one seed were used. Sequential MNIST, the adding problem, ordinary spectral normalization, multi-seed statistics, stress tests, and a larger SSM were not evaluated. The benchmark uses a row-sum envelope penalty as a proxy rather than the full power-iteration spectral-radius loss."
  },
  "status": "mech_ok_no_baseline",
  "status_label": "Mechanism confirmed, baseline not beaten",
  "updated_at": "2026-09-02T00:58:38",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)"
 }
}
