Practice
1. Which activation function is most likely to suffer from the vanishing gradient problem?
easy
Solution
Step 1: Identify the vanishing gradient issue.
The vanishing gradient problem occurs when gradients become too small, hindering learning.Step 2: Evaluate each option.
ReLU and Leaky ReLU do not suffer from this as they have non-zero gradients for positive inputs. GELU is similar to ReLU in behavior. Sigmoid squashes inputs to a small range, leading to vanishing gradients.Final Answer:
Option C -> Option CQuick Check:
Sigmoid squashes, gradients vanish. [OK]
Hint: Sigmoid squashes, gradients vanish. [OK]
Common Mistakes:
2. In a scenario where computational resources are limited, which approach is more suitable for hyperparameter tuning and why?
medium
Solution
Step 1: Evaluate resource constraints
Cross-validation is computationally expensive but provides robust tuning.Step 2: Eliminate less suitable options
Use a single train-test split to save resources. risks overfitting. Use a train-validation split and skip the test set. skips the test set, risking unseen data performance. Use a larger test set to ensure model generalization. misallocates resources to testing rather than tuning.Final Answer:
Option C -> Option CQuick Check:
Cross-validation ensures robust tuning despite cost. [OK]
Hint: Cross-validation ensures robust tuning despite cost. [OK]
Common Mistakes:
3. A Naive Bayes model is underperforming on a dataset. What is the most likely cause?
medium
Solution
Step 1: Identify Potential Causes
Naive Bayes assumes feature independence, so correlation can degrade performance.Step 2: Eliminate Other Causes
The model has too many parameters. is incorrect because Naive Bayes is not parameter-heavy. The features are not normalized. is incorrect because normalization is not critical for Naive Bayes. The dataset is too small. is incorrect because Naive Bayes can work well with small datasets.Final Answer:
Option A -> Option AQuick Check:
Correlated features degrade Naive Bayes. [[check]]
Hint: Correlated features degrade Naive Bayes. [[check]]
Common Mistakes:
4. A high-dimensional dataset is causing a model to perform poorly. The model's accuracy is unexpectedly low. What is the most likely root cause?
medium
Solution
Step 1: Identify the impact of high dimensions.
High dimensions often lead to data sparsity, affecting generalization.Step 2: Eliminate wrong options.
The model is underfitting due to insufficient complexity. is about model complexity, not data sparsity. The model is overfitting due to too many parameters. is about overfitting, not generalization. The learning rate is too high, causing unstable training. is about training stability, not generalization.Final Answer:
Option A -> Option AQuick Check:
High dimensions lead to sparsity, hurting generalization. [OK]
Hint: High dimensions lead to sparsity, hurting generalization. [OK]
Common Mistakes:
5. When choosing between BPE and WordPiece for a language model, which scenario makes WordPiece a better choice?
medium
Solution
Step 1: Identify the strengths of WordPiece.
WordPiece is designed to handle rare words efficiently by breaking them into subwords.Step 2: Eliminate wrong options.
Minimizing vocabulary size (A) and handling inflection (B) are not specific strengths of WordPiece; text generation (D) is not a specific advantage.Final Answer:
Option C -> Option CQuick Check:
WordPiece excels with rare words. [OK]
Hint: WordPiece excels with rare words. [OK]
Common Mistakes:
