The core ideas that every neural network architecture shares: how a network computes, learns and generalises. Start here before the architecture-specific pages.
Deep learning is machine learning with neural networks of many layers, trained end to end by gradient descent. Whatever the architecture (feed-forward, convolutional, recurrent, graph, Transformer), the same loop runs underneath: a forward pass turns inputs into predictions, a loss function scores them, backpropagation computes how each weight affected the loss, and an optimizer nudges the weights. This section collects the building blocks that every architecture relies on, so the architecture pages can focus on what makes each one different.
Most training failures trace back to a fundamentals problem rather than an architecture problem: gradients that vanish because of a poor activation or initialisation, a loss that does not match the output layer, a learning rate that is too high, or a network that memorises the training set. Understanding these pieces makes debugging systematic.
A suggested reading order. Begin with activation functions, because they explain why depth needs non-linearity and why some networks will not train at all. Next, revisit the bias-variance trade-off, since almost every deep learning technique beyond the basics is a way of controlling capacity and generalisation. Then move to the architecture pages: the multi-layer perceptron shows the training loop in its plainest form, convolutional networks add weight sharing for images, recurrent networks add state for sequences, and graph networks generalise message passing to arbitrary structures. Each architecture page assumes the vocabulary introduced here, so returning to this section when something is unclear is the fastest way to fill gaps.
| Decision | Common default | When to change it |
|---|---|---|
| Hidden activation | ReLU (CNN, MLP); GELU or SwiGLU (Transformers) | Dead units: Leaky ReLU; recurrent cells: tanh and sigmoid gates |
| Output + loss | Softmax + cross-entropy; sigmoid + BCE; linear + MSE | Multi-label: per-class sigmoid; heavy-tailed targets: Huber loss |
| Initialisation | He for ReLU-family, Xavier for tanh | Usually left to framework defaults |
| Optimizer | AdamW | SGD with momentum often generalises well for vision |
| Normalisation | BatchNorm (CNN), LayerNorm (Transformers, RNNs) | Small batches: LayerNorm or GroupNorm |
| Regularisation | Weight decay + early stopping | Overfitting persists: dropout, augmentation, more data |