Courseiva

Overfitting and Regularization in Machine Learning

A data scientist trains a deep neural network on a small dataset. The model achieves 100% accuracy on the training data but only 60% accuracy on a validation set. Which technique is most appropriate to address this issue?

Quick Answer

The correct answer is to apply regularization. This is because the model’s perfect 100% training accuracy paired with only 60% validation accuracy is a textbook case of overfitting, where the network has memorized noise and specific patterns in the small dataset instead of learning generalizable features. Regularization techniques, such as L1/L2 weight penalties or dropout, constrain the model’s complexity by penalizing large weights or randomly disabling neurons during training, forcing the network to rely on simpler, more robust representations. On the Microsoft Azure AI Fundamentals AI-900 exam, this scenario tests your understanding of overfitting regularization as a core machine learning concept, often appearing in questions about deep learning on limited data. A common trap is to assume more training epochs or a larger model will help, but that worsens overfitting. Remember the memory tip: “Perfect train, poor test? Regularize to rest.”

⚠ Common exam trap

Candidates often confuse overfitting with underfitting and incorrectly choose options that increase model complexity (more layers or epochs) or speed up training (higher learning rate), rather than recognizing that regularization is the standard technique to combat overfitting.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Apply regularization

The model's perfect training accuracy (100%) paired with poor validation accuracy (60%) is a classic sign of overfitting, where the model has memorized the training data rather than learning generalizable patterns. Regularization techniques (e.g., L1/L2 regularization, dropout) penalize large weights or randomly drop neurons during training, which forces the network to learn simpler, more robust features and reduces overfitting on small datasets.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Increase the number of training epochs

    Why it's wrong here

    Increasing epochs would likely worsen overfitting by allowing the model to memorize more training details.

    When this WOULD be correct

    When the model is underfitting (e.g., training accuracy is low and similar to validation accuracy), increasing epochs can help the model learn more from the data.

  • Add more hidden layers

    Why it's wrong here

    Adding layers increases model complexity, which typically exacerbates overfitting.

    When this WOULD be correct

    If the model were underfitting (e.g., low accuracy on both training and validation sets) and the dataset were large enough to support deeper architectures, adding hidden layers could improve performance.

  • Apply regularization

    Why this is correct

    Regularization adds constraints to the model to prevent overfitting by discouraging overly complex patterns.

  • Increase the learning rate

    Why it's wrong here

    Increasing the learning rate can cause instability and may not address overfitting; it might even hurt performance.

    When this WOULD be correct

    When a model's training loss is decreasing very slowly or not at all, and validation accuracy is also low (indicating underfitting), increasing the learning rate can help the model converge faster and improve performance.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AI-900 exam frequently reuses these exact scenarios with slightly different constraints.

Apply regularizationCorrect answer

Why this is correct

Regularization adds constraints to the model to prevent overfitting by discouraging overly complex patterns.

Increase the number of training epochsWrong answer — click to see why

Why this is wrong here

Increasing epochs would further overfit the model to the small training dataset, worsening the validation accuracy gap.

★ When this WOULD be the correct answer

When the model is underfitting (e.g., training accuracy is low and similar to validation accuracy), increasing epochs can help the model learn more from the data.

Why candidates choose this

Candidates may think more training always improves accuracy, not realizing that overfitting is the issue here.

Add more hidden layersWrong answer — click to see why

Why this is wrong here

Adding more hidden layers increases model capacity, which would likely worsen overfitting on a small dataset, not fix it.

★ When this WOULD be the correct answer

If the model were underfitting (e.g., low accuracy on both training and validation sets) and the dataset were large enough to support deeper architectures, adding hidden layers could improve performance.

Why candidates choose this

Candidates may think deeper networks always improve accuracy, overlooking that overfitting is the core issue here.

Increase the learning rateWrong answer — click to see why

Why this is wrong here

Increasing the learning rate would make the model converge faster but does not address overfitting; it may even cause divergence or instability, worsening validation accuracy.

★ When this WOULD be the correct answer

When a model's training loss is decreasing very slowly or not at all, and validation accuracy is also low (indicating underfitting), increasing the learning rate can help the model converge faster and improve performance.

Why candidates choose this

Candidates may think that a higher learning rate will help the model learn more from the training data, not realizing that the issue is overfitting (memorization) rather than slow learning.

Analysis generated from the official AI-900blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

About these practice questions

This AI-900 question is part of Courseiva's 985-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

4 more ways this is tested on AI-900

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A data scientist trains a machine learning model on a dataset of housing prices. The model achieves 98% accuracy on the training data but only 72% accuracy on a separate test set. What is the most likely problem with this model?

medium
  • A.Underfitting
  • B.Overfitting
  • C.Data leakage
  • D.Class imbalance

Why B: The model's high accuracy on training data (98%) but significantly lower accuracy on test data (72%) is a classic symptom of overfitting, where the model learns noise and specific patterns in the training set rather than generalizing to new, unseen data. In Azure Machine Learning, this often occurs when the model is too complex (e.g., deep decision trees or high-degree polynomial features) relative to the amount of training data, and regularization techniques like L1/L2 regularization or early stopping are not applied.

Variation 2. A data scientist trains a machine learning model on historical sales data to predict future sales volume. The model achieves 99% accuracy on the training dataset but only 75% accuracy on a separate test dataset. What is the most likely issue with this model?

medium
  • A.Underfitting
  • B.Overfitting
  • C.High bias
  • D.High variance

Why B: The model's 99% accuracy on the training set versus 75% on the test set indicates it has memorized the training data, including noise and outliers, rather than learning generalizable patterns. This classic symptom of overfitting occurs when the model is too complex relative to the amount or variability of the training data, causing poor performance on unseen data.

Variation 3. A data scientist trains a machine learning model to predict house prices based on features like square footage, number of bedrooms, and location. The model achieves a very low error on the training data but performs poorly on a held-out test set. Which term best describes this situation?

medium
  • A.Underfitting
  • B.Overfitting
  • C.High bias
  • D.High variance

Why B: The model performs exceptionally well on training data but poorly on test data, which is the classic symptom of overfitting. Overfitting occurs when the model learns noise and specific patterns in the training set rather than generalizing to unseen data. In Azure Machine Learning, this can be detected by monitoring the gap between training and validation metrics, and mitigated using techniques like regularization or early stopping.

Variation 4. A data scientist trains a model to predict house prices. The model achieves 99% accuracy on the training data but only 80% accuracy on new test data. Which technique is most likely to help improve the model's generalization?

medium
  • A.Reduce the amount of training data
  • B.Apply regularization to the model
  • C.Remove some features from the dataset
  • D.Increase the number of layers in the neural network

Why B: The model is overfitting: it has memorized the training data (99% accuracy) but fails to generalize to new data (80% accuracy). Regularization (e.g., L1 or L2) penalizes large weights, reducing the model's complexity and forcing it to learn simpler patterns that generalize better. This directly addresses the variance problem without discarding useful information.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AI-900 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-900 exam.