You are interviewing for an applied scientist role and are asked several theory questions.
-
Overfitting
-
Define overfitting and underfitting in supervised learning.
-
How would you detect overfitting in practice (e.g., using training/validation curves or cross-validation)?
-
Describe several techniques to reduce overfitting (at least 3–4 distinct methods) and explain the intuition behind each.
-
Contrastive learning
-
Explain the high-level idea of contrastive learning for representation learning.
-
What are positive and negative pairs, and how are they constructed in practice (e.g., in vision or NLP)?
-
What kinds of downstream tasks benefit from contrastive pretraining?
-
Contrastive loss
-
Describe a common contrastive loss (for example, InfoNCE / NT-Xent style loss).
-
Intuitively explain how this loss encourages representations of positive pairs to be close and negative pairs to be far apart.
-
You may write a simple formula, but focus on the intuition.
-
Transformers
-
At a high level, describe the architecture of a transformer used for NLP or vision tasks.
-
Explain the role of self-attention and how it differs conceptually from recurrent or convolutional approaches.
-
Briefly describe positional encoding and why it is needed.
-
Mention typical components in a transformer block (e.g., multi-head attention, feedforward layers, residual connections, normalization).