Matroid-selected circular latent coordinates
Implementation & benchmark of arXiv:2607.08230 — Selecting Interpretable Circular Coordinates from Data
Source paper: Selecting Interpretable Circular Coordinates from Data arXiv:2607.08230 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Use a dictionary of scientifically meaningful angle-valued observables to construct a compact periodic latent representation aligned with the persistent first-cohomology subspace of the data. Select the minimum-energy subset that spans the detected topological directions, then feed each selected coordinate to a VAE, world model, or downstream predictor as a sine/cosine pair rather than as an unconstrained scalar.
Formulas
Mathematical statement
For a smooth manifold \(\mathcal M\), a differential \(1\)-form \(\alpha\) evaluated on a cycle \(c:S^1\to\mathcal M\) satisfies \(\int_c\alpha=\bar\alpha(\bar c)\in\mathbb R\), and for an integer cohomology class this integral is in \(\mathbb Z\). The associated circular coordinate from a base point \(x_0\) is \(z_\alpha(x)=\int_{\gamma:x_0\to x}\alpha\ \mathrm{mod}\ \mathbb Z\), where path changes alter the integral by an integer. For sampled points \(x_i\), represent candidate \(j\) by a discrete edge cochain \(a_j(e)\), and estimate the \(L^2\) inner product by \(\widehat{\langle a_j,a_k\rangle}=\sum_{e\in E}w_ea_j(e)a_k(e)\), with nonnegative edge weights \(w_e\) normalized to sum to one. Let \(v_j\in\mathbb R^r\) be candidate \(j\)'s coordinates after projection onto an estimated persistent \(H^1\) basis, and let \(M\succeq0\) be the projected cochain Gram matrix. Its energy is \(E_j=v_j^TMv_j\). Select a basis by sorting candidates by \(E_j\) and greedily adding candidate \(j\) whenever \(\operatorname{rank}[v_{j_1},\ldots,v_j]\) increases; this is the minimum-weight basis algorithm for the vector matroid. The projection residual \(R=I-V(V^TMV)^{\dagger}V^TM\) measures persistent directions unexplained by the dictionary.
Implementation notes
Integrate this at the representation bottleneck of a VAE, world model, or supervised encoder. Assume each training example has a dictionary of \(m\) candidate angle observables \(\theta_j(x)\in\mathbb R/\mathbb Z\), plus a neighborhood graph \(G=(V,E)\) built from the input samples. First compute wrapped edge differences \(a_j(i,k)=\operatorname{wrap}_{[-1/2,1/2]}(\theta_j(x_k)-\theta_j(x_i))\) on graph edges. Estimate the candidate Gram matrix with \(G_{jk}=\sum_{(i,k)\in E}w_{ik}a_j(i,k)a_k(i,k)\). Obtain an estimated persistent cohomology basis, or use a precomputed target matrix \(Q\in\mathbb R^{m\times r}\) whose columns span the detected \(H^1\) directions; set \(v_j=Q_{j,:}\) and use \(M=Q^TGQ\). Sort candidates by \(E_j=v_j^TMv_j\), greedily retain a candidate only if the smallest singular value after appending it exceeds a tolerance such as \(10^{-5}\). For every retained coordinate, inject \([\cos(2\pi\theta_j(x)),\sin(2\pi\theta_j(x))]\) into the latent vector. During training, add a prediction or reconstruction loss on these pairs, and optionally penalize unexplained persistent directions using \(\|R\|_F^2\), where \(R=I-V(V^TMV)^\dagger V^TM\). The mathematical quantities are the wrapped cochains, Gram matrix, energies, rank test, and projection residual; graph bandwidth, edge weights, rank tolerance, and loss coefficient are empirical hyperparameters. The first experiment should use a torus or synthetic pendulum dataset with known angles, a small VAE baseline with two unconstrained latent scalars, and the selected circular latents. Measure reconstruction error, angle decoding error, latent traversability, and the number of latent dimensions needed for the same error. Success is lower-dimensional representation with equal or better reconstruction and substantially higher correlation to the known physical angles, while the residual should correctly flag a dictionary that omits one torus angle.
Verification
Stage 1 · Toy mechanism gate: Failed ✗
Stage 2 · Mechanism transferred to benchmark: Not tested
Stage 2 · Practical benchmark result: Not run
Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built wrapped edge-cochain Gram estimation, energy-ordered vector-matroid selection, persistent-direction residuals, and a torus autoencoder comparison. The residual behaved as claimed: approximately 0 when both directions were retained and approximately 1 when one was omitted; circular coordinates also recovered their angles essentially exactly. However, minimum-energy selection chose a distractor plus a mixed coordinate, and the fixed circular representation had substantially worse reconstruction than the learned 2-scalar baseline, so no overall representation win was observed.
- Agent confidence
- 9/10
- Baseline
- 2-scalar learned autoencoder reconstruction MSE 0.10022 after 1000 steps
- Idea
- Selected sine/cosine coordinates reconstruction MSE 0.48458; angle mean wrapped error 2.49e-17; full residual 4.52e-16 versus omitted-direction residual 1.00000
Limitations: Only a small synthetic torus and one random seed were tested. The circular decoder used fixed dictionary coordinates while the baseline learned its encoder, and no VAE, prediction loss, multiple seeds, or persistent-cohomology estimator was evaluated. The experiment also revealed that the stated energy ranking can favor a low-energy distractor unless the candidate dictionary and projected metric are carefully calibrated.
How to run: python3 experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- clean_check.py 0.6 KB View Raw
- experiment.py 5.0 KB View Raw
- report.md 1.6 KB View
- results.json 0.7 KB View Raw