Skip to content

Machine learning interview questions and how to answer them out loud

By the Mockich team · Updated · 5 sources

ML theory questions are short; the follow-ups are where the round is decided. A good spoken answer has two layers: a 30-second version that is correct and says when it matters, then the depth the interviewer pulls out with “why” and “what breaks if”. Practise both layers for the topics that come up most: generalization, regularization, metrics on imbalanced data, leakage and training problems.

Key points

  • Lead with a one or two sentence answer that is correct, then add when you would use it.
  • Expect “why does that work?” and “when would it fail?” after every answer.
  • Tie each concept to a decision: what you would change in the data, the model or the metric.
  • Use one small example with numbers; it shows understanding faster than a definition.
  • Say when you are unsure and reason from first principles instead of guessing a term.

The two-layer answer

The first layer answers the question as asked in about 30 seconds. The second layer is ready but not volunteered all at once: the mechanism, a failure case, and what you would do about it. Interviewers probe the topic they care about; an answer that tries to cover everything up front leaves no room for that and often runs into a mistake in a detail nobody asked about.

Sources: [3]

Worked answers to six common questions

Bias and variance. Short answer: bias is error from a model too simple to capture the pattern; variance is error from a model that fits noise in its particular training set. You read it from learning curves: high training and validation error together point to bias; low training error with a large gap to validation points to variance. Depth: more data helps variance, not bias; a richer model or better features help bias.

L1 versus L2 regularization. Short answer: both add a penalty on the weights to the loss; L1 pushes many weights to exactly zero, L2 shrinks them smoothly. Depth: L1 acts as feature selection but picks arbitrarily among correlated features; L2 spreads weight across them. Elastic net mixes both.

Why not accuracy on imbalanced data. Take 100,000 card transactions with 1,000 frauds. A model flags 1,500, of which 700 are fraud. Precision is 700 / 1,500 ≈ 47%, recall is 700 / 1,000 = 70%, and accuracy is (98,200 + 700) / 100,000 = 98.9%. A model that never flags anything scores 99.0% accuracy and catches nothing. Depth: choose the threshold from the cost of a missed fraud against the cost of a blocked customer; report precision and recall, or the area under the precision-recall curve.

Data leakage. Short answer: information in training that would not be available at prediction time. Example: predicting churn with a feature “number of support tickets in the last 30 days” computed after the churn date. Depth: split by time, build features only from data before each prediction moment, and be suspicious of any single feature with near-perfect importance.

Training loss stuck or exploding. Short answer: check the learning rate first, then the data and the labels. Depth: a loss that turns to NaN often means a learning rate that is too high or a log of zero; a loss that will not fall even on a tiny batch you should be able to memorize points to a bug in the model or the labels; gradient clipping and normalization help with exploding gradients in deep networks.

Random forest versus gradient boosting. Short answer: both combine many trees; a random forest averages deep trees trained independently on resampled data, which mainly reduces variance, while gradient boosting adds shallow trees one after another, each fitting the errors of the ones before, which mainly reduces bias. Depth: boosting usually wins on tabular data when tuned, but it overfits more easily and needs early stopping and a learning rate; a forest is a robust baseline that is hard to break.

Sources: [1], [2], [4]

How it sounds out loud

Answering, then taking a probe
“Short version: accuracy hides the minority class. With 1% fraud, predicting ‘never fraud’ is 99% accurate and useless.”
“So I’d look at precision and recall, and set the threshold from what a missed fraud costs compared with a declined good customer.”
Probe: “What if the business can review only 500 cases a day?” “Then I’d rank by score and measure precision in the top 500, because that is the decision the model actually supports.”

Topics that come up most

AreaTypical questionsWhat a strong answer adds
GeneralizationBias and variance, overfitting, cross-validationHow you would diagnose it from curves and what you would change
ModelsTrees and boosting, linear models, k-meansWhen each fails: correlated features, scale, outliers
EvaluationPrecision and recall, ROC and PR curves, calibrationWhich metric matches the decision and its costs
DataLeakage, missing values, class imbalanceTime-aware splits and the moment of prediction
Deep learningVanishing gradients, normalization, dropout, attentionWhy the technique helps optimization or generalization
ProductionDrift, monitoring, retrainingWhat you would watch and the trigger for action

Sources: [1], [2], [5]

Handling probes you cannot fully answer

A follow-up you cannot answer completely is normal; the round is built to find the edge of what you know. Say what you do know, reason one step further out loud, and name how you would check. “I don’t remember the exact form of the Adam update, but it keeps running averages of the gradient and its square, so the step size adapts per parameter; I would check the bias correction in the paper” is a better answer than a confident wrong formula.

Sources: [3]

Common mistakes

  • Reciting a definition with no example or no consequence.
  • Answering everything at maximum depth, so the interviewer cannot steer.
  • Naming a metric without tying it to the cost of errors.
  • Random splits for data that has time in it.
  • Guessing a term instead of reasoning from what you know.
  • Talking about models when the question is really about the data.

Sources: [3], [5]

Questions

How many ML theory topics should I prepare?

Breadth across generalization, models, evaluation, data, deep learning and production, with depth in the areas your target role uses. For each topic, prepare a 30-second answer and one example with numbers.

Do I need to derive formulas?

Sometimes, for gradients of simple losses or the update of a linear model. More often the interviewer wants the mechanism and its consequence, said clearly.

How do I practise answers out loud?

Answer a question aloud, then ask yourself “why?” and “when does it fail?” and answer those aloud too. Recording yourself, or a mock interviewer who probes, shows where your second layer is thin.

Practise this out loud with Vera

Mockich’s ML theory round runs 35 min: six questions at regular and five at lead across core ML, deep learning, evaluation, language models and debugging models, asked out loud one at a time. Vera probes each answer once or twice for depth and gives at most one small hint. The report scores accuracy, depth, practical judgment, communication (plus breadth and connection at lead) and quotes what you said.

Sources

We read these sources on 2026-11-03 for the topics ML theory rounds cover and how answers are probed; the worked answers, the fraud numbers and the spoken lines are our own.

  1. [1] Alireza Dirafzoon, AI/ML Interviews: ML fundamentals and depth (MIT)
  2. [2] Amit Shekhar, Machine Learning Interview Questions (Apache-2.0)
  3. [3] datajourney24 on Substack, Acing machine learning breadth interviews
  4. [4] jayinai on GitHub, Data Science Question Answer (MIT)
  5. [5] Yuan Meng, Machine learning engineer interviews