Deep Learning Transfer Learning and Fine-Tuning 2 — Questions and Answers
Question 1: What is 'domain adaptation' in transfer learning?
- Changing the architecture of a neural network to fit a new problem
- Adapting a model trained in one data distribution to work well on a different but related distribution (Correct answer)
- Collecting more training data from the target domain
- Converting a regression model into a classification model
Correct answer: Adapting a model trained in one data distribution to work well on a different but related distribution
Domain adaptation addresses the distribution shift between source and target domains so that a model trained on the source performs well on the target without requiring extensive target labels.
Question 2: In NLP transfer learning, what does BERT's pre-training primarily involve?
- Next sentence classification only
- Masked language modeling and next sentence prediction (Correct answer)
- Autoregressive language generation
- Supervised text classification on Wikipedia
Correct answer: Masked language modeling and next sentence prediction
BERT is pre-trained using Masked Language Modeling (predicting randomly masked tokens) and Next Sentence Prediction, enabling it to learn deep bidirectional representations.
Question 3: What is 'catastrophic forgetting' in neural networks?
- A model failing to converge due to exploding gradients
- The tendency of a neural network to abruptly lose previously learned information when trained on new data (Correct answer)
- GPU memory overflow during large batch training
- Gradient vanishing in very deep networks
Correct answer: The tendency of a neural network to abruptly lose previously learned information when trained on new data
Catastrophic forgetting occurs when training a network on a new task overwrites the weights that encoded knowledge from previous tasks, causing performance on those tasks to degrade sharply.
Question 4: What is 'zero-shot learning' in deep learning?
- Training a model without any data augmentation
- A model's ability to recognize or solve tasks it has never explicitly seen during training (Correct answer)
- Skipping the validation step during model training
- Training with zero regularization
Correct answer: A model's ability to recognize or solve tasks it has never explicitly seen during training
Zero-shot learning enables a model to generalize to unseen classes or tasks at inference time by leveraging semantic descriptions, attribute vectors, or language embeddings learned during training.
Question 5: In transfer learning, what is the primary purpose of replacing the original output head with a new one?
- To increase the depth of the network
- To adapt the model's final predictions to the number and type of classes in the new target task (Correct answer)
- To reduce memory consumption during inference
- To improve gradient flow during backpropagation
Correct answer: To adapt the model's final predictions to the number and type of classes in the new target task
The original head is task-specific to the source dataset; replacing it with a new head sized to the target task's output space allows the pre-trained backbone's features to be applied to a different problem.
Question 6: Which of the following best describes cross-domain transfer learning?
- Applying a model trained on images to another image dataset with the same classes
- Applying knowledge learned in one modality or domain (e.g., images) to a different domain (e.g., medical scans) with a distribution gap (Correct answer)
- Transferring model weights between different hardware platforms
- Using the same dataset for both pre-training and fine-tuning
Correct answer: Applying knowledge learned in one modality or domain (e.g., images) to a different domain (e.g., medical scans) with a distribution gap
Cross-domain transfer learning involves a significant distribution shift between source and target domains, such as adapting a natural image classifier to medical imaging, requiring careful adaptation strategies.
Question 7: What is 'discriminative fine-tuning' as used in language model transfer?
- Fine-tuning only the discriminator in a GAN
- Applying different learning rates to different layers, with lower rates for earlier layers (Correct answer)
- Training only on the hardest examples in the dataset
- Using a discriminative loss instead of cross-entropy
Correct answer: Applying different learning rates to different layers, with lower rates for earlier layers
Discriminative fine-tuning assigns progressively lower learning rates to earlier (more general) layers, acknowledging that different layers should be updated at different speeds based on how task-specific their representations are.
What is 'domain adaptation' in transfer learning?