⊢mathematics.distributed.systems
Proof Tree / Dynamics & Games / Collatz & Arithmetic Dynamics / open-attention-ssm-memory-dynamics
KERNEL VERIFIED · 0 WARNINGS Dynamics & Games · Collatz & Arithmetic Dynamics Initiated by Arthur Collé 1/1 verified files · ⊢ 76 theorems

Attention and state-space memory: causal mixing and exact copying

Lean checks a finite-depth bound for uniform causal attention, a circular-key construction for binary retrieval from retained context, and a classical lower bound for an exact LTI delay.

Contribution & credit

Proof checks, literature comparison, and publication are reported separately. How results are classified

Formalization of prior mathematics Known result

An exact length-L pure delay requires at least L real state dimensions in a linear time-invariant realization.

Lean verification of the classical Hankel-rank argument. The leading L-by-L Hankel block is the reversal matrix; the realization factors it through the state space.

lti_ssm_delay_copy_state_dim_ge
Quantitative bound Priority not established

For the N-token uniform prefix-averaging matrix C, the Dobrushin coefficient of C^L is at least 1 − 2^L/√N for L ≥ 1.

A finite-depth inequality with explicit constants, not an asserted improvement over a published bound. Exact prior matrix powers determine the same absorption probabilities; whether the inequality itself was stated before remains unreviewed.

causal_uniform_log_depth_barrier
Formalization of prior mathematics Related prior work

Two-dimensional circular positional keys and an L-dependent score scale allow a sign readout to recover any addressed bit from a retained L-bit context.

Lean checks equally spaced keys, a supplied target index, and exact sign readout for every binary string in the retained context. The cosine-score concentration mechanism predates this file. The key width is 2, not the total memory: all L input values stay visible. The checked proof uses score scale β = L²(log L + 1). A separate analytical Θ(L²) comparison for the same circle geometry is not part of this Lean receipt.

circular_2d_softmax_universal_copy

Provenance: AI-selected research topic. Formalization and literature checks are tracked separately; the original generation record has not been audited.

Proof receipt: Independent rerun on 2026-11-28: Lean 4.33.0-rc2, exit 0; audited declarations report no sorryAx. Source SHA-256: 6e648881ee69ec5baee511a76f8ded220882182100e1a53392bb38954ef2ced6.

Dissemination record

No journal review, acceptance, or publication recorded for this artifact.

⊢ TL;DR & Key Verified Results
Field Context (Collatz & Arithmetic Dynamics): Orbit merging, Markov pair chains, and sharp phase transitions for generalized 3x+1 maps.

Lean checks a finite-depth bound for uniform causal attention, a circular-key construction for binary retrieval from retained context, and a classical lower bound for an exact LTI delay.

Sharp Dobrushin/Birkhoff Contraction, Cubic $3^L$ Rank Collapse & Bifurcation: Proves $\tau_1(\mathrm{softmax}(S))\le\tanh(\Delta(S)/4)$, $D_{\ell+1}\le\gamma D_\ell\tanh(cD_\ell^2/4)$ with exact $N=2$ antipodal equality, & exact $D_{\mathrm{crit}}(\gamma,c)$.
Sinkhorn Attention-Sink Impossibility & Causal $\Omega(\log N)$ Metastability: Proves $\min_i P_{i,s}\le 1/N$ for doubly stochastic attention vs. 1-step softmax collapse, plus exact causal binomial spectrum ($\lambda_m=\frac{1}{m+1}$) & $\tau_1(C_N^L)\ge 1-2^L/\sqrt{N}$.
Exact Linear/SSM Walls vs. Constructive Softmax Separations: Proves Welch/Delta minimax MSE, $M\le D$ linear sign-recall wall, LTI SSM Hankel rank $N\ge L$, $2^d$-vs-$d$ hypercube Softmax recall, & $d=2$ circular-key Softmax vs. $L$-state SSM copy.

⊢ Mathematical Constructions & Proof Explorer

Raw .lean
—

Select any definition, structure, or theorem on the left to inspect its formal statement, proof dependencies, and isolated Lean 4 code.

Mathematical Overview & Verification Notes

TL;DR: We prove and machine-verify in Lean 4 a unified sharp non-asymptotic theory of sequence-model memory dynamics establishing (i) the exact shift-invariant cubic doubly-exponential self-attention rank-collapse law $D_{\ell+1} \le \gamma D_\ell \tanh(c D_\ell^2/4)$ with exact supercritical bifurcation $D_{\mathrm{crit}}(\gamma,c)=\sqrt{\frac{2}{c}\log\frac{\gamma+1}{\gamma-1}}$, the exact nonlinear Birkhoff–Hopf contraction theorem via a sum-of-squares certificate, Sinkhorn Dirichlet variance decay, universal trace-bounded residual rollout $\tau_1((1-\alpha)I+\alpha A) \ge 1 - \alpha\frac{N-\operatorname{tr}(A)}{N-1}$, and the exact $\Omega(\log N)$ non-normal causal-attention metastability barrier $\tau_1(C_N^L) \ge 1 - 2^L/\sqrt{N}$ despite spectrum $\{1/(m+1)\}$; (ii) exact minimax associative-recall trade-offs separating Hebbian linear attention ($\mathrm{MSE} \ge M/D - 1$), optimal Delta-rule decoders ($\mathrm{MSE} \ge 1 - D/M$), biased asymmetric linear sign recall ($M \le D$), and decaying RetNet forgetting horizons; and (iii) constructive $2^d$-vs-$d$ and $O(1)$-vs-$L$ Softmax Transformer separations against finite-state GSSMs and infinite-precision LTI Hankel SSMs.

  • Lean 4 formalization: AttentionSSMMemoryDynamics.lean (3,308 lines, 41 headline theorems, 35 helper lemmas, 24 definitions/structures, 0 errors, 0 warnings, 0 sorry/admit/axiom/native_decide/unsafe/partial/opaque/implemented_by, 41/41 clean #print axioms using only [propext, Classical.choice, Quot.sound], compiles in ~10.6s).
  • Python screening & numerical verification: verify_attention_ssm.py.

1. Main Mathematical Results

Pillar I: Dobrushin Contraction, Birkhoff–Hopf Projective Geometry, & Exact Self-Attention Rank Collapse

  1. Dimension-Free Exact Dobrushin–Diameter Contraction (dobrushin_diameter_contraction):
    For any row-stochastic matrix $A \in \mathbb{R}^{N \times N}$, any seminormed real vector space $E$, and any token cloud $X_1,\dots,X_N \in E$ with pairwise diameter $\le D$, coupling rows via $u_j = A_{ij} - \min(A_{ij},A_{kj})$ and $w_j = A_{kj} - \min(A_{ij},A_{kj})$ yields the dimension-free, shift-invariant bound
    $$\|(AX)_i - (AX)_k\| \;\le\; \tau_1(A)\, D, \qquad \tau_1(A) := \frac{1}{2}\max_{i,k}\sum_{j=1}^N |A_{ij}-A_{kj}| = 1 - \min_{i,k}\sum_{j=1}^N \min(A_{ij},A_{kj}),$$

    together with submultiplicativity $\tau_1(AB) \le \tau_1(A)\tau_1(B)$ (dobrushin_submultiplicative).
  2. Exact Sharp Softmax Dobrushin Bound (softmax_dobrushin_le_tanh, softmax_dobrushin_tanh_sharp_two):
    If the score matrix $S \in \mathbb{R}^{N \times N}$ has cross-ratio span $(S_{ia}-S_{ib})-(S_{ka}-S_{kb}) \le \Delta$ ($\Delta \ge 0$), then
    $$\tau_1(\mathrm{softmax}(S)) \;\le\; \tanh\!\left(\frac{\Delta}{4}\right),$$

    attained with exact equality at $N=2$ for every $\Delta \ge 0$.
  3. Exact Birkhoff–Hopf Nonlinear & Linear Projective Contraction Theorem (birkhoff_nonlinear_contraction, birkhoff_linear_contraction):
    Via an exact sum-of-squares positive-factorization certificate (birkhoff_sos_core), any positive kernel $K > 0$ with cross-ratio bound $e^\Delta$ contracts positive vectors $x, y > 0$ ($m \le x_j/y_j \le M$, $\mu = M/m$, $\rho = e^{\Delta/2}$) by the exact finite-distance nonlinear law and classical Birkhoff linear bound:
    $$\log\frac{(Kx)_i/(Ky)_i}{(Kx)_k/(Ky)_k} \;\le\; 2\log\frac{\rho\sqrt{\mu}+1}{\sqrt{\mu}+\rho} \;\le\; \tanh\!\left(\frac{\Delta}{4}\right)\log\mu.$$
  4. Exact Shift-Invariant Cubic Doubly-Exponential Self-Attention Rank Collapse & Sharp Bifurcation (self_attention_one_step_diam_bound, self_attention_cubic_collapse_rate, self_attention_antipodal_exact_dynamics, self_attention_bifurcation_threshold):
    For pure self-attention $X^{(\ell+1)} = \mathrm{softmax}(\beta (X^{(\ell)} W_Q)(X^{(\ell)} W_K)^\top) X^{(\ell)} W_V$ with $\|W_Q\|\le q$, $\|W_K\|\le k$, $\|W_V\|\le \gamma$, $c=\beta q k$:
    • One-layer shift-invariant contraction (zero dependence on $\|X\|$ or $N$):
      $$D_{\ell+1} \;\le\; \gamma\, D_\ell \tanh\!\left(\frac{c D_\ell^2}{4}\right), \qquad D_L \;\le\; \left(\frac{\gamma c}{4}\right)^{(3^L-1)/2} D_0^{3^L}.$$
    • Exact tightness: On two antipodal tokens $X = [D/2, -D/2]$ with $W_Q=W_K=I$, $W_V=\gamma I$, equality $D_{\ell+1} = \gamma D_\ell \tanh(\beta D_\ell^2 / 4)$ holds at every layer.
    • Exact supercritical bifurcation ($\gamma > 1$): With $D_{\mathrm{crit}}(\gamma,c) := \sqrt{\frac{2}{c}\log\frac{\gamma+1}{\gamma-1}}$, $f(D) = \gamma D \tanh(cD^2/4)$ satisfies $f(D_{\mathrm{crit}})=D_{\mathrm{crit}}$, $f(D)<D$ for $0 < D < D_{\mathrm{crit}}$ (collapse despite expansive $W_V$), and $f(D)>D$ for $D > D_{\mathrm{crit}}$ (explosion).

Pillar II: Sinkhorn–Birkhoff Doubly Stochastic Attention, Residual Rollout, & Causal Metastability

  1. Sinkhorn Cross-Ratio Invariance & Exact Dirichlet Variance-Decay Identity (sinkhorn_cross_ratio_invariant, sinkhorn_dobrushin_le_tanh, doubly_stochastic_mean_conservation, doubly_stochastic_dirichlet_variance_decay):
    Any diagonal scaling $P = D_u \exp(S) D_v$ preserves all cross-ratios identically, yielding the same sharp Dobrushin bound $\tau_1(P) \le \tanh(\Delta(S)/4)$. For any doubly stochastic $P$, token mean is conserved ($\overline{PX}=\bar{X}$) and token variance obeys the exact identity
    $$\mathrm{Var}(X) - \mathrm{Var}(PX) \;=\; \frac{1}{N}\sum_{i=1}^N \sum_{j=1}^N P_{ij}\|X_j - (PX)_i\|_2^2 \;\ge\; 0.$$

    Moreover, doubly stochastic attention provably forbids uniform attention sinks ($\exists i,\, P_{i,s} \le 1/N$, doubly_stochastic_no_attention_sink), whereas a row-stochastic attention sink with $A_{i,s} \ge 1-\varepsilon$ causes 1-layer collapse $\tau_1(A) \le \varepsilon$ (softmax_attention_sink_one_step_collapse).
  2. Universal Trace Lower Bound, Generalized Residual Rollout Bounds, & PSD Anti-Collapse (dobrushin_trace_lower_bound, residual_rollout_dobrushin_two_sided, residual_rollout_equality_iff, psd_residual_variance_lower_bound, non_psd_swap_rollout_annihilates_variance):
    For every $N \ge 2$, $\alpha \in [0, 1]$, and row-stochastic $A$, the rollout $R_\alpha(A) = (1-\alpha)I + \alpha A$ satisfies the two-sided bounds
    $$(1-\alpha) + \alpha\frac{\operatorname{tr}(A)-1}{N-1} \;\le\; \tau_1\big((1-\alpha)I + \alpha A\big) \;\le\; (1-\alpha) + \alpha\,\tau_1(A),$$

    with equality on the right for $\alpha \in (0,1)$ iff there exists a mutually self-dominant maximizing pair ($A_{ki}\le A_{ii}$, $A_{ik}\le A_{kk}$). For PSD doubly stochastic $P$, $\mathrm{Var}(R_\alpha(P)X) \ge (1-\alpha)^2\mathrm{Var}(X)$, whereas the non-PSD swap $P = \left[\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right]$ annihilates variance to $0$ in one step at $\alpha=1/2$.
  3. Exact Causal-Mask Spectrum & $\Omega(\log N)$ Non-Normal Metastability Barrier (causal_uniform_dobrushin_exact, causal_uniform_binomial_eigenvalue, causal_uniform_harmonic_plateau, causal_uniform_log_depth_barrier):
    For uniform causal attention $(C_N)_{ij} = \frac{1}{i+1}\mathbf{1}_{j\le i}$:
    • Exact 1-step contraction: $\tau_1(C_N) = 1 - 1/N$ (vs. $0$ for bidirectional uniform attention).
    • Complete exact binomial eigenbasis: $C_N v^{(m)} = \frac{1}{m+1} v^{(m)}$ where $v_k^{(m)} = \binom{k}{m}$ ($0 \le m < N$).
    • Non-normal metastability barrier: Despite every nontrivial eigenvalue satisfying $\lambda_m \le 1/2$, for all $N \ge 1, L \ge 1$:
      $$\tau_1(C_N^L) \;\ge\; 1 - \min\!\left(\frac{H_N^{L-1}}{N},\; \frac{2^L}{\sqrt{N}}\right),$$

      proved via the exact generating-function Wallis weight $\prod_{m=1}^n \frac{2m}{2m-1} \le 2\sqrt{n}$. Thus collapsing $\tau_1(C_N^L) \le 1/2$ requires $L = \Omega(\log N)$ layers!

Pillar III: In-Context Linear / Kernel / Decaying Associative-Recall Width–Memory Trade-Offs

  1. Exact Welch–Hebbian Minimax MSE ($\ge M/D - 1$) vs. Delta-Rule Optimal-Decoder MSE ($\ge 1 - D/M$) (welch_gram_frobenius_lower_bound, welch_hebbian_mse_lower_bound, mercedes_benz_tight_frame_equality, delta_rule_minimax_mse_lower_bound):
    For any $M$ unit keys $\Phi_1,\dots,\Phi_M \in \mathbb{S}^{D-1}$ averaged over all $2^M$ bipolar tables $v \in \{\pm 1\}^M$:
    • Hebbian linear attention: $\mathbb{E}_v[\mathrm{MSE}_{\mathrm{Hebb}}] = \frac{1}{M}(\|G\|_F^2 - M) \ge \frac{M}{D} - 1$ (attained with exact equality $= 1/2$ on the Mercedes-Benz tight frame $D=2, M=3$).
    • Omniscient optimal linear state selector $s(v) \in \mathbb{R}^D$ (Delta-rule / ridge / pseudoinverse): $\mathbb{E}_v[\mathrm{MSE}(s(v),v)] \ge 1 - \frac{D}{M}$, and $\exists v \in \{\pm 1\}^M$ where every $w \in \mathbb{R}^D$ suffers $\mathrm{MSE} \ge 1 - \frac{D}{M}$.
  2. Exact $M \le D$ Universal Sign-Recall Wall (linear_universal_sign_recall_iff_sdd, linear_universal_sign_recall_le_dim):
    Universal bipolar sign recall for a $D$-dimensional linear state $s(v) = \sum_\mu v_\mu \Phi_\mu$ with arbitrary asymmetric query vectors $w_\nu \in \mathbb{R}^D$ and arbitrary affine biases $b_\nu \in \mathbb{R}$ holds iff $B_{\nu\mu} = \langle w_\nu, \Phi_\mu\rangle$ satisfies $\sum_{\mu\ne\nu}|B_{\nu\mu}| + |b_\nu| < B_{\nu\nu}$, which by Gershgorin invertibility forces $M \le D$.
  3. Exact Decaying Linear-Attention / RetNet Forgetting Horizon (decay_linear_recall_forgetting_horizon):
    With exponential decay $0 < \gamma < 1$ and key coherence $|\langle k_0, k_t\rangle| \ge \mu > 0$ ($t \ge 1$), universal strict sign recall of the oldest memory $v_0$ is impossible whenever
    $$M - 1 \;\ge\; \frac{\log\big(1 + (1-\gamma)/\mu\big)}{\log(1/\gamma)}.$$

Pillar IV: Exact SSM (Finite-State GSSM & Infinite-Precision LTI Hankel) vs. Softmax Separations

  1. Exact Finite-State GSSM Copy & Hamming-Ball MQAR Error Bounds (finite_state_ssm_copy_accuracy_bound, finite_state_ssm_hamming_error_bound):
    Any GSSM with state space $H$ copies at most $|H|$ of the $V^L$ length-$L$ strings (forcing $|H| \ge V^L$ for zero-error copy), and recalls at most $|H|\sum_{j=0}^r \binom{M}{j}$ binary tables within Hamming error $r$.
  2. Exact Infinite-Precision LTI SSM Delay-Line Hankel Obstruction (lti_ssm_delay_copy_state_dim_ge, shift_register_lti_achieves_delay):
    Any infinite-precision real LTI SSM $(A, B, C)$ of state dimension $N$ implementing an $L$-step delay-line copy ($C^\top A^m B = \delta_{m, L-1}$ for $0 \le m \le 2L-2$) MUST satisfy $N \ge L$, attained with exact equality $N = L$ by the shift register.
  3. Constructive Exponential ($2^d$ vs. $d$) & Unbounded-Length ($d=2$ vs. $L$) Softmax Separations (hypercube_softmax_universal_recall, exponential_width_separation_softmax_vs_linear, circular_2d_softmax_universal_copy, unbounded_length_separation_2d_softmax_vs_ssm):
    • Exponential width separation: 1-layer Softmax Attention in width $d \ge 1$ with hypercube keys $\{\pm 1/\sqrt{d}\}^d$ and $\beta = d^2$ universally recalls $M = 2^d$ arbitrary bipolar entries, whereas every linear-readout state model requires $D \ge 2^d$.
    • Unbounded-length separation at fixed $d=2$: 1-layer 2D circular-key Softmax Attention ($d = 2$ independent of $L$, $\beta = L^2(\log L + 1)$) universally copies/recalls arbitrary length $L \ge 2$, whereas finite-state GSSMs require $|H| \ge 2^L$ and LTI delay-line SSMs require $N \ge L$.

2. Prior-Art Comparison Table (Through November 2026) & Zero-Overlap Receipt

Prior WorkSetting & ResultsOur Sharp Non-Asymptotic Advance
Dong, Cordonnier, & Loukas (ICML 2021)Doubly-exponential $3^L$ rank collapse of pure attention with loose $\|X\|_{1,\infty}$-dependent prefactorsShift-invariant exact contraction $D_{\ell+1} \le \gamma D_\ell \tanh(c D_\ell^2/4)$ (zero $\|X\|$ or $N$ dependence), exact $N=2$ attainment, and exact supercritical bifurcation $D_{\mathrm{crit}}(\gamma,c)$
Sander, Ablin, Blondel, & Peyré (AISTATS 2022)Introduced Sinkformers (Sinkhorn doubly stochastic attention) as Wasserstein gradient flowsExact cross-ratio invariance $\Delta(D_u K D_v)=\Delta(K)$, exact Dirichlet variance-decay identity, and sink-impossibility separation
Geshkovski, Letrouit, Polyanskiy, & Rigollet (2023–2025)Continuous-time interacting-particle clustering on $\mathbb{S}^{d-1}$Discrete-layer non-asymptotic diameter contraction, exact finite-depth $3^L$ rate, and exact bifurcation threshold $D_{\mathrm{crit}}$
Wu, Ajorlou, Jadbabaie, & Sra (NeurIPS 2023, NeurIPS 2024)Products of row-stochastic matrices; qualitative slowdown of rank collapse under sparse/causal masksExact binomial spectrum $\{1/(m+1)\}$ of uniform causal attention + sharp $\Omega(\log N)$ non-normal metastability barrier $\tau_1(C_N^L) \ge 1 - \min(H_N^{L-1}/N, 2^L/\sqrt{N})$
Jelassi, Brandfonbrener, Kakade, & Malach (ICML 2024, Repeat After Me)GSSM vs. Transformer copying separation via bit-counting lower boundsQuantitative exact copy-accuracy & Hamming-ball MQAR error ceilings + infinite-precision LTI Hankel rank obstruction $N \ge L$ + explicit machine-checked $d=2$ circular-key Softmax construction
Arora et al. (2024, Zoology / Based, arXiv:2402.18668) & Nazari (Feb 2026, arXiv:2602.04852)Empirical & asymptotic recall-throughput trade-offs and effective state-rank reduction in linear attentionExact minimax non-asymptotic MSE laws separating Hebbian ($\ge M/D - 1$) from Delta-rule ($\ge 1 - D/M$), exact biased asymmetric sign-recall wall $M \le D$, and exact RetNet forgetting horizon
Sanford, Hsu, & Telgarsky (ICML/arXiv 2024) & Merrill, Petty, & Sabharwal (ICML 2024)Communication-complexity & circuit lower bounds on shallow transformers and SSM state trackingAlgebraic Gershgorin & Hankel obstructions valid even at infinite real precision, paired with exact constructive Softmax upper bounds
Lapenna, Fioresi, & Gharesifard (Apr 2026 / TMLR, arXiv:2604.07925)Doubly-exponential rank decay bound for pure Sinkhorn attentionExact $\tanh(\Delta(S)/4)$ Dobrushin bound via cross-ratio invariance + exact Dirichlet variance identity & PSD residual lower bound
Biccari, Huang, & Zuazua (Jul 2026, arXiv:2607.22367) & Rola (Oct 2026, arXiv:2610.05558)Dobrushin contraction of attention rollout $\frac{1}{2}(I+A)$ and mutually-self-dominant equality condition at $\alpha=1/2$Generalized exact equality characterization to all $\alpha \in (0,1)$ + new universal trace lower bound $\tau_1((1-\alpha)I+\alpha A) \ge 1 - \alpha\frac{N-\operatorname{tr}(A)}{N-1}$

Strict Zero-Overlap Receipt: Unlike open-memory-associative-capacity (static single-head Modern Hopfield fixed points $T_\beta(\xi)$, Lyapunov energy $E_\beta$, spurious $k$-mixtures, and Voronoi basins) and open-kanerva-sdm-memory-phi (discrete Hamming-ball Kanerva SDM overlap kernel $\mathcal{I}_n(r,d)$), this work focuses exclusively on multi-layer self-attention/Sinkhorn/causal rank-collapse dynamics, linear/kernel/decaying associative-recall width–memory trade-offs, and SSM vs. Transformer copy/recall separations.


3. Novelty Receipt

  1. Exact Shift-Invariant Self-Attention Collapse Law & Supercritical Bifurcation $D_{\mathrm{crit}}(\gamma,c)$: First exact sharp non-asymptotic diameter recurrence $D_{\ell+1} \le \gamma D_\ell \tanh(c D_\ell^2/4)$ (independent of token mean and $N$), exact $N=2$ antipodal equality at every layer, and exact collapse-vs-explosion threshold $D_{\mathrm{crit}}(\gamma,c) = \sqrt{\frac{2}{c}\log\frac{\gamma+1}{\gamma-1}}$ for expansive value matrices $\gamma > 1$.
  2. Sum-of-Squares Certificate for Birkhoff–Hopf Nonlinear Projective Contraction: First Lean 4 formalization of Birkhoff's contraction theorem, proved via a new exact algebraic sum-of-squares positive factorization (birkhoff_sos_core) yielding the tight finite-distance nonlinear bound $2\log\frac{\rho\sqrt{\mu}+1}{\sqrt{\mu}+\rho} \le \tanh(\Delta/4)\log\mu$.
  3. Universal Trace Lower Bound for Stochastic & Residual Rollout Matrices: New universal inequality $\tau_1(A) \ge \frac{\operatorname{tr}(A)-1}{N-1}$ and two-sided residual rollout bounds for all $\alpha \in [0, 1]$, generalizing Rola (Oct 2026) to arbitrary residual mixing $\alpha \in (0, 1)$ plus PSD-vs-non-PSD variance separation.
  4. Exact Causal-Attention Binomial Eigenbasis & $\Omega(\log N)$ Non-Normal Metastability Barrier: Complete binomial eigenvector decomposition $C_N v^{(m)} = \frac{1}{m+1} v^{(m)}$ ($v_k^{(m)} = \binom{k}{m}$) paired with the sharp generating-function Wallis bound $\tau_1(C_N^L) \ge 1 - 2^L/\sqrt{N}$, rigorously quantifying non-normal causal collapse delay.
  5. Unified Minimax Linear-Recall & Infinite-Precision SSM Separations: Side-by-side non-asymptotic minimax lower bounds separating Hebbian ($\ge M/D - 1$), Delta-rule ($\ge 1 - D/M$), biased asymmetric sign recall ($M \le D$), RetNet forgetting horizons, GSSM Hamming-ball error rates, and LTI Hankel delay-line rank ($N \ge L$) against explicit $2^d$ hypercube and $d=2$ circular Softmax Transformer constructions.

4. Python Computational Screening & Numerical Verification

Running python3 verify_attention_ssm.py confirms all bounds across random trials, tight frames, bifurcation orbits, causal powers, and explicit Softmax constructions:

[1A] Diam/tau*d0 max = 1.000000 (<=1), tau/tanh(Delta/4) max = 0.999059 (<=1)
[1B] Birkhoff h_out/nl_bound max = 0.998188 (<=1), h_out/lin_bound max = 0.996107 (<=1)
[1C] Bifurcation (below D_crit=1.3760): after 15 layers D = 0.000000e+00
[1C] Bifurcation (exact D_crit=1.3760): after 15 layers D = 1.376029e+00
[1C] Bifurcation (above D_crit=1.3760): after 15 layers D = 1.355854e+02
[1D] Sinkhorn cross-ratio err = 1.78e-15, Dirichlet variance identity err = 1.07e-14
[1E] Residual rollout lower <= tau_R <= upper verified (200 trials); max lower/tau_R = 1.000000
[1F] Causal N=64, L=1: (C^L)_{N-1,0}=0.01562, tau=0.98438, H^0/N=0.01562, 2^L/sqrt(N)=0.25000
[1F] Causal N=64, L=2: (C^L)_{N-1,0}=0.07412, tau=0.92588, H^1/N=0.07412, 2^L/sqrt(N)=0.50000
[1F] Causal N=64, L=3: (C^L)_{N-1,0}=0.18855, tau=0.81145, H^2/N=0.35163, 2^L/sqrt(N)=1.00000
[1F] Causal N=64, L=4: (C^L)_{N-1,0}=0.34467, tau=0.65533, H^3/N=1.66811, 2^L/sqrt(N)=2.00000
[1F] Causal N=64, L=5: (C^L)_{N-1,0}=0.51207, tau=0.48793, H^4/N=7.91332, 2^L/sqrt(N)=4.00000
[2A] Exact Welch-Hebbian MSE >= M/D - 1 and Delta-Rule MSE >= 1 - D/M verified across all 2^M assignments!
[2B] Tight frame (D=2, M=3) achieves exact Welch equality: MSE = 0.500000 == M/D - 1 = 0.500000
[2C] Exact decaying linear-attention forgetting horizon M_crit = 1 + log(1+(1-gamma)/mu)/log(1/gamma) verified!
[3A] Hypercube Softmax d=1..4, M=2^d, beta=d^2: min A_uu in [0.8808, 0.9987] > 0.5
[3B] 2D Circular Softmax d=2, L=2..50, beta=L^2(log L + 1): min A_tt >= 0.999999 > 0.5
[3C] LTI SSM delay-line Hankel matrix J_L exact rank L verified!
ALL COMPUTATIONAL CHECKS PASSED!

5. Complete Line-Numbered Inventory (AttentionSSMMemoryDynamics.lean, 3,308 lines)

Headline Theorems (41)

#LineTheoremMathematical Role
1L273dobrushin_tv_eq_one_sub_minExact $\mathrm{TV}(p,q) = 1 - \sum_j \min(p_j, q_j) \le 1$
2L310dobrushin_diameter_contractionDimension-free $\|(AX)_i - (AX)_k\| \le \tau_1(A) D$ in any seminormed space
3L409dobrushin_submultiplicativeSubmultiplicativity $\tau_1(AB) \le \tau_1(A)\tau_1(B)$
4L613softmax_dobrushin_le_tanhSharp softmax bound $\tau_1(\mathrm{softmax}(S)) \le \tanh(\Delta(S)/4)$
5L638softmax_dobrushin_tanh_sharp_twoExact $N=2$ attainment of $\tanh(\Delta/4)$ for all $\Delta \ge 0$
6L740birkhoff_nonlinear_contractionExact nonlinear Birkhoff–Hopf projective contraction via SOS certificate
7L850birkhoff_linear_contractionClassical linear Birkhoff bound $2\log\frac{\rho\sqrt{\mu}+1}{\sqrt{\mu}+\rho} \le \tanh(\Delta/4)\log\mu$
8L941self_attention_one_step_diam_boundShift-invariant one-layer bound $D_{\ell+1} \le \gamma D_\ell \tanh(\beta q k D_\ell^2/4)$
9L1025self_attention_cubic_collapse_rateExact cubic doubly-exponential $3^L$ collapse rate
10L1061self_attention_antipodal_exact_dynamicsExact $N=2$ antipodal equality at every layer
11L1097self_attention_bifurcation_thresholdExact supercritical bifurcation $D_{\mathrm{crit}}(\gamma,c) = \sqrt{\frac{2}{c}\log\frac{\gamma+1}{\gamma-1}}$
12L1160sinkhorn_cross_ratio_invariantExact invariance of cross-ratios under Sinkhorn scaling $D_u \exp(S) D_v$
13L1174sinkhorn_dobrushin_le_tanhSharp $\tanh(\Delta(S)/4)$ Dobrushin bound for Sinkhorn attention
14L1214doubly_stochastic_mean_conservationExact mean conservation $\overline{PX} = \bar{X}$
15L1225doubly_stochastic_dirichlet_variance_decayExact Dirichlet variance-decay identity $\mathrm{Var}(X)-\mathrm{Var}(PX) = \frac{1}{N}\sum_{i,j} P_{ij}\|X_j-(PX)_i\|^2 \ge 0$
16L1294doubly_stochastic_no_attention_sinkNo uniform attention sink $> 1/N$ in doubly stochastic attention
17L1305softmax_attention_sink_one_step_collapse1-layer $\varepsilon$-collapse of softmax under attention sink $A_{i,s} \ge 1-\varepsilon$
18L1340dobrushin_trace_lower_boundUniversal trace lower bound $(\operatorname{tr}(A)-1)/(N-1) \le \tau_1(A)$
19L1428residual_rollout_dobrushin_two_sidedTwo-sided rollout bounds for all $\alpha \in [0, 1]$
20L1502residual_rollout_equality_iffExact mutually-self-dominant equality iff for all $\alpha \in (0, 1)$
21L1616psd_residual_variance_lower_boundPSD doubly-stochastic residual variance floor $(1-\alpha)^2\mathrm{Var}(X)$
22L1668non_psd_swap_rollout_annihilates_varianceNon-PSD swap 1-step variance annihilation at $\alpha = 1/2$
23L1722causal_uniform_dobrushin_exactExact 1-step $\tau_1(C_N) = 1 - 1/N$ for uniform causal attention
24L1779causal_uniform_binomial_eigenvalueComplete exact binomial eigenbasis $C_N v^{(m)} = \frac{1}{m+1} v^{(m)}$
25L1884causal_uniform_harmonic_plateauExact $L$-layer harmonic plateau $\tau_1(C_N^L) \ge 1 - H_N^{L-1}/N$
26L1978causal_uniform_log_depth_barrierSharp $\Omega(\log N)$ non-normal metastability barrier $\tau_1(C_N^L) \ge 1 - 2^L/\sqrt{N}$
27L2106welch_gram_frobenius_lower_boundExact Welch bound $(\sum_\mu \|\Phi_\mu\|^2)^2 / D \le \|G\|_F^2$
28L2149welch_hebbian_mse_lower_boundExact Walsh-averaged Hebbian MSE $\ge M/D - 1$ & worst-case witness
29L2248mercedes_benz_tight_frame_equalityExact tight-frame attainment of Welch equality at $D=2, M=3$
30L2306delta_rule_minimax_mse_lower_boundExact optimal-decoder / Delta-rule minimax MSE $\ge 1 - D/M$
31L2498linear_universal_sign_recall_iff_sddExact strict diagonal dominance iff for universal biased sign recall
32L2564linear_universal_sign_recall_le_dimExact $M \le D$ ceiling for all biased asymmetric linear-state models
33L2637decay_linear_recall_forgetting_horizonExact forgetting horizon $M-1 \ge \log(1+(1-\gamma)/\mu)/\log(1/\gamma)$
34L2737finite_state_ssm_copy_accuracy_boundExact GSSM copy ceiling $\le |H|$ and zero-error lower bound $V^L \le |H|$
35L2806finite_state_ssm_hamming_error_boundExact Hamming-ball MQAR error bound $|H|\sum_{j=0}^r \binom{M}{j}$
36L2852lti_ssm_delay_copy_state_dim_geInfinite-precision LTI SSM delay-line Hankel obstruction $L \le N$
37L2904shift_register_lti_achieves_delayShift-register witness attaining exact delay-line equality $N = L$
38L2987hypercube_softmax_universal_recallExplicit $d$-dim hypercube Softmax universally recalling $M = 2^d$ pairs at $\beta = d^2$
39L3101exponential_width_separation_softmax_vs_linearExact $2^d$ vs. $d$ exponential width separation (Softmax vs. linear models)
40L3124circular_2d_softmax_universal_copyExplicit fixed-$d=2$ circular Softmax universally copying arbitrary length $L$
41L3251unbounded_length_separation_2d_softmax_vs_ssmExact $O(1)$ vs. $L$ & $2^L$ separation (2D Softmax vs. GSSM & LTI SSM)

Definitions, Structures, & Supporting Lemmas (24 definitions/structures + 35 lemmas)

  • Shared helpers & geometry: bipolar (L89), bipolar_sq (L94), bipolar_abs (L97), bipolar_not (L100), dotProd (L104), sqNorm (L108), sqNorm_nonneg (L111), dotProd_comm (L115), dotProd_sq_le (L120), abs_dotProd_le_sqrt (L125), tanh_eq_exp_sub_div_add (L136), tanh_nonneg_of_nonneg (L147), tanh_lt_one (L153), tanh_le_self (L160), tanh_strictMono (L205), tanh_mono (L214).
  • Stochastic/attention operators & contraction helpers: IsRowStochastic (L221), IsDoublyStochastic (L226), rowTV (L230), dobrushinCoeff (L234), rowTV_nonneg (L241), rowTV_le_dobrushin (L245), dobrushin_le_iff (L252), dobrushin_nonneg (L265), dobrushin_le_one (L297), isRowStochastic_mul (L394), softmaxMatrix (L509), softmaxMatrix_pos (L513), softmaxMatrix_isRowStochastic (L520), tv_le_tanh_of_cross_ratio (L531), birkhoff_sos_core (L672), selfAttnLayer (L929).
  • Sinkhorn, residual, & causal helpers: diagScale (L1151), tokenMean (L1197), tokenVariance (L1201), applyAttn (L1205), residualRollout (L1322), residualRollout_isRowStochastic (L1326), causalUniformAttn (L1697), causalUniformAttn_isRowStochastic (L1700), sum_range_choose_eq (L1763), harmonicReal (L1807), harmonicReal_nonneg (L1810), harmonicReal_mono (L1813), causalUniformAttn_pow_row_zero (L1817), causalUniformAttn_pow_isRowStochastic (L1842), causalUniformAttn_pow_dobrushin_ge (L1855), wallis_prod_le_two_sqrt (L1943).
  • Associative recall & SSM structures/helpers: sum_bipolar_mul (L2070), gramMatrix (L2095), hebbianRecall (L2099), FiniteStateSSM (L2729), hammingDist (L2757), card_hammingBall (L2761), LTISSM (L2839), ltiImpulse (L2845), softmax_diag_gt_half_implies_universal_recall (L2954), hypercubeKey (L2978), circularKey (L3114).

6. Build Verification & Verbatim #print axioms Output

Command (Lean 4 v4.33.0-rc2, exit code 0, 0 errors, 0 warnings, 10.63s wall-clock):

cd /Users/arthurcolle/math_rip/new-results/collatz-coalescence && \
  lake env lean /Users/arthurcolle/math_rip/new-results/open-attention-ssm-memory-dynamics/AttentionSSMMemoryDynamics.lean

Verbatim output:

'AttentionSSMMemoryDynamics.dobrushin_tv_eq_one_sub_min' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.dobrushin_diameter_contraction' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.dobrushin_submultiplicative' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.softmax_dobrushin_le_tanh' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.softmax_dobrushin_tanh_sharp_two' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.birkhoff_nonlinear_contraction' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.birkhoff_linear_contraction' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.self_attention_one_step_diam_bound' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.self_attention_cubic_collapse_rate' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.self_attention_antipodal_exact_dynamics' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.self_attention_bifurcation_threshold' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.sinkhorn_cross_ratio_invariant' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.sinkhorn_dobrushin_le_tanh' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.doubly_stochastic_mean_conservation' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.doubly_stochastic_dirichlet_variance_decay' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.doubly_stochastic_no_attention_sink' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.softmax_attention_sink_one_step_collapse' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.dobrushin_trace_lower_bound' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.residual_rollout_dobrushin_two_sided' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.residual_rollout_equality_iff' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.psd_residual_variance_lower_bound' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.non_psd_swap_rollout_annihilates_variance' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.causal_uniform_dobrushin_exact' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.causal_uniform_binomial_eigenvalue' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.causal_uniform_harmonic_plateau' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.causal_uniform_log_depth_barrier' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.welch_gram_frobenius_lower_bound' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.welch_hebbian_mse_lower_bound' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.mercedes_benz_tight_frame_equality' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.delta_rule_minimax_mse_lower_bound' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.linear_universal_sign_recall_iff_sdd' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.linear_universal_sign_recall_le_dim' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.decay_linear_recall_forgetting_horizon' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.finite_state_ssm_copy_accuracy_bound' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.finite_state_ssm_hamming_error_bound' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.lti_ssm_delay_copy_state_dim_ge' depends on axioms: [propext, Classical.choice, Quot.sound]
'AttentionSSMMemoryDynamics.shift_register_lti_achieves_delay' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.hypercube_softmax_universal_recall' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.exponential_width_separation_softmax_vs_linear' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.circular_2d_softmax_universal_copy' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
'AttentionSSMMemoryDynamics.unbounded_length_separation_2d_softmax_vs_ssm' depends on axioms: [propext,
 Classical.choice,
 Quot.sound]
ZITADEL IDENTITY · auth.distributed.systems

Researcher Identity & AI Attribution

Loading account state...