# Positive-envelope stability for complex state updates

- ID: 2784
- Canonical URL: https://synthcore.org/idea/2784/positive-envelope-stability-for-complex-state-updates
- API JSON: https://synthcore.org/api/idea/2784.json
- API Markdown: https://synthcore.org/api/idea/2784.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2608.27939](https://arxiv.org/abs/2608.27939)
- Category: stability
- Solves: stability, accuracy, speedup
- ML areas: ssm, rnn, regularization
- Math tags: linear-algebra, spectral-theory, dynamical-systems
- Ratings: usefulness 7/10; difficulty 4/10; novelty 6/10

## Idea 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.

## Mathematical statement

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.

## Key formulas

- $$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}$$

## Implementation notes

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.

## Verification

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: inconclusive
- 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.

### Mechanism check

- 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.
- Confidence: 9/10
- 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.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.78325
- Paired wins: 6/8
- Benchmark verdict: no significant win

## Artifacts

- [bench_experiment.py](https://synthcore.org/code/1096/bench_experiment.py)
- [bench_report.json](https://synthcore.org/code/1096/bench_report.json)
- [experiment.py](https://synthcore.org/code/1096/experiment.py)
- [report.md](https://synthcore.org/code/1096/report.md)
- [report_bench_2026-09-02T005838.md](https://synthcore.org/code/1096/report_bench_2026-09-02T005838.md)
- [results.json](https://synthcore.org/code/1096/results.json)
- [Download all files as ZIP](https://synthcore.org/download/1096)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
