Attention vs. Memory: Why Transformers Killed the RNN
The math behind the coup — vanishing gradients, the sequential bottleneck, and why attention treats a sequence as a fully connected graph.
Writing
I publish these deep-dives in Towards AI on Medium. The architecture series below maps one-to-one onto the Atlas, and each version hosted here links back to the original publication.
In reading order — each piece picks up where the previous architecture failed.
The math behind the coup — vanishing gradients, the sequential bottleneck, and why attention treats a sequence as a fully connected graph.
How delta-gated state-space models challenge the Transformer — selective memory, zero-order hold, and the parallel-scan trick that makes it trainable.
Two papers land on the same fix: a gate that lets the model multiply noise by zero — and a delta rule that writes memory surgically instead of blindly.
NVIDIA's PostNAS recipe: keep the few attention layers that matter, replace the rest — full-attention accuracy at a fraction of the cost.
The production proof: a hybrid Mamba–Transformer mixture-of-experts with a million-token context window, and what its design choices reveal.
Why one-token-at-a-time decoding is a straitjacket, and how multi-token prediction teaches models to plan ahead.
A slow planner and a fast worker, recursing at different frequencies — and beating far larger models on ARC-AGI with ~1000 training examples.
A single 2-layer network recursing on a latent scratchpad — 7M parameters, state-of-the-art generalization on Sudoku-Extreme, Maze-Hard, and ARC-AGI.
Earlier pieces on the building blocks — read on Medium.
Rotary positional encoding, and why it decides how far a context window can stretch.
From static skips to dynamic routing — rewiring deep networks with hyper-connections.
Why a sigmoid loss beats softmax contrastive training at scale.
How contrastive pre-training unlocked zero-shot vision.
Everything in one place: kyouma45.medium.com ↗