Why Linear Alone Can't Win
Stack 100 linear layers without anything between them and you get... one linear layer. The composition of linear functions is still linear. A 100-layer purely-linear network has the exact same expressive power as a single linear regression. Useless waste of compute.
Activation functions introduce non-linearity. They're the kink in the line that lets the network bend reality into useful shapes. Without them, no curves, no boundaries, no understanding of cats vs dogs.
The Activation Zoo
| Activation | Formula | When to use |
|---|---|---|
| ReLU | Default in modern deep nets. Cheap, doesn't vanish for positive inputs. | |
| Sigmoid | Output layer for binary classification. Squeezes to (0, 1) — interpretable as probability. | |
| Tanh | Squeezes to (-1, 1). Used in older RNNs. | |
| Softmax | Output layer for multi-class classification. Squeezes to a probability distribution. | |
| GeLU / SiLU | smooth ReLU variants | Modern Transformers, LLMs. |
Why ReLU Took Over
Sigmoid's max derivative is 0.25. Stack many and gradients vanish (we saw this in the Calculus track). ReLU's derivative is 1 for positive inputs — gradients flow through unchanged. Plus it's just max(0, x), which is cheap on hardware. The 2012 deep learning revival was largely "ReLU + GPUs + ImageNet."