
Part 1 was published last December and has proved to be useful to so many reader and a lot of the candidates reached out to get more pointers on how to approach ML interviews. Hence this article.
Machine learning system design round is increasingly becoming one of the rounds of assessment at top FAANG companies for ML engineers. The caveat is that ML System design interviews are still not formalised or haven’t become standardised across the industry. This is both a good thing and a bad thing. It’s a good thing because, as a candidate if you are prepared well, you can really shine through this round compared to other candidates. It’s a bad thing because, depending on the company and the interviewer this round can be a hit or miss.
I have interviewed at 10+ Tier1 and Tier2 companies and secured offers for Staff ML levels from Google, Uber, Doordash, Nextdoor, Square, Glean, Roblox and a few others. I have also interviewed at smaller companies ahead of my Tier 1 onsite interviews. I am currently a Principle Machine learning engineer at Roblox. I plan to share tips on what helped me in securing onsite offers based on my experience attending over 7+ ML design interviews and taking over 10+ mock interviews for colleagues and candidates.
If you haven’t read my previous article , please do take a look https://medium.com/p/78a2882a05c5. I’ve also shared some study resources here. This article is less about giving you interview questions or prep materials, but more about giving you a sense of criteria you have to watch out for when you interview at a certain level. ML System design interviews are quite crucial at calibrating your actual IC level.
Most ML System design interview books in the market don’t give a complete picture of how a candidate should approach this round.
The industrial standards are still being set and from my perspective, books on ML System design interviews (Alex Xu, Khang Pham, Master ML) still don’t precisely capture expectations from interviewers especially from FAANG companies where building production grade ML systems processing requests for Billions of users over millions of entities (Think ads ranking) requires a very niche skill set of ML that overlaps ever so lightly with traditional Machine learning. So, if you are a candidate in the Job market, do not go completely by what you study from these books. My main pet peeves about the books are : Books seem to cater both to ML Modeling engineers as well ML Infra engineers with Khang Pham’s book more leaning towards Infra engineers.
In this article, I plan to provide some suggestions on how levels are calibrated and how an L4, L5, L6 engineer may approach the same system design question.
In my previous article I’ve touched upon how you could prepare for an ML design system with a template. This is a simple template that’s pretty common for all levels, however the depth of the answers will help differentiate a candidate at L5 vs. L6.
An L4 engineer would typically be expected to complete project level tasks in one component (i.e Build a feature set for X, y,z , Train an offline model for existing dataset). We expect L4 engineers to know the basic building blocks. Typically there are 5 parts to the ML Design question. As an L4, you could spend the first 10 mins giving an overview of the system and just taking two parts to deep dive. Typically Feature engineering and Model building are L4 favourites and also presents a depth in modeling.
10 mins - feature engineering -> How do you encode categorical features, how do you log features, embedding features
10 mins - Modeling -> How do you model this problem in logistic regression vs. Decision trees. Speak about Cross entropy, pros and cons of LR and GBDT. Difference between GBDT and XGBoost. How do you parameter tune them?
Expect to give trade offs for each option
Objective function — compare between pairwise learning vs. pointwise learning.
Training data generation — Give 2–3 options of how you could generate training data (for.e.g you could generate sessionized training data, speak about weighting negative samples or upweighting long tail samples. Trade off on cases like what happens if there’s popularity bias on one video/game. How do you handle new users?
Model building — Contrast among different options but don’t spend too much time here. An L5 Engineer would know that Models are just a part of the equation as opposed to a lot of junior engineers who get fixated on Models.
Deployment — Talking about A/B experimentation (interleaving vs non-interleaving), User exposure, Minimum detectable effect itself can take upto 10 mins.
Without being asked explicitly already touch on offline-online metric skew. So you offline trained a model and put it in AB Experiment and you notice the metrics are not as expected? What do you do?
Feature engineering — Usually you could just skip this or just spend a minute here. This really is a place where L4 shines and too much time here doesn’t exhibit L5 signs.
Online deployment/Objective function and Metrics is typically where an L5 engineer would shine through.
L6 engineers typically are tech lead for the entire domain and have cross-org impact. At bigger companies like Meta, 3–4 L6 folks lead the CTR ads prediction for a particular surface (marketplace/IG), 3–4 L6 folks lead the notifications ML system for say IG Story etc. At smaller startups like Roblox/Instacart/Doordash — these are engineers who would build the entire building block.
“Design the first ads prediction system for Meal delivery startup”
“Design and implement the first ranking model for homepage personalization”
To exhibit the depth that is required for such complex problems, an L6 engineers needs to have higher degree of taking the birds eye view, speaking about the broader picture, always always talking about tradeoffs and noticing patterns
Expect to cover what an L5 would cover in a succinct way in the first 15 mins and then get to more advanced topics
Call out best practices
I hope this article was useful. I write more articles on ML Design case studies on my website www.helloml.co. I also provide free mock interviews for folks who are currently in the job market and here’s my booking link https://prepfully.com/coach/7VNNX