Practice
1. In the context of sequence modeling, why is the attention mechanism preferred over recurrent neural networks (RNNs)?
easy
Solution
Step 1: Understand the advantage of attention mechanisms.
Attention mechanisms allow for parallel processing, unlike RNNs which process sequentially.Step 2: Eliminate wrong options.
RNNs cannot handle sequences longer than 100 tokens. is incorrect as RNNs can handle longer sequences but with difficulty. Attention mechanisms require less data to train effectively. is incorrect because both require substantial data. RNNs are unable to capture any long-term dependencies. is incorrect as RNNs can capture long-term dependencies but less effectively.Final Answer:
Option A -> Option AQuick Check:
Parallel processing makes attention faster. [OK]
Hint: Parallel processing makes attention faster. [OK]
Common Mistakes:
2. In the context of dropout regularization, what happens to the dropout rate during inference?
easy
Solution
Step 1: Understand dropout behavior during inference
During inference, dropout is not applied, meaning the dropout rate is effectively zero.Step 2: Eliminate wrong options
The dropout rate is increased to improve generalization. is incorrect because increasing dropout during inference would not improve generalization. The dropout rate remains the same as during training. is incorrect because dropout is not applied during inference. The dropout rate is adjusted based on validation performance. is incorrect because dropout rate is not adjusted based on validation performance during inference.Final Answer:
Option A -> Option AQuick Check:
Dropout off during inference. [OK]
Hint: Dropout off during inference. [OK]
Common Mistakes:
3. You need to reduce the dimensionality of a dataset with 10,000 features for a real-time application. Which technique is more suitable and why?
medium
Solution
Step 1: Consider computational efficiency
Real-time applications require fast computations.Step 2: Evaluate each option
t-SNE is computationally expensive, UMAP is faster but still slower than PCA, and LDA is not suitable for unsupervised tasks.Final Answer:
Option B -> Option BQuick Check:
PCA for speed in large datasets [OK]
Hint: PCA for speed in large datasets [OK]
Common Mistakes:
4. You are tasked with designing a recommendation system for a high-dimensional dataset. Which approach would best handle the curse of dimensionality while maintaining performance?
hard
Solution
Step 1: Identify the challenge of high dimensions.
Matrix factorization reduces dimensionality effectively.Step 2: Eliminate wrong options.
Implement a simple content-based filtering system. doesn't reduce dimensions. Apply a deep learning model with many hidden layers. may overfit due to high dimensions. Use a rule-based system to manually curate recommendations. is not scalable for large datasets.Final Answer:
Option B -> Option BQuick Check:
Matrix factorization reduces dimensions, aids recommendations. [OK]
Hint: Matrix factorization reduces dimensions, aids recommendations. [OK]
Common Mistakes:
5. You are tasked with adapting a pretrained language model for a sentiment analysis task in a low-resource language. Which approach is most suitable?
hard
Solution
Step 1: Consider the constraints of low-resource languages.
Fine-tuning on a small corpus allows the model to adapt to the specific language nuances.Step 2: Eliminate wrong options.
Translate the low-resource language data to English and fine-tune the English model. might lose language-specific nuances. Use the pretrained model as is, without any fine-tuning. won't adapt the model to the new language. Train a new model from scratch using the low-resource language data. is impractical due to limited data.Final Answer:
Option B -> Option BQuick Check:
Fine-tune on small corpus for low-resource languages. [check]
Hint: Fine-tune on small corpus for low-resource languages. [check]
Common Mistakes:
