Repository navigation
Module 09
Level: Intermediate
Status: Planned — navigation and lesson specifications
This module is a self-contained learning unit within the larger Deep Learning curriculum. Its purpose is to build understanding from motivation and prerequisites through mathematical reasoning, implementation and critical evaluation.
The starting scale of parameters affects activation and gradient magnitudes. Poor initialization can cause signals to vanish or explode across depth. Normalization methods and residual paths help stabilize optimization, although their effects depend on architecture and training setup.
Understand symmetry breaking and variance propagation. Derive the motivation for Xavier and He initialization, then compare BatchNorm, LayerNorm and related methods. Inspect activation statistics and gradient norms across layers.
By the end of this module, a reader should be able to define its central objects, explain the motivation behind its main methods, interpret the governing equations, work through a small example, and identify assumptions and limitations. The goal is understanding the mechanism—not memorizing a list of terms.
- Explain symmetry breaking.
- Relate initialization to activation and gradient variance.
- Compare normalization axes and behaviour.
- Module-09-Lesson-Map
- Module-09-Important-Lessons
- Module-09-Numericals-and-Exercises
- Module-09-Implementation-Roadmap
- Module-09-Research-Extensions
- Module-09-weight-initialization-normalization-gradient-flow
Each page below isolates a specific concept or closely related group of concepts. The page isolates a specific concept or closely related group of concepts for focused study.
- Module-09A-Initialization-and-Gradient-Flow —
- Module-09B-Normalization-and-Residual-Gradient-Paths —
- Module-09-Lesson-01
- Module-09-Lesson-02
- Module-09-Lesson-03
- Module-09-Lesson-04
- Module-09-Lesson-05
- Module-09-Lesson-06
- Module-09-Lesson-07
- Module-09-Lesson-08
- Module-09-Lesson-09
- Study the lessons in prerequisite order.
- Write a notation sheet and derive central equations.
- Solve at least one hand-worked example per major mechanism.
- Implement core operations where appropriate.
- Verify outputs and gradients.
- Complete conceptual and coding exercises.
- Record limitations and research extensions.
- Conceptual understanding
- Mathematical derivations
- Worked numerical examples
- NumPy implementation (where applicable)
- PyTorch implementation (where applicable)
- Tests and numerical verification
- Experiments and interpretation
- Revision and self-assessment
Initialization and normalization influence signal and gradient propagation through depth. Poorly scaled weights can cause activations or gradients to vanish or explode. BatchNorm and LayerNorm normalize different axes and have different behaviour during training and inference.
For a layer with fan-in
Layer normalization for one feature vector: $$ \operatorname{LN}(x)=\gamma\odot \frac{x-\mu(x)}{\sqrt{\sigma^2(x)+\epsilon}}+\beta. $$
If each layer multiplies activation variance by roughly 2, after L layers variance scales like
flowchart TD
A[Choose architecture and activation] --> B[Compute fan-in / fan-out]
B --> C[Select initialization]
C --> D[Measure activation and gradient statistics]
D --> E{Stable across depth?}
E -->|No| C
E -->|Yes| F[Train and monitor]
Record activation means, variances and gradient norms layer by layer during the first few batches. Compare Xavier and He initialization under sigmoid and ReLU activations.
BatchNorm uses batch statistics during training and running estimates at evaluation. LayerNorm normalizes features per example and is common in Transformers. Initialization rules depend on activation and architecture.
Explore RMSNorm, GroupNorm, weight standardization, residual scaling and normalization-free architectures.
- Reproduce the smallest mathematical example by hand.
- Implement the central operation using NumPy.
- Implement the same operation using PyTorch.
- Compare outputs and gradients with numerical tolerances.
- Change one assumption or hyperparameter and document what changes.
- Record environment, random seed, data split, compute budget and limitations.
- Explain the motivation and assumptions without notes.
- Derive the principal equations and define every symbol.
- Complete at least one worked numerical example.
- Trace tensor shapes through the computation.
- Implement and test the central mechanism.
- Explain at least two failure modes.
- Read one primary paper and summarize its contribution and limitations.
Content status: This page now contains a technical chapter and a practical learning specification. The linked lesson pages provide focused subtopic treatment; experiments are not claimed complete until their result logs are added.
🏠 Home · 🗺️ Curriculum · 🧭 Learning paths · ❓ Question bank · 📖 Glossary · 📚 References · ✏️ Contributing
🏠 Home · 🗺️ Curriculum · 🧭 Learning paths
❓ Question bank · 📖 Glossary · 📚 References
Jump to module:
01 02 03 04 05 06 07 08 09 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24