Which Hyperparameters Directly Affect Overfitting in Deep Learning?
A data scientist is tuning a deep learning model. Which TWO hyperparameters directly affect the model's capacity to overfit?
Quick Answer
The answer is the number of layers and the dropout rate. Increasing the number of layers directly expands the model’s depth and representational capacity, allowing it to memorize noise in the training data, which is the core mechanism of overfitting. Conversely, dropout is a regularization technique that randomly deactivates neurons during training; a low dropout rate (e.g., 0.0) removes this safeguard, while a higher rate (e.g., 0.5) forces the network to learn more robust features, directly reducing overfitting risk. On the CompTIA AI+ AI0-001 exam, this question tests your understanding of how architectural choices versus regularization controls influence model generalization. A common trap is confusing hyperparameters like learning rate or batch size, which affect convergence speed rather than overfitting capacity. Remember the mnemonic “Depth Drives Overfit, Dropout Defends It” to keep these two directly linked hyperparameters straight.
⚠ Common exam trap
CompTIA often tests the distinction between hyperparameters that affect model capacity (number of layers, dropout rate) versus those that affect training dynamics (batch size, optimizer, learning rate), leading candidates to mistakenly select learning rate or batch size as direct overfitting controls.
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
✓
Number of layers in the network.
Increasing the number of layers increases the model's depth, which expands its representational capacity and allows it to learn more complex patterns, including noise, thereby directly increasing overfitting risk. Option D is correct because dropout is a regularization technique that randomly drops neurons during training; a low dropout rate (e.g., 0.0) removes this regularization, while a high rate (e.g., 0.5) reduces overfitting by preventing co-adaptation of neurons.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Number of layers in the network.
Why this is correct
More layers increase capacity, raising overfitting risk.
- ✗
Batch size.
Why it's wrong here
Batch size affects gradient noise, not capacity directly.
- ✗
Optimizer choice (e.g., SGD vs Adam).
Why it's wrong here
Optimizer affects training dynamics, not capacity.
- ✓
Dropout rate.
Why this is correct
Dropout is a regularization technique that reduces overfitting.
- ✗
Learning rate.
Why it's wrong here
Learning rate does not change model capacity.
About these practice questions
Courseiva writes every AI0-001 question from scratch — 754 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way 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 team trained a ResNet-50 model with the configuration shown. The high training accuracy and lower validation accuracy suggest overfitting. Which change to the training configuration is MOST likely to reduce overfitting?
hard- A.Reduce number of epochs to 5.
- B.Increase batch size to 64.
- C.Increase learning rate to 0.01.
- ✓ D.Add dropout layers after convolutional layers.
Why D: Adding dropout layers after convolutional layers is a regularization technique that randomly drops a fraction of neurons during training, which forces the network to learn more robust features and reduces overfitting. This directly addresses the symptom of high training accuracy with lower validation accuracy by preventing the model from relying too heavily on specific neurons.
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.