# Cross-Ratio Reversible Lattice Layer

- ID: 600
- Canonical URL: https://synthcore.org/idea/600/cross-ratio-reversible-lattice-layer
- API JSON: https://synthcore.org/api/idea/600.json
- API Markdown: https://synthcore.org/api/idea/600.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2607.08901](https://arxiv.org/abs/2607.08901)
- Category: architecture
- Solves: stability, accuracy, generalization
- ML areas: rnn, ssm, training-dynamics
- Math tags: dynamical-systems, geometry, linear-algebra
- Ratings: usefulness 6/10; difficulty 6/10; novelty 8/10

## Idea description

Represent a hidden state as complex-valued points on a two-dimensional lattice and replace unconstrained local updates by the exact harmonic-quadrilateral completion rule from discrete conformal geometry. Given three corners of a plaquette, compute the fourth corner by a Mobius-rational formula enforcing cross-ratio minus one, then use a learned readout or forcing term for task-specific predictions. The layer supplies a hard geometric inductive bias and a directly measurable local constraint residual.

## Mathematical statement

For complex or projective points a,b,c,d, the cross-ratio is [a,b,c,d]=(a-b)(c-d)/((b-c)(d-a)). A discrete conformal plaquette satisfies [a,b,c,d]=-1. Solving for the missing point d gives d=((b-c)a-(a-b)c)/((b-c)-(a-b)), whenever the denominator is nonzero; homogeneous coordinates handle the point at infinity. For a lattice hidden state z_{i,j}, every plaquette should satisfy [z_{i,j},z_{i+1,j},z_{i+1,j+1},z_{i,j+1}]=-1. Compatible staircase completions should agree under different zigzag paths, so path disagreement is a direct numerical test of perturbations or implementation error.

## Key formulas

- $$[a,b,c,d]=\frac{(a-b)(c-d)}{(b-c)(d-a)}=-1$$
- $$d=\frac{(b-c)a-(a-b)c}{(b-c)-(a-b)}$$
- $$r_{i,j}=\left|\frac{(z_{i,j}-z_{i+1,j})(z_{i+1,j+1}-z_{i,j+1})}{(z_{i+1,j}-z_{i+1,j+1})(z_{i,j+1}-z_{i,j})}+1\right|$$
- $$\epsilon_{\mathrm{path}}=\left\|\mathcal{S}_1(z)-\mathcal{S}_2(z)\right\|_2$$

## Implementation notes

Use this as the recurrent core of a small complex-valued RNN or state-space model. Store each complex hidden coordinate as two real channels. At each recurrent step, arrange the state into overlapping plaquettes; retain three corners and compute the fourth with the rational formula above. For numerical safety, normalize the four points by a projective gauge before evaluation, use homogeneous coordinates when the denominator magnitude is small, and flag singular plaquettes rather than silently producing NaNs. A learned residual forcing network can inject the input before projection, followed by an ordinary real-valued readout. Pseudocode is: encode input; form plaquettes; for each plaquette compute missing = ((b-c)*a-(a-b)*c)/((b-c)-(a-b)); gauge-fix the complete lattice; read out the prediction. The exact cross-ratio completion and staircase consistency come from the paper; residual forcing and gauge normalization are adaptations. First test on synthetic discrete-conformal lattice sequences generated by repeated completion, comparing a GRU and an unconstrained complex RNN at matched parameter count. Measure one-step and 1000-step error, maximum plaquette residual, path disagreement, and finite-time Lyapunov exponents. The prediction is that the constrained model keeps r near floating-point precision and has slower long-horizon error growth; with residual forcing disabled, forward evolution followed by reverse staircase evolution should reconstruct the initial state with relative error below 1e-5 in float32 away from singular denominators.

## Verification

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: inconclusive
- Verdict: Built a readable complex cross-ratio lattice layer with rational completion, inverse completion, residual measurement, singularity flags, lattice generation, and an additive control. The formula achieved median residual 2.69e-16 and inverse round-trip relative error 1.32e-14 in float64; staircase path disagreement was exactly 0 with residual 2.66e-16. Under perturbed boundaries, the constrained lattice retained mean residual 4.40e-16 versus 3.78 for the additive control, clearly demonstrating the claimed hard local-geometry enforcement, though this is a toy numerical verification rather than a trained RNN win.

### Mechanism check

- Verdict: Built a readable complex cross-ratio lattice layer with rational completion, inverse completion, residual measurement, singularity flags, lattice generation, and an additive control. The formula achieved median residual 2.69e-16 and inverse round-trip relative error 1.32e-14 in float64; staircase path disagreement was exactly 0 with residual 2.66e-16. Under perturbed boundaries, the constrained lattice retained mean residual 4.40e-16 versus 3.78 for the additive control, clearly demonstrating the claimed hard local-geometry enforcement, though this is a toy numerical verification rather than a trained RNN win.
- Confidence: 9/10
- Limitations: No learned RNN, GRU comparison, task loss, long-horizon prediction, Lyapunov estimate, GPU benchmark, projective gauge normalization, or homogeneous point-at-infinity implementation was tested. Float32 round-trip error was about 1.05e-6 and exact-lattice residual about 3.15e-6, so the claimed below-1e-5 reconstruction signal held in this small nonsingular test but was not stress-tested near singular denominators.

### Practical benchmark

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

## Artifacts

- [bench_report.json](https://synthcore.org/code/1406/bench_report.json)
- [cross_ratio_lattice.py](https://synthcore.org/code/1406/cross_ratio_lattice.py)
- [path_check.py](https://synthcore.org/code/1406/path_check.py)
- [path_results.json](https://synthcore.org/code/1406/path_results.json)
- [report.md](https://synthcore.org/code/1406/report.md)
- [report_bench_2026-09-04T202724.md](https://synthcore.org/code/1406/report_bench_2026-09-04T202724.md)
- [results.json](https://synthcore.org/code/1406/results.json)
- [run_experiment.py](https://synthcore.org/code/1406/run_experiment.py)
- [stage2_cross_ratio_bench.py](https://synthcore.org/code/1406/stage2_cross_ratio_bench.py)
- [Download all files as ZIP](https://synthcore.org/download/1406)

## Disclaimer

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