This question looked like one question but was basically five questions stacked on top of each other.
Structure your answer by first defining dropout and L1/L2 regularization with their mathematical formulations, then explain how each reduces overfitting and their train vs inference behavior. Next, compare typical hyperparameter ranges and tradeoffs, and finally discuss interactions with LayerNorm, AdamW weight decay, and why dropout is often disabled in modern LLM pretraining.
Pro tip: Emphasize that dropout is typically omitted in large-scale LLM pretraining because it slows convergence and modern architectures with massive data and LayerNorm already provide sufficient regularization; instead, weight decay (decoupled via AdamW) is the primary regularizer.
Clearly state the math: dropout randomly zeroes activations with probability p during training and scales by 1/(1-p) at inference (or uses inverted dropout). L1 adds λ∑|w| to the loss, L2 adds λ∑w² (or λ/2∑w²).
Describe why each works: dropout prevents co-adaptation of neurons and approximates an ensemble; L1 induces sparsity by pushing weights to zero; L2 penalizes large weights, smoothing the function and improving generalization.
Highlight that dropout is active only during training (with scaling) and disabled at inference; L1/L2 are always applied during training but not at inference (they only affect the learned weights).
Mention typical ranges: dropout p=0.1–0.5 (0.5 for large FC layers, 0.1–0.3 for transformers); L2 λ=1e-4 to 1e-2; L1 λ=1e-5 to 1e-3. Tradeoffs: dropout adds noise and slows training; L1 yields sparse models but can be unstable; L2 is smooth and widely used.
Explain how dropout interacts with LayerNorm (dropout before/after LN can affect stability), and how AdamW decouples weight decay from gradient updates, making L2 regularization more effective. Note that dropout is often turned off in LLM pretraining because it harms convergence and large datasets provide implicit regularization.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.