Scale the learning rate up, roughly linearly with batch size for moderate increases, or by the square root under some analyses. A larger batch gives a lower variance gradient estimate, so you can afford a bigger step. In practice you also need warmup, since the linear rule breaks down early in training, and very large batches eventually stop improving generalization.
Why interviewers ask this
This is a quick check on whether you have actually trained models at scale or only run tutorials. The interviewer wants the reasoning about gradient variance rather than a memorized rule, plus awareness that linear scaling has limits and needs warmup. Candidates who say nothing changes reveal they have never watched a run diverge after moving to a bigger GPU.
How to structure your answer
- State the linear scaling rule up front.
- Justify it with gradient variance, not just convention.
- Add warmup as the practical requirement.
- Say where the rule breaks down and what you watch for.
Example answer
Default is linear scaling: double the batch, double the learning rate. The logic is that the gradient you compute on a batch is an estimate of the true gradient, and its variance falls with batch size, so a bigger batch gives you a more trustworthy direction and you can take a proportionally bigger step in it. What people skip is warmup. Right at the start the weights are random and the loss surface is not friendly, so a large learning rate applied immediately after a batch size jump will blow the run up in the first few hundred steps. So I ramp linearly from near zero to the target over a warmup window, then decay. Beyond a certain batch size the rule stops paying, both because the gradient estimate is already low variance so you gain nothing, and because you take far fewer optimizer steps per epoch, which seems to hurt generalization. I have hit that ceiling around a few thousand samples per batch on the models I have worked on. So my routine after any batch size change is scale, warm up, then watch the loss curve for the first thousand steps rather than walking away.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- How long a warmup would you use, and what determines it?
- What is gradient accumulation and when does it substitute for a bigger batch?
- Why might a very large batch hurt final validation accuracy?
Related machine learning engineer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions