Fold-Avoiding Endogenous Feedback Layer
Implementation & benchmark of arXiv:2607.02877 — Endogenous Feedback in Size-Structured Transport Equations
Source paper: Endogenous Feedback in Size-Structured Transport Equations arXiv:2607.02877 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Build a recurrent or state-space layer whose transition matrix depends on a scalar pooled from the current hidden state. Estimate the local derivative of the scalar closure and penalize feedback gains that approach the fold threshold, preventing abrupt branch changes and excessive sensitivity.
Formulas
Mathematical statement
The paper uses the structured state x(t,l) on Ω=[l₀,lₘ], the scalar observable E(t)=∫χ(l)x(t,l)dl, and the feedback transport equation ∂ₜx+∂ₗ(g(E,l)x)=−(μ(E,l)+u(t,l))x. Freezing a feedback path E gives a linear operator T_E and the closed-loop scalar fixed point E=K(E), where K(E)(t)=∫χ(l)T_E(x₀,p,u)(t,l)dl. At equilibrium this becomes E=Φ(E). The paper identifies 1−Φ′(E)>0 as the uniqueness margin and Φ′(E)=1 as the fold threshold. Adapt this to a discrete neural state x_k∈Rⁿ, feedback E_k=cᵀx_k, and transition x_{k+1}=x_k+Δt A(E_k)x_k. The local feedback gain is L_k=Δt|cᵀ(∂A/∂E)(E_k)x_k|. Penalize L_k above 1−ε, where c is a learned pooling vector, A(E) is the feedback-dependent transition matrix, Δt is the integration step, and ε>0 is a safety margin.
Implementation notes
(1) Integrate this at the recurrent or state-space transition, not at the output head. Let x be an n-dimensional hidden state, c a learned vector, and E=dot(c,x). Construct A(E) as a banded or diagonal-plus-low-rank matrix whose coefficients are generated by small linear maps from [E,1]. A simple implementation is A(E)=G(E)D_shift−diag(M(E)), where D_shift is a fixed finite-difference shift matrix and G,M use softplus outputs. (2) Use the following loop: x=x0; penalty=0; for k in range(T): E=dot(c,x); A=build_A(E); dA=autograd_jacobian(build_A,E); L=dt*abs(dot(c,dA@x)); penalty += relu(L-(1-eps))**2; x=x+dt*(A@x+B@input[k]). Add lambda times the averaged penalty to the task loss. (3) Compute A and dA/dE by automatic differentiation. Independently estimate the closure slope with two rollout evaluations, phi_prime=(Phi(E+delta)-Phi(E-delta))/(2*delta), to test whether L predicts actual sensitivity. (4) Start with a 32-dimensional recurrent block after a small CIFAR-10 encoder, comparing the method with a matched GRU and an unregularized feedback block. Sweep dt and feedback gain. Success means fewer loss spikes, lower gradient variance, and equal or better validation accuracy at matched parameters and FLOPs. A falsification is that the penalty only suppresses useful feedback and reduces accuracy.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
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 a reusable endogenous-feedback Euler layer with learned pooling, feedback-dependent banded transition, autograd-computed local gain, and fold penalty in feedback_layer.py. The toy verification confirmed linear gain scaling with maximum absolute error 4.98e-11, contraction below L=1 and divergence above it, and fixed-point sensitivity 1/(1-L) with relative errors below 4e-11. The secondary recurrent task remained far below the fold and showed identical baseline and penalized loss, so no practical training win was demonstrated; the proposed mechanism itself was numerically confirmed.
- Agent confidence
- 9/10
- Baseline
- Toy closure matched the predicted slope and sensitivity; recurrent task final loss 1.016864, maximum gain 0.007063, and zero loss spikes.
- Idea
- Toy closure slope maximum error 4.98e-11; every tested L<1 case converged and every tested L>1 case diverged; sensitivity matched 1/(1-L) within 4e-11. The penalty sweep generally reduced gain, but its maximum final L was 1.0355 versus threshold 0.9. The recurrent task result was unchanged from baseline.
Limitations: Only scalar analytical closures and a tiny synthetic recurrent task were tested. CIFAR-10, a GRU comparison, FLOP-matched benchmarking, long-horizon gradient-variance studies, GPU execution, and broad hyperparameter sweeps were not performed. The penalty optimizer was not guaranteed to enforce a hard gain bound near the threshold.
How to run: python3 fold_feedback_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.02877)
Significantly WORSE than the tuned baseline (+185.9%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0
- Effect (Δ)
- 0 (+185.9%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Not confirmed ✗
- Practical effect
- Hurts
- Baseline tuning
- swept over 3 configs
Only the built-in dynamics track was tested; no CIFAR, sequence, long-horizon gradient-variance, FLOP profiling, or larger recurrent architectures were evaluated. The baseline was a matched fixed Euler state-space model rather than the harness GRU implementation, and the benchmark used 800 training and 300 test examples for runtime control.
How to run: python3 stage2_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
Built a fold-avoiding endogenous-feedback Euler recurrent model and evaluated it against a matched fixed-transition Euler baseline on the structurally appropriate dynamics track. The trained-model feedback-gain prediction was confirmed: predicted 0.003458 versus observed finite-difference 0.003451, relative error 0.002. However, the idea significantly worsened test MSE, with delta_mean +2.09e-05 and permutation p=0.0081, so it does not provide a benchmark win.
- Baseline
- Best fixed-transition baseline lr=0.006; 8-seed mean test MSE 1.12285e-05, std 4.91582e-06.
- Idea
- Best fold-feedback configuration lr=0.006, lambda=2.0, feedback=0.8; 8-seed mean test MSE 3.21048e-05, std 2.73627e-05. Paired delta +2.08763e-05, 0/8 wins, permutation p=0.0081.
- Mechanism signature
- Predicted local feedback gain 0.0034579954; observed trained-model finite-difference gain 0.0034511408; relative error 0.001986; confirmed=true.
Benchmark result
Significantly WORSE than the tuned baseline (+185.9%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0
- Effect (Δ)
- 0 (+185.9%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Not confirmed ✗
- Practical effect
- Hurts
- Baseline tuning
- swept over 3 configs
Only the built-in dynamics track was tested; no CIFAR, sequence, long-horizon gradient-variance, FLOP profiling, or larger recurrent architectures were evaluated. The baseline was a matched fixed Euler state-space model rather than the harness GRU implementation, and the benchmark used 800 training and 300 test examples for runtime control.
How to run: python3 stage2_bench.py
Artifacts
- bench_report.json 4.3 KB View Raw
- feedback_layer.py 2.5 KB View Raw
- fix_signature.py 1.3 KB View Raw
- fold_feedback_experiment.py 5.1 KB View Raw
- report.md 1.7 KB View
- report_bench_2026-08-30T200251.md 4.3 KB View
- results.json 7.1 KB View Raw
- stage2_bench.py 7.1 KB View Raw