Deep Learning
CNNs, RNNs & Transformers
CNNs exploit local spatial patterns, RNNs process sequences through state, and Transformers use attention so tokens can interact directly. Each architecture family encodes a different assumption about the data.
- CNNs are built for locality and translation
- RNNs process sequences step by step
- LSTMs and GRUs gate memory
- Transformers use attention over tokens
- Architecture choice is an inductive-bias choice
- Transformers are not automatically best for everything
| Family | Assumption | Typical use |
|---|---|---|
| CNN | Nearby values form local patterns | Images, spectrograms, grids |
| RNN/LSTM/GRU | Order matters and state evolves | Sequences, time series, older NLP |
| Transformer | Tokens need flexible pairwise interaction | LLMs, modern NLP, multimodal models |
| MLP | No special structure assumed | Dense features, simple baselines |