Machine Learning Engineer interview preparation guide
This is an article with 21 links about preparing for interviews for Machine Learning Engineer position.
Context
I am currently leading Machine Learning (ML) operations at a startup, transitioning from my previous role where I trained virtual assistants at SberDevices. After a sabbatical at the end of January for rest, learning, and career exploration, I decided not to return to SberDevices. Instead, I spent February and March preparing for job interviews, which I started attending in April, culminating in my acceptance of a new role in May.
During this period, I received several job offers, including from a European company, a few startups in the UK and Asia, and Yandex. I was also in the interview process with Meta, Google, and Amazon, thanks to some helpful referrals. However, as I began my new role, I found myself fatigued by the continuous interviews and decided to halt these processes.
In the end, I joined a team that offered me the quickest interview process. After discussions with the CTO and a partner from the fund, I was convinced by their strong technical team, the clear backing of a well-established fund, and the opportunity to build the ML systems from scratch. Another perk is that the role is fully remote. Interestingly, much of the preparation I had done for other interviews was not required for this role. 😅
The acquired skills
- I've developed my algorithm skills to the point where I can tackle algorithmic stages, even though I didn't engage in algorithm-specific interviews at Google due to their high difficulty level.
- I've expanded my knowledge in Machine Learning System Design which is now an asset during interviews and a valuable tool in my everyday work.
- Through consistent interview preparation and responding to behavioral questions, I've made noticeable improvements in my English proficiency.
Understanding Different Interview Stages and Preparations
- Algorithmic Stage: I prepared by solving problems on LeetCode and participating in mock interviews.
- Machine Learning System Design: I studied how to solve ML problems from inception to deployment using resources like CS 329S, booklets, FB videos, and mock interviews. I have compiled these resources on a GitHub page.
- ML Theory Questions: Standard questions revolve around metrics, interpreting models, and writing formulas. I revisited the Machine Learning textbook from Yandex School of Data Analysis and refreshed concepts by searching specific topics online.
- Code Debugging: This involves finding and fixing bugs in given code. An interesting example is a language model training code with a detailed transformer block and attenuation. I didn't specifically prepare for this, but it can be mastered by studying basic implementations.
- Topic-specific Questions: These questions pertain to Python, Machine Learning, Computer Science, and Natural Language Processing.
- Experience-based Discussion: Interviewers delve into specifics of your past work, asking about data layout, model testing, and deployment. I prepared by elaborating on the points listed in my CV.
- Behavioural Stage: I prepared STAR responses to standard questions in advance. LeetCode cards on behavioral topics were a helpful resource.
- Logic and Mathematics Tasks: These involve probability theory and statistics. I didn't specifically prepare for this stage.
- Casual Conversations: This informal stage may involve discussions about life and experiences, akin to a casual chat in a bar.
Examples of Questions from the Communication Stage:
- Can you share your thoughts about the last article you read? What was it about, and why did it interest you?
- What would be your plan of action on your first day on the job?
- Can you recall and describe a significant mistake you've made in your career?
Algorithmic interviews
Despite my background in medicine and lack of Olympiad programming experience, I gathered the necessary knowledge from online resources. I dedicated about 2-5 hours, five days a week for approximately eight weeks to solve problems and conduct mock interviews on LeetCode.
Here's how I structured my preparation. I began by reviewing LeetCode's study cards, reading the associated theory, and attempting the problems. If I couldn't solve a problem within 15 minutes, I would review the analysis and solution, noting the key points and creating Anki cards for challenging aspects. Rather than memorizing specific solutions and codes, I focused on honing my problem-solving approach. LeetCode also offers a section for practicing mock interviews.
- LeetCode Theory: This section provides clear explanations of key topics, along with practical problem-solving exercises. Some problems even include formal proofs of solutions and time complexities, which can be useful, though I've only been asked about this once during a job interview.
- Labuladong Articles: These translated articles are organized into chapters, and some topics are covered more comprehensively than on LeetCode, particularly when it comes to binary search pattern logic.
- Problem list by the main topics. There is comfortable sorting by topic, difficulty, and company + you can mark progress. This list includes problem from blind-75 list and from course on educative.
- Problem Solutions: If you're stuck on a problem, NeetCode offers clear explanations in accessible English. The solutions are more intuitive than those on LeetCode, and they provide insight into the problem-solving process.
- Fundamental Approach: For a more foundational study, there's a course by Sedgewick (though it uses Java for problem-solving). Although often recommended, I personally haven't explored it in depth, having only read a few chapters by Skiena.
Machine Learning System Design Interview Stage
This stage is prevalent in about 90% of companies. It involves designing a comprehensive Machine Learning (ML) solution, from defining the problem and metrics, to deployment and optimization.
A critical consideration is the limited interview time. Hence, it's essential to strike a balance between a comprehensive response covering all stages of the ML solution, and a focused one that demonstrates a deep understanding of the problem.
A well-structured response can include:
Problem definition and requirement clarification.
- Data. Data sources, what markup, what the sample looks like.
- Evaluation. What metrics, comparison with a baseline.
- Features and models. Preprocessing, model variations.
- Online eval, deploy. Roll-out + AB.
- Further actions. How to debug/update/improve/accelerate/itd model.
Each of the stages is explained in more detail in the ML design primer.
Procedure for preparing
- Watch fb , yandex videos, flip a github ml design primer.
- Make a test interview and try to design a system from the list.
- Read some reviews from technical blogs of companies or engineers. For example, here or here.
- Make mock-ups (mock-interviews). You call each other and give each other a test interview. You can search for mock-ups in this chat room.
- You get feedback from the mock and go to improve your weak points, read more articles or chapters from 329s.
General advices
- Time Management: I've found it challenging to prepare for interviews while maintaining a full-time job, so taking a sabbatical was a more suitable approach for me.
- Make Assumptions: It's okay to ask questions, but during the Machine Learning System Design (MLSD) stage, I found it more beneficial to make assumptions rather than ask vague questions like "How fast and stable should the model run?"
- Answer Timings: Understand the timings of your responses, especially for algorithms and MLSD. Often, your interviewer will have another meeting scheduled immediately after yours, so it's important to convey your points succinctly and effectively.
- Leverage Communities: Seek out forums where people share their interview experiences and conduct mock interviews. Communities such as faang-interview preparation offer valuable insights into what to expect.
- Practice: Frequent mock interviews and real interviews can help reduce anxiety. You can even conduct a self-administered mock interview without a partner.
- Avoid Burnout: Ensure you maintain a healthy work-life balance by getting sufficient sleep, taking regular breaks, and incorporating physical exercise into your routine.