MLA-C01 · Question #198
An ML engineer is training a text generation model on Amazon SageMaker AI. After several epochs, the loss function does not converge, and the model's accuracy on the validation dataset starts to…
The correct answer is C. Decrease the learning rate and increase the mini-batch size. Oscillating validation loss and non-convergence are classic symptoms of a learning rate that is too high - the optimizer is taking steps so large it overshoots the minimum and bounces around the loss surface. The fix is to decrease the learning rate, which produces smaller…
Question
An ML engineer is training a text generation model on Amazon SageMaker AI. After several epochs, the loss function does not converge, and the model’s accuracy on the validation dataset starts to show oscillating results. The ML engineer needs to ensure that the model achieves generalization. Which solution will meet this requirement?
Options
- AIncrease the learning rate and decrease the mini-batch size.
- BIncrease the learning rate as the number of epochs increases.
- CDecrease the learning rate and increase the mini-batch size.
- DDecrease the learning rate and decrease the mini-batch size.
How the community answered
(49 responses)- A2% (1)
- B6% (3)
- C84% (41)
- D8% (4)
Explanation
Oscillating validation loss and non-convergence are classic symptoms of a learning rate that is too high - the optimizer is taking steps so large it overshoots the minimum and bounces around the loss surface. The fix is to decrease the learning rate, which produces smaller, more stable gradient steps toward convergence. Increasing mini-batch size reduces the variance of each gradient estimate (less noise per update), which further stabilizes training and aids generalization. Together, a lower learning rate and larger mini-batch size calm the oscillations and allow the model to converge. Increasing the learning rate (A, B) would exacerbate the instability. Decreasing mini-batch size (D) introduces more gradient noise, which would worsen the oscillations.
Topics
Community Discussion
No community discussion yet for this question.