In a previous article, by Jameson Merkow (Principal Software Engineer, Microsoft Health and Life Sciences — Medical Imaging AI), we gave you an overview of different areas within ML engineering to help you sort through the required skills and responsibilities of these positions.
This article outlines what you can expect from an interview loop and then dives into one of the most complex interviews to crack — the Machine Learning System Design interview.
- Interview Loops for Machine Learning Engineering Roles
- Machine Learning System Design Interview Process
- Machine Learning System Design Interview Tips
Interview Loops for Machine Learning Engineering Roles
Interview loops for ML engineering roles typically follow the same pattern as other tech engineers, with a few notable differences.
- They usually start with a screening round followed by on-site or virtual on-site interviews
- There are typically 3-5 interviews, but some companies can have as many as 8 rounds
- If you pass those interviews, sometimes, the on-site will end with an “if applicable” interview with an executive or director
The screening step filters out the candidates to save resources before on-site interviews. It can either be a “phone” screen that’s a shorter, less formal chat or, sometimes, a coding challenge.
Next comes the on-site interview, which has a lot of variety depending on the company and position, i.e., where they fall on the product-to-research spectrum, and the size and business profile of the team. On-site interviews have several standard formats:
1. Coding Rounds
These interviews will test your coding and technical abilities. There are two subtypes for ML engineering positions:
1.1 “LeetCode” Style
These interviews test your ability to write good code and your knowledge of algorithms. These will likely be “Medium” or “Hard” questions for product engineers. However, these interviews will be easier for research positions and fall between the “Easy” and “Medium” difficulty on LeetCode.
1.2 ML Coding
These interviews will test you specifically on ML technical skills such as training, testing, and deploying models. These come in three forms:
- Live coding examples where you essentially “fill in the blanks.”
- A take-home exam where you are given 24-48 hours to complete some ML task, typically training, validating, and testing a model.
- Coding ML algorithms from scratch where you implement an algorithm without using Python libraries like scikit-learn, PyTorch, or TensorFlow.
2. Technical Discussion
Another typical format for interviews is a technical discussion. These interviews specifically test your knowledge of ML algorithms, tools, and techniques but do not (typically) include any coding.
- For product engineering positions, these interviews will consist of questions to test your knowledge of particular technologies or tools.
- Research technical interviews will often ask you hypotheticals or “what if…” scenarios where you discuss some research problem and describe what research avenues would be best to consider under different conditions.
Presentation rounds usually happen for research scientist positions but rarely during product role interviews. In this round, you would be asked to present work you completed as a researcher or as an applied/research scientist role.
The interviewer (or interviewers, as this is often done in a group) will evaluate your presentation skills and the work itself, including the analyses presented, the experimental design, and your communication skills.
All on-site interviews will include some form of behavioral interviews, which test your cultural fit at the company. These interviews typically have “Tell me about a time when…” or “What would you do..” type questions. This interview is your chance to describe your experience and show that it aligns with the position's requirements.
5. System Design
A system design interview is one of the hardest to crack formats for ML engineers. They can either be a software system design (think scalable systems) or an ML system design interview. These two system design interviews have different objectives, and we will discuss them in the next section.
Machine Learning System Design Interview Process
Whether software or ML-centric, you will be asked to design a system based on a short problem statement in system design interviews. During both of these interviews, you are expected to understand the problem statement, gather more information by asking appropriate questions, and architect a system that meets the requirements.
Software vs. ML System Design
Broadly speaking, software and ML system design interviews are the same. However, the details differ significantly. We discuss the major differences in the expectations for these rounds in the following table:
Machine Learning System Design Interview Tips
Machine learning system design interviews can seem intimidating. Here are a few tips to help you get through them.
Identify Common Problem Categories
During ML system design interviews, the interviewer will give you a vague problem statement and then ask you to walk through a system design to solve that problem statement. This section discusses a few common themes and examples that we've seen for these problem statements.
A recommendation system is an information retrieval/filtering system that predicts a new option based on inferred user preferences from a past action or a collection of past actions. These systems suggest new content (music, videos, products, etc.) to users to encourage them to continue using the platform.
They are a potent tool, and many business models depend on accurate recommendation models, making them a favorite during ML system design interviews. Here are a few interview-relevant recommendation system questions asked at FAANG:
- Google: Design a system that recommends new videos to YouTube users.
- Amazon: In-flight entertainment systems have a vast library of movies that users can enjoy during their journey. Design a system that recommends a set of movies to watch based on the user's preferences and total flight time.
- Meta: How would you build a newsfeed that suggests interesting posts or comments to a user?
Data Transformation Systems
Unlike recommendation systems, a data transformation system seeks to change or manipulate input data to fit customers' needs. It does not directly use user contextual cues to make predictions. These systems are helpful in both consumer and enterprise capacities. They are often used for audio transcription/translation, video detection/track, etc.
Transformation systems are also commonly used as sub-components in larger systems, so you must understand how to design these systems. Some FAANG interview questions of this type are given below:
- Apple: Design a “Hey Siri” style trigger word detection system.
- Amazon: Build a model to select the best images to market a given product.
- Google: How would you design a system to translate an unknown (new) language into English?
Business Intelligence (BI) Systems
BI systems merge data mining and analytics to help organizations make data-driven decisions. Designing these systems requires extensive knowledge of a particular domain bringing crucial insights to increasing productivity (and, therefore, profitability). These could automate decision-making, such as route finding for a ride-share service, or aid in human decision-making, such as fraud detection.
These questions appear more and more often during interviews, especially with the rapidly growing automation and fintech industries. Here are some examples from actual interviews at Tier-1 tech companies:
- Meta: How would you detect if posted content violates the terms and conditions and/or contains offensive materials?
- Airbnb: How would you detect fraud or predatory house listings on Airbnb?
- Google: Estimate the likelihood of a user clicking on a particular advertisement given a search term.
Dos and Don’ts
Finally, we have some simple dos and don’ts to look out for during machine learning system design interviews:
Do: Show that you can communicate and delineate open-ended problems.
No matter how outstanding your design skills are, you cannot demonstrate those abilities if you cannot communicate. You must be able to talk through a problem and solution with your interviewer. You should clearly define the problem statement in simple terms to provide solutions within the interview's timeframe.
Don’t: Try to solve a general problem
These interviews are short; you have 30-40 minutes from hearing the problem to dissect, design, and explain your solution. You will add unnecessary complexity if you generalize the problem, making it more challenging to complete on time. Instead, pick a specific problem and solve it.
Do: Ask clarifying questions.
A system design interview is not a self-standing test but rather a collaborative one. Problems statements are purposefully vague or obtuse because interviewers expect you to collaborate with them to unpack the problem and the business needs.
Do: Connect business importance with pre and post-deployment model metrics.
It is crucial to demonstrate that you understand the ML systems and the business importance the problem represents during the interview. Before describing a design for an ML system:
- Clarify what success looks like in the business sense.
- Describe how to measure that success in a deployed ML system.
- Provide a clear framework to evaluate, select and deploy the best model.
Don’t: Choose metrics that are too complex or costly
The best metrics in any system require little to no effort from either the users or operators of the system. Asking users to rate everything makes for a poor user experience. Also, it is costly and time-consuming to human-annotate data for deployed metrics. Try to think of ways to build feedback into your system designs!
Do: Draw a high-level diagram of the system
A picture is worth a thousand words and a simple diagram can mean the difference between successful and unsuccessful interviews. It is challenging to follow an interviewee's ideas if they verbally discuss them. Instead, draw out your ideas, making it easier for the interviewer to understand your solution and increase its impact.
Don’t: Get caught in the weeds!
During system design interviews, you need to present a complete system. However, don't describe every component in excruciating detail. You will never complete the design in time and will likely lose the interviewer's focus. Instead, ensure that you stay at a high enough level to finish your description within the allotted time!
Do: Save time to discuss a few weeds
Ok, I know I just said to stay high level, but it's equally important to show that you have ML expertise. That means going into detail on a few critical components to illustrate your well-rounded knowledge as an ML engineer or scientist. I find it best to do this after you've described the overall system.
About the Author
Jameson Merkow (Principal Software Engineer, Microsoft Health and Life Sciences — Medical Imaging AI) is an experienced leader in AI with over 15 years of experience in AI system design. He has spent over a decade working hands-on in computer vision and deep learning projects.
Jameson has a passion for healthcare ML systems. He also has a deep interest in mentoring software engineers and scientists. Jameson is an Interview Kickstart alumnus and is currently an instructor at IK in AI/ML system design.
Ready to Crack Your Next ML Interview?
Interview Kickstart’s Machine Learning Engineering Interview Course is designed and taught by ML experts from FAANG and Tier-1 tech companies. These courses are tailored to help ML engineers nail the toughest tech interviews.
To learn more, join our FREE webinar.