Back to articles

Born Attention: Exact Linear Recurrence, Constant-State Decoding

3 min read

Introduction

Self-attention becomes increasingly expensive as context grows: inference must account for earlier tokens, and conventional decoding stores a growing key-value cache. Many linear-attention methods address this by approximating softmax attention. This work instead changes the attention operator so that its weights have an exact finite-dimensional feature representation. The authors call it Born attention, after the probability rule in quantum mechanics. The connection is mathematical; the method does not require quantum hardware.

Key ideas

  • A finite kernel from measurement probabilities. For complex queries Q and keys K, the proposed weight is the squared magnitude of their inner product, |⟨Q,K⟩|². Map each vector x to the rank-one matrix ρₓ=xx†, and this weight becomes the trace inner product between the two matrices. The result is a finite feature map that represents this particular kernel exactly, rather than an approximation to the softmax kernel.
  • Causal recurrence with fixed-size decoding state. The matrix representation lets a causal computation accumulate information token by token. The paper gives an O(Td²) recurrence and maintains a state whose size does not depend on the number of tokens already processed. That does not mean the state is free of model-size costs: its dimensions still depend on d. The authors also report that rotary positional information can be preserved exactly within the formulation.
  • Promising serving measurements. On an A100, the paper reports 6.4 MB of state per layer and 0.12 ms per generated token. Its comparison point is FlashAttention-2, reported at a 3.2 GB cache and 2.26 ms per token at one million tokens. In prefill tests, a fused implementation passes FlashAttention-2 somewhere between 16k and 32k tokens, and is reported to be four times faster at 128k. These figures describe particular experiments and implementations, not a guarantee across hardware, batch sizes, or production workloads.

Modeling results and caveats

A more efficient operator is not automatically a better language-modeling choice. In small-scale tests, inserting Born attention into a real-valued GPT trails softmax by 0.12 nats at a 1k context and by 0.77 nats at 16k. The authors associate the gap with attention dilution and report that a decay mechanism, represented exactly in the recurrent state, repairs it. A fully complex residual stream matches softmax at 1k context in their reported comparison. Gated linear attention, however, beats both in some of these tests.

On PG-19 at 128k context, Born attention with a fixed decay is reported to be 0.32 nats ahead of softmax and within 0.04 nats of gated linear attention; the latter is 1.8 times faster. The findings therefore support a specific claim: Born attention offers an exact finite-kernel route to recurrent computation and potentially much cheaper long-context decoding. They do not establish that it universally replaces softmax or outperforms other linear-attention designs. Larger-scale and broader task evaluations will be needed to determine how reliably the computational gains translate into model quality.

Hugging Face Daily Papers

Comments

Checking sign-in status...

Loading comments...

Related articles