Optimization Methods
This section covers how deep networks are set up and trained, in the order CS 182 teaches it. The optimizers themselves work on any objective, so their notes live in Mathematical Optimization. This folder holds the parts that only make sense for networks:
- Starting point: weight initialization sets the scale of the weights so that signals neither explode nor vanish.
- Optimizers for weight matrices: Muon orthogonalizes each update with Newton-Schulz iterations.
- Scaling with width: μP sets initialization and learning rates per layer so that tuned hyperparameters carry over to wider networks.
- Regularization: regularizers reduce overfitting, with separate notes on dropout and data augmentation.
- Normalization: normalization layers keep activations at a stable scale, with batch, layer and group normalization.
Prerequisites
- 2. Neural Networks, for layers, activations and backpropagation.
- 6.1. Least Squares, the model problem the course uses to analyze optimizers.
- 3.2.1. Ridge Regression, for ridge regression.
- 13.1 Singular Value Decomposition, for the spectral view of updates in Muon and μP.
Contents
Optimizers, in the Mathematical Optimization folder:
- 6.4. Gradient Descent: the basic update and its behavior on least squares.
- 6.4.1. Stochastic Gradient Descent: minibatch gradients and their noise.
- 6.4.2. Momentum: averaging past gradients.
- 6.4.3. Adam: per-coordinate step sizes, AdamW and sign descent.
- 6.4.4. Steepest Descent Under a Norm: the norm choice behind normalized GD, sign descent and spectral steps. Not taught: the ball and the Shampoo update rule.
This folder:
- 4.1. Weight Initialization: variance propagation, zero initialization and symmetry, Xavier, He and Glorot, bias initialization, ReLU elbow placement. Not taught: uniform variants and PyTorch defaults, the backward-pass argument, zero-initialized output and residual layers.
- 4.2. Muon: the Muon update, Newton-Schulz iteration, the cubic and quintic polynomials. Not taught: cost counts and which parameters use Muon.
- 4.3. Maximal Update Parameterization: RMS norm, the RMS→RMS norm, feature-learning conditions, learning-rate scaling with width, hyperparameter transfer. Not taught: random-matrix spectral norms, the spectral initialization rule, the lazy regime.
- 4.4. Neural Network Regularization: weight decay, model averaging and an overview of the other regularizers.
- 4.4.1. Dropout: random masking of hidden units, test-time scaling, and the equivalence with ridge regression.
- 4.4.2. Data Augmentation: label-preserving transformations, mixing methods, and test-time augmentation.
- 4.5. Neural Network Normalization: comparison hub for normalization layers, with a decision rule and a comparison table.
- 4.5.1. Batch Normalization: statistics across the batch, test-time statistics, scale invariance, batch noise, and the backward pass.
- 4.5.2. Layer Normalization: statistics within each example, used in transformers and RNNs.
- 4.5.3. Group Normalization: statistics over groups of channels, with instance normalization as a special case.
Recommended Path
Read 4.1. Weight Initialization first. Then read 6.4.4. Steepest Descent Under a Norm, 4.2. Muon and 4.3. Maximal Update Parameterization together, since they share the RMS→RMS norm. Read 4.5.1. Batch Normalization and 4.4.1. Dropout with the CNN material.