Tokenizer3 XP · 1-day streak
Topics / ML & Deep Learning Foundations

ML & Deep Learning Foundations

Every AI Engineer loop - frontier lab, big tech, or startup - still opens with fundamentals: interviewers use them to separate people who operate models from people who understand them. Expect these questions in phone screens, as warm-ups before system design, and as depth probes when you claim LLM experience ("you fine-tuned a model - why AdamW?

0%mastery
0/55questions tried
0due today
0/15cards read

Card 1 of 15

Generalization: bias, variance, and the modern caveat

Bias is error from a model too simple to capture the signal; variance is error from fitting noise in a particular training set. Under squared-error loss, expected test error decomposes exactly as bias² + variance + irreducible noise (for other losses the decomposition is only an analogy). Diagnose with the train/val gap: high train error = underfitting (bias); low train error but high val error = overfitting (variance). The modern caveat: heavily overparameterized networks violate the classical U-shaped curve (double descent) - past the interpolation threshold, bigger models often generalise better, which is part of why scaling works.

Regularization toolkit (know what each one trades away):

  • L2 / weight decay - shrinks weights toward zero; MAP estimation with a Gaussian prior.
  • L1 - drives weights exactly to zero (sparsity); Laplace prior.
  • Dropout - randomly zeroes activations at train time (rescaled so inference needs no change); an implicit ensemble. Large-scale LLM pretraining often sets it to 0 because data is effectively unlimited.
  • Early stopping - halt when val loss stops improving; cheap and surprisingly close to L2 in effect.
  • Data augmentation - encodes invariances (crops/flips in vision, paraphrase/back-translation in NLP).
All 55 ML & Deep Learning Foundations questions

Basic

  1. Explain the bias-variance tradeoff. How do you tell which one is hurting your model?
  2. How do you detect overfitting and underfitting in practice, and what do you do about each?
  3. Compare L1 and L2 regularization. Why does L1 produce sparse weights?
  4. How does dropout work - and what changes between training and inference?
  5. Walk me through train/validation/test splits. When do you use cross-validation, and when is it a bad idea?
  6. Explain precision, recall, and F1. Give a concrete case where 99% accuracy means the model is useless.
  7. What's the difference between parameters and hyperparameters? How do you tune hyperparameters efficiently?
  8. What's the difference between batch, mini-batch, and stochastic gradient descent? What does batch size actually change?
  9. What are embeddings? Compare cosine similarity, dot product, and Euclidean distance - when does the choice matter?
  10. Define supervised, unsupervised, and self-supervised learning. Where does each stage of modern LLM training fit?
  11. Random forest vs gradient boosting: how does each work, and why do tree ensembles still beat neural networks on tabular data?
  12. What is feature scaling? Compare normalization and standardization, and tell me which models actually need it.
  13. Walk me from RNNs to LSTMs to transformers. Why did attention win?
  14. What is the difference between feature engineering and representation learning? Where does hand-engineering still earn its keep in 2026?
  15. Why does a neural network need non-linear activation functions, and how did the field move from sigmoid to ReLU to GELU-style activations?

Intermediate

  1. What is data leakage? Give me three subtle examples you've seen or could imagine, and how you'd detect them.
  2. ROC-AUC vs PR-AUC - what does each measure, and why does ROC-AUC look deceptively good on imbalanced data?
  3. What does it mean for a classifier to be calibrated? How do you measure and fix miscalibration?
  4. Your fraud dataset is 0.5% positive. Walk me through your strategy for handling the imbalance.
  5. Explain momentum and Adam. What problem does each solve over vanilla SGD?
  6. Adam vs AdamW - what exactly is "decoupled weight decay," and why did AdamW become the transformer default?
  7. Why do transformer training recipes use learning-rate warmup, and what does the rest of the schedule look like?
  8. Explain backpropagation to me like I'm a strong software engineer who's never done ML. Why is it efficient?
  9. What are vanishing and exploding gradients? What causes them, and what does modern architecture design do about them?
  10. Why can't you initialize all weights to zero? What do Xavier and He initialization actually do?
  11. Batch norm vs layer norm: how does each work, and why do transformers use layer norm?
  12. Derive cross-entropy loss from first principles. Why is it "the right" loss for classification and language modeling?
  13. Explain softmax and the temperature parameter. How do you compute softmax stably, and where does temperature show up across ML?
  14. Compare PCA, t-SNE and UMAP. When would you use each, and how do people misread these plots?
  15. Your new model scores 87.2% on the test set, the incumbent scores 86.5%. Ship it?
  16. What is training-serving skew? How do you detect it and how do you design it out?
  17. You're running an A/B test on a new model. Walk me through designing it, and tell me what you'd refuse to do once it's live.
  18. About 10% of your training labels are wrong. What happens, and what do you do about it?
  19. You're adapting a pretrained model to a new task. What do you freeze, what do you train, and how do you decide?
  20. What goes wrong when you validate a model on time-ordered data, and how do you do it properly?
  21. How do you choose k in clustering, and how do you evaluate a clustering when you have no labels?
  22. What is conformal prediction, and how would you use it to put a statistical guarantee on a classifier's or an LLM pipeline's outputs?
  23. A stakeholder asks which features drive your gradient-boosted model. Compare built-in importance, permutation importance and SHAP, and tell me where each one misleads.

Advanced

  1. Why is MSE a bad loss for classification, even though it "works"? Connect it to the probabilistic view of loss functions.
  2. Explain contrastive learning and the InfoNCE loss. How are modern embedding models (CLIP, text retrievers) actually trained?
  3. Beyond L1/L2: explain early stopping, data augmentation, and label smoothing as regularizers. What is regularization, really?
  4. What kinds of distribution shift exist, and how would you monitor a deployed model - classical or LLM-based - for them?
  5. When does cosine similarity mislead you? Discuss embedding-space pathologies relevant to retrieval systems.
  6. What is maximum likelihood estimation? Show how it generates the standard loss functions, and where the Bayesian view (MAP) connects to regularization.
  7. What is double descent, and how does it change the classical story about model size and overfitting?
  8. Your LLM pretraining loss just spiked. Talk me through training stability: gradient clipping, mixed precision, and your debugging playbook.
  9. Design the evaluation for a fraud model at 0.1% prevalence, end to end: metrics, thresholding, validation protocol, and monitoring.
  10. Your model hits 0.87 AUC offline, you launch it, and the business metric doesn't move. Debug it.
  11. Attention vs convolution: compare them as inductive biases, and tell me what that implies for architecture choice.
  12. Your churn model has 0.9 AUC. Product wants to send retention discounts to the top 5%. Why might that be a bad plan?
  13. Your model meets quality but runs at 4s p95 and you need 400ms with 10x the throughput. Design the compression plan.
  14. You have 10M unlabelled examples and budget for 20k labels. How do you spend it?
  15. Why do ensembles work, when are they worth the cost, and where do they show up in LLM systems?
  16. What is the Muon optimizer, how does it differ from AdamW, and why have some frontier pretraining runs adopted it?
  17. What is superposition in neural networks, and how do sparse autoencoders try to recover interpretable features from it? Where have they fallen short?
+3 XP · card read