Detecting and Fixing Overfitting in Neural Networks
A data scientist trains a deep neural network for image classification. The training loss decreases but validation loss starts increasing after 50 epochs. What should the data scientist do to improve generalization?
Quick Answer
The correct approach is to apply dropout and early stopping, as the rising validation loss alongside falling training loss is the classic signature of overfitting in neural networks. Dropout works by randomly deactivating a fraction of neurons during each training pass, which prevents the network from relying too heavily on any single pathway and forces it to learn more generalized, robust features. Early stopping then directly addresses the overfitting by monitoring validation performance and halting training at the epoch where it peaks, effectively selecting the model that generalizes best before degradation begins. On the CompTIA AI+ AI0-001 exam, this scenario tests your ability to recognize overfitting detection and solutions in a practical deep learning context; a common trap is to add more layers or increase epochs, which would worsen the problem. Remember the mnemonic “Drop and Stop” — when validation loss climbs, drop neurons and stop early.
⚠ Common exam trap
CompTIA often tests the misconception that increasing model complexity (more layers) or adjusting batch size/learning rate can fix overfitting, when in reality these changes either exacerbate the problem or address unrelated training dynamics.
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 dropout and early stopping
The increasing validation loss while training loss decreases is a classic sign of overfitting. Dropout randomly deactivates neurons during training, which prevents co-adaptation and forces the network to learn more robust features. Early stopping halts training when validation performance stops improving, directly addressing the overfitting by selecting the model with the best generalization before it degrades.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Decrease batch size
Why it's wrong here
Decreasing batch size introduces noise in gradient updates but is not a primary technique for addressing overfitting; it may even lead to slower convergence.
- ✓
Apply dropout and early stopping
Why this is correct
Dropout randomly ignores neurons during training to reduce overfitting, and early stops when validation loss worsens, preventing further overfitting.
- ✗
Add more hidden layers
Why it's wrong here
Adding more layers increases model capacity, which typically exacerbates overfitting rather than reducing it.
- ✗
Increase learning rate
Why it's wrong here
Increasing the learning rate would exacerbate the divergence between training and validation loss, as the model is already overfitting; a larger step size prevents the optimizer from settling into a flatter minimum that generalises. This option is tempting because raising the learning rate can accelerate convergence when loss is stagnating on a plateau, making it a correct choice for underfitting scenarios.
About these practice questions
One of 754 original AI0-001 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
2 more ways this is tested on AI0-001
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 research team is training a deep neural network for image classification. The training loss decreases rapidly for the first few epochs but then plateaus, while validation loss starts to increase after epoch 10. Which action would best address this issue?
hard- A.Reduce the batch size to introduce more noise during training.
- B.Increase the learning rate to help the model escape the plateau.
- ✓ C.Implement early stopping based on validation loss to prevent further overfitting.
- D.Add more convolutional layers to increase model capacity.
Why C: The training loss decreasing rapidly then plateauing while validation loss increases after epoch 10 is a classic sign of overfitting. Early stopping monitors validation loss and halts training when it begins to rise, preventing the model from memorizing noise in the training data. This directly addresses the overfitting issue without requiring architectural or hyperparameter changes that could destabilize training.
Variation 2. A team is training a neural network for image classification. They observe that training loss decreases steadily but validation loss starts increasing after 20 epochs. What is the most likely issue?
medium- A.Underfitting
- B.Vanishing gradients
- C.Data leakage
- ✓ D.Overfitting
Why D: The training loss decreasing while validation loss increases after 20 epochs is the classic signature of overfitting. The model is memorizing the training data (including noise) rather than learning generalizable patterns, causing it to perform poorly on unseen validation data.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI0-001 practice question is part of Courseiva's free CompTIA 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 AI0-001 exam.