# Event-Driven Hybrid Neural State Space

- ID: 2683
- Canonical URL: https://synthcore.org/idea/2683/event-driven-hybrid-neural-state-space
- API JSON: https://synthcore.org/api/idea/2683.json
- API Markdown: https://synthcore.org/api/idea/2683.md
- Verification status: unverified
- Source: [arXiv:2608.22226](https://arxiv.org/abs/2608.22226)
- Category: dynamics
- Solves: stability, speedup, accuracy
- ML areas: rnn, ssm, training-dynamics, inference-speedup
- Math tags: dynamical-systems, control-theory, numerical-analysis, linear-algebra
- Ratings: usefulness 6/10; difficulty 6/10; novelty 6/10

## Idea description

Replace a uniformly time-stepped neural ODE or state-space layer with a finite set of neural dynamical modes and an event scheduler. The hidden state follows the smooth flow of the current mode until a learned guard function crosses zero, at which point the solver evaluates the state at the event, switches mode, and continues with the new dynamics; this avoids numerical smearing of hard routing, thresholding, and switching behavior.

## Mathematical statement

The paper models switched systems as Eẋ = Aσx + bσ(u,t), where x is the continuous state, E is a possibly singular mass matrix, σ is the current discrete topology, Aσ is the mode-specific dynamics matrix, and bσ is the mode-specific input. Adapt this to a neural layer with ḣ = fσ(h,u;θσ), where h is a hidden state and σ belongs to {1,...,K}. Define an event guard gj(h,u,t;φj) = 0; an event occurs at the first future time τ for which the guard reaches zero with a prescribed crossing direction. Between events, integrate only the active mode. For a locally linear mode fσ(h,u) = Aσh + bσ(u), the exact constant-input flow is h(t + Δ) = exp(AσΔ)h(t) + ∫₀Δ exp(Aσ(Δ − s))bσ(u) ds. The engineering stability condition is maxσ μ(Aσ) < 0, where μ(A) = λmax((A + Aᵀ)/2) is the Euclidean logarithmic norm; this guarantees contraction inside every mode, while event resets and mode changes must be monitored separately.

## Key formulas

- E\dot{x}=A_{\sigma}x+b_{\sigma}(u,t)
- \dot{h}=f_{\sigma}(h,u;\theta_{\sigma}),\qquad \tau=\inf\{t'>t:g_j(h(t'),u,t';\phi_j)=0\}
- h(t+\Delta)=e^{A_{\sigma}\Delta}h(t)+\int_{0}^{\Delta}e^{A_{\sigma}(\Delta-s)}b_{\sigma}(u)\,ds
- \mu(A_{\sigma})=\lambda_{\max}\left(\frac{A_{\sigma}+A_{\sigma}^{\mathsf T}}{2}\right)<0\quad\forall\sigma

## Implementation notes

1. Integration point: implement this as a continuous-time recurrent or state-space layer inside a classifier, sequence model, or latent neural ODE. Use K = 2 to 4 modes, with each mode represented by a small MLP vector field or by a stable linear-plus-MLP residual field. Let the guard be gj(h) = wjᵀh + cj, with a specified crossing direction. At inference, maintain the current time, hidden state, active mode, and a list of candidate guards. 2. Pseudocode: initialize t = 0, h = h0, and mode σ. Estimate the next guard crossing; integrate the active mode from t to the candidate event using adaptive Runge–Kutta or a matrix exponential for a linear mode; bisect the interval until |gj| < εg; record the event; update σ to the destination mode; optionally apply a reset h ← Rσ→σ′h; and continue until the sequence end. During training, backpropagate through each smooth interval and use a straight-through or softly smoothed guard only when exact event gradients are unstable. 3. Computed versus estimated: event times, trajectories, and local truncation errors are computed by the solver; guard parameters, mode parameters, contraction margins, and event rates are learned or estimated empirically. For stable linear modes, parameterize Aσ = Sσ − ασI, where Sσ is skew-symmetric and ασ > 0, then compute μ(Aσ) after each update. 4. First cheap experiment: train a two-mode event-driven neural ODE on sequential MNIST or a synthetic two-regime damped oscillator, comparing it with the same parameter-count neural ODE using fixed-step RK4 and an adaptive solver that steps across guards. Sweep guard-crossing frequency and solver tolerances. The predicted signature is that event-driven switch error scales with event-localization tolerance, approximately O(εg), while a time-driven solver has error proportional to its step size when crossing a discontinuity. For sparse switching, measure wall-clock cost versus event count Ne; cost should scale approximately as O(Ne Cflow) and become lower than fixed stepping when Ne is much smaller than T/Δt. Also verify the contraction law ||h(t)|| ≤ exp(−αt)||h(0)||, where α = −maxσ μ(Aσ) > 0, within intervals without resets.

## Disclaimer

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