# Topological Response Basis Layer

- ID: 780
- Canonical URL: https://synthcore.org/idea/780/topological-response-basis-layer
- API JSON: https://synthcore.org/api/idea/780.json
- API Markdown: https://synthcore.org/api/idea/780.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2607.12096](https://arxiv.org/abs/2607.12096)
- Category: architecture
- Solves: accuracy, stability, generalization
- ML areas: mlp, world-model, training-dynamics
- Math tags: stochastic-processes, graph-theory, linear-algebra, dynamical-systems
- Ratings: usefulness 7/10; difficulty 6/10; novelty 8/10

## 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.

## 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.

## Key formulas

- d p(t)/dt = W(x) p(t), with W_ij(x) >= 0 for i != j and W_ii(x) = -sum_{j != i} W_ji(x)
- W(x) pi(x) = 0, 1^T pi(x) = 1, R(x) = g^T pi(x)
- W(x) pi'(x) = -W'(x) pi(x), 1^T pi'(x) = 0, pi'(x) = -W#(x) W'(x) pi(x)
- R(x) = sum_{k=1}^K alpha_k R_k(x), alpha_k >= 0, sum_{k=1}^K alpha_k = 1

## 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

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: harms
- Verdict: 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.

### Mechanism check

- Verdict: 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.
- Confidence: 9/10
- 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.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.0081
- Paired wins: 0/8
- Benchmark verdict: idea worse (significant)

## Artifacts

- [bench_report.json](https://synthcore.org/code/318/bench_report.json)
- [experiment.py](https://synthcore.org/code/318/experiment.py)
- [report.md](https://synthcore.org/code/318/report.md)
- [report_bench_2026-08-31T010841.md](https://synthcore.org/code/318/report_bench_2026-08-31T010841.md)
- [results.json](https://synthcore.org/code/318/results.json)
- [stage2_topological_bench.py](https://synthcore.org/code/318/stage2_topological_bench.py)
- [topological_layer.py](https://synthcore.org/code/318/topological_layer.py)
- [Download all files as ZIP](https://synthcore.org/download/318)

## Disclaimer

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