Papers
arxiv:2612.02459

Born Attention is Linear: Exact Sub-Quadratic Attention and Constant-State Inference from Quantum Measurement

Published on Oct 30
· Submitted by
Marcel Crasmaru
on Dec 3
Authors:

Abstract

Softmax attention costs O(T^2) in sequence length because the exponential kernel has no finite feature map, so linear-time variants approximate it. We observe that Born-rule attention, whose weights are quantum-measurement probabilities |<Q_k,K_j>|^2 over complex queries and keys, is an exact finite kernel with the rank-one density-matrix feature map rho_x = x x^dagger, since |<Q_k,K_j>|^2 = tr(rho_Q rho_K). As the complex degree-two case of polynomial-kernel linear attention, it admits an exact O(T d^2) causal recurrence and constant-state decoding, independent of T, and keeps rotary positions exactly. On an A100, constant-state decoding uses 6.4 MB per layer at 0.12 ms per token at any length, against a 3.2 GB FlashAttention-2 cache at 2.26 ms per token at 1M tokens; a fused prefill overtakes FlashAttention-2 between 16k and 32k tokens (4x at 128k). Whether the operator matches softmax is a separate modeling question, answered here at small scale: bolted into a real-valued GPT it trails softmax by 0.12 nats at 1k context and 0.77 at 16k (attention dilution, which a decay kept exactly in the state repairs), while inside a fully complex residual stream it matches softmax at 1k; gated linear attention beats both. At 128k context on PG-19, Born with a fixed decay is 0.32 nats ahead of softmax and within 0.04 of gated linear attention, which is 1.8x faster. Streamed in constant state over the PG-19 test set in 5M-byte windows, 4M-complex-parameter byte models score 1.66 (Born with decay) and 1.70 (gated) bits per byte, where a 350M-parameter hierarchical model built for that window reports 2.45.

Community

Paper author Paper submitter

Attention weights taken as quantum-measurement probabilities |<Q,K>|² over complex queries and keys form an exact finite kernel (rank-one density matrices), so causal attention becomes an exact O(T d²) recurrence with constant-state decoding at any length. On an A100: 6.4 MB per layer and 0.12 ms per token versus a 3.2 GB FlashAttention-2 cache at 1M tokens. Modeling results at small scale, including where gated linear attention wins.

This is an automated message from the Librarian Bot. I found the following papers similar to this paper.

The following papers were recommended by the Semantic Scholar API

Please give a thumbs up to this comment if you found it helpful!

If you want recommendations for any Paper on Hugging Face checkout this Space

You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend

Sign up or log in to comment

Get this paper in your agent:

hf papers read 2612.02459
Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper 1

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2612.02459 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2612.02459 in a Space README.md to link it from this page.

Collections including this paper 0

No Collection including this paper

Add this paper to a collection to link it from this page.