AWS Certified Machine Learning – SpecialtyModelingHard

A team is developing a computer vision model to detect defects in manufactured products. They have collected a large dataset of images, but a significant portion of them are mislabeled or contain noise due to imperfect data collection. Training on this noisy data leads to suboptimal model performance and poor generalization. Which model training technique is most appropriate to mitigate the impact of noisy labels and improve the model's robustness?

  1. AIncreasing the learning rate and using a larger batch size.
  2. BReducing the model complexity by decreasing the number of layers.
  3. CApplying label smoothing during training with a small epsilon value.
  4. DImplementing early stopping based on training accuracy.
Show answer & explanation

Correct answer: C. Applying label smoothing during training with a small epsilon value.

Label smoothing is a regularization technique that replaces hard labels (0 or 1) with soft labels during training. Instead of using 0 for negative and 1 for positive, it uses 0 + ε and 1 - ε (or similar distribution). This encourages the model to be less confident in its predictions, making it more robust to mislabeled samples and improving generalization. It prevents the model from overfitting to potentially incorrect labels, which is very common with noisy data.

Why the other options are wrong

  • A. Increasing the learning rate with noisy labels can make training unstable and potentially exacerbate overfitting to incorrect labels. Larger batch sizes might smooth gradients but don't directly tackle label noise.
  • B. Reducing model complexity can help with overfitting in general, but it's a blunt instrument for noisy labels. Label smoothing is a more targeted approach that specifically makes the model more tolerant to label inaccuracies without necessarily sacrificing capacity for complex patterns.
  • D. Early stopping prevents overfitting to the training data, but if the training data itself is noisy, it might stop too early or still learn from incorrect labels. It doesn't directly mitigate the effect of individual noisy labels.

Label Smoothing

Label smoothing is a regularization technique used in classification tasks to prevent models from becoming overconfident in their predictions, especially when dealing with noisy or uncertain labels. It replaces hard target labels with a weighted average of the hard label and a uniform distribution.

  • Reduces overfitting, particularly to mislabeled data.
  • Encourages better generalization by making the model less confident.
  • Often used in deep learning, especially in computer vision and NLP.
  • A small hyperparameter (epsilon) controls the extent of smoothing.

Memory trick: When labels are 'MESSY', 'SMOOTH' them out, don't trust them perfectly.

More Modeling questions