Core Deep Learning Concepts: Architectures, Normalization, and Why Training Actually Works
Beyond "it's a Transformer": the architectural building blocks (normalization, initialization, residual connections) that make deep networks trainable at all, the training dynamics that explain generalization and its failures, and how these pieces combine in the models this series has already covered.
Why "It's a Transformer" Isn't a Complete Answer
Article 3 established the math underneath deep learning; this article covers the architectural and training concepts built on top of it. It would be easy to treat "the Transformer" (Article 1's Vaswani et al. paper) as the whole story of modern deep learning architecture, but the Transformer alone doesn't train — it needs normalization to keep activations stable across dozens of layers, careful initialization so gradients don't vanish or explode from the first step, residual connections so gradients can flow through very deep stacks at all, and regularization so the resulting model generalizes past its training set rather than memorizing it. These pieces are individually simple and collectively responsible for most of why deep learning works in practice.
This article also goes slightly further back than the Transformer, because understanding what came before it — and specifically why it had real limitations — is what makes the Transformer's design choices legible rather than arbitrary.
What Came Before, and What the Transformer Actually Changed
Before Transformers, sequence modeling (text, speech, time series) was dominated by Recurrent Neural Networks and specifically Long Short-Term Memory (LSTM) networks (Hochreiter & Schmidhuber, 1997), which process a sequence one step at a time, carrying a hidden state forward. This works, but has two structural problems the Transformer's attention mechanism (Article 1) was specifically designed to solve: sequential processing can't be parallelized across time steps (slow to train at scale), and information from early in a long sequence has to survive being carried through every intermediate step (prone to being diluted or lost — the "vanishing gradient" problem in its sequence-length form).
| Architecture Family | Core Mechanism | Where It's Still Used / Relevant |
|---|---|---|
| CNNs (Convolutional Networks) | Local, weight-shared filters slid across spatial data | Vision backbones, though Vision Transformers (below) now compete directly in many settings |
| RNNs / LSTMs | Sequential hidden-state carry-forward | Largely superseded by Transformers for language; still relevant in some low-latency or streaming contexts |
| Transformer (encoder-decoder) | Self-attention across the full sequence, in parallel | Original machine-translation design in Vaswani et al. (Article 1) |
| Transformer (decoder-only) | Causal self-attention, predicting the next token | The architecture behind GPT-family and most modern LLMs referenced throughout this series |
| Vision Transformer (ViT) | Treats image patches as a token sequence, applies the same attention mechanism | Introduced by Dosovitskiy et al., 2020; now a mainstream vision architecture family |
The practical takeaway for a newcomer: you don't need deep historical mastery of RNNs to work with modern LLMs, but knowing that the Transformer's core innovation was trading sequential processing for parallelizable attention — at the cost of the O(n²) compute-in-sequence-length noted in Article 3's linear algebra section — explains both why Transformers scaled so well and why long-context is still an active engineering challenge.
Normalization and Initialization: Keeping Deep Networks Trainable
Article 3's calculus section covered how gradients can explode or vanish through the chain rule across many layers. Normalization and initialization are the two architectural tools that keep this under control from the start, rather than fixing it after the fact with gradient clipping alone.
| Technique | What It Does | Where It's Used |
|---|---|---|
| Batch Normalization (Ioffe & Szegedy, 2015) | Normalizes activations across a mini-batch, stabilizing and speeding up training | Standard in CNN architectures; less common in Transformers, which batch differently across sequence length |
| Layer Normalization (Ba, Kiros & Hinton, 2016) | Normalizes across features within a single example rather than across the batch | Used in the original Transformer (Article 1) and most Transformer variants since |
| RMSNorm (Zhang & Sennrich, 2019) | A simplified, cheaper variant of Layer Normalization that skips re-centering | Used in LLaMA and many modern open-weight LLM architectures for its lower compute cost |
| He Initialization (He et al., 2015) | Scales initial weights based on layer size to keep activation variance stable at the start of training | Standard default for networks using ReLU-family activations |
Residual connections — already cited in Article 1's ResNet paper — deserve a second mention here specifically as a training-dynamics tool: by adding a layer's input directly to its output, gradients have a direct path backward through the network that doesn't depend entirely on passing through every intervening transformation, which is a large part of why networks with dozens or hundreds of layers became trainable at all.
Training Dynamics: Loss Landscapes, Generalization, and Double Descent
Getting a model to train (loss going down) is necessary but not sufficient — the actual goal, per Article 3's probability section, is a model that performs well on data it hasn't seen. The gap between training performance and held-out performance is the generalization gap, and understanding its behavior is one of the more counterintuitive parts of modern deep learning.
Regularization: Fighting Overfitting Directly
Key Papers to Read First
| Paper | Why It's Foundational | Link |
|---|---|---|
| Hochreiter & Schmidhuber — Long Short-Term Memory (1997) | The dominant sequence architecture before Transformers; explains what attention was designed to replace | |
| Ioffe & Szegedy — Batch Normalization (2015) | Established normalization as a core training-stability tool | arXiv:1502.03167 |
| Ba, Kiros & Hinton — Layer Normalization (2016) | The normalization variant used in the original Transformer | arXiv:1607.06450 |
| Srivastava et al. — Dropout (2014) | The canonical regularization technique for neural networks | JMLR |
| He et al. — Delving Deep into Rectifiers (2015) | Introduces He initialization, standard for ReLU-family networks | arXiv:1502.01852 |
| Zhang & Sennrich — Root Mean Square Layer Normalization (2019) | RMSNorm, used in LLaMA and many modern open-weight LLMs | arXiv:1910.07467 |
| Dosovitskiy et al. — An Image Is Worth 16x16 Words (ViT, 2020) | Extends the Transformer's attention mechanism to images | arXiv:2010.11929 |
| Nakkiran et al. — Deep Double Descent (2019) | Documents a training-dynamics phenomenon that contradicts classical bias-variance intuition | arXiv:1912.02292 |
Courses to Complete
Real Scenario Walkthroughs
Self-Assessment Checklist
⚠️ What's Missing or Scoped Out of This Article
Where This Series Goes Next
Article 5 moves from these architectural and training-dynamics building blocks into generalization and learning theory proper — formal treatments of why models generalize, PAC-learning-style frameworks, and the bias-variance tradeoff's relationship to the double-descent phenomenon introduced in this article. From there, the series continues through RL foundations, interpretability, alignment, world models, systems, and research methodology, before a capstone article ties everything back into one unified map.
- Hochreiter & Schmidhuber — "Long Short-Term Memory" (1997)
- Ioffe & Szegedy — "Batch Normalization" (arXiv:1502.03167)
- Ba, Kiros & Hinton — "Layer Normalization" (arXiv:1607.06450)
- Zhang & Sennrich — "RMSNorm" (arXiv:1910.07467)
- He et al. — "Delving Deep into Rectifiers" (arXiv:1502.01852)
- Srivastava et al. — "Dropout" (JMLR 2014)
- Dosovitskiy et al. — "An Image Is Worth 16x16 Words" (arXiv:2010.11929)
- Nakkiran et al. — "Deep Double Descent" (arXiv:1912.02292)
- This site — AGI Researcher Foundations: The Technical Stack (Article 1)
- This site — AGI Researcher Foundations: The Self-Assessment Deep Dive (Article 2)
- This site — AGI Researcher Foundations: The Mathematical Foundations (Article 3)