paint-brush
How I Approached Machine Learning Interviews at FAANGs as an ML Engineerby@bharathi
1,534 reads
1,534 reads

How I Approached Machine Learning Interviews at FAANGs as an ML Engineer

by Bharathi Thangamani February 1st, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Cracking a Machine learning interview at companies like Facebook, Google, Netflix, Snap etc. really comes down to nailing few patterns that these companies look for.  In this article, I plan to share my experience interviewing with these companies and also how I went about preparing.

People Mentioned

Mention Thumbnail
featured image - How I Approached Machine Learning Interviews at FAANGs as an ML Engineer
Bharathi Thangamani  HackerNoon profile picture

Cracking a machine learning interview at companies like Facebook, Google, Netflix, Snap etc. really comes down to nailing few patterns that these companies look for.  In this article, I plan to share my experience interviewing with these companies and also how I went about preparing.

About me:

I have 6 years of experience working as a machine learning engineer at Meta. I have been part of two teams at Meta. I was an early ML engineer in the Misinformation modeling team, working on hoax classification models. After 3 years at Misinformation, I moved to Instagram Ads’ ranking team where I’m part of the the core-optimization team building and improving upon Ads ranking models across all surfaces of Instagram (Feed, Stories, Reels etc)

How to crack Machine learning interviews at FAANG companies

I’ve been on the job market for the past two months and attended ~10 onsite interviews and have 6 offers from Google and few others for Senior/Staff ML roles. This was my first job search attempt since graduating from my Master’s almost 6 years ago and I had to learn the landscape of ML interviews to go about strategizing my preparation.


In this article, I will share tips and tricks that could help you prepare for MLE interviews (L4 and above). I’ve attended interviews at Netflix, Google, Snap, Airbnb, Uber, Instacart, Doordash, Nextdoor and I’m going to focus this article based on the structure from these companies


Machine learning interviews are quite different from vanilla software engineering interviews and the ecosystem is evolving to make these interviews more calibrated and structured. But here are things that you can broadly expect:

  • Phone screen: Machine learning technical assessment + Leetcode style coding question
  • Onsite interview:
    • Machine learning theory round
    • Machine learning system design
    • Machine learning coding


1) Machine learning technical assessment


Typically, big-tech companies have a 1 hour technical phone screen that comprises of 1 leetcode style question followed by 10 to 15 mins of rapid fire ML tech questions towards the end. Some of these questions include:


  • Explain overfitting and regularization
  • Explain bias-variance tradeoff
  • How do you handle data imbalance issues
  • What are gradient descent
  • [Difficult] Can you explain logistic regression and derive gradient descent for Logistic regression
  • [Difficult] What do eigen-values and eigen-vectors mean in PCA


I’ve compiled a set of commonly asked ML Theory questions over here.

How should you prepare for this round

This round is quite crucial because it really tests your basic understanding of common topics in ML. Instead of approaching these questions by studying a cheat sheet, I’d really recommend spending a week or two going over the basics from a textbook. I highly recommend this text book and this Coursera course which you can watch in 1.5X speed.


Onsite - Machine Learning Theory Round


This round is quite similar to the above technical assessment round and has 45 min to 1 hour dedicated to it. You can expect two kinds of questions. For example:


  • Straight forward theory questions:
    • What does L1 and L2 regularization mean and when would you use L1 vs. L2. Can you use both?

    • When there are highly correlated features in your dataset, how would the weights for L1 and L2 end up being?


  • Nuanced derivation based questions that requires a pen and paper:
    • Can you use MSE for evaluating your classification problem instead of Cross entropy
    • How does the loss curve for Cross entropy look?
    • What does the “minus” in cross entropy mean?
    • Explain how Momentum differs from RMS prop optimizer?


More similar questions over here.


Aim to spend the bulk of your preparation going back to basics and getting the concepts right. I spent >2 weeks revising machine learning concepts. Getting the derivations practiced with pen and paper makes a huge difference.


Prep-materials attached here.


Onsite Interview - How to tackle the ML system design round?

Now this is the round that few companies manage to conduct well. Finding calibrated interviewers and having the right set of rubric for evaluating candidates is quite challenging for this round. Some of the companies I interviewed at, like Google, Meta, Airbnb, and Doordash had a mature process for ML System design, while others were a disaster.


For ML Design, the expectation from candidates is often not clear and I’ve found interviewers asking questions that are quite large in scope, leaving little room for going in depth. So its crucial that candidates remember to clarify expectations by asking questions like:


  • Do we care about Model deployment and the system design of how ML infra works?

  • Do we care about going deep into modeling choices?


L4 candidates don’t typically have an ML design round, for L5 you can expect 1-2 rounds and L6 there’s a minimum of 2 rounds expected.


Expect questions like

  • Design a feed recommendation system
  • Design Youtube
  • Design Google contact ranking
  • Design an item replacement recommendation


Here are top tips for nailing this round

  1. Have a good pre-defined structure for the interview. Here’s my recommended structure:


  1. Have a good script for answering any ML Design question. Basically, pretty much every ML design question fits into the above structure and the script can also be somewhat generalized. Here’s my pdf on how I approach recommendation systems; You can also rely on online machine learning design resources like this course for help with different types of design questions.


  2. How to salvage a derail?


Say you are 10 mins into the design interview and the interviewer asks you a question on Business metrics and you spend an excessive amount of time in that section; how do you salvage your interview?


This is something I noticed far too often especially in ML Design interviews. This is often a function of your interviewer having a pre-defined structure in their mind that collides with your structure. for e.g If you start speaking about online metrics and they want to know about Training data - Take a pause, make it explicit to the interviewer that this is the structure you intend to follow and get back on track.


  • Design interviews should typically be led by the candidate with minimal interruptions from the interviewer. So, take ownership here fully knowing that the interviewer on the other end is probably not calibrated and hence its entirely up to you to utilize your 45 mins to give as much as signal as possible.


    • Its also quite possible that the interviewer would want to probe for more signals in a specific area. In which case, ask explicitly “Should I go deep into explaining the modelling section now or would you want me to just touch on it” → Often you’d get a very objective answer which will throw light on what is the interviewer expecting from you.


4) The best way to prepare for ML design rounds are to take as many mock interviews as possible. I took 5 ML mock interviews with my friends which really helped shape my runbook for this round.


This brings me to the end of Part 1. In Part 2, I plan to deep dive into types of ML Design questions and the rubric that differentiates an L4 candidate vs. L5 and L6 (Meta levels).


I also provide free mock interviews for folks who are currently in the job market. Head over to my website to schedule yours now!