Distributed Training Strategies and How Backpropagation Works in Each
Company: Roblox
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Technical Screen
What kinds of distributed training are there? For each one, explain how the forward and backward passes are split across devices, and how backpropagation produces the gradients and updates the weights.
```hint Ask what each device holds
For each approach, identify what one device holds and what it is missing, then follow what has to be exchanged when gradients flow backward.
```
### Clarifying Questions
- What scale is in scope: one server with several GPUs, or many servers?
- Does the model fit in one device's memory, or not?
- Synchronous training only, or asynchronous methods as well?
### What a Strong Answer Covers
- Data parallelism: how gradients are combined across devices and how that communication overlaps with the backward pass.
- Sharded data parallelism: what is sharded, and which collectives run in the forward and backward passes.
- Model parallelism within layers and across layers, with the backward-pass communication for each.
- Communication and memory trade-offs, and how methods are combined at large scale.
- Synchronous versus asynchronous updates and their effect on convergence.
### Follow-up Questions
- Why does ring all-reduce scale better than sending every gradient to one parameter server?
- In pipeline parallelism, where does the idle time come from, and how do micro-batches reduce it?
- How does gradient accumulation interact with data parallelism, and when does a larger effective batch call for a different learning rate?
- Training slows down sharply when you go from one server to two. What would you look at?
Overview: Explain the main kinds of distributed training for neural networks and, for each one, how the forward pass, backpropagation and weight updates are split across devices. Tests knowledge of what each device holds, the communication needed during the backward pass, and the memory and speed trade-offs between methods.
Read the full Roblox Machine Learning Engineer interview experience this question came from