This page is a self-test for the ideas in Limitations of RNNs motivating transformers. Each line is a trap that catches most learners. Read the left side, say your answer OUT LOUD, then reveal the right side. If your reason doesn't match the reasoning given, you found a gap — go back and re-read.
Every symbol below appears in the parent note; if any feels unfamiliar, here is the one-line reminder before we start:
False. The time axis cannot be parallelized (each ht needs ht−1), but many sequences in a batch can run side by side. The bottleneck is depth-in-time, not total work.
The vanishing gradient problem is a bug that better code could fix.
False. It follows from repeatedly multiplying by numbers <1 (tanh′≤1 times a small Whh); the exponential decay (something<1)T is baked into the recursive structure itself.
LSTMs completely eliminate vanishing gradients.
False. They mitigate it via the additive cell-state highway, but the forget gate ft<1 still multiplies the gradient each step, so decay returns for very long sequences (~1000+ tokens).
If σmax(Whh)⋅γ>1, gradients vanish faster.
False. When the per-step factor (largest stretch of Whh times the typical tanh′ shrink) exceeds 1, gradients explode (blow up) instead of vanishing — the opposite failure, but still caused by the same repeated multiplication.
A transformer does less total computation than an RNN.
False. Self-attention makes each position do O(T) work (it looks at all others), so total work can be more; the win is that this work happens in parallel, not in sequence.
The compression bottleneck only matters for very long inputs.
False. It bites whenever the input's information (in bits) exceeds what one fixed vector hT∈Rd can hold; even moderate sentences lose fine detail because dlog2d bits is a hard ceiling.
Making the hidden state bigger (d larger) fully solves the compression bottleneck.
False. It raises the ceiling but capacity grows only like O(dlog2d), while required bits grow like Tlog2V; long enough inputs still overflow, and big d costs memory and slows training.
In BPTT the gradient to word 1 passes through one matrix multiply.
False. It passes through the whole chain∂hT−1∂hT⋯∂h1∂h2 — that's T−1 multiplications, exactly what causes the decay. Self-attention is what gives a single-hop path.
Error:h3=tanh(Whhh2+…) needs h2, which needs h1. You need every earlier hidden state first, not just the current input token.
"Because tanh′(z)∈(0,1], gradients always shrink by exactly the same factor each step."
Error: the factor tanh′(z)varies with z and combines with σmax(Whh); we use an averageγ only as an estimate. The decay is approximate, not a fixed constant.
"The cell-state update ct=ft⊙ct−1+it⊙c~t has no gradient decay."
Error:∂ct−1∂ct=ft, and ft is between 0 and 1, so gradients still shrink whenever the network chooses to forget — which it usually must.
"A sequence of T tokens from vocabulary V needs T⋅V bits to store."
Error: each token needs log2V bits (which of V words), so the sequence needs Tlog2V bits, far less than T⋅V.
"For a batch of 32 sequences each 512 tokens long, the RNN takes 512/32 ≈ 16 sequential timesteps."
Error: here 512 is the sequence length (tokens per sentence) and 32 is the batch size. Batching parallelizes over sequences, not time, so it still takes the full 512 timesteps; the 32 sequences just march through those steps together.
"Transformers are faster because self-attention is cheaper per position."
Error: per position it's actually more expensive (O(T) vs O(1)). The speed comes from doing all positions at once, so wall-clock time drops even though work rises.
Why can't we "skip ahead" to compute a late hidden state directly?
Because each ht is a non-linear function of ht−1; there's no closed-form shortcut that jumps past the intermediate states, so they must be built one at a time.
Why do modern GPUs sit mostly idle when running an RNN?
A GPU has thousands of cores, but the time-recurrence lets only one timestep run at a time, so the remaining cores have nothing to do until that step finishes.
Why does the "not ... terrible" example fail for a vanilla RNN?
The gradient linking the far-apart words must travel ~295 recursive steps; multiplied by a factor <1 each step it becomes ~10−7, far too weak to teach the model that early "not" flips the meaning.
Why does self-attention avoid this exponential decay?
Position 1000 attends to position 1 through a single weighted connection, so the gradient between them passes through one hop, not 999 multiplications — no exponential shrinking. See Self-Attention Mechanism.
Why is the encoder's final vector called a "bottleneck"?
All of the input's information has to be squeezed through one fixed-size vector hT; like a narrow pipe, it limits how much can pass, forcing detail to be dropped. See Encoder-Decoder Architecture.
Why does making ft close to 1 keep long-term memory but risk instability?
With ft≈1 the cell state barely forgets, so gradients survive — but old information never fades, so the cell can accumulate and blow up (exploding activations). See LSTMs and GRUs.
Why does the vanishing gradient problem count as a training failure, not a prediction failure?
The forward pass still runs fine; it's the backward learning signal that dies, so the model can never learn long-range rules even though it could in principle use them.
What happens to gradients when the per-step factor σmax(Whh)⋅γ equals exactly 1?
They neither vanish nor explode — the ideal knife-edge — but it's practically impossible to stay there for many steps, so real training drifts to vanishing or exploding. See Vanishing and Exploding Gradients.
What if the sequence length T=1?
There is no recurrence to unroll, so parallelization, vanishing gradients, and the recurrence bottleneck all disappear; the RNN degenerates to a single feed-forward step.
What if two sequences in a batch have very different lengths?
The whole batch still marches for as many timesteps as the longest sequence (shorter ones are padded), so the slow-per-timestep problem is set by the longest input, not the average.
Does a bidirectional RNN remove the sequential bottleneck?
No. It adds a second pass reading right-to-left, but each direction is still a strict left-to-right (or right-to-left) chain — it doubles the passes, it doesn't parallelize time. See Backpropagation Through Time.
If we shorten inputs enough (say T<10), do RNN limitations vanish?
Largely yes for gradients — 10 steps of a factor like 0.95 loses only ~40% signal — but you also lose the ability to model any genuinely long-range structure, so it's a workaround, not a fix. See Computational Complexity of Sequence Models.
What about attention added on top of an RNN (pre-transformer models)?
It relieves the compression bottleneck (the decoder can look back at all ht), but the encoder still processes tokens sequentially, so the parallelization problem remains — which is why transformers dropped recurrence entirely. See Positional Encoding.
Recall Quick self-check
Name the three distinct RNN limitations. ::: (1) Sequential processing — can't parallelize over time; (2) vanishing/exploding gradients over long chains; (3) fixed-size compression bottleneck in the encoder vector.
Which single transformer idea attacks all three at once? ::: Self-attention: it computes all positions in parallel, gives one-hop gradient paths, and lets the decoder read every input position directly.