# Simplex-Preserving Quadratic Markov Layer

- ID: 1626
- Canonical URL: https://synthcore.org/idea/1626/simplex-preserving-quadratic-markov-layer
- API JSON: https://synthcore.org/api/idea/1626.json
- API Markdown: https://synthcore.org/api/idea/1626.md
- Verification status: unverified
- Source: [arXiv:2608.00295](https://arxiv.org/abs/2608.00295)
- Category: dynamics
- Solves: stability, accuracy, generalization
- ML areas: rnn, moe-routing, graph-nn
- Math tags: probability, dynamical-systems, linear-algebra
- Ratings: usefulness 6/10; difficulty 5/10; novelty 7/10

## Idea description

Replace an unconstrained recurrent transition on several probability-valued latent states with a nonlinear Markov operator whose transition coefficients depend on pairwise inner products between the states. Enforce the paper's coefficient margin so the layer preserves nonnegativity and normalization for every input, avoiding exploding or invalid probability states while allowing state-to-state interference.

## Mathematical statement

The paper perturbs finite Markov processes using quadratic interaction terms proportional to inner products of probability vectors. Its sufficient condition is $\sum_{j=1}^{4}|\alpha_{i,j}^{(s)}|\leq \min_{1\leq t\leq 2}\{a_i^{(s,t)}\}$, where $a_i^{(s,t)}$ is a base transition coefficient from source state $t$ to destination state $s$ for process $i$, and $\alpha_{i,j}^{(s)}$ is the signed perturbation coefficient contributed by process $j$ to destination state $s$ of process $i$. For probability vectors $v_i\in\Delta_{K-1}$, their inner products satisfy $0\leq\langle v_i,v_j\rangle\leq1$. Adapt the transition as $T_i^{(s,t)}(v)=a_i^{(s,t)}+\sum_j\alpha_{i,j}^{(s,t)}\langle v_i,v_j\rangle$, followed by $v_i'^{(s)}=\sum_tT_i^{(s,t)}(v)v_i^{(t)}$. If $\sum_s a_i^{(s,t)}=1$ and $\sum_s\alpha_{i,j}^{(s,t)}=0$, every column remains normalized. If $\sum_j|\alpha_{i,j}^{(s,t)}|\leq\min_r a_i^{(s,r)}$, then $T_i^{(s,t)}\geq0$ for every collection of probability inputs, so the update maps the simplex to itself. The paper's fixed-point discussion motivates iterating this nonlinear operator until a stable probabilistic latent configuration is reached.

## Key formulas

- $$\sum_{j=1}^{4}|\alpha_{i,j}^{(s)}|\leq \min_{1\leq t\leq 2}\{a_i^{(s,t)}\}.$$
- $$P(Y(m+1)=a\mid Y(m)=a_m,\ldots,Y(1)=a_1)=P(Y(m+1)=a\mid Y(m)=a_m).$$
- $$T_i^{(s,t)}(v)=a_i^{(s,t)}+\sum_{j=1}^{N}\alpha_{i,j}^{(s,t)}\langle v_i,v_j\rangle,\qquad v_i'^{(s)}=\sum_{t=1}^{K}T_i^{(s,t)}(v)v_i^{(t)}.$$
- $$\sum_{s=1}^{K}a_i^{(s,t)}=1,\qquad \sum_{s=1}^{K}\alpha_{i,j}^{(s,t)}=0,\qquad \sum_{j=1}^{N}|\alpha_{i,j}^{(s,t)}|\leq\min_{r}a_i^{(s,r)}.$$

## Implementation notes

Integrate this as a recurrent latent-state module for a batch of $N$ probability vectors, such as one vector per MoE expert group, graph node, agent, or mixture component. Use tensor shape `[batch, N, K]`, with each row initialized by softmax. Create a learnable nonnegative base transition tensor `A[i,s,t]` and parameterize each source column with a softmax, guaranteeing `sum_s A[i,s,t]=1`. Create an unconstrained interaction tensor `B0[i,j,s,t]`, then enforce zero destination-state sums by setting `B1[i,j,:,t] = B0[i,j,:,t] - mean_s(B0[i,j,:,t])`. Scale it to satisfy the paper's margin: `m = min(A)` and `q = max_{i,s,t}(sum_j abs(B1[i,j,s,t]))`; use `B = rho * m * B1 / (q + eps)`, where `rho=sigmoid(rho_raw)` is at most one. At every recurrent step, compute `G[i,j] = sum_k v[i,k]*v[j,k]`; construct `T[i,s,t] = A[i,s,t] + sum_j B[i,j,s,t]*G[i,j]`; and update `v_new[i,s] = sum_t T[i,s,t]*v[i,t]`. Optionally use `v <- (1-gamma)*v + gamma*v_new`, with `gamma=sigmoid(gamma_raw)`. Renormalize only to remove floating-point error. The paper-derived properties are the column-sum, zero-sum perturbation, and coefficient-margin constraints; the Gram matrix is computed directly from activations. First test a 2-layer GRU replacement on a small sequence-classification benchmark with $N=8$, $K=16$, matched parameter count, and sequence lengths 100 to 500. Compare against a GRU and an independent Markov recurrence. Measure validation accuracy, gradient-norm variance, probability violations, repeated-step convergence, and wall-clock cost. Success means no invalid probabilities, fewer exploding-gradient runs, and equal-or-better accuracy at the same recurrent depth.

## Disclaimer

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