Long-Cycle Topological Graph Pooling
Implementation & benchmark of arXiv:2608.25065 — Detection of first homology via random geometric graphs in the thermodynamic regime
Source paper: Detection of first homology via random geometric graphs in the thermodynamic regime arXiv:2608.25065 ⓘ · analyzed Aug 29, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Construct a sparse radius graph over input samples or learned node embeddings, compute its cycle space, and remove the subspace generated by sufficiently short cycles. Feed the remaining quotient-cycle coordinates or Betti-rank estimate to a graph neural network as a global topological feature, or use them to guide pooling so that local redundant loops are collapsed while global loops are retained. The paper predicts that the threshold L approximately equal to |log r| graph hops is the critical scale in the supercritical sparse regime.
Formulas
Mathematical statement
The central result states that for n independent samples on a compact d-dimensional Riemannian manifold M, with radius r satisfying r tending to zero and nr^d at least lambda_0, the random geometric graph G_M(n;r) satisfies P(H_1(M) is isomorphic to Z_1(G_M(n;r)) / Z_1^{Q' r |log r|}(G_M(n;r))) at least 1 - O(r^kappa). Here C_1(G;F_2) is the vector space of graph edges over coefficients F_2, the boundary map partial maps each edge {u,v} to u+v, Z_1(G)=ker(partial) is the graph cycle space, and Z_1^L(G) is the subspace generated by cycles whose metric diameter is at most L. Q' depends on the lower intensity lambda_0, the confidence parameter kappa, and dimension d. The construction uses only the graph, while the metric-diameter version can be approximated by graph diameter: cycles with graph diameter O(|log r|) are treated as local. The negative-scale statement says that quotienting by cycles of diameter o(r|log r|) does not recover H_1(M) with high probability. The sparse graph has expected O(n) edges when nr^d is bounded.
Implementation notes
Integrate this at the input graph-construction stage of a graph neural network, before message passing or graph pooling. Given node features x_i and coordinates or an embedding z_i, choose a radius r so the average degree is bounded but above the percolation threshold; in practice estimate r from the desired degree k by r approximately (k/n)^(1/d), then build edges (i,j) whenever the distance is at most r. Work over F_2. First compute a spanning forest T. For every non-tree edge e=(u,v), form its fundamental cycle c_e consisting of e plus the unique T-path from u to v; these cycles provide a basis of Z_1(G). Estimate the graph-diameter cutoff L_G=alpha*log(1/r), with alpha initially 2 to 6. Classify each fundamental cycle as local when its maximum pairwise shortest-path distance is at most L_G. To approximate Z_1^{L_G}, collect local cycles and run binary Gaussian elimination on their edge-incidence vectors; calculate rank_long=rank(all cycle basis)-rank(local-cycle span). A scalable alternative is a sparse XOR basis for local cycle vectors. Append rank_long, the surviving quotient coordinates, or a learned projection of the quotient basis to the pooled graph representation. The theorem supplies the scale separation and expected O(n) edge budget; estimate the percolation threshold, cycle ranks, and alpha empirically. Start with 2D Swiss-roll, torus, and circle-versus-line graph classification using 1,000 to 10,000 points. Compare a GCN or GraphSAGE on a kNN graph, a radius graph without topology features, and a persistent-homology baseline. Measure accuracy at fixed edges, memory, and wall-clock time. The expected signal is improved classification of manifolds with different global loops at equal edge count, with long-cycle rank stable under node subsampling and coordinate noise. Sweep alpha to test for a transition near the logarithmic cutoff.
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 an F2 cycle-space analyzer using spanning-tree fundamental cycles, XOR rank elimination, graph-diameter cutoff, and a long-cycle rank feature. Numerical checks passed: the cycle-rank identity held, every fundamental cycle had zero F2 boundary, and local rank was monotone with increasing alpha. On the circle-versus-line experiment, long-cycle rank differed substantially (mean 232.1 vs 115.6) but baseline and topology-augmented classifiers both achieved 1.00 accuracy, so no observed predictive win was demonstrated.
- Agent confidence
- 9/10
- Baseline
- 1.00 5-fold accuracy using edges, connected components, and radius
- Feature signal
- mean long rank: circle 232.1, line 115.6
- Idea
- 1.00 5-fold accuracy using baseline features plus long-cycle rank; alpha-only sweep was 1.00 for alpha=0.5, 1, 2, 4, 8
- Math sanity
- cycle rank 156 = 200 - 45 + 1; local ranks [0, 89, 127, 156, 156] increased monotonically with alpha
Limitations: Only a small synthetic circle-versus-line classification task was tested; no GNN, manifold subsampling/noise robustness study, torus or Swiss-roll data, persistent-homology comparison, GPU implementation, wall-clock/memory scaling benchmark, or theorem-level probability validation was performed. The implemented local-cycle criterion uses graph diameter of fundamental-cycle vertices, which is an approximation to the metric-diameter subspace.
How to run: python3 long_cycle_experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- long_cycle_experiment.py 5.9 KB View Raw
- report.md 1.7 KB View