Beat the Machine Learning Interviews at FAANG — Part 1
In this article, I plan to share my experience interviewing with big tech companies and also how I went about preparing.
Join the DZone community and get the full member experience.Join For Free
Cracking a machine learning interview at companies like Facebook, Google, Netflix, Snap, etc., really comes down to nailing a 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.
I have six 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 of a misinformation modeling team working on hoax classification models. After three years at Misinformation, I moved to the Instagram Ads ranking team, where I’m part of the core-optimization team building and improving upon Ads ranking models across all surfaces on 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 six offers from Google and a few others for Staff ML roles. This was my first job search attempt since graduating with my master's almost six years ago, and I had to learn the landscape of ML interviews and go about strategizing my preparation.
In this article, I try to share tips and tricks that could help you prepare for MLE interviews (at L4 and above). I’ve attended interviews at Netflix, Google, Snap, Airbnb, Uber, Instacart, Doordash, and Nextdoor, and I’m going to focus this article based on the structure of these companies.
Machine learning interviews are quite different from vanilla software engineering interviews, and the ecosystem is continuously evolving to make the 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 would have a one-hour technical phone screen that would comprise of one leet code style question and leave 10-15 mins towards the end for some rapid-fire ML tech questions. The easier end of these ML theory questions is mostly like this:
- Explain overfitting and regularization
- Explain bias-variance tradeoff
- How do you handle data imbalance issues
- What is gradient descent
- [Difficult] Can you explain logistic regression and derive gradient descent for Logistic regression
- [Difficult] What do eigenvalues and eigenvectors mean in PCA
I’ve compiled a set of commonly asked ML Theory questions.
How Would 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 to answer 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 textbook and this Coursera course which you can watch at 1.5X speed.
Onsite — Machine Learning Theory Round
This round is quite similar to the above technical assessment round but has 45 min — one hour dedicated to it. You can expect two kinds of questions. Here are a few examples:
Straightforward theory questions
What do 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 require 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.
You can find similar questions here.
Aim to spend the bulk of your preparation going back to basics, getting the concepts right. I spend >2 weeks revising machine learning concepts by watching the above videos. Getting the derivations practiced with pen and paper makes a huge difference.
Click here for more prep materials.
Onsite Interview — How to Tackle the ML System Design Round?
Now, this is a round that few companies have managed to conduct well. Like, finding calibrated interviewers for this round and having the right set of rubrics for evaluating candidates for this round is quite challenging. Few companies, like Google, Meta, Airbnb, Doordash, etc., have a mature process for ML System design. Few others were honestly a disaster for me, and that is tempting me to say this round could very well be a hit or miss.
For ML Design, the expectation of candidates is often not clear, and I’ve found interviewers give questions that have a broad ground to cover while also interjecting the candidates and transforming the interview into an ML theory round. This is why this round can be a hit or miss, even for the most well-prepared candidates. L4 candidates don’t typically have an ML design round. For L5, you can expect 1-2 rounds, and for L6, there’s a minimum of two 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
Have a good pre-defined structure for the interview. Here’s my recommended structure:
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 take on how I approach recommendation systems
Online machine learning design resources like the course on educative.io are helpful in defining the structure for different types of design questions.
How to salvage a derail?
Say you are ten minutes into the design interview, and the interviewer asked you a question on Business metrics, and you spent excess time in that section. How do you salvage your interview back?
- 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. So 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 it's entirely up to you to utilize your 45 mins to give as much signal as possible.
4. The best way to prepare for ML design rounds are to take as many mock interviews as possible. I took five ML mock interviews with my ex-colleagues which really helped shape my run-book for this round.
This brings me to the end of Part 1. In Part 2, I plan to dive deep 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.
Published at DZone with permission of Bharathipriyaa Thangamani. See the original article here.
Opinions expressed by DZone contributors are their own.