Margulis-Balanced Expanding Recurrent Layer
Implementation & benchmark of arXiv:2607.13556 — Margulis Measures on Expanding Foliations: Construction and Rigidity
Source paper: Margulis Measures on Expanding Foliations: Construction and Rigidity arXiv:2607.13556 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Add a regularizer to a recurrent or state-space transition that makes its expansion along a learned one-dimensional direction approximately constant across hidden states. A learned potential can absorb state-dependent terms, implementing the paper's cohomology mechanism rather than forcing the raw Jacobian to be constant.
Formulas
Mathematical statement
The paper constructs leaf measures mu_x^u satisfying f_* mu_x^u = exp(-h) mu_{f(x)}^u, where f is the dynamical map and h is the relevant leaf entropy. For a neural transition z_next = f_theta(z,u), let J_theta(z) be its state Jacobian and v_theta(z) a unit learned expanding direction. Define a_theta(z) = norm(J_theta(z) v_theta(z)) and ell_theta(z) = log(a_theta(z) + epsilon). Estimate h_theta by the minibatch mean of ell_theta. The adapted cohomological residual is r_theta(z) = ell_theta(z) - h_theta - phi(f_theta(z)) + phi(z), where phi is a learned scalar potential. Minimizing the variance of r_theta transfers the paper's constant-Jacobian and measurable-cohomology structure. The predicted signature is decreasing variation of r_theta and reduced variation of finite-time tangent growth.
Implementation notes
Integration point: apply this to a GRU-like recurrent cell, a recurrent state-space model, or an invertible residual block with update z_next = f_theta(z,u). Add lambda times L_Marg to the ordinary supervised or sequence-modeling loss. Use a small vector network to produce v_theta(z), normalize it to unit Euclidean norm, and compute J_theta(z) v_theta(z) with an automatic-differentiation Jacobian-vector product; do not construct the full Jacobian. Pseudocode: sample hidden states z and inputs u from truncated training sequences; compute z_next = f_theta(z,u); compute q = J_theta(z) v_theta(z); compute ell = log(norm(q) + epsilon); compute h as the detached minibatch mean of ell; evaluate phi(z) and phi(z_next); form r = ell - h - phi(z_next) + phi(z); add lambda times mean(r squared) to the task loss. For neighboring states z and z_prime generated from nearby prefixes, add gamma times the squared difference of their ell values. Update theta, the direction network, and phi jointly. The paper supplies the constant scaling and coboundary mechanism; the direction, entropy estimate, and neighbor pairs are empirical estimates. First run a two-dimensional linear-map unit test, then train a small tanh RNN on adding-task regression or sequential MNIST against vanilla training and spectral normalization with matched parameter counts. Estimate finite-time Lyapunov growth using repeated tangent-vector products over 100 recurrent steps. Quantitative prediction: increasing lambda should monotonically reduce the batch standard deviation of r, and should reduce the variance of finite-time log expansion across initial states. Sweep the recurrent gain g and measure the horizon at which hidden-state norms diverge. The uncontrolled model should become unstable near the point where its empirical mean log expansion crosses zero; the proposed model should show a narrower expansion distribution and a delayed divergence boundary. Report whether the measured standard deviation of corrected log expansion falls by at least 20 percent at equal task loss.
Verification
This idea has not been verified yet.
Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.
Artifacts
Artifacts unavailable.