~/satyajit

KDA has a half-life: linear attention forgets like a radioactive isotope

mdjsonmcp

2026-08-03 · 8 min · linear-attention · kimi · attention · math

Why read this

Solidtop 85%

Shows KDA's per-channel decay is radioactive decay: alpha 0.99 is a 69-token half-life, and K3's gate floor and per-head A_log are read from config and code.

  • Original analysis
  • A lasting reference
  • Explained from first principles

LLM architectureNothing to runPractitioner guide

How this was scored
Is it new?
1 of 3: An incremental tweak
Can I trust it?
2 of 3: Measures key facts from files, code or configs
Can I run it?
0 of 3: Closed, nothing to run
Will I understand it?
2 of 3: Mechanism from first principles with figures
Can I act on it?
1 of 3: General advice
Will it last?
2 of 3: A reference for a year or more
Does it affect many?
1 of 3: A specialist community
Only here?
2 of 3: A teardown or measurement few others did

Score 49 of 100, ranked 555 of 666 rated articles. Each question is answered 0–3 by hand, and a 3 is rare. How articles are scored

Here is a small thing I keep turning over. The forgetting mechanism inside Kimi Delta Attention — the linear attention in Kimi K3 — is the same mathematics as radioactive decay. Not "reminiscent of", not "a useful analogy". The same two-line derivation, with tokens where a physicist writes seconds.

Two laws that are one law

A radioactive sample loses a fixed fraction of its remaining atoms per unit time. That gives the exponential law everyone meets in school:

N(t)=N0e−λtN(t) = N_0 e^{-\lambda t}

A KDA channel loses a fixed fraction of its remaining state per token. Take the recurrence and strip it to the decay term — set the write strength to zero and watch a stored value with no new input arriving:

Sn=α nS0S_n = \alpha^{\,n} S_0

Those are the same function. Since α=eln⁡α\alpha = e^{\ln \alpha},

α n=enln⁡α=e−λn,λ=−ln⁡α\alpha^{\,n} = e^{n \ln \alpha} = e^{-\lambda n}, \qquad \lambda = -\ln \alpha

The retention factor α\alpha and the decay constant λ\lambda are two spellings of one number. A channel with α\alpha close to 1 is a long-lived isotope; a channel with small α\alpha is one that barely outlives its own creation.

So it has a half-life

Once you accept that, the half-life comes for free. Ask for the nn where half the signal is gone:

α n1/2=12⟹n1/2 ln⁡α=ln⁡12⟹n1/2=ln⁡0.5ln⁡α\alpha^{\,n_{1/2}} = \tfrac{1}{2} \quad\Longrightarrow\quad n_{1/2} \, \ln \alpha = \ln \tfrac{1}{2} \quad\Longrightarrow\quad n_{1/2} = \frac{\ln 0.5}{\ln \alpha}

That is the whole result, and it is worth internalizing because it converts an opaque hyperparameter into a number with units you can reason about. α = 0.99 gives a half-life of about 69 tokens. Not "some decay" — sixty-nine tokens, roughly a long sentence. Drag it:

The lever is brutally nonlinear near 1, which is the part worth feeling rather than reading. Going from α = 0.99 to α = 0.999 does not extend memory by a tenth of a percent; it multiplies the half-life by ten, from about 69 tokens to about 693. Each additional nine buys another factor of ten. That is why linear-attention gates are usually parameterized in log space — the useful resolution all lives in the last few decimal places, and a linear parameterization would spend nearly all its range on channels that forget immediately.

The interesting part: α is per channel

If KDA had one global α this would be a cute observation and nothing more. It doesn't. In K3, α is a channel-wise vector — the report writes the state update as

St=(I−βtktkt⊤)Diag(αt) St−1+βtktvt⊤S_t = \left(I - \beta_t k_t k_t^{\top}\right) \mathrm{Diag}(\alpha_t)\, S_{t-1} + \beta_t k_t v_t^{\top}

where αt∈(0,1)dk\alpha_t \in (0,1)^{d_k} is a per-channel one-step retention factor and βt\beta_t is the delta-rule write strength. Diag(αₜ) is the load-bearing notation: every one of the dkd_k channels gets its own decay constant, so a single head carries a whole spectrum of half-lives simultaneously.

This is what makes a fixed-size state genuinely useful rather than merely cheap. The head is not choosing between "remember recent things sharply" and "remember old things vaguely" — it runs both at once, on different channels. The fast channels behave like a local window: they hold the current clause and dump it. The slow channels are closer to a running summary that survives the entire context. Attention over a KV cache gets its long-range recall by storing everything; KDA gets a version of it by storing a small number of things at deliberately different rates.

It also reframes what "training the gate" means. The model is not learning whether to forget. It is learning a distribution of timescales — effectively allocating channels across memory horizons, the way a filter bank allocates across frequencies.

What K3's config actually pins down

The released weights make a couple of things concrete. K3 runs 69 KDA layers out of 93, three of every four, with a Gated MLA layer as the fourth — so most of the model's sequence mixing is this decay process, and the full-attention layers are the periodic exact-recall anchor. Head dimension is 128, and the gate is full-rank (use_full_rank_gate: true) rather than a low-rank approximation — though see the update below for exactly how the per-channel variation is produced.

The Kimi K3 architecture diagram. On the right, a block repeats a KDA layer paired with a Stable LatentMoE feed-forward network three times, then one Gated MLA layer with its own LatentMoE, with attention-residual weights feeding back from the embedding and preceding blocks. Bottom left, the KDA module expands: linear projections produce q, k, v, alpha and beta, with convolutions and an L2 norm on q and k and sigmoids on the gates, feeding Kimi Delta Attention, a norm, a multiplicative output gate and a final linear.
The three-to-one stack the config describes, drawn: three KDA layers per Gated MLA layer. The bottom-left inset is the KDA module itself, where the per-step retention factor alpha enters as its own projected, sigmoid-gated input alongside the delta-rule write strength beta (Kimi K3 technical report, Figure 2).

The config also carries gate_lower_bound: -5.0. Read as a floor on log-α, that bounds the fastest a channel is allowed to forget: α≥e−5≈0.0067\alpha \ge e^{-5} \approx 0.0067, which is a half-life of about 0.14 tokens — a channel that has essentially dumped its state by the very next step. The ceiling is the interesting end and it is open: as α approaches 1 the half-life grows without bound. To keep half your signal across a full 1M-token context you need α ≈ 0.99999931. That number has seven leading nines, which is exactly why the bound is expressed in log space.

A line plot of the log-decay g against the decay logit z. A grey curve labelled 'Kimi Linear: g = minus e to the A, Softplus of z' falls away without bound toward minus infinity. A red curve labelled 'Kimi K3: g = g-min times Sigmoid of e to the A z' flattens onto a dashed red asymptote at g-min = minus 5.
Why the floor exists and what shape it has: K3 replaces Kimi Linear's unbounded negative-Softplus log-decay with a scaled sigmoid that saturates at g-min = -5, which is the gate_lower_bound in the config and the 0.0067 retention floor in the text (Kimi K3 technical report, Figure 3a).

Why this is more than a nice analogy

Two things fall out of it that are practically useful.

It gives you a unit. "The gate decays the state" is unfalsifiable prose. "This channel has a half-life of 69 tokens" is a claim you can check against a model's behaviour — and it tells you immediately that a channel with a 7-token half-life cannot be the thing carrying a fact across a document, no matter what the attribution heatmap suggests.

It explains the parameterization. Every design choice around these gates — log-space parameterization, bounded gates, careful initialization near 1 — follows from the shape of n1/2=ln⁡0.5/ln⁡αn_{1/2} = \ln 0.5 / \ln \alpha. The function is nearly flat for most of (0,1)(0,1) and then explodes in the last sliver. Any scheme that samples α uniformly wastes almost all of its capacity on channels that forget within a few tokens.

The same algebra runs through every gated linear-attention variant, not just KDA — Mamba's Aˉ\bar{A}, the decay in RetNet and RWKV, the forget gate of an LSTM. They differ in how α is produced and whether it depends on the input. They agree on the underlying law, which has been sitting in physics textbooks the whole time.


Sources: the Kimi K3 technical report for the KDA recurrence, the hybrid layer composition and the two figures reproduced above, and the released Kimi K3 config.json for the layer split, head dimension, use_full_rank_gate and gate_lower_bound. The half-life framing and the derivation are mine; the channel α values in the spectrum widget are illustrative, chosen to span the range, while every half-life shown is computed exactly from them.

Cite this article

For attribution, please use the following reference or BibTeX:

Satyajit Ghana, "KDA has a half-life: linear attention forgets like a radioactive isotope", ai.thesatyajit.com, August 2026.

bibtex
@misc{ghana2026kdahalflife,
  author = {Satyajit Ghana},
  title  = {KDA has a half-life: linear attention forgets like a radioactive isotope},
  url    = {https://ai.thesatyajit.com/articles/kda-half-life},
  year   = {2026}
}
share