This is a question bank. Each line is a trap: a statement that sounds right, or a boundary case people skip. Cover the answer, commit to a reason (not just "true"/"false"), then reveal. If your reason differs from the answer's reason, that's the misconception caught.
Full self-attention over n tokens costs O(n2) because every token compares against every other token.
True. Each of the n query tokens forms a dot product with all n key tokens, giving n×n comparisons — the grid is fully filled in, so cost grows with the square of n.
Sparse attention always saves training memory, no matter how it is implemented.
False. Sparsity only helps if the implementation skips the masked-out entries. Many frameworks apply a sparse mask on top of a dense n×n matrix — the full grid is still allocated, so memory is unchanged. Real savings require a specialised kernel (block-sparse, gather/scatter) that never materialises the dropped pairs.
Longformer's sliding window alone (no global tokens) already preserves document-level understanding.
False. A pure local window of size w means token i can only ever see tokens within ±w/2; information from far-away tokens must hop through many intermediate layers, and shallow models lose it — that's exactly why global tokens are added.
Linear attention is called "linear" because the feature mapϕ is a linear function.
False. ϕ can be nonlinear (the random-feature ϕ above uses exp); "linear" refers to the total cost scalingO(n) in sequence length, achieved by the associative re-order that summarises keys once instead of comparing them per query.
Replacing softmax(q⋅k) with ϕ(q)⊤ϕ(k) leaves the attention output unchanged.
False. As the derivation above shows, ϕ(q)⊤ϕ(k) only equals eq⋅kin expectation — it is an unbiased approximation with variance; the efficiency win buys O(n) cost at the price of no longer computing the exact softmax kernel (see Kernel Methods).
A State Space Model (SSM) has fixed memory cost regardless of how long the sequence is.
True. The hidden state hk is a fixed-dimension vector (e.g. 256 numbers); it is overwritten every step, so storing it does not grow with n — unlike attention, which caches a key/value for every past token.
Because an SSM keeps a fixed-size state, it can never lose information from early tokens.
False. The opposite: a fixed-size state is an Information Bottleneck — old information must be compressed into the same 256 numbers, so distant details can be squeezed out, whereas attention keeps a separate cached vector per token.
The convolutional form of S4 and its recurrent form compute different outputs.
False. They are two views of the same linear recurrence hk=Aˉhk−1+Bˉxk: the kernel Kˉk=CAˉkBˉ unrolls the recurrence into a convolution, so outputs match — the convolution is just chosen for parallel training.
Memory-augmented models achieve O(n) overall because nearest-neighbour lookup over a memory of size M is roughly O(logM).
True — with a caveat. Approximate nearest-neighbour search (e.g. FAISS) is sub-linear per query, so total cost is O(nw)+O(nlogM); this is O(n)only whilew and logM stay much smaller than n (i.e. M≪ exponential-in-n; see the edge case below).
"We use a sliding window of size w=n to be safe, and still enjoy O(n) complexity."
Error: if w=n the window is the whole sequence, so cost is n⋅w=n2 — you've reverted to full attention. The linear win requires w≪n.
"Linear attention precomputes S=∑jϕ(kj)vj⊤ separately for each query, one S per query."
Error: S is computed once, globally, shared by all queries (see the associative re-order above). Recomputing it per query would reintroduce the O(n2) scan and defeat the entire method.
"In linear attention we can drop the denominator ϕ(qi)⊤Z since it's just a scaling constant."
Error: that denominator is the softmax-style normalizerZ=∑jϕ(kj); different queries have different denominators, so dropping it removes the normalization and gives unbounded, wrongly-weighted outputs.
"The SSM matrix Aˉ=eΔA, so a bigger step size Δ always means the state changes more slowly."
Error: the effect depends on the sign/magnitude of A's eigenvalues. For stable systems (Re(λ)<0), larger Δ makes eΔλsmaller, so the past decays faster — the state forgets more quickly, not more slowly.
"S4 chooses A diagonal-plus-low-rank purely to reduce the number of parameters."
Error: the structure A=Λ−pq⊤ exists to make the matrix exponential and the convolution kernel fast to compute (diagonal exp + Woodbury correction); parameter count is a minor side effect, computability is the point.
"A [CLS] global token costs the same as any other token in Longformer."
Error: a global token attends to alln tokens (cost n), while a regular token attends to only w (cost w). That's why the budget is O(nw+gn), with the gn term paying for the g global tokens.
"Memory-augmented attention retrieves the top-k nearest neighbours, so it always sees the single most relevant past token."
Error: it uses approximate nearest-neighbour search — for speed it may miss the exact top match; you trade a small recall error for O(logM) lookup, similar to retrieval in Retrieval-Augmented Generation.
Why does full attention hit a wall around 2k–8k tokens even though a modern GPU has plenty of raw FLOPs?
Because the bottleneck is memory, not FLOPs: the n×n score matrix must be stored, and at large n it exceeds GPU RAM long before compute becomes the limit.
Why can't we just make the window w grow slowly with n (say w=n) and call it O(n)?
You can, but then Ctotal=n⋅n=O(n1.5) — that's the "O(nn)" sparse regime, better than O(n2) but not truly linear.
Why does the associativity trick (∑jϕ(kj)vj⊤) before multiplying by ϕ(qi) save so much?
Because it changes the order of a matrix product: summarising keys+values first builds the fixed-size matrix S (and normalizer Z); each query then multiplies by S in O(dϕdv) time, so the expensive scan over n happens once instead of per query — exactly the algebra in the formula callout above.
Why do SSMs offer a convolutional training form but a recurrent inference form?
Training sees the whole sequence at once, so the convolution y=Kˉ∗x parallelises across all positions on a GPU; inference generates tokens one at a time, so the step-by-step recurrence hk=Aˉhk−1+Bˉxk (carry state forward) is the natural, memory-cheap mode — the same duality that motivates Recurrent Neural Networks.
Why do memory-augmented models still keep a local sliding window instead of relying entirely on retrieved memory?
Local, recent tokens carry fine-grained syntactic dependencies that retrieval (built for coarse semantic similarity) often misses; the window guarantees nearby context is always attended to, regardless of what the memory returns.
Why is calling any sub-quadratic method "just as good as full attention" misleading?
Every method trades exactness for cost: sparse patterns drop token pairs, linear attention approximates the kernel, SSMs compress into a bottleneck. They approach full-attention quality on many tasks but can fail on tasks needing exact, arbitrary long-range pairwise lookups.
What happens to Longformer's cost accounting if every token is made a global token (g=n)?
The gn term becomes n2, so complexity collapses back to O(n2) — global attention is only cheap when the global set g is tiny.
What is the attention cost when n is smaller than the window w (a short sequence)?
Each token can attend to at most n tokens, so the effective window saturates at n; sparse and full attention coincide, and there is no efficiency gain — sparsity only helps once n>w.
What does linear attention's output become if every value vj is identical, say vj=c?
The numerator becomes ϕ(q)⊤(∑jϕ(kj))c=c⋅ϕ(q)⊤Z, and dividing by the normalizer ϕ(q)⊤Z gives exactly c — normalization guarantees the output is the constant, matching intuition that averaging identical values returns that value.
What happens to an SSM's state as n→∞ if the largest eigenvalue of Aˉ has magnitude >1?
The state hk=Aˉhk−1+Bˉxk grows without bound (each step amplifies), so outputs blow up — this is why S4 constrains eigenvalues to keep ∣eΔλ∣<1 for a stable, decaying memory.
What is the memory-lookup cost when the memory bank M is empty (start of a long document)?
There is nothing to retrieve, so only the local window contributes; cost per token is just w, and the model behaves like a plain sliding-window model until enough context is stored.
What if the memory bank grows with the sequence, e.g. M∝n (store every token)?
Then O(nlogM) becomes O(nlogn) — not linear. The advertised O(n) holds only under the unstated assumption M≪n (a compressed, bounded memory); an ever-growing memory quietly reintroduces a logn factor.
What breaks if the feature-map dimension dϕ in linear attention is chosen as large as n?
The per-query cost O(dϕdv) then scales with n, so total cost returns to O(n2) — the linear guarantee holds only while dϕ is a fixed small constant, independent of sequence length.
Recall One-line summary of the whole trap set
Every efficient long-context method wins by not filling the full n×n grid — sparse drops pairs, linear reorders sums, SSM compresses to a fixed state, memory retrieves a few neighbours — and each win comes with a specific failure mode when its "≪n" assumption is violated.
Text alone hides geometry. These four figures are the visual anchors the traps refer back to.
The n×n grid and what each method keeps. Full attention fills the whole square (every token-pair). The red cells are the only comparisons each efficient method actually computes.
Sliding window vs global tokens. A local token sees a red band around the diagonal; a global token (top row/left column, red) sees the entire sequence.
SSM: one recurrence, two shapes. The same hk=Aˉhk−1+Bˉxk can be unrolled left-to-right (recurrent, red arrows) or flattened into a single convolution kernel Kˉ (red) applied to all inputs at once.
Memory-augmented lookup. The current query (red) attends to a small local window plus the top-k neighbours pulled from a bounded memory bank — never to the whole past.