2026-08-10 · 14 min · linear-attention · state-space-models · attention · math · explainer · open-source
There are two separate research literatures about neural networks that forget at an input-dependent rate, and as far as I can tell they mostly do not read each other.
One starts in continuous time. Liquid Time-constant Networks (Hasani, Lechner, Amini, Rus and Grosu, 2020) are ODEs, motivated by the neural dynamics of C. elegans, analysed with stability theorems and solved with numerical integrators. The other starts in discrete time. Gated DeltaNet (Yang, Kautz and Hatamizadeh, 2024) is a linear attention variant, motivated by retrieval failures in efficient Transformers, analysed through online learning and implemented with chunkwise GPU kernels.
They are the same recurrence. Not analogous — the same. This piece derives that correspondence from each paper's own equations, works through what each tradition figured out that the other did not, and then reads LTCAttention, an implementation published today that sits deliberately between them.
Part 1 — What "liquid" means
A plain continuous-time RNN decays toward its input at a fixed rate: , where is a learned constant. Every input, every timestep, same . LTC's move is to let the decay rate be a function of the state and the input. Substituting gives the paper's Equation 1:
Read the bracket. The coefficient multiplying is the decay rate, and it now contains — a neural network. So the system time constant is
which is a number the network computes fresh at every point in time from whatever it is currently looking at. That is the whole idea, and the name: a time constant that flows.
A conventional RNN fixes its decay rate at training time. An LTC makes it an output of the network: a gate f reads the current state and the current input, and the answer sets how fast this neuron forgets on this timestep. Turn the drive up and the memory horizon collapses from 100 steps toward 5; turn it down and the neuron holds. The bounds matter as much as the mechanism — because f is a bounded sigmoid, the time constant is trapped in a finite interval no matter how extreme the input, which is what makes the system provably stable rather than merely usually stable.
The paper's two theorems are what make this more than a reparameterization. Because is a bounded sigmoidal nonlinearity, Theorem 1 traps the time constant:
and Theorem 2 traps the state itself between and , "which guarantees that the outputs of LTCs never explode even if their inputs grow to infinity." Those are unusual guarantees. A model whose decay rate is an unconstrained network output could in principle be driven to instability by an adversarial input; LTC's cannot, by construction.
This is worth flagging because the same argument recurs, unattributed, throughout modern gated linear
attention. Every one of these architectures constrains its gate — Mamba2 through a softplus and a
discretization, Gated DeltaNet by requiring , Kimi K3's
KDA through a gate_lower_bound on . The reason is always the
same one LTC proved in 2020: an unbounded forgetting rate is an unbounded system.
Part 2 — The bridge
Now the part neither literature states, which falls out of LTC's own Algorithm 1. Solving Equation 1 in closed form is not possible, so the paper introduces a fused solver — a semi-implicit Euler step that reads
Look at the denominator. Writing for the gate output,
because by definition. So the entire update is
That is a gated linear recurrence. Previous state times a scalar in , plus a write. The scalar depends on the input, through . This is structurally identical to what Mamba2, Gated DeltaNet and KDA do — the object those papers call and describe as a "data-dependent gating term."
The only difference is which approximation of the exponential you use. The exact solution of the linear ODE over a step decays by ; LTC's fused solver uses , which is the Padé approximant of that exponential.
Take LTC’s fused solver step, group the terms, and the denominator collapses to 1 + Δt/τ_sys. What is left is a gated linear recurrence: last state times a scalar in (0,1), plus a write. That scalar is the thing Gated DeltaNet calls α and Mamba2 calls the decay gate — LTC just spells it as a Padé approximant of the exponential rather than the exponential itself. In the regime these models actually run in (small z, long memory) the two agree to a fraction of a percent. The literatures are not analogous. They are the same recurrence, discretized two different ways.
In the regime these models actually operate in — long memory, so — the two agree to a fraction of a percent. LTC picked the Padé form because it is what makes the implicit Euler step solvable in closed form; the linear-attention literature picked the exponential because composes cleanly across a chunk, which is what its parallel scan needs. Same recurrence, two discretizations, chosen for two different implementation reasons.
Which means the three quantities have one meaning:
| tradition | symbol | this article's other coverage |
|---|---|---|
| continuous-time / LTC | , a time constant in seconds | Part 1 above |
| gated linear attention | , retention per token | KDA has a half-life |
| what you should think in | , a horizon in tokens | same |
I have argued the third column before, and the LTC connection strengthens it: a half-life is just in units a language model can be reasoned about in. , and are one number in three coordinate systems.
Part 3 — What gating alone cannot do
If the story ended there, Gated DeltaNet would be LTC with better kernels. It is not, and the difference is the delta rule.
A gated linear attention state is a matrix holding key-value associations. Pure gating updates it as : scale everything down, add the new pair. The problem the Gated DeltaNet paper identifies is that is a single number multiplying the entire state. It can dump everything, and it can hold everything, and it has no way to express forget this one fact, keep the rest.
DeltaNet solved that with the delta rule, which subtracts the state's existing content at the current key before writing the new one — but, as the paper puts it, "since this process only modifies a single key-value pair at a time, the model lacks the ability to rapidly clear outdated or irrelevant information, especially during context switches." One mechanism clears the table but cannot pick up a single plate; the other picks up single plates but cannot clear the table.
The gated delta rule (Equation 8) is both terms in one product:
The paper’s argument is that these two knobs are complementary rather than redundant, and the two bars are why. α is a blunt instrument: it scales everything the state holds, so it can dump a whole stale context at a topic switch but cannot forget one fact and keep the rest. β is a scalpel: it subtracts precisely the component along the key being written, so it can overwrite one association without disturbing anything else — but it can only ever touch one key per step, so clearing a long context takes as many steps as there were keys. DeltaNet had the scalpel and no way to clear the table; Mamba2 had the table-clearing and no scalpel. The gated delta rule is just both terms in the same product.
The two bars are the whole argument. Along any direction orthogonal to the current key, the surviving fraction is — the global forgetting knob. Along itself it is — global decay and targeted erasure. Set and you have DeltaNet; set and you have Mamba2; the useful region is the interior.
Part 4 — LTCAttention, and a third place to put a time constant
Both traditions above put the time constant on a recurrent state. LTCAttention by Rikka Botan, published today under MIT, puts it somewhere else: on the attention score itself.

The construction is worth following because it is genuinely clever. Each KV head carries learned directions, orthonormalized by QR so that . The first token of the causal block, , sets every mode's time constant through one linear projection:
That is the LTC principle exactly — a positive, input-conditioned, bounded-below time constant, with the sigmoid playing the role LTC's Theorem 1 played. Because is visible to every position in the block, reading it keeps the controller causal.
For a query at and a key at , with key age , mode retains , and the modes assemble into
which drops into the score as .
Drag δ and every mode’s horizon moves together — that is the LTC principle, transplanted from a recurrent state onto an attention score. One linear projection of the block’s first token sets all the time constants, and because that token is visible to every query, the controller stays causal. The division by a sigmoid is what keeps it honest: τ = τ_min/σ(·) is always greater than τ_min, so no mode can decay arbitrarily fast and no exponent can blow up. The modes are orthonormal, so each one owns a direction in head space and decays independently — a spectrum of memory horizons inside a single head, exactly as in a per-channel gated linear attention, but expressed as a metric on the query-key inner product instead of a recurrent state.
The effect: the learned orthogonal complement passes through untouched, while each temporal mode is an eigenvector with eigenvalue . Since with , this is the same stable diagonal decay law as an SSM — just expressed as a metric on an inner product rather than a state update.
The factorization is the load-bearing trick, and it checks out
Applying a different to every pair naively means building a object. LTCAttention avoids it by pushing the decay into the queries and keys separately, around a fixed center :
I checked the algebra rather than taking it on faith. Decompose using orthonormality; the transform replaces each modal coefficient by and leaves alone, and symmetrically for . Their inner product is then
and expanding directly gives the same thing. The center cancels, exactly as claimed. The modal projections cost , so scaled dot-product attention remains the only quadratic operation — the mechanism is free at the asymptotic level and the standard SDPA kernel is still doing the heavy lifting.
There is a real numerical hazard hiding in that trick, and the code knows it. The factors
and are individually huge or tiny even though their product is
bounded by 1; they cancel only algebraically. The implementation handles this two ways. It computes
the exponents in FP32 or FP64 regardless of the BF16 activation dtype, with a comment saying exactly
why. And it fixes at the middle of the context, centre = 0.5 * (max_positions - 1), rather than
recomputing it per prefix — which both keeps cached keys valid as the KV cache grows and halves the
worst-case exponent.
The choice of then finishes the job, and this is my favourite detail in the repository.
The default is min_tau = max_positions / 12. Combined with the centered origin, the largest
exponent magnitude is
independent of context length. Whatever you configure, the factorization's intermediate values stay inside roughly . That is not a coincidence; it is a bound chosen so the trick cannot overflow.
The experiment, and the number that worries me
The repository ships a real controlled study rather than a claim: three seeds, a paired comparison, SHA-256 checksums on the tokenized data, one epoch over 287,588,352 FineWeb-Edu tokens consumed without replacement, and the full result JSON checked in.


Reading the numbers straight out of results/fineweb_edu_fullrank_29m_6layer_half_3seeds.json:
| validation loss | perplexity | |
|---|---|---|
| standard | 4.13471 ± 0.02367 | 62.49 |
| LTC | 4.07281 ± 0.01777 | 58.73 |
| paired difference | −0.06190 ± 0.00646 |
The per-seed differences are −0.0544, −0.0702 and −0.0610 — negative in all three, with a spread ten times smaller than the effect. As a paired result at this scale that is about as clean as three seeds get, and the README is careful to say that "three seeds and one small model scale do not establish broad scaling behavior."
Two confounds are worth quantifying, and the repository reports exactly the numbers needed to do it.
Parameters. LTC adds 345,600 of them, +1.20%. Borrowing the Chinchilla-form sensitivity with , a 1.20% parameter increase at 28.8M is worth roughly 0.005 nats. The observed effect is more than ten times that. The gain is not just parameter count.
Compute. This is the one. LTC also runs 12.40% slower (142,473 vs 162,638 tokens/sec, measured and reported by the author). The comparison is token-matched, not wall-clock-matched. Spend that same 12.4% on more training tokens for the baseline instead, and the same scaling form ( on the data term) predicts a gain of roughly 0.061 nats — which is, to two decimal places, the entire measured effect.
One further limitation, stated plainly in the repo: the released code is LTC-only, and the baseline artifacts are "retained only as experiment provenance." So the comparison cannot currently be re-run from this repository, only re-read.
What each tradition knows
Setting the implementations aside, the two literatures have complementary blind spots.
LTC knows about stability and it knows about time. It has proofs that the time constant and the state stay bounded under arbitrary input. It treats as a real quantity, which means it handles irregularly sampled sequences natively — a capability the discrete-time literature mostly gave up without noticing, because tokens arrive on a uniform grid. And it thinks in a unit, seconds, that forces you to ask how long a memory is supposed to last.
Gated linear attention knows about scale and it knows about writing. It has the chunkwise parallel algorithms that make these recurrences trainable on modern hardware at all, which is the entire reason the idea reached billion-parameter models. And it has the delta rule — a way to modify one association without disturbing the others that has no counterpart in the LTC formulation, where the "write" is just added to a decaying state.
LTCAttention is interesting mostly as evidence that the gap is crossable in either direction: it takes LTC's bounded input-conditioned , GDN's adaptive retention, and applies them to a third substrate neither paper considered. Whether that particular hybrid pays for its 12% is, on the evidence available, not yet settled. Whether the two literatures should be reading each other seems to me much clearer.
Sources: Liquid Time-constant Networks (arXiv 2006.04439,
Hasani, Lechner, Amini, Rus, Grosu) for Equation 1, Algorithm 1, and Theorems 1–2, read via ar5iv;
Gated Delta Networks: Improving Mamba2 with Delta Rule (arXiv
2412.06464, Yang, Kautz, Hatamizadeh) for Equation 8 and the complementarity argument; and the
LTCAttention repository at its 2026-08-10 state —
README.md, model.py, config/, and results/fineweb_edu_fullrank_29m_6layer_half_3seeds.json.
The three figures are LTCAttention's own, flattened onto white. The fused-solver-to-gated-recurrence
derivation, the verification of the query-key factorization, the bound, and both
scaling estimates are mine and are shown in full above so they can be checked. All four interactives
are mine.