Back to Dynamics
Designing Sequence Models Through Their State Dynamics

Shutian Liang, Yue Song*

College of AI, Tsinghua University

* Denotes corresponding author.

Bringing Dynamics into Model Design

We usually describe sequence models through their architecture: an attention rule, a state-space parameterization, a gating mechanism, or an efficient recurrent update. These choices determine how information is written, retained, and read. They also raise a more basic question: once information enters the hidden state, how does it evolve over time?

A recurrent sequence model is a discrete-time dynamical system. If we temporarily set aside new writes, its state evolves through a transition:

\[S_t=T_tS_{t-1}.\]

A transition can shrink a state, preserve selected directions, rotate it in a plane, or move information between memory slots. These behaviors determine how a stored signal changes over time.

Same Retention, Different Dynamics

State norm · 1.00 in both

One initial signal, no new writes. Change how fast it fades and how it moves.

Decay

Keep the direction.

Decay An arrow shrinks along a fixed direction. Its length equals the shared state norm.

Decay + Oscillation

Turn while fading.

Decay plus oscillation An arrow rotates as it shrinks, tracing a spiral. Its length matches the decay arrow at every instant.
Memory has a lifetime, but it also has a trajectory.

From Recurrences to Differential Equations

Differential equations describe how a state evolves in continuous time. A linear homogeneous system has the form \(\dot S(\tau)=A(\tau)S(\tau)\), where \(A\) is its generator. Holding the generator fixed over an interval of length \(\Delta_t\) gives an exact discrete transition:

\[S(\tau_t)=e^{A_t\Delta_t}S(\tau_{t-1}),\quad T_t=e^{A_t\Delta_t}.\]

Conversely, when \(T_t\) admits a real matrix logarithm, we can construct \(A_t=\log(T_t)/\Delta_t\). The transition’s eigenvalues and invariant subspaces tell us which components decay, persist, or change phase.

Different Architectures, Related Dynamics

Different architectures can produce similar state dynamics. The examples below reach decay and oscillation from two starting points.

Starting from an oscillator

LinOSS (Rusch & Rus, 2025) starts from driven linear oscillators. For a positive scalar frequency \(\omega\), its continuous-time dynamics can be written as

\[\ddot x+\omega^2x=Bu(\tau).\]

Without the forcing term, the first-order state \((x,\dot x)\) has generator eigenvalues \(\pm i\omega\). Rescaling position and velocity reveals a two-dimensional rotation. D-LinOSS (Boyer et al., 2025) adds learnable damping. In our notation, a mode takes the form

\[\ddot x+2a\dot x+\omega_0^2x=Bu(\tau).\]

When \(0<a<\omega_0\), the generator eigenvalues are \(-a\pm i\sqrt{\omega_0^2-a^2}\). The state both loses amplitude and advances in phase. This describes the continuous system without forcing. The discrete behavior also depends on the chosen discretization.

Starting from selective decay

Mamba-1 (Gu & Dao, 2024) uses selective state spaces. With its real, negative diagonal parameterization, a homogeneous state mode follows \(z_t=\rho_tz_{t-1}\), \(0<\rho_t<1\). The input controls retention. With the parameters held fixed, the corresponding continuous system is \(\dot z=-a_tz\), where \(a_t=-\log\rho_t/\Delta_t\).

Mamba-2 (Dao & Gu, 2024) reorganizes computation through structured state-space duality and uses a scalar state transition within each head. Without new writes, the state still undergoes selective decay. Mamba-3 (Lahoti et al., 2026) adds phase evolution through complex state updates. In a suitable real coordinate system, a rotary pair follows

\[ \begin{aligned} z_t&=\rho_tR(\theta_t)z_{t-1},\\ R(\theta)&=\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix}. \end{aligned} \]

Here, \(\rho_t\) sets decay and \(\theta_t\) advances phase. With \(\nu_t=\theta_t/\Delta_t\) and \(J=\left[\begin{smallmatrix}0&-1\\1&0\end{smallmatrix}\right]\),

\[ \begin{aligned} \rho_tR(\theta_t)&=e^{(-a_tI+\nu_tJ)\Delta_t},\\ \operatorname{spec}(-a_tI+\nu_tJ)&=\{-a_t\pm i\nu_t\}. \end{aligned} \]

D-LinOSS adds damping to an oscillator. Mamba-3 adds rotation to a decaying state. In suitable coordinates and with parameters held fixed, both give decay plus rotation. Eliminating one coordinate of a rotating pair gives

\[\boxed{\ddot x+2a\dot x+(a^2+\nu^2)x=0.}\]

For \(a>0\) and \(\nu\ne0\), this is an underdamped oscillator, just as in D-LinOSS above.

Linear Attention: Which Directions Should Forget?

Now consider a matrix state that stores key–value associations. We write its update with the transition acting from the left:

\[S_t=T_tS_{t-1}+U_t,\quad S_t\in\mathbb R^{d_k\times d_v},\quad o_t=S_t^\top q_t.\]

The same \(T_t\) acts on every value column. We can therefore analyze one column \(s_t\in\mathbb R^{d_k}\) through \(s_t=T_ts_{t-1}\). Below, keys have unit norm, and we first consider positive gates with \(0<\beta_t<1\). Each model summary describes one head’s homogeneous transition on a state column, with the current key and gates held fixed.

DeltaNet: forgetting along the current key

DeltaNet (Yang et al., 2024) writes a correction to the association currently stored at the key:

\[\begin{aligned}S_t&=S_{t-1}+\beta_tk_t(v_t-S_{t-1}^\top k_t)^\top\\&=(I-\beta_tk_tk_t^\top)S_{t-1}+\beta_tk_tv_t^\top.\end{aligned}\]

Let \(P_t=k_tk_t^\top\). Since \(\|k_t\|_2=1\), \(P_t\) is an orthogonal projector. The component parallel to the key shrinks by \(1-\beta_t\). The orthogonal component stays unchanged:

\[T_ts=(1-\beta_t)s_\parallel+s_\perp.\]

The corresponding continuous system is \(\dot s=-b_tP_ts\), with \(b_t=-\log(1-\beta_t)/\Delta_t\). DeltaNet implements relaxation in an input-selected direction.

Gated DeltaNet: adding a common forgetting rate

Gated DeltaNet (Yang et al., 2025) adds a scalar forget gate \(0<\alpha_t<1\), giving \(T_t=\alpha_t(I-\beta_tP_t)\).

To see how this acts in different directions, split a state column into \(s=s_\parallel+s_\perp\), where \(s_\parallel=P_t s\) is parallel to the current key and \(k_t^\top s_\perp=0\). Since the key has unit norm, \(P_t s_\parallel=s_\parallel\), while

\[P_t s_\perp=k_t(k_t^\top s_\perp)=0.\]

Applying the full transition therefore gives

\[ \begin{aligned} T_t s&=\alpha_t(I-\beta_tP_t)(s_\parallel+s_\perp)\\ &=\alpha_t(1-\beta_t)s_\parallel+\alpha_t s_\perp. \end{aligned} \]

The delta factor leaves every component orthogonal to the current key unchanged, so its retention factor is just \(\alpha_t\). The key component receives both the shared factor \(\alpha_t\) and the extra factor \(1-\beta_t\), giving \(\alpha_t(1-\beta_t)\).

Because \(I\) and \(P_t\) commute, its generator is

\[\dot s=(-a_tI-b_tP_t)s,\quad a_t=-\frac{\log\alpha_t}{\Delta_t}.\]

This separates shared forgetting from the extra correction along the key.

KDA: different decay rates across coordinates

Kimi Delta Attention (KDA) (Kimi Team, 2025) replaces the scalar gate with a diagonal gate:

\[\begin{aligned}D_t&=\operatorname{Diag}(\alpha_{t,1},\ldots,\alpha_{t,d_k}),\\S_t&=(I-\beta_tP_t)D_tS_{t-1}+\beta_tk_tv_t^\top.\end{aligned}\]

The diagonal gate scales each state coordinate by \(\alpha_{t,i}\). The delta correction can then mix coordinates, so we need to analyze their combined effect.

With \(0<\alpha_{t,i}<1\) and \(0<\beta_t<1\), hold the current key and gates fixed over an interval \(\Delta>0\). Drop the time index and write \(H=I-\beta kk^\top\), so \(T=HD\). Rescaling the state by \(D^{1/2}\) gives the transition

\[\widetilde T=D^{1/2}TD^{-1/2}=D^{1/2}HD^{1/2}\]

This matrix is symmetric. Since \((1-\beta)I\preceq H\preceq I\), its eigenvalues satisfy

\[0<(1-\beta)\min_i\alpha_i\le\lambda_j(T)\le\max_i\alpha_i<1.\]

Let \(U\) be an orthogonal matrix satisfying \(\widetilde T=U\operatorname{Diag}(\lambda_j)U^\top\). First rescale the state by \(D^{1/2}\), then rotate it by \(U^\top\):

\[y=U^\top D^{1/2}s,\quad y_{n+1,j}=\lambda_j y_{n,j}.\]

Since \(0<\lambda_j<1\), each transformed coordinate decays. The corresponding continuous dynamics over the interval \(\Delta\) are

\[\dot y_j=-\gamma_j y_j,\quad \gamma_j=-\frac{\log\lambda_j}{\Delta}>0.\]

Larger \(\gamma_j\) means faster decay. Smaller \(\gamma_j\) means longer retention. These coordinates generally differ from the original state axes, and their retention factors \(\lambda_j\) reflect both the diagonal gate and the delta correction. This coordinate system can change when the key or gates change.

Gated DeltaNet-2: separating erase and write

KDA uses the same scalar \(\beta_t\) to erase an old association and write a new value. Gated DeltaNet-2 (GDN2) (Hatamizadeh et al., 2026) separates these decisions into a key-side erase gate \(b_t\) and a value-side write gate \(w_t\), while retaining KDA’s channel-wise decay:

\[ \begin{aligned} S_t&=T_tS_{t-1}+k_t(w_t\odot v_t)^\top,\\ T_t&=\bigl[I-k_t(b_t\odot k_t)^\top\bigr]D_t, \quad D_t=\operatorname{Diag}(\alpha_t). \end{aligned} \]

Tying \(b_t=\beta_t\mathbf 1_{d_k}\) and \(w_t=\beta_t\mathbf 1_{d_v}\) recovers KDA. Making the decay scalar as well recovers Gated DeltaNet. Given the input, \(T_t\) determines how the old state evolves, while \(w_t\) controls the new write. We derive its frozen spectrum below using the same approach as for KDA.

Drop the time index and set \(B=\operatorname{Diag}(b)\). Then \(T=D-kk^\top BD\), which is generally asymmetric. For positive \(b_i\) and \(\alpha_i\), define \(P=(BD)^{1/2}\) and \(u=Pk\). Since these diagonal matrices commute, rescaling by \(P\) gives

\[\boxed{\widetilde T=PTP^{-1}=D-uu^\top.}\]

The right-hand side is real and symmetric, so every eigenvalue of \(T\) is real. An asymmetric erase operation therefore still admits a basis of real modes.

The official default implementation uses sigmoid erase and write gates, exponential decay, and L2-normalized keys. In the mathematical parameterization, \(0<b_i,w_j<1\) and \(0<\alpha_i<1\). With \(\|k\|_2=1\), let \(r=B^{1/2}k\). Then

\[ \begin{aligned} \|r\|_2^2&=\sum_i b_i k_i^2<1,\\ D-uu^\top&=D^{1/2}(I-rr^\top)D^{1/2}. \end{aligned} \]

Because \(I-rr^\top\) is positive definite and at most \(I\), we obtain

\[ \begin{aligned} &0\prec D-uu^\top\preceq D\prec I\\ &\Longrightarrow\quad \boxed{0<\lambda_j(T)<1.} \end{aligned} \]

As with KDA, diagonalize \(\widetilde T\) with an orthogonal matrix \(U\) and use \(y=U^\top Ps\). Every frozen mode decays:

\[ \begin{aligned} y_{n+1,j}&=\lambda_j y_{n,j},\\ \dot y_j&=-\gamma_j y_j, \quad \gamma_j=-\frac{\log\lambda_j}{\Delta}>0. \end{aligned} \]

This also connects to the second-order equations above. For two frozen modes, \(x=y_i+y_j\) satisfies

\[\ddot x+(\gamma_i+\gamma_j)\dot x+\gamma_i\gamma_j x=0.\]

Its characteristic roots are \(-\gamma_i\) and \(-\gamma_j\). Distinct rates give an overdamped equation. This second-order description applies to a pair of frozen modes. The full state can have many modes, and their basis changes with the input. In particular, a product of changing transitions need not share the real-spectrum property of each step.

The implementation also offers allow_neg_eigval=True, which expands the erase range to \(0<b_i<2\). The same similarity transform remains valid, although positive definiteness can be lost. Negative real eigenvalues can produce alternating signs. The frozen transition still has no non-real conjugate pair.

So far, the key and gates control which components decay and how quickly. GDN2 also separates erasing from writing. Can a frozen transition support an oscillatory mode while retaining the state?

Complex KDA: Oscillation Through Signed Gates

Complex KDA (CKDA) (Siems et al., 2026) expands KDA’s gate ranges, allowing a state to rotate as well as decay:

\[T_t=(I-\beta_tk_tk_t^\top)D_t,\quad\beta_t\in[0,2],\quad\alpha_{t,i}\in[-1,1].\]

We analyze one fixed transition for one head and one state column. Here, \(D\) is real and diagonal, \(k\) is a real unit vector, and \(\beta\) is a real scalar.

For a two-dimensional example with fixed gates and key, choose \(0<\rho<1\) and \(0<\theta<\pi/2\). A signed gate and the delta correction give

\[ \begin{aligned} k&=\begin{bmatrix}\cos\theta\\\sin\theta\end{bmatrix},\quad D=\rho\operatorname{Diag}(-1,1),\quad\beta=2,\\ T&=(I-2kk^\top)D=\rho R(2\theta). \end{aligned} \]

Its eigenvalues are \(\rho e^{\pm2i\theta}\), a non-real conjugate pair that oscillates and decays because \(\rho<1\). In general, a non-real pair implies oscillation, not stability. An oscillatory mode is asymptotically stable only when \(|\lambda|<1\).

The necessary conditions follow from symmetry. Write \(T=HD\), where \(H=I-\beta kk^\top\) and \(\|k\|_2=1\). If \(\beta<1\), then \(H\) is positive definite, and

\[H^{-1/2}TH^{1/2}=H^{1/2}DH^{1/2}.\]

The matrix on the right is symmetric, so all eigenvalues are real. The case \(\beta=1\) follows by continuity. If all \(\alpha_i\ge0\), the determinant identity gives

\[\det(\lambda I-T)=\det(\lambda I-D^{1/2}HD^{1/2}).\]

Since \(D^{1/2}HD^{1/2}\) is symmetric, this also forces a real spectrum. Thus a non-real conjugate pair requires both \(\beta>1\) and \(\alpha_i<0\) for at least one \(i\). These are necessary conditions, not a guarantee of oscillation.

To count the possible oscillatory pairs, first assume the gates are distinct and nonzero, ordered as \(\alpha_1<\cdots<\alpha_d\), and that every key coordinate is nonzero. The matrix determinant lemma gives

\[\chi_T(\lambda)=\prod_{i=1}^{d}(\lambda-\alpha_i)\left(1+\beta\sum_{i=1}^{d}\frac{\alpha_i k_i^2}{\lambda-\alpha_i}\right).\]

Between two adjacent gates of the same sign, the expression in parentheses is continuous and runs from one sign of infinity to the other. It must therefore cross zero, giving a real eigenvalue. At most one interval separates negative and positive gates, so at least \(d-2\) intervals contain a real root. This leaves at most two non-real roots. Because \(T\) is real, they must form at most one non-real conjugate pair. The same bound holds for repeated or zero gates and zero key coordinates by continuity.

In our Mamba-3 blog post (Part I) (Liang & Song, 2026), we observed lower long-context perplexity in models trained with oscillation. To explore long-context behavior in linear attention, we also evaluated the officially released CKDA and KDA models on PG-19 (Rae et al., 2019) and LongBench-E (Bai et al., 2024).

PG-19: lower perplexity beyond the training context

CKDA maintains lower perplexity than KDA from 2K to 64K, including beyond the 4K training context reported by Siems et al. (2026).

PG-19 perplexity for 1.3B KDA in blue and CKDA in orange at 2K, 4K, 8K, 16K, 32K, and 64K tokens. CKDA is lower at every length. Both curves fall to their lowest point at 32K, then rise at 64K. A dotted line marks 4K.
PG-19 perplexity at 1.3B. Lower is better. The gray dotted line marks the 4K training context length.

LongBench-E: gains vary by task

CKDA averages 13.90 across the 13 tasks, compared with 12.75 for KDA, and scores higher on 8 of them.

LongBench-E scores. Higher is better.
Model QA MQA HQA 2WM GR MN TR TQA SS PC PR LCC RB Avg.
KDA 5.61 13.32 6.80 7.95 9.11 10.34 23.00 23.69 24.75 3.24 6.47 14.96 16.52 12.75
CKDA 5.87 13.36 6.76 8.23 8.99 7.60 30.00 26.66 26.06 3.14 5.89 18.58 19.59 13.90

CKDA performs better than KDA in these evaluations. It achieves lower PG-19 perplexity at every tested context length from 2K to 64K and a higher average score on LongBench-E, with gains on 8 of the 13 tasks.

Momentum: Another Route to Oscillation

Momentum DeltaNet (MDN) (Huang et al., 2026) adds a momentum state \(M_t\) to the memory update:

\[ \begin{aligned} M_t&=\mu_tM_{t-1}-\eta_tk_t(v_t-\alpha_tS_{t-1}^\top k_t)^\top,\\ S_t&=\alpha_tS_{t-1}-\beta_tM_t. \end{aligned} \]

We consider one head and one state column, with scalar coefficients and a real unit key held fixed, and set aside new writes. The coupling \(P=kk^\top\) has rank one. Let \(s_n\) and \(m_n\) denote the memory column and its momentum. Their updates are \(m_{n+1}=\mu m_n+\alpha\eta Ps_n\) and \(s_{n+1}=\alpha s_n-\beta m_{n+1}\).

Each direction has two components: memory and momentum. Since \(Pk=k\) and \(Pe=0\) for \(e\perp k\), the key direction has the block \(B\). Each of the \(d_k-1\) perpendicular directions has an independent block \(B_\perp\):

\[ \begin{aligned} B&=\begin{bmatrix}\alpha(1-\beta\eta)&-\beta\mu\\ \alpha\eta&\mu\end{bmatrix},\\ B_\perp&=\begin{bmatrix}\alpha&-\beta\mu\\0&\mu\end{bmatrix}. \end{aligned} \]

\(B_\perp\) is triangular, so its eigenvalues \(\alpha\) and \(\mu\) are real. For the key block, write \(c=\alpha(1-\beta\eta)+\mu\). Its eigenvalues are roots of

\[\det(\lambda I-B)=\lambda^2-c\lambda+\alpha\mu.\]

Only the key block can have non-real eigenvalues. Its quadratic has just two roots, so the transition has at most one conjugate pair. The pair appears when \(c^2<4\alpha\mu\). With \(0<\alpha,\mu<1\), its modulus is \(\sqrt{\alpha\mu}<1\), so the oscillation decays over time.

What Are the Limits of a Single Oscillator?

A single oscillator, represented by one non-real conjugate pair, has one oscillation frequency. Its linear readouts can differ in amplitude and phase, but they share that frequency. Suppose two pieces of memory need different rotation speeds: 20° and 50° per step. The demo shows why one fixed oscillator cannot sustain both frequencies.

Can One Pair Match Two Frequencies?

Each curve shows a coordinate of a rotating state. Solid curves are targets, and dashed curves are linear readouts. With one pair, both readouts share a frequency. All curves start at the same value and use the same decay. Try Match A, then Match B.

Target A Target B One-pair readouts

Target A · 20° / step

Matches
Target A and its oscillatory readout Target A rotates 20 degrees per step. The readout rotates 20 degrees per step. The two curves match. 1 0 −1 0 8 16 24 Step

Target B · 50° / step

Different frequency
Target B and its oscillatory readout Target B rotates 50 degrees per step. The readout rotates 20 degrees per step. The readout has a different frequency. 1 0 −1 0 8 16 24 Step

A matches. B needs a different frequency.

Linear readouts of fixed oscillatory states. No new writes.

The targets correspond to two independent state pairs, with \(\phi_A=20^\circ\), \(\phi_B=50^\circ\), and \(\rho=0.98\):

\[T_\star=\rho R(\phi_A)\oplus\rho R(\phi_B).\]

Here \(\oplus\) places the two rotations in separate blocks. Each contributes a distinct non-real conjugate pair. Within one head and state column, the fixed CKDA and MDN transitions above have at most one pair. Therefore they cannot exactly maintain both independent rotations with a fixed linear state encoding.

Let \(\mathsf T\) and \(T_\star\) be fixed real linear transitions. Suppose the time-independent linear map \(E\) is injective and encodes the entire target state \(z\), including both rotating pairs, as \(s=Ez\). Exact state dynamics require

\[\mathsf T E=ET_\star.\]

If \(T_\star v=\lambda v\), then \(\mathsf T(Ev)=\lambda(Ev)\), with \(Ev\ne0\). Every target eigenvalue must therefore also appear in the model transition. A wider state with only one oscillatory pair still cannot reproduce both target frequencies exactly.

This argument does not rule out finite-horizon approximation, time-varying encodings, or input-dependent products of transitions. Multiple heads or layers can also combine more frequencies. CyFA, which we consider next, supports several oscillatory pairs within a single transition, with related frequencies.

From Rotation to Memory Transport

CyFA (Chen et al., 2026) moves information through memory slots using cyclic shifts. Each head maintains separate key and value states over \(m\) relative-time slots:

\[\begin{aligned}K_t&=\alpha_tP(\delta_t)K_{t-1}+\beta_te_0k_t^\top,\\V_t&=\alpha_tP(\delta_t)V_{t-1}+\beta_te_0v_t^\top.\end{aligned}\]

Here, \(K_t\in\mathbb R^{m\times d_k}\), \(V_t\in\mathbb R^{m\times d_v}\), and \(e_0\) selects the first slot. The clock increment \(\delta_t\in(0,1)\) controls CyFA’s Fourier fractional shift \(P(\delta_t)\), rather than an arbitrary transport operator. The gate \(\alpha_t\) controls decay and \(\beta_t\) controls writing, with both gates in \((0,1)\). This shift operator is different from the key projector used earlier. Existing information moves before the new key and value are written into slot zero.

Transport in slot space, oscillation in Fourier space

We restrict the count below to an odd number of slots \(m=2p+1\). Even \(m\) adds a real Nyquist mode and requires a separate count. For odd \(m\), an orthogonal real Fourier basis \(\Phi\) decomposes the shift into a constant mode and \(p\) cosine–sine pairs:

\[ \begin{aligned} P(\delta)&=\Phi\mathcal R(\delta)\Phi^\top,\\ \mathcal R(\delta)&=1\oplus\bigoplus_{j=1}^{p}R(\omega_j\delta),\\ \omega_j&=\frac{2\pi j}{m}. \end{aligned} \]

In Fourier coordinates, cyclic transport rotates each cosine–sine pair. With no new writes, each pair follows \(z_{t,j}=\alpha_tR(\omega_j\delta_t)z_{t-1,j}\), with eigenvalues

\[\lambda_{t,j,\pm}=\alpha_t e^{\pm i\omega_j\delta_t}.\]

Because \(0<\omega_j\delta_t<\pi\), all \(p=(m-1)/2\) pairs are non-real. Each gives a local damped oscillator after setting \(a_t=-\log\alpha_t/\Delta_t\) and \(\nu_{t,j}=\omega_j\delta_t/\Delta_t\). The constant mode only decays.

Compare the same memory state with and without shifting. In slot coordinates, a shift moves its signed coefficients between slots. In Fourier coordinates, it rotates each cosine–sine pair. The two rows below show the same states in different coordinates.

One State, Two Coordinate Systems

State norm · 1.00 in both

Start with one write in slot 0. Top: slot values. Bottom: Fourier pairs. Both columns retain 95% of the state per step. Only the right column shifts.

Slots: decay

Slots: decay At step 0, only slot zero contains the initial write. 1 0 −1 0 1 2 3 4 Slot

Slots: decay + shift

Slots: decay + shift At step 0, only slot zero contains the initial write. 1 0 −1 0 1 2 3 4 Slot

Fourier: decay

Fourier: decay Both Fourier pairs have their initial length and direction. Neither pair rotates. cos sin

Fourier: decay + rotation

Fourier: decay + rotation Both Fourier pairs have their initial length and direction. Neither pair has rotated yet. cos sin
Pair 1 Pair 2 Constant mode: 0.45 in both
Both pairs decay equally. With shifting, Pair 2 rotates twice as fast.

Many modes, coupled controls

CyFA has multiple oscillatory pairs, but it cannot set their frequencies independently. Their phase increments obey

\[\theta_{t,j}=\frac{2\pi j}{m}\delta_t=j\theta_{t,1}.\]

All modes share one learned clock increment and one decay coefficient. The Fourier subspaces and frequency ratios are fixed by the transport structure. At \(m=5\), for example, the second pair rotates through twice the angle of the first. The two pairs therefore cannot use angles \(\pi/10\) and \(\pi/3\) in the same update.

CyFA's oscillators have fixed frequency ratios, and their number is set by the slot count \(m\). For odd \(m\), each state column has \((m-1)/2\) oscillatory pairs. Increasing \(m\) adds more pairs whose frequencies remain tied to the same learned clock. This describes the homogeneous slot transition. It does not claim that the full input-driven model output contains only these frequencies.

How transported states are written and read

Let \(W\in\mathbb R^{m\times m}\) be the learned readout matrix, using a different symbol from the rotation \(R\). Omitting dot-product scaling, CyFA reads

\[\pi_t=\operatorname{softmax}(WK_tq_t),\quad o_t=(WV_t)^\top\pi_t.\]

The matrix \(W\) can mix Fourier modes at readout without changing the homogeneous transition. Starting with zero states, define the cumulative clock \(\ell_t=\sum_{r=1}^t\delta_r\), a retained write weight \(\gamma_{t,i}=\beta_i\prod_{r=i+1}^t\alpha_r\), and a relative-time coefficient vector \(c_{t,i}=P(\ell_t-\ell_i)e_0\). Unrolling the recurrences gives

\[K_t=\sum_{i=1}^t\gamma_{t,i}c_{t,i}k_i^\top,\quad V_t=\sum_{i=1}^t\gamma_{t,i}c_{t,i}v_i^\top.\]

The effective coefficient on a historical value is \(\gamma_{t,i}(\pi_t^\top Wc_{t,i})\). It depends on elapsed learned time, decay, and the full set of query–key matches through the softmax. Fractional shifts are orthogonal but need not be entrywise nonnegative, so \(c_{t,i}\) is a signed coefficient vector, not a probability distribution.

A moving coordinate system can transfer rotation from the recurrence into the writes and readout. Define \(\overline K_t=\mathcal R(-\ell_t)\Phi^\top K_t\), and similarly for \(\overline V_t\). With \(b=\Phi^\top e_0\) and \(u_t=\mathcal R(-\ell_t)b\), the updates become

\[\begin{aligned}\overline K_t&=\alpha_t\overline K_{t-1}+\beta_tu_tk_t^\top,\\\overline V_t&=\alpha_t\overline V_{t-1}+\beta_tu_tv_t^\top.\end{aligned}\]

The original states are recovered as \(K_t=\Phi\mathcal R(\ell_t)\overline K_t\) and likewise for \(V_t\) before readout. This is a time-dependent coordinate transformation, so it does not contradict the non-real spectrum in fixed Fourier coordinates. The same model can thus place rotation in the state update or in the writes and readout, depending on the coordinates.

Dynamics as a Design Dimension

Beyond asking whether a model oscillates, we can ask how many oscillatory modes it supports, which controls they share, whether their subspaces change with the input, and how the model writes and reads in those coordinates.

Designing how memory evolves.
Design question Examples in this post
Which directions forget? DeltaNet selects the current key direction. Gated DeltaNet adds shared decay.
How many retention timescales? KDA uses coordinate-wise gates and allows different decay rates in transformed coordinates. GDN2 retains positive real decay modes under its default gates.
Can erase and write be controlled separately? GDN2 separates key-side erasure from value-side writing while keeping a real frozen spectrum.
Can a step advance phase? Mamba-3 uses rotary pairs, CKDA composes reflections, and MDN couples state and momentum.
How many non-real pairs per column? At most one for CKDA and the scalar-gated MDN analyzed here. For odd \(m\), CyFA’s active slot transition has \((m-1)/2\).
Which modes can be controlled independently? CyFA’s harmonics share a learned clock and a common decay rate.
Can the mode subspaces change? CKDA and MDN can change their local modes with the input. CyFA uses fixed Fourier subspaces.
How does phase organize memory? CyFA’s learned clock controls transport across slots and the relative-time coefficients used at readout.

Writing, readout, input dependence, multiple heads, and composition across layers also shape what a complete model can compute. Studying state dynamics lets us examine one part of that design in detail.

These questions suggest experiments. Does a task benefit from more oscillatory modes? Should each pair have its own phase and decay controls, or should modes share a clock? Does allowing their subspaces to change with the input help? How much memory and computation do these choices require, and can the updates still be trained efficiently in parallel?

Back to dynamics. We do not claim that oscillatory dynamics are always better. We hope to treat state dynamics as one dimension of model design, looking beyond memory decay and erasure.

Memory has a lifetime, but it also has a trajectory.

References

Citation

If you find this post useful, please cite it as:

@misc{liang2026backtodynamics,
  title        = {{Back to Dynamics}: Designing Sequence Models Through Their State Dynamics},
  author       = {Liang, Shutian and Song, Yue},
  year         = {2026},
  howpublished = {Blog post},
  url          = {https://shutian-liang.github.io/backtodynamics/}
}

Download BibTeX (.bib)