# Hopf Period-Homeostatic Recurrent Cell

- ID: 1772
- Canonical URL: https://synthcore.org/idea/1772/hopf-period-homeostatic-recurrent-cell
- API JSON: https://synthcore.org/api/idea/1772.json
- API Markdown: https://synthcore.org/api/idea/1772.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2608.04126](https://arxiv.org/abs/2608.04126)
- Category: dynamics
- Solves: stability, accuracy, generalization
- ML areas: rnn, ssm, training-dynamics, regularization
- Math tags: dynamical-systems, bifurcations, control-theory, differential-geometry
- Ratings: usefulness 7/10; difficulty 5/10; novelty 7/10

## Idea description

Replace or augment a recurrent layer with a learnable near-Hopf oscillator whose amplitude remains stable while its oscillation period is explicitly regularized to be insensitive to the input operating point. The cell is intended for sequence tasks where timing or phase must persist despite changes in signal amplitude, gain, or nuisance context.

## Mathematical statement

Use the complex Hopf normal form \(\dot z=[\mu(\lambda,\mathcal{I})+i\omega(\lambda,\mathcal{I})]z-(c_r+i c_i)|z|^2z\), where z is the complex oscillator state, lambda is a trainable bifurcation-control parameter, I is the scalar input operating point, mu is the linear growth rate, omega is the linear angular frequency, and c_r > 0 and c_i are nonlinear coefficients. For mu > 0, the stable periodic orbit has radius r = sqrt(mu/c_r), angular frequency Omega = omega - c_i mu/c_r, and period T = 2 pi/Omega. Hopf onset is mu = 0, while infinitesimal period homeostasis is dT/dI = 0. When coefficients are locally constant, this is equivalent to d[omega - c_i mu/c_r]/dI = 0. Near a homeostatic point I_star, the linear period response vanishes and T(I_star + delta) = T_star + one-half T_II delta squared + O(delta cubed).

## Key formulas

- $$\dot z=[\mu(\lambda,\mathcal{I})+i\omega(\lambda,\mathcal{I})]z-(c_r+i c_i)|z|^2z,\qquad c_r>0.$$
- $$r_*^2=\frac{\mu}{c_r},\qquad \Omega=\omega-c_i\frac{\mu}{c_r},\qquad T(\lambda,\mathcal{I})=\frac{2\pi}{\Omega},\qquad \mu>0.$$
- $$\text{Hopf: }\mu(\lambda,\mathcal{I})=0,\qquad \text{period homeostasis: }\frac{\partial T}{\partial\mathcal{I}}=0\ \Longleftrightarrow\ \frac{\partial}{\partial\mathcal{I}}\left(\omega-c_i\frac{\mu}{c_r}\right)=0.$$
- $$T(\mathcal{I}_*+\delta)=T_*+\frac{1}{2}T_{\mathcal{I}\mathcal{I}}(\mathcal{I}_*)\delta^2+O(\delta^3),\qquad \left.\frac{\partial T}{\partial\mathcal{I}}\right|_{\mathcal{I}_*}=0.$$

## Implementation notes

Use this mechanism as a recurrent cell or state-space block. Represent each oscillator by two real channels x and y, corresponding to z = x + i y. Let a small projection of the current feature vector u_t produce an operating scalar I_t, while mu, omega, c_r, and c_i are learned per channel or per layer. Integrate the normal form with RK2 or RK4 at step size Delta t, then concatenate the oscillator states with ordinary features before the output projection. For each channel, compute r_squared = x squared + y squared, dx = mu x - omega y - c_r r_squared x + c_i r_squared y, and dy = omega x + mu y - c_r r_squared y - c_i r_squared x; advance x and y with the chosen integrator. Add L_homeo = alpha times the squared estimated derivative of period with respect to I to the task loss. Estimate T using unwrapped phase phi = atan2(y,x) after a warmup, or by measuring successive upward zero crossings. Estimate dT/dI by evaluating the same sequence at I + h and I - h and using [T(I + h) - T(I - h)]/(2h). The paper supplies the Hopf and homeostasis conditions; finite-difference period estimates and the loss term are engineering adaptations. First run a copy task and sine-wave phase-tracking task with a GRU baseline, an unconstrained Hopf cell, and the homeostatic Hopf cell under input-gain shifts from 0.5 to 2.0. Enforce mu > 0 and c_r > 0 with softplus parameterizations, and monitor radius growth. The quantitative prediction is that training creates an operating point with estimated dT/dI near zero, that the period-versus-gain curve has a vanishing fitted linear coefficient near that point, and that the orbit radius obeys r proportional to the square root of mu close to Hopf onset.

## Verification

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: harms
- Verdict: Built a real-valued RK2 Hopf recurrent cell with softplus-positive mu and c_r, input-conditioned omega, and a differentiable finite-difference period-homeostasis penalty. Numerical integration confirmed radius slope 0.99987 versus predicted 1.0, frequency slope -0.24705 versus predicted -0.24706, and quadratic period-response coefficient 0.9548 versus predicted 0.9768; the central period derivative was numerically zero. The gain-shift toy comparison reduced mean period error from 0.2619 to 0.1123, but this is a controlled mechanism comparison rather than evidence from trained sequence-task generalization.

### Mechanism check

- Verdict: Built a real-valued RK2 Hopf recurrent cell with softplus-positive mu and c_r, input-conditioned omega, and a differentiable finite-difference period-homeostasis penalty. Numerical integration confirmed radius slope 0.99987 versus predicted 1.0, frequency slope -0.24705 versus predicted -0.24706, and quadratic period-response coefficient 0.9548 versus predicted 0.9768; the central period derivative was numerically zero. The gain-shift toy comparison reduced mean period error from 0.2619 to 0.1123, but this is a controlled mechanism comparison rather than evidence from trained sequence-task generalization.
- Confidence: 8/10
- Limitations: The recurrent cell was smoke-tested but not trained end-to-end on copy or sine phase-tracking tasks, and no actual GRU baseline was run. The toy homeostatic comparison imposes an analytically quadratic omega-versus-gain relation rather than learning it from data; period homeostasis is therefore mechanistically verified, not yet demonstrated as a practical trained-model win.

### 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/664/bench_report.json)
- [hopf_bench.py](https://synthcore.org/code/664/hopf_bench.py)
- [hopf_cell.py](https://synthcore.org/code/664/hopf_cell.py)
- [hopf_experiment.py](https://synthcore.org/code/664/hopf_experiment.py)
- [report.md](https://synthcore.org/code/664/report.md)
- [report_bench_2026-08-31T213820.md](https://synthcore.org/code/664/report_bench_2026-08-31T213820.md)
- [results.json](https://synthcore.org/code/664/results.json)
- [verify_cell.py](https://synthcore.org/code/664/verify_cell.py)
- [Download all files as ZIP](https://synthcore.org/download/664)

## Disclaimer

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