# Heterogeneity-Calibrated Hopf RNN

- ID: 1527
- Canonical URL: https://synthcore.org/idea/1527/heterogeneity-calibrated-hopf-rnn
- API JSON: https://synthcore.org/api/idea/1527.json
- API Markdown: https://synthcore.org/api/idea/1527.md
- Verification status: beats_baseline
- Source: [arXiv:2607.28275](https://arxiv.org/abs/2607.28275)
- Category: dynamics
- Solves: stability, accuracy
- ML areas: rnn, graph-nn, training-dynamics, initialization
- Math tags: dynamical-systems, bifurcations, control-theory, statistical-mechanics, graph-theory
- Ratings: usefulness 8/10; difficulty 5/10; novelty 7/10

## Idea description

Construct a recurrent or graph-recurrent layer with a homeostatic feedback variable and set its recurrent gain using the graph degree-moment ratio \(\alpha=\langle k^2\rangle/\langle k\rangle\). The feedback loop is deliberately placed below, near, or above a predicted Hopf boundary, allowing controlled persistent oscillations without unconstrained exploding states.

## Mathematical statement

Use the mean-field Glauber-inspired system \(\dot m=-m+\tanh[\beta(J\alpha m+h)]\) and \(\dot h=-a h+c(m_0-m)\), where \(m\) is global hidden-state activity, \(h\) is a slow homeostatic field, \(J\) is recurrent coupling, \(\beta\) is activation sharpness, \(a>0\) is feedback relaxation, \(c>0\) is feedback strength, and \(m_0\) is target activity. At fixed point \((m_*,h_*)\), define \(q=\operatorname{sech}^2[\beta(J\alpha m_*+h_*)]\). The Jacobian is \(A=[[-1+\beta J\alpha q,\beta q],[-c,-a]]\). A Hopf crossing occurs when \(\operatorname{tr}(A)=0\) and \(\det(A)>0\), yielding \(\beta J\alpha q=1+a\). Thus graph heterogeneity directly shifts the oscillatory stability boundary.

## Key formulas

- $$\alpha=\frac{\langle k^2\rangle}{\langle k\rangle},\qquad \dot m=-m+\tanh\!\left[\beta(J\alpha m+h)\right],\qquad \dot h=-a h+c(m_0-m).$$
- $$A_* = \begin{pmatrix}-1+\beta J\alpha q & \beta q\\-c & -a\end{pmatrix},\qquad q=\operatorname{sech}^2\!\left[\beta(J\alpha m_*+h_*)\right].$$
- $$\text{Hopf boundary: }\operatorname{tr}(A_*)=-1-a+\beta J\alpha q=0,\qquad \det(A_*)=a(1-\beta J\alpha q)+\beta c q>0.$$

## Implementation notes

Integrate this mechanism directly into the recurrent update of a small RNN or message-passing GNN. For a graph, compute node states \(x_i\), degrees \(k_i\), and global activity \(m=N^{-1}\sum_i x_i\). Maintain one scalar feedback state \(h\) per layer or sequence. Estimate \(\alpha\) once from the graph, or recompute it for dynamic graphs. A concrete Euler implementation is: compute neighbor input \(r_i=J\sum_jA_{ij}x_j/k_i+h\); update \(x_i\leftarrow x_i+\Delta t[-x_i+\tanh(\beta r_i)]\); then update \(h\leftarrow h+\Delta t[-ah+c(m_0-m)]\). Parameterize \(a,c,J,\beta\) as positive values. Log \(\alpha\), the empirical fixed point, \(q\), the Jacobian trace, determinant, and the largest hidden-state spectral growth rate. The graph degree moments and state statistics are computed directly; the fixed point and Jacobian quantities are estimated from long burn-in trajectories or automatic differentiation. First experiment: train this layer and a vanilla tanh RNN on synthetic graph-sequence prediction using graphs with matched mean degree but different \(\alpha\). Sweep \(J\) and \(\beta\). The predicted signature is an oscillation onset when \(\beta J\alpha q\approx1+a\), within 20 percent, followed by a narrow activity-spectrum peak; below onset, perturbations should decay exponentially.

## Verification

- Status: beats_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: helps
- Verdict: Built a self-contained Heterogeneity-Calibrated Hopf RNN toy verifier with degree-moment alpha, equilibrium/Jacobian diagnostics, trajectory simulation, and a vanilla graph-RNN comparison. Predicted Hopf boundaries matched numerical trace crossings within 5e-6 relative error; thresholds scaled inversely with alpha, with observed Jc ratio 1.562497 versus predicted 1.562500. Below the boundary perturbations decayed, while above it bounded oscillations emerged. The mechanism manifested clearly, although the untuned tiny prediction task was worse for the Hopf model, so there is no demonstrated practical accuracy win.

### Mechanism check

- Verdict: Built a self-contained Heterogeneity-Calibrated Hopf RNN toy verifier with degree-moment alpha, equilibrium/Jacobian diagnostics, trajectory simulation, and a vanilla graph-RNN comparison. Predicted Hopf boundaries matched numerical trace crossings within 5e-6 relative error; thresholds scaled inversely with alpha, with observed Jc ratio 1.562497 versus predicted 1.562500. Below the boundary perturbations decayed, while above it bounded oscillations emerged. The mechanism manifested clearly, although the untuned tiny prediction task was worse for the Hopf model, so there is no demonstrated practical accuracy win.
- Confidence: 9/10
- Limitations: Only a two-variable mean-field toy system and a tiny synthetic graph-memory task were tested; no trained multi-layer model, dynamic graphs, FLOP/speed analysis, long-horizon benchmark, or broad parameter/seed sweep was performed. The fixed-gain comparison was illustrative and the Hopf task parameters were not tuned for predictive accuracy.

### Practical benchmark

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

## Artifacts

- [bench_report.json](https://synthcore.org/code/389/bench_report.json)
- [focused_probe.json](https://synthcore.org/code/389/focused_probe.json)
- [hopf_rnn_experiment.py](https://synthcore.org/code/389/hopf_rnn_experiment.py)
- [hopf_stage2_bench.py](https://synthcore.org/code/389/hopf_stage2_bench.py)
- [report.md](https://synthcore.org/code/389/report.md)
- [report_bench_2026-08-31T110427.md](https://synthcore.org/code/389/report_bench_2026-08-31T110427.md)
- [results.json](https://synthcore.org/code/389/results.json)
- [Download all files as ZIP](https://synthcore.org/download/389)

## Disclaimer

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