KatInterview

Foundations of Generalization Error and Deep Network Gradient Dynamics

Machine LearningModel answer
MediumModel answerMachine Learningbias-varianceoverfittingvanishing-gradients

Last updated

Break down bias-variance decomposition, diagnose deep learning overfitting with remedies, and derive vanishing gradient mechanics alongside modern structural solutions.

Part 1: Generalization Error Breakdown

Explain the classic bias-variance decomposition in supervised learning. Detail how increasing a model's capacity influences its bias and variance components, and describe how this interaction dictates the total expected out-of-sample error.


Part 2: Overfitting & Limitations of Data Scaling

Imagine training a deep neural network on a large image recognition benchmark. During training, you notice that while the training loss steadily declines over 100 epochs, the validation loss reaches its minimum at epoch 50 and continuously increases thereafter.

  1. What specific phenomenon is taking place after epoch 50? Describe two practical techniques to address this issue.
  2. Explain why simply acquiring a larger volume of training data does not guaranteed solve high-variance issues in all scenarios.

Part 3: Vanishing Gradients in Deep Architectures

When optimizing a 100-layer feedforward network using standard logistic sigmoid activations, parameters in the earliest layers fail to update effectively and remain near their initial values.

  1. Formulate the mathematical intuition behind why backpropagated gradients shrink exponentially in early layers under this architecture.
  2. Recommend two structural or architectural modifications to overcome this issue, explaining mathematically why each approach resolves the gradient degradation.

Hints

Hint 1

Express the expected MSE as the sum of squared bias, variance, and noise components.

Hint 2

Consider the maximum upper bound of the logistic sigmoid's derivative and what happens when multiplying hundreds of these terms in the chain rule.

Hint 3

Evaluate how identity mappings in residual blocks alter the recursive Jacobian product during backpropagation.