KatInterview

Model Fit, CNNs, RNNs, Transformers and Ensembles: ML Fundamentals

Machine LearningModel answer
MediumModel answerMachine Learningoverfittingbias-variancecnn

Last updated

A broad machine-learning fundamentals question covering model fit diagnostics, augmentation, CNNs, RNNs, transformer encoders, dropout and ensemble methods.

You are in a screening conversation on core machine-learning concepts, with a lean toward computer vision. Answer each part concisely, as you would aloud in a minute or two.

  1. Model fit: How do underfitting and overfitting differ? How would you recognize each one in practice, and what would you do to fix it?
  2. Data augmentation: What is it, and why does it help? Give concrete examples for images, including cases where an augmentation would be harmful.
  3. CNNs: What are the main building blocks of a convolutional network, and what is each one for?
  4. RNNs: How does a recurrent network consume a sequence, and what goes wrong when training it?
  5. Transformer encoder: Explain the roles of positional embeddings, self-attention, residual connections and the feed-forward sublayer.
  6. Dropout: What does it do during training and at inference, and why does it improve generalization?
  7. Bagging vs. boosting: Compare them in terms of bias, variance and how the algorithms actually behave.

A strong answer ties each technique back to the bias-variance trade-off, gives a mechanism rather than just a definition, and mentions a practical diagnostic or pitfall.

Hints

Hint 1

Start from the decomposition of expected error into bias squared, variance and irreducible noise, and use it as the thread connecting most of the parts.

Hint 2

For diagnostics, think about what training versus validation curves look like, and how they change as you add data or model capacity.

Hint 3

For the architecture questions, say what problem each component solves (parameter sharing, order information, gradient flow, per-token nonlinearity) before describing the mechanics.

Hint 4

For bagging versus boosting, contrast how the base learners are trained (independent and parallel versus sequential and error-focused) and which error term each mainly reduces.