Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

The architecture-family decision chain

CNNs, RNNs, and Transformers -- three ways to build in an assumption about structure, and which assumption fits which data.

Each architecture family bakes in a different assumption about the input, and picking one is really picking an assumption. A CNN assumes locality and translation invariance -- a pattern that matters in one corner of an image matters the same way elsewhere -- and pays for that assumption with far fewer parameters than a fully connected layer would need. An RNN assumes order matters and processes a sequence one step at a time, carrying a hidden state forward, which suits a stream that arrives incrementally but struggles with very long-range dependencies and can't be parallelized across time steps. A Transformer assumes neither locality nor strict sequential order -- self-attention lets every position look at every other position directly, in parallel, at the cost of quadratic compute in sequence length. In practice: reach for a CNN on grid-structured data (images) where locality is a genuine prior, reach for an RNN when a sequence must be processed causally and one step at a time with bounded memory, and reach for a Transformer when long-range dependencies matter more than compute cost -- which is why it has displaced RNNs for most large-scale sequence modeling today.

The locality assumption -- CNNs

An operation that slides a small kernel across an input, computing a weighted sum at each position.
The region of the original input that ultimately influences one value in a later layer.

The sequential assumption -- RNNs

A recurrent network's running summary of everything it has processed in a sequence so far.
A recurrent architecture with gates that let it selectively remember or forget information over long sequences.

The gated fix for a plain RNN's short effective memory.

Neither assumption -- Transformers

Attention where the queries, keys, and values all come from the same sequence.
An architecture built entirely from attention and feed-forward layers, with no recurrence or convolution.

The comparison, made directly

Graph settings

Calculator