Topological Response Basis Layer
Implementation & benchmark of arXiv:2607.12096 — Topological building blocks of nonequilibrium response
Source paper: Topological building blocks of nonequilibrium response arXiv:2607.12096 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Insert a small continuous-time Markov latent module between a neural encoder and decoder, with input-dependent transition rates and a fixed library of graph topologies such as directed cycles, reversible chains, and branching motifs. The output is an observable of the stationary distribution, while a learned convex mixture over topology-specific response curves constrains the network to represent responses as combinations of interpretable nonequilibrium mechanisms.
Formulas
Mathematical statement
For a strongly connected directed graph with states i = 1,...,N, let W(x) be its generator at scalar input x, with off-diagonal rates W_ij(x) >= 0 for i != j and diagonal entries W_ii(x) = -sum_{j != i} W_ji(x). The stationary distribution pi(x) satisfies W(x) pi(x) = 0 and 1^T pi(x) = 1. For observable values g_i, the response is R(x) = g^T pi(x). Differentiation gives W(x) pi'(x) = -W'(x) pi(x) and 1^T pi'(x) = 0; using the group inverse W#, pi'(x) = -W#(x) W'(x) pi(x). Construct topology-specific responses R_k(x) and impose R(x) approximately equal to sum_k alpha_k R_k(x), with alpha_k >= 0 and sum_k alpha_k = 1. The paper's structural conjecture is that relevant responses are generated by convex combinations of topologically optimal extremal models.
Implementation notes
Use this as a differentiable latent layer in an MLP for scalar-response prediction or in a world model for systems with discrete modes. First encode the input into a scalar or low-dimensional condition x, then produce positive edge rates with W_ij(x) = softplus(a_ij^T h(x) + b_ij) + epsilon for edges belonging to one of K fixed strongly connected graph motifs. For each motif, solve the linear stationary system W_k(x) pi_k(x) = 0 with normalization, compute R_k(x) = g_k^T pi_k(x), and combine outputs using alpha = softmax(u). An optional residual head can be trained with penalty lambda times the squared difference between its output and the convex mixture. Pseudocode is: h = encoder(x); for each k compute rates, construct W_k, solve pi_k, compute R_k; y = sum_k softmax(u)_k R_k; loss = task_loss(y,target) + lambda times convex_hull_penalty. Stationary distributions are computed exactly for small motifs and differentiated by implicit linear solves. Start with a two-layer MLP on synthetic sigmoidal and nonmonotonic response curves, comparing a standard MLP and mixture-of-experts baseline. The quantitative prediction is that held-out curves should lie near the nonnegative simplex hull of motif responses, and that a single extremal directed-cycle motif should have larger maximum slope than random convex mixtures. Failure is indicated if more than 20 percent of held-out curves require negative coefficients or have normalized hull residual above 0.05.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Significantly worse ✗
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built and numerically verified a differentiable Topological Response Basis Layer using fixed strongly connected motifs, positive input-dependent rates, exact stationary linear solves, and convex softmax mixing. The mechanism manifested: implicit derivative residuals stayed below 1.2e-15 across rate-sensitivity values, centered finite-difference error scaled as h^1.999, and small-sensitivity response slopes were exactly linear. On a synthetic convex-mixture response, the recovered mixture was [0.1499997, 0.5499991, 0.3000012] and beat the small standard MLP in held-out MSE, although this is only a toy interpolation experiment.
- Agent confidence
- 9/10
- Baseline
- Small sklearn MLP, 2x24 tanh, held-out MSE 7.7555e-06
- Idea
- Topological convex mixture: held-out MSE 1.6647e-16; recovered alpha [0.1499997, 0.5499991, 0.3000012]; implicit derivative max residual 1.1990e-15; finite-difference log-log slope 1.9993 versus predicted 2; small-beta linear relative deviation 0.0; outside-hull constrained residual MSE 3.9290e-04
Limitations: Only scalar synthetic responses and three hand-designed motifs were tested. No large-scale dataset, learned encoder-decoder training comparison, robustness to poorly conditioned generators, FLOP/latency benchmark, or world-model experiment was performed.
How to run: python3 experiment.py && /home/maxwelhelp/main/bin/python3 topological_layer.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.12096)
Significantly WORSE than the tuned baseline (+3723.2%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0003
- Idea mean
- 0.0123
- Effect (Δ)
- 0.012 (+3723.2%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±1000.5%
- Mechanism
- Confirmed ✓
- Practical effect
- Hurts
- Baseline tuning
- swept over 6 configs
Only the built-in dynamics track was tested. The topological head used fixed three motifs and a relatively short 16-epoch budget; no ablation of motif count, observable parameterization, rate-head capacity, residual decoder, or longer training was performed. The reported mechanism signature verified trained-model convex-weight normalization and output response behavior, but did not independently reconstruct every trained generator residual in the signature path.
How to run: python3 stage2_topological_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 10/10
Implemented the Topological Response Basis Layer as an end-to-end replacement head on the shared GRU-64 dynamics model and ran the paired-seed protocol with baseline and idea hyperparameter sweeps. The baseline achieved mean test MSE 0.0003221 versus 0.0123137 for the idea; the paired delta was +0.0119916 with permutation p=0.0081, indicating a significant loss. The trained model did exhibit normalized convex mixture weights, but this mechanism signal did not translate into benchmark performance.
- Alpha sum error
- 1.1920928955078125e-07
- Baseline
- dynamics/rnn_small, best lr=0.006, weight_decay=0, 16 epochs; 8-seed mean MSE 0.00032208267020905623, std 0.00013150113298489614
- Idea
- Topological stationary-response mixture head on GRU-64, best lr=0.006, weight_decay=0, 16 epochs; 8-seed mean MSE 0.012313722632825375, std 0.0036399413142409096
- Paired delta
- idea - baseline = +0.011991639962616318 MSE
- Permutation p
- 0.0081
- Stationary residual
- 8.940696716308594e-08
Benchmark result
Significantly WORSE than the tuned baseline (+3723.2%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0003
- Idea mean
- 0.0123
- Effect (Δ)
- 0.012 (+3723.2%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±1000.5%
- Mechanism
- Confirmed ✓
- Practical effect
- Hurts
- Baseline tuning
- swept over 6 configs
Only the built-in dynamics track was tested. The topological head used fixed three motifs and a relatively short 16-epoch budget; no ablation of motif count, observable parameterization, rate-head capacity, residual decoder, or longer training was performed. The reported mechanism signature verified trained-model convex-weight normalization and output response behavior, but did not independently reconstruct every trained generator residual in the signature path.
How to run: python3 stage2_topological_bench.py
Artifacts
- bench_report.json 4.2 KB View Raw
- experiment.py 5.2 KB View Raw
- report.md 1.6 KB View
- report_bench_2026-08-31T010841.md 5.8 KB View
- results.json 1.6 KB View Raw
- stage2_topological_bench.py 5.4 KB View Raw
- topological_layer.py 3.6 KB View Raw