Katkat

practice a little every day, paws crossed ♡

Machine Learning Engineer Interview Questions

Practice 9403 coding, system design and machine learning questions from 546 companies, sorted by role, topic and interview round. Every question has step-by-step hints, a code runner that supports 8 languages and an AI mentor; members also get the full solution walkthrough.

9403
Questions
546
Companies
11
Topics
8
Languages

Showing 31–60 of 202 results

  • CoinbaseMediumMachine Learning Engineer
    Build a baseline classification model from messy data

    This question evaluates skills in practical machine learning engineering, including data cleaning, preprocessing, feature selection, handling mixed numeric and categorical features, and baseline model construction for a binary classification task.

    Machine LearningOnsite
  • CoinbaseHardMachine Learning Engineer
    Explain precision/recall and compute NN output

    This question tests the ability to calculate classification performance metrics, explain ensemble model dynamics, and perform manual forward propagation through a small neural network architecture.

    Machine LearningOnline AssessmentClassificationNeural NetworksEnsemble Methods
  • DRWMediumMachine Learning Engineer
    Explain core ML and DL fundamentals

    Explain core ML and DL fundamentals evaluates core ML concepts, assumptions, math intuition, training/evaluation trade-offs, and practical failure modes in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Machine LearningOnline Assessment
  • DandyMediumMachine Learning Engineer
    Why do transformers struggle with long context?

    This question evaluates understanding of transformer architectures, attention mechanisms, and scalability trade-offs, assessing competencies in computational complexity, memory usage, and system-level performance implications.

    Machine LearningHR Screen
  • DatabricksMediumMachine Learning Engineer
    Implement Gradient Descent Regression

    This problem tests your understanding of linear regression by requiring the implementation of a gradient descent optimizer from scratch to minimize the Mean Squared Error loss.

    Machine LearningOnsiteLinear RegressionGradient DescentOptimization
  • DatabricksMediumMachine Learning Engineer
    Implement Linear Regression Gradient Descent

    This question tests the ability to implement batch gradient descent for simple linear regression from scratch, requiring the derivation of gradients for weights and bias, and understanding how to optimize convergence.

    Machine LearningOnsiteGradient DescentLinear RegressionOptimization
  • DatabricksMediumMachine Learning Engineer
    Implement Simple Linear Regression with Gradient Descent from Scratch

    Write simple linear regression trained with gradient descent from scratch, choosing the loss, learning rate and stopping rule yourself. Tests deriving the gradients correctly, writing a runnable training loop, understanding feature scaling and convergence, and verifying results against a closed-form fit.

    Machine LearningOnsite
  • DatadogHardMachine Learning Engineer
    Implement Focal Loss for Class-Imbalanced Classification

    Tests the ability to implement binary focal loss with raw logits from first principles, emphasizing numerical stability, custom weighting, and tensor reduction strategies.

    Machine LearningTechnical Screenmachine-learningdeep-learningpytorch
  • DatadogHardMachine Learning Engineer
    Implement Grouped-Query Attention (GQA)

    Implement the Grouped-Query Attention (GQA) mechanism commonly used in modern LLMs to balance serving memory bandwidth with generation quality. You will handle tensor reshaping/expansion across query head groups, scaled dot-product attention, and causal masking.

    Machine LearningTechnical Screendeep-learningtransformerspytorch
  • DisneyMediumMachine Learning Engineer
    Build Naive Bayes spam classifier with F1

    This question evaluates understanding of probabilistic text classification with Naive Bayes, text preprocessing and feature extraction, and use of the F1 score for performance measurement in a binary spam detection task.

    Machine LearningTechnical Screen
  • ExaHardMachine Learning Engineer
    Debug a PyTorch Contrastive Loss

    Repair a PyTorch contrastive loss whose matrix multiplication contracts incompatible dimensions instead of producing pairwise scores. Validate aligned rank-two tensors and temperature, create the correct batch-by-batch logits, preserve gradients, and handle low-precision numerical stability.

    Machine LearningTechnical Screen
  • FigmaMediumMachine Learning Engineer
    Clarify a BERT Keyphrase Span-Extraction Task

    Implement and clarify the post-processing decoder for a BERT-based span-extraction model that maps token-level start and end logits back to non-overlapping character-level keyphrases.

    Machine LearningTechnical Screennlpbertspan-extraction
  • Goldman SachsHardMachine Learning Engineer
    Evaluate TPR/FPR, sigmoid, and activations

    This question evaluates competency in binary classification metrics (confusion matrices, TPR/FPR), basic neural network forward computation (sigmoid neuron z and output), and knowledge of activation function selection and pitfalls.

    Machine LearningOnline Assessment
  • GoogleHardMachine Learning Engineer
    Compare Language-Model Post-Training Methods

    This question tests your conceptual depth in LLM alignment by asking you to differentiate between supervised fine-tuning (SFT), reinforcement learning from human feedback (RLHF), direct preference optimization (DPO), and group-relative optimization (e.g., GRPO) based on their mathematical objectives and operational characteristics.

    Machine LearningTechnical ScreenLLMAlignmentRLHF
  • GoogleMediumMachine Learning Engineer
    Compare NLP tokenization and LLM recommendations

    This question tests the conceptual understanding of tokenization strategies in NLP and the architectural trade-offs when integrating LLMs into recommendation systems.

    Machine LearningOnsiteNLPLLMRecommendation-Systems
  • GoogleHardMachine Learning Engineer
    Detect and Prevent Reward Hacking

    Assess the candidate's understanding of reward hacking (specification gaming) in reinforcement learning from human feedback (RLHF), focusing on diagnosing exploitation patterns, designing detection metrics, applying conservative policy updates, and implementing recovery safeguards.

    Machine LearningTechnical ScreenRLHFReward ModelingLLM Alignment
  • GoogleMediumMachine Learning Engineer
    Explain GRPO-style training for diffusion models

    This question tests your conceptual understanding of applying Group Relative Policy Optimization (GRPO) to diffusion models, focusing on how reinforcement learning can be used to steer image generation toward specific objective functions without explicit gradient feedback from the decoder.

    Machine LearningTechnical ScreenDiffusion ModelsReinforcement LearningGRPO
  • GoogleHardMachine Learning Engineer
    Explain Importance Sampling in LLM Training

    Tests understanding of importance sampling in modern LLM fine-tuning, focusing on sequence-level likelihood ratios, exponential variance growth, support conditions, and practical mitigations like clipping and diagnostics.

    Machine LearningTechnical Screenreinforcement-learningllm-trainingimportance-sampling
  • GoogleHardMachine Learning Engineer
    Explain KL Divergence in Language Models

    Review KL divergence from its probability definition through directionality, support mismatch, sample estimates, and LLM regularization.

    Machine LearningTechnical Screen
  • GoogleMediumMachine Learning Engineer
    Explain LLM lifecycle and trade-offs

    This question evaluates a candidate's understanding of the end-to-end lifecycle of large language models, covering training data collection and filtering, pretraining objectives, transformer architecture, post-training methods like supervised fine-tuning and preference optimization, and common model or training variants.

    Machine LearningTechnical Screen
  • GoogleHardMachine Learning Engineer
    Explain VAEs, ELBO, KL, and Reparameterization

    Derive and explain the theoretical foundations of Variational Autoencoders (VAEs), linking the Evidence Lower Bound (ELBO) to network architecture, gradient estimation via the reparameterization trick, and posterior collapse.

    Machine LearningTechnical ScreenVariational AutoencodersGenerative ModelsDeep Learning
  • GoogleMediumMachine Learning Engineer
    Explain modeling challenges and fixes

    This question evaluates end-to-end ML ownership and operational troubleshooting skills, including detection of data and modeling issues, trade-off analysis, and evidence-based impact measurement within the Machine Learning/MLOps domain.

    Machine LearningTechnical Screen
  • GoogleMediumMachine Learning Engineer
    Explain ranking cold-start strategies

    This question tests your ability to design strategies for surfacing new items and serving new users in a large-scale recommendation system while maintaining relevance and diversity.

    Machine LearningTechnical ScreenRecommender SystemsCold StartEmbeddings
  • GoogleHardMachine Learning Engineer
    Explain transformer architecture and variants

    This question evaluates a candidate's mastery of transformer architecture and related competencies such as attention mechanisms, positional encodings, encoder/decoder variants, computational complexity and scaling, stability and initialization practices, and adaptation of sequence models to molecular representations.

    Machine LearningTechnical Screen
  • GoogleHardMachine Learning Engineer
    Interpret Language-Model Perplexity

    Learn the exact likelihood basis of perplexity, correct evaluation details, tokenizer caveats, and limits as an LLM quality metric.

    Machine LearningTechnical Screen
  • GoogleHardMachine Learning Engineer
    List regularization methods and trade-offs

    This question evaluates competency in machine learning regularization and model generalization, covering familiarity with methods such as L1/L2, dropout, early stopping, data augmentation, label smoothing, mixup, normalization, Bayesian priors, and ensembling.

    Machine LearningTechnical Screen
  • HackerRankMediumMachine Learning Engineer
    Build A Purchase-Intent Prediction Notebook

    Prepare for a machine learning take-home notebook that predicts purchase intent from session features and submits binary outcomes. The prompt focuses on data cleaning, missing values, categorical encoding, model pipelines, weighted F1, threshold tuning, and robust submissions.

    Machine LearningOnline Assessment
  • HarveyMediumMachine Learning Engineer
    Training LLM Agents for Long-Context, Long-Horizon Tasks: Environments and Rewards

    An ML research discussion on training language-model agents for long-context, long-horizon tasks. It tests the training recipe from context extension through supervised trajectories to RL, the design of reproducible training environments, and reward design that resists reward hacking over long trajectories.

    Machine LearningOnsite
  • InceptionMediumMachine Learning Engineer
    Implement Autoregressive Decoding in PyTorch

    This question evaluates a candidate's ability to implement autoregressive decoding and sampling strategies in PyTorch, testing competencies in sequence generation, probabilistic sampling methods (greedy, temperature, top-k, top-p), batching, and end-of-sequence handling.

    Machine LearningTechnical Screen
  • IndeedMediumMachine Learning Engineer
    Implement MSE Loss and Linear Regression from Scratch

    Implement the mean squared error loss and a linear regression model with fit and predict methods, written from scratch rather than with a library model. It tests deriving and coding the gradients, choosing a training method, feature scaling, input validation, and verifying the implementation.

    Machine LearningTechnical Screen