Backprop • Optimisers • CNNs • RNNs & Attention • Transfer Learning • 2026

Deep Learning Interview Questions

30 questions What each one tests, an answer frame, a spoken answer 38 min read

This page is for anyone facing a deep learning round, from a first ML role to a senior research or applied position. Most rounds start with neurons, activations and loss functions, move to backpropagation and why gradients vanish or explode, then test optimisers, normalisation and dropout. After that come convolutions, recurrent nets and attention at an intuitive level, and how you would reuse a pretrained model when data is scarce. Senior rounds add a debugging story and a judgement call about scale. Each question shows what the interviewer is checking, the shape of a strong answer and a short answer you can say out loud.

Search all questions by round, difficulty and level, or save the ones you want to practise.

Foundations 4 questions

Easy Technical round Fresher, Mid-level Practice question

1. Why does a neural network need a non-linear activation function? What happens if you take it out?

What the interviewer is really testing:
Whether you understand where a network's expressive power comes from, not just that activations are part of the recipe.
Answer frame:

Collapse: stacked linear layers multiply out to one linear layer, however deep.

Power: the non-linearity is what lets the network bend its decision boundary and model curved relationships.

Example: without it, a network cannot even solve XOR.

Sample spoken answer:

"Each layer computes a weighted sum plus a bias, which is a linear function. If I stack two of those with nothing in between, I get W2 times W1 times x plus some bias, and W2 times W1 is just another matrix. So a hundred linear layers are mathematically the same as one, and the whole network is no better than linear regression or logistic regression. The activation function breaks that. Putting something like ReLU between layers means each layer can fold and bend the space, and stacking those bends lets the network approximate very complicated functions. The classic small example is XOR: no single straight line separates it, but one hidden layer with a non-linearity handles it easily. So depth only buys you anything because of the non-linear step between layers."

Red flag to avoid:

Saying activations are there to squash outputs into a range, without seeing that the real point is to stop the layers collapsing into one linear map.

They may ask next:
  • Is there any place in a network where you would deliberately use no activation at all?
  • Why is ReLU enough, given that it is linear on each side of zero?
Say it in 60 seconds
Easy Technical round Fresher, Mid-level Practice question

2. Compare sigmoid, tanh and ReLU. Why did ReLU become the default for hidden layers?

What the interviewer is really testing:
Whether you connect the shape of each function to what it does to gradients during training.
Answer frame:

Sigmoid: outputs 0 to 1, saturates at both ends, derivative at most 0.25, not zero-centred.

Tanh: outputs -1 to 1 and is zero-centred, but still saturates.

ReLU: max(0, x), gradient of 1 for positive inputs, cheap; the catch is dead units.

Where each fits: sigmoid still belongs at the output for yes-or-no and multi-label tasks.

Sample spoken answer:

"Sigmoid squashes everything between zero and one. The problem is that for large positive or negative inputs it goes flat, so the gradient is close to zero, and even at its steepest the derivative is only a quarter. Multiply that through many layers and the early layers barely learn. Tanh is similar but centred on zero, which helps a little, yet it still saturates. ReLU is just max of zero and x. For positive inputs the gradient is exactly one, so it doesn't shrink the signal, and it's very cheap to compute. The weakness is dying ReLU: if a unit's input ends up negative for every example, its gradient is zero and it never recovers. Leaky ReLU or GELU soften that. I'd still use sigmoid at the output when I need a probability for a binary or multi-label decision."

Red flag to avoid:

Saying sigmoid is bad and should never be used, missing that it is still the right choice for a binary or multi-label output.

They may ask next:
  • What would make a lot of ReLU units die during training, and how would you notice?
  • Why do many transformer models use GELU rather than plain ReLU?
Say it in 60 seconds
Medium Technical round Fresher, Mid-level Practice question

3. For multi-class classification, why do we pair softmax with cross-entropy loss instead of using mean squared error?

What the interviewer is really testing:
Whether you understand what the loss is measuring and why its gradient behaves well, which matters when you pick losses for new problems.
Answer frame:

Softmax: turns raw scores (logits) into probabilities that sum to one.

Cross-entropy: the negative log of the probability given to the correct class; it is the maximum likelihood objective.

Gradient: with respect to the logits it is simply predicted minus true, so confident mistakes get a strong push.

Practice: pass raw logits to the framework's combined loss for numerical stability.

Sample spoken answer:

"Softmax takes the raw scores from the last layer and turns them into a probability for each class. Cross-entropy then looks only at the probability the model gave the right class and takes the negative log of it. So if the model says 0.9 for the right answer the loss is small, and if it says 0.01 the loss is large. That's also exactly maximising the likelihood of the labels. The nice part is the gradient: with respect to the logits, it works out to predicted probabilities minus the one-hot label, so a confidently wrong prediction gets a big correction. With mean squared error on top of softmax, the gradient gets multiplied by the softmax slope, which is tiny when the output is saturated, so a badly wrong model can learn slowly. In code I pass logits straight into the built-in cross-entropy, which does the log-softmax in a stable way."

Red flag to avoid:

Applying softmax yourself and then feeding the probabilities into a loss that already applies log-softmax, without noticing the double application.

They may ask next:
  • An image can carry several labels at once. How do you change the output layer and the loss?
  • What is label smoothing, and why might you use it?
Say it in 60 seconds
Easy Technical round Fresher, Mid-level Practice question

4. Why can't you initialise every weight in a network to zero? What do Xavier and He initialisation fix?

What the interviewer is really testing:
Whether you know about symmetry breaking and why the scale of random weights matters for signal flowing through deep nets.
Answer frame:

Symmetry: identical weights mean every unit in a layer computes the same thing and gets the same update, forever.

Scale: random weights that are too big or too small make activations and gradients blow up or fade layer by layer.

Xavier and He: pick the variance from the layer's fan-in (and fan-out) so the signal keeps a steady size; He suits ReLU.

Sample spoken answer:

"If every weight starts at zero, or at any single shared value, then every unit in a layer sees the same inputs with the same weights, so they all produce the same output and receive the same gradient. They stay identical through training, and a layer of five hundred units behaves like one. Random initialisation breaks that symmetry. But the size of the random values matters too. Too large and activations grow layer after layer until things saturate or overflow. Too small and they shrink towards nothing, and so do the gradients. Xavier, or Glorot, initialisation sets the variance based on the number of inputs and outputs, which suits tanh and sigmoid. He initialisation uses a variance of two over the fan-in, which compensates for ReLU zeroing out half its inputs. Biases are usually fine starting at zero."

Red flag to avoid:

Saying zero initialisation is fine because training will move the weights anyway, missing that the units stay identical.

They may ask next:
  • Why is it fine to start the biases at zero but not the weights?
  • If you use batch normalisation, does initialisation still matter as much?
Say it in 60 seconds

Gradients & Backprop 5 questions

Easy Technical round Fresher, Mid-level Practice question

5. Explain backpropagation to me as if I were a new engineer joining the team.

What the interviewer is really testing:
Whether you can explain the chain rule mechanism clearly and separate computing gradients from using them to update weights.
Answer frame:

Forward pass: compute each layer's output and the loss, keeping the intermediate values.

Backward pass: apply the chain rule from the loss back through each layer, reusing the gradient from the layer above.

Update: backprop only gives the gradients; the optimiser then uses them to change the weights.

Sample spoken answer:

"Training needs to know, for every weight, how the loss would change if I nudged that weight a little. Backpropagation is the efficient way to get all of those at once. First I run the forward pass: inputs go through each layer, I get a prediction and a loss, and I keep the intermediate values around. Then I go backwards. At the output I know how the loss changes with the prediction. Using the chain rule, I pass that back to the last layer's weights and to its inputs, and the gradient with respect to its inputs becomes the starting point for the layer before. Because each layer reuses the gradient handed down to it, the whole backward pass costs about the same order as the forward pass. Then a separate step, the optimiser, uses those gradients to update the weights."

Red flag to avoid:

Treating backpropagation and gradient descent as the same thing, or describing it as the network sending the error back without mentioning the chain rule.

They may ask next:
  • Why do frameworks keep the activations from the forward pass in memory, and what does that cost?
  • How would you check that a hand-written gradient is correct?
Say it in 60 seconds
Hard Coding round Mid-level, Senior Practice question

6. Write the forward and backward pass for a one-hidden-layer network with ReLU and a sigmoid output, using only NumPy.

What the interviewer is really testing:
Whether you can derive gradients yourself and get the shapes right, which shows you understand what the framework does for you.
Answer frame:

Forward: linear, ReLU, linear, sigmoid, then binary cross-entropy averaged over the batch.

Output gradient: for sigmoid with cross-entropy, the gradient at the logit is predicted minus label, divided by the batch size.

Chain back: weight gradients are input-transpose times upstream gradient; ReLU passes the gradient only where its input was positive.

Check: compare against finite differences on a tiny example.

Sample spoken answer:

"I'll keep inputs as rows, so X is N by D. Forward: z1 is X times W1 plus b1, h is ReLU of z1, z2 is h times W2 plus b2, and p is sigmoid of z2. The loss is binary cross-entropy averaged over the batch, with a small epsilon inside the logs. Going back, the useful fact is that sigmoid plus cross-entropy gives a gradient at z2 of just p minus y, and I divide by N because of the mean. The gradient for W2 is h transposed times that, and for b2 it's the sum over the batch. To get back into the hidden layer I multiply by W2 transposed, then mask with z1 greater than zero, because ReLU only lets gradient through where it was active. Then W1 and b1 follow the same pattern with X. Before trusting it, I'd run a finite-difference check on a tiny network."

Code:
import numpy as np

def forward_backward(X, y, W1, b1, W2, b2):
    # X: (N, D), y: (N, 1) with 0/1 labels
    N = X.shape[0]
    z1 = X @ W1 + b1              # (N, H)
    h = np.maximum(0, z1)          # ReLU
    z2 = h @ W2 + b2               # (N, 1)
    p = 1 / (1 + np.exp(-z2))      # sigmoid
    eps = 1e-12
    loss = -np.mean(y * np.log(p + eps) + (1 - y) * np.log(1 - p + eps))

    dz2 = (p - y) / N              # gradient at the output logit
    dW2 = h.T @ dz2
    db2 = dz2.sum(axis=0)
    dh = dz2 @ W2.T
    dz1 = dh * (z1 > 0)            # ReLU passes gradient where active
    dW1 = X.T @ dz1
    db1 = dz1.sum(axis=0)
    return loss, (dW1, db1, dW2, db2)
Red flag to avoid:

Getting shapes to line up by trial and error with random transposes, or forgetting to mask the gradient through the ReLU.

They may ask next:
  • How would you write the finite-difference gradient check, and what tolerance would you accept?
  • What changes if the output becomes softmax over five classes?
  • Why can computing sigmoid this way overflow, and how do frameworks avoid it?
Say it in 60 seconds
Medium Technical round Fresher, Mid-level, Senior Practice question

7. What causes vanishing and exploding gradients, and what do you do about each one?

What the interviewer is really testing:
Whether you understand that depth multiplies gradients together and can name fixes that address the actual cause.
Answer frame:

Cause: backprop multiplies many per-layer factors; below one they shrink exponentially, above one they grow.

Vanishing fixes: ReLU-family activations, sensible initialisation, normalisation layers, residual connections, gated units for sequences.

Exploding fixes: gradient clipping by norm, a lower learning rate, better initialisation.

Diagnose: log gradient norms per layer instead of guessing.

Sample spoken answer:

"During backprop the gradient at an early layer is a product of many terms, roughly one per layer between it and the loss. If those terms are mostly smaller than one, say sigmoid derivatives, which are at most a quarter, the product shrinks exponentially and the early layers stop learning. That's vanishing. If they're mostly bigger than one, the product blows up, updates become huge and the loss can jump to NaN. That's exploding, and it's especially common in recurrent nets, where the same weights are multiplied at every time step. For vanishing, I'd use ReLU or similar activations, He or Xavier initialisation, batch or layer normalisation, and residual connections that give the gradient a short path back. For exploding, gradient clipping by global norm is the standard fix, plus a lower learning rate. And I'd confirm the diagnosis by logging gradient norms layer by layer."

Red flag to avoid:

Offering gradient clipping as the fix for vanishing gradients, which it cannot help.

They may ask next:
  • What is the difference between clipping by value and clipping by norm?
  • How would a plot of per-layer gradient norms look in each case?
Say it in 60 seconds
Hard Technical round Mid-level, Senior Practice question

8. Why do residual, or skip, connections make it possible to train networks that are hundreds of layers deep?

What the interviewer is really testing:
Whether you know the degradation problem and can explain both the optimisation view and the gradient-flow view of skip connections.
Answer frame:

Problem: deeper plain nets showed higher training error, not just higher validation error, so it was an optimisation issue.

Idea: a block outputs x plus F(x), so it only has to learn a correction; doing nothing is easy.

Gradient flow: the identity path carries the gradient straight back, so it never passes only through long chains of small factors.

Detail: when shapes differ, the shortcut uses a projection such as a one-by-one convolution.

Sample spoken answer:

"Before residual connections, people saw that stacking more plain layers could make training error worse, not just validation error. That means it wasn't overfitting; the optimiser simply couldn't find a good solution, even though a deeper net could in principle copy a shallower one and set the extra layers to identity. A residual block changes the target. Instead of learning a full mapping, the block computes F of x and adds x back, so it only learns a correction. If a layer isn't useful, pushing F towards zero is easy. The other view is the gradient: the derivative of x plus F of x with respect to x includes an identity term, so gradient flows straight through the shortcut to earlier layers without being shrunk by every block on the way. When the block changes the number of channels or the resolution, the shortcut uses a one-by-one convolution to match shapes."

Red flag to avoid:

Saying skip connections work because they reduce overfitting, when the original problem was that deep plain nets were hard to optimise.

They may ask next:
  • Where does the normalisation layer go in a residual block, and does the order matter?
  • How do residual connections show up inside a transformer block?
Say it in 60 seconds
Medium Situational round Mid-level, Senior Practice question

9. Halfway through a long training run, your loss suddenly turns into NaN. What do you check, and in what order?

What the interviewer is really testing:
Whether you debug methodically from the most likely causes, and set things up so the failure can be reproduced.
Answer frame:

Reproduce: find the step and save the batch and checkpoint just before it.

Data: check that batch for NaN, infinity or extreme input and target values.

Maths: look for log of zero, division by zero or a hand-rolled softmax; use the framework's stable combined losses.

Dynamics: watch gradient norms for a spike; lower the rate, add clipping, check 16-bit overflow and loss scaling.

Sample spoken answer:

"First I'd make it reproducible. I'd find the step where it happened, reload the checkpoint just before, and save the exact batch. Then I'd check that batch: one corrupt input or an absurd target value can blow up the loss. If the data is clean, I'd look at the maths in anything custom: a log of something that can hit zero, a division by a variance or norm that can be zero, or a softmax I wrote myself. I'd swap those for the framework's stable versions or add a small epsilon. Next I'd look at gradient norms in the logs. If they spike just before the NaN, the gradients are exploding, so I'd lower the learning rate, check the warmup, and add clipping by global norm. If I'm training in 16-bit, I'd check for overflow and make sure loss scaling is on, or move to bfloat16. Anomaly detection modes can point at the first operation that made the NaN."

Red flag to avoid:

Restarting with a different random seed and hoping it goes away, without finding the cause.

They may ask next:
  • How would you tell a data problem from an optimisation problem using only the training logs?
  • What guard would you add so a long run doesn't waste hours after a NaN appears?
Say it in 60 seconds

Optimisers 3 questions

Medium Technical round Fresher, Mid-level, Senior Practice question

10. Walk me through SGD, momentum and Adam. When might you still choose SGD with momentum over Adam?

What the interviewer is really testing:
Whether you know what each optimiser adds on top of the last, and have a practical rather than dogmatic view of when to use which.
Answer frame:

SGD: step against the gradient of a mini-batch, scaled by the learning rate.

Momentum: keep a running average of past gradients so consistent directions speed up and zig-zags cancel out.

Adam: momentum plus a per-parameter step size from a running average of squared gradients, with bias correction early on.

Choice: Adam is the quick, robust default; well-tuned SGD with momentum can match or beat it on some vision tasks.

Sample spoken answer:

"Plain SGD takes a mini-batch, computes the gradient and steps against it, scaled by the learning rate. It's noisy and it zig-zags in narrow valleys. Momentum keeps a velocity, an exponentially decayed average of past gradients, and steps along that. Directions that stay consistent build up speed and directions that flip back and forth cancel out. Adam keeps that first moment and adds a second one: a running average of squared gradients per parameter. It divides the step by the square root of that, so parameters with large, noisy gradients take smaller steps and rarely updated ones take larger steps. It also corrects both averages early in training because they start at zero. Adam is usually my first choice because it converges quickly with little tuning. But on some image classification problems, SGD with momentum and a good schedule reaches equal or better final accuracy, so if I have the time to tune, I'll compare both."

Red flag to avoid:

Claiming Adam is always better, or describing Adam as simply a faster SGD without mentioning the per-parameter scaling.

They may ask next:
  • What are the two beta values in Adam controlling?
  • Why does Adam need a small epsilon in its update?
Say it in 60 seconds
Medium Technical round Fresher, Mid-level, Senior Practice question

11. How do you pick a learning rate, and what do warmup and decay schedules actually do?

What the interviewer is really testing:
Whether you treat the learning rate as the most important knob and know practical ways to set and schedule it.
Answer frame:

Symptoms: too high and the loss spikes or diverges; too low and it crawls or stalls.

Finding it: a short range test that raises the rate step by step and watches where the loss falls fastest before blowing up.

Warmup: start small and ramp up over the first steps, while statistics and weights are still settling.

Decay: lower the rate later, with steps, cosine or reduce-on-plateau, so the model can settle into a good minimum.

Sample spoken answer:

"The learning rate is the first thing I tune because nothing else matters much if it's wrong. If it's too high the loss jumps around or shoots up to NaN; if it's too low the loss goes down so slowly I run out of budget. A quick way to find a sensible value is a range test: train for a few hundred steps while raising the learning rate exponentially, plot loss against rate, and pick something a bit below the point where the loss was dropping fastest. Warmup means starting with a small rate and ramping up over the first steps. Early on, the weights are random and Adam's running averages are unreliable, so a big step can knock training off course; warmup matters most for transformers and large batches. Decay does the opposite at the end: big steps early to explore, smaller steps later to settle. Cosine decay and step decay are common, and reduce-on-plateau works when I don't know the length in advance."

Red flag to avoid:

Tuning everything else first and leaving the learning rate at a library default without checking it.

They may ask next:
  • If you double the batch size, would you change the learning rate?
  • Your loss drops quickly then flattens very early. What does that tell you about the rate?
Say it in 60 seconds
Hard Technical round Mid-level, Senior Practice question

12. What is the difference between adding L2 regularisation to the loss and using weight decay with Adam? Why does AdamW exist?

What the interviewer is really testing:
Whether you understand how adaptive optimisers interact with regularisation, a detail that separates people who read the update rule from those who only call it.
Answer frame:

Plain SGD: an L2 penalty adds lambda times w to the gradient, which is the same as shrinking weights each step.

Adam: that extra gradient term gets divided by the adaptive denominator, so weights with large past gradients are decayed less.

AdamW: decouples decay from the gradient and shrinks weights directly, so every weight decays at the intended rate.

Practice: decay usually skips biases and normalisation parameters.

Sample spoken answer:

"With plain SGD, adding an L2 penalty to the loss puts an extra lambda times w into each gradient, and the update shrinks every weight a little each step. That's why people use L2 and weight decay as the same thing. In Adam they come apart. If I put L2 in the loss, that lambda times w term goes through Adam's adaptive scaling, so it gets divided by the square root of the running squared gradient. Weights that have had large gradients end up barely decayed, which isn't the regularisation I asked for. AdamW fixes this by decoupling: it computes the Adam step from the loss gradient alone, then shrinks the weights directly by the learning rate times the decay. Every weight decays at the same relative rate, and the decay setting becomes easier to tune separately from the learning rate. It usually generalises better, which is why it's the common default for transformers. I'd also exclude biases and normalisation weights from decay."

Red flag to avoid:

Saying AdamW is just Adam with a different default setting, without being able to say what is decoupled from what.

They may ask next:
  • Why would you exclude normalisation layer parameters from weight decay?
  • If you switch from Adam with L2 to AdamW, would you keep the same decay value?
Say it in 60 seconds

Training at Scale 3 questions

Medium Technical round Fresher, Mid-level, Senior Practice question

13. How does batch size affect training speed, GPU memory and the quality of the model you end up with?

What the interviewer is really testing:
Whether you see batch size as a trade-off between hardware efficiency and optimisation behaviour, and know it interacts with the learning rate.
Answer frame:

Hardware: bigger batches use the GPU's parallelism better but activation memory grows with them.

Gradient noise: small batches give noisier gradients, which can help generalisation; big batches give smoother ones.

Learning rate: when batch size changes, the rate usually needs retuning, often scaled up with warmup.

Side effects: very small batches make batch norm statistics unreliable.

Sample spoken answer:

"Batch size touches both the hardware and the optimisation. On the hardware side, a GPU does best with lots of parallel work, so a bigger batch gives better throughput per example, up to the point where memory runs out. Memory grows with batch size mainly because every example's activations are kept for the backward pass. On the optimisation side, a small batch gives a noisy estimate of the gradient. That noise slows things down, but it can also help the model avoid sharp minima and generalise better. A big batch gives a smoother gradient and fewer steps per epoch, but if I don't raise the learning rate, progress per epoch drops, and very large batches can generalise worse without careful tuning. A common heuristic is to scale the learning rate roughly with the batch size and add warmup, then verify on validation. And with tiny batches, I'd avoid batch norm or switch to group norm."

Red flag to avoid:

Saying bigger batches are always better because training is faster, with no mention of the learning rate or generalisation.

They may ask next:
  • If you can only fit a batch of four, how would you get the effect of a batch of sixty-four?
  • Why can a larger batch finish an epoch faster but still take longer to reach the same accuracy?
Say it in 60 seconds
Medium Technical round Mid-level, Senior Practice question

14. Your model runs out of GPU memory at the batch size you want. What are your options, and what does each one cost you?

What the interviewer is really testing:
Whether you know what actually fills GPU memory during training and the standard tricks to trade compute or precision for it.
Answer frame:

What fills memory: weights, gradients, optimiser state (Adam keeps two extra values per weight) and activations.

Gradient accumulation: run several small batches, add up their gradients, then step once; same effective batch, more time.

Mixed precision: 16-bit activations and maths roughly halve activation memory and often speed things up.

Checkpointing and sharding: recompute activations in the backward pass, or split weights and optimiser state across GPUs.

Sample spoken answer:

"First I'd think about what's in memory: the weights, their gradients, the optimiser state, which for Adam is two extra tensors the size of the model, and the activations saved for the backward pass, which grow with batch size and input size. The cheapest fix is gradient accumulation: run smaller batches, call backward on each so gradients add up, and only step the optimiser every few batches. I get the same effective batch, just slower, though batch norm still sees the small batch. Next is mixed precision, running in 16-bit where it's safe, which roughly halves activation memory and usually speeds things up on modern GPUs. Activation checkpointing throws away some activations and recomputes them during the backward pass, trading extra compute for memory. If the model itself is too big, I'd look at sharding weights and optimiser state across GPUs, since plain data parallelism still keeps a full copy on each one."

Code:
accum_steps = 4
optimizer.zero_grad()
for step, (x, y) in enumerate(loader):
    loss = loss_fn(model(x), y) / accum_steps  # average over the effective batch
    loss.backward()                              # gradients add up
    if (step + 1) % accum_steps == 0:
        optimizer.step()
        optimizer.zero_grad()
Red flag to avoid:

Only offering to reduce the batch size, without knowing about accumulation, mixed precision or what actually uses the memory.

They may ask next:
  • Why do you divide the loss by the number of accumulation steps?
  • What can go wrong numerically with 16-bit training, and how is it handled?
Say it in 60 seconds
Hard Situational round Senior Practice question

15. Accuracy has plateaued and your manager suggests training a much bigger model. How do you decide whether to scale up, get more data or change approach?

What the interviewer is really testing:
Whether you use evidence such as training versus validation error and learning curves to decide, and weigh serving cost, instead of scaling by default.
Answer frame:

Diagnose: if training error is also high the model is underfitting; if training is good but validation is not, it is overfitting.

Learning curve: train on growing slices of the data; if validation still improves, more data will pay off.

Error analysis: read the mistakes to find label noise, a hard subgroup or an impossible case.

Cost: a bigger model costs more to train and to serve; run a cheap experiment before committing.

Sample spoken answer:

"I'd want evidence before spending on a bigger model. First, where's the error? If training accuracy is also stuck well below target, the model is underfitting, and a bigger model or longer training could help. If training is near perfect and validation is behind, more capacity will probably make the gap worse, and data or regularisation is the better bet. Second, I'd train on a quarter, half and all of the data and plot validation accuracy. If it's still climbing at the full set, more labelled data is likely worth more than more parameters. Third, I'd read a few hundred mistakes. Often a chunk are wrong labels or cases even a person can't call, which means the ceiling is the data. I'd also raise serving cost, because a model several times larger may break the latency budget. Then I'd suggest one cheap experiment, like a moderately larger model on the current data, and let the result decide."

Red flag to avoid:

Agreeing to scale up straight away, or refusing outright, without looking at training versus validation error.

They may ask next:
  • How would you estimate the best accuracy that is realistically possible on this data?
  • If the bigger model wins but is too slow to serve, what are your options?
Say it in 60 seconds

Regularisation 4 questions

Easy Technical round Fresher, Mid-level Practice question

16. How does dropout work, and what changes between training time and inference time?

What the interviewer is really testing:
Whether you know the mechanism, the scaling detail and the practical bug of leaving dropout on at inference.
Answer frame:

Training: each unit is zeroed at random with probability p on every forward pass.

Why it helps: units can't rely on specific partners, a bit like training many thinned networks and averaging them.

Scaling: frameworks scale kept units up by one over one minus p during training, so inference needs no change.

Inference: dropout is switched off; forgetting eval mode gives random, worse predictions.

Sample spoken answer:

"During training, dropout randomly switches off each unit in a layer with some probability p, say 0.3, and it picks a fresh random set on every forward pass. That stops units from depending on particular other units being present, so the network learns more spread-out, robust features. You can think of it as training a huge family of thinner networks that share weights and averaging them at the end. At inference I want a deterministic answer, so dropout is turned off and every unit is used. To keep the expected size of the activations the same, frameworks use inverted dropout: during training they scale the surviving activations up by one over one minus p, so nothing needs rescaling at test time. The practical bug I watch for is forgetting to put the model in eval mode, which leaves dropout on and makes predictions noisy and worse."

Red flag to avoid:

Saying dropout permanently removes neurons, or not knowing that it has to be switched off at inference.

They may ask next:
  • Why is dropout used less often inside convolutional layers than in dense layers?
  • How could you use dropout at inference on purpose to estimate uncertainty?
Say it in 60 seconds
Medium Technical round Fresher, Mid-level, Senior Practice question

17. What does batch normalisation do, why does it help training, and why does it behave differently at inference?

What the interviewer is really testing:
Whether you know the mechanism, including the learnable scale and shift and the running statistics, and are honest that the exact reason it works is debated.
Answer frame:

Mechanism: normalise each feature or channel using the batch mean and variance, then apply a learnable scale and shift.

Effect: allows higher learning rates, faster convergence, less sensitivity to initialisation, a mild regularising noise.

Inference: uses running averages of mean and variance collected in training, so one input's answer doesn't depend on its batch.

Limits: unreliable with very small batches; layer or group norm are alternatives.

Sample spoken answer:

"Batch norm takes each feature, or each channel in a conv net, and normalises it using the mean and variance of the current mini-batch, so it has roughly zero mean and unit variance. Then it applies two learnable parameters, a scale and a shift, so the network can undo the normalisation if that's better. In practice it lets me use higher learning rates, trains faster and makes the network less fussy about initialisation. The batch-to-batch noise also adds a small regularising effect. Why it works is still debated: the original reason given was reducing shifts in layer inputs, and later work pointed more at a smoother loss surface. At inference, there may be only one example, and I don't want a prediction to depend on what else is in the batch. So the layer keeps running averages of the mean and variance during training and uses those fixed values at test time."

Red flag to avoid:

Not knowing about the running statistics, or thinking batch norm computes a fresh mean and variance from the test batch.

They may ask next:
  • What happens to batch norm when your batch size is two?
  • If you fine-tune a pretrained model with batch norm on a small dataset, would you freeze its statistics?
Say it in 60 seconds
Medium Technical round Fresher, Mid-level, Senior Practice question

18. Your network reaches near-perfect training accuracy, but validation accuracy lags far behind. What do you try, and in what order?

What the interviewer is really testing:
Whether you rule out data problems first and then apply fixes in a sensible order, rather than piling on every regulariser at once.
Answer frame:

Check first: is the validation set clean, drawn from the same distribution and free of leaks or label noise?

Data: more labelled data or stronger augmentation is usually the biggest win.

Constrain: early stopping on validation loss, weight decay, dropout, a smaller model or a frozen pretrained backbone.

Measure: change one thing at a time and watch both learning curves.

Sample spoken answer:

"First I'd make sure the gap is real. I'd check that validation comes from the same distribution as production, that no near-duplicate images or users sit on both sides of the split, and I'd look at some validation mistakes to see if the labels themselves are wrong. If it's genuine overfitting, data is my first lever: more labelled examples if I can get them, otherwise stronger augmentation. Then I'd add early stopping on validation loss, which is nearly free. After that, weight decay and dropout, and if the model is clearly too big for the data, a smaller architecture or starting from a pretrained network and freezing most of it. I'd change one thing at a time and watch both training and validation curves, because piling on five regularisers at once tells me nothing about which one helped and can easily tip the model into underfitting."

Red flag to avoid:

Jumping straight to adding dropout everywhere without first checking the validation set or the data.

They may ask next:
  • Validation loss starts rising while validation accuracy keeps improving. What is going on?
  • How do you know you have added too much regularisation?
Say it in 60 seconds
Easy Technical round Fresher, Mid-level Practice question

19. What is data augmentation, and how do you decide which augmentations are safe for a given task?

What the interviewer is really testing:
Whether you understand that augmentation must preserve the label and should mimic variation the model will really see.
Answer frame:

Idea: create new training examples by transforming existing ones in ways that keep the label true.

Choosing: copy the variation real inputs have, such as lighting, framing or noise, and avoid changes that alter meaning.

Pitfall: a flip or rotation can change the label, such as a left arrow becoming a right arrow.

Rule: augment the training set only, and check samples by eye.

Sample spoken answer:

"Data augmentation means making extra training examples by transforming the ones I have, so the model sees more variety without new labelling. For images that's random crops, flips, small rotations, colour and brightness changes, and blur. For audio it's adding background noise or shifting in time. The key question is whether the label is still true after the change. A horizontally flipped cat is still a cat, but a flipped road sign with a left arrow now means right, and rotating a handwritten six can turn it into a nine. So I choose augmentations that match variation the model will meet in real use, like different lighting or camera angles, and avoid ones that change meaning. I apply them only to training data, never to validation, and I always look at a grid of augmented samples before training, because a bug here quietly poisons everything."

Red flag to avoid:

Applying augmentations to the validation or test set, or picking transformations without asking whether they change the label.

They may ask next:
  • How would you augment text data without changing its meaning?
  • What do mixup or cutout do, and why would they help?
Say it in 60 seconds

CNNs 3 questions

Easy Technical round Fresher, Mid-level Practice question

20. Why do we use convolutional layers for images instead of fully connected layers?

What the interviewer is really testing:
Whether you can name the two structural ideas behind convolution, local connections and weight sharing, and what they buy.
Answer frame:

Size: a dense layer on a full-size image needs a separate weight per pixel per unit, which is enormous.

Local connectivity: each filter looks at a small patch, since nearby pixels matter most to each other.

Weight sharing: the same filter slides across the image, so a pattern is detected wherever it appears.

Hierarchy: stacked layers build from edges to textures to parts to objects.

Sample spoken answer:

"A 224 by 224 colour image has about 150,000 input values. A dense layer would give every hidden unit its own weight for every one of those, so even a modest layer runs into many millions of parameters, and it would ignore that pixels next to each other are related. A convolutional layer uses two ideas. Local connectivity: each filter only looks at a small patch, like three by three. And weight sharing: the same small filter slides across the whole image, so the layer has very few parameters and a pattern it learns, like a vertical edge, is detected wherever it shows up. Stack a few of these layers and the early ones pick up edges and colours, middle ones textures and shapes, and later ones whole object parts. That structure is a good fit for images, so conv nets need far less data than a dense net would."

Red flag to avoid:

Saying convolutions are used just because they are faster, without mentioning weight sharing or local structure.

They may ask next:
  • What does translation equivariance mean, and where does a conv net lose it?
  • What is a one-by-one convolution useful for?
Say it in 60 seconds
Medium Technical round Fresher, Mid-level Practice question

21. A 32 by 32 RGB image goes through 16 filters of size 5 by 5, stride 1, no padding. What is the output shape, and how many parameters does the layer have?

What the interviewer is really testing:
Whether you can do the shape and parameter arithmetic that every conv net design and debugging session needs.
Answer frame:

Formula: output size is (input minus kernel plus two times padding) divided by stride, plus one.

Shape: (32 minus 5) over 1, plus 1, gives 28, so the output is 28 by 28 by 16.

Parameters: each filter spans all 3 input channels, so 5 times 5 times 3 is 75 weights plus 1 bias; times 16 is 1,216.

Sample spoken answer:

"For each spatial side, the output size is the input size minus the kernel size, plus twice the padding, divided by the stride, plus one. Here that's 32 minus 5, plus zero, over 1, plus 1, which is 28. There are 16 filters, and each produces one output channel, so the output is 28 by 28 by 16. For parameters, the thing people miss is that a filter covers all the input channels, not just one. So each filter is 5 by 5 by 3, which is 75 weights, plus one bias, making 76. Times 16 filters gives 1,216 parameters. Notice the count doesn't depend on the image size at all; that's weight sharing. If I added padding of 2, the output would stay 32 by 32, and with stride 2 and no padding it would be 14 by 14, because I round down before adding one."

Red flag to avoid:

Counting 5 times 5 weights per filter and forgetting that each filter spans every input channel.

They may ask next:
  • How many multiply-adds does this layer perform for one image?
  • What padding keeps the size the same for a 3 by 3 kernel with stride 1?
Say it in 60 seconds
Easy Technical round Fresher, Mid-level Practice question

22. What does a pooling layer do in a CNN, and what is a receptive field?

What the interviewer is really testing:
Whether you know how a conv net shrinks its feature maps and why later layers can see large parts of the image.
Answer frame:

Pooling: summarise each small window, usually by max or average; a 2 by 2 window with stride 2 halves height and width.

Why: less compute, a little tolerance to small shifts, no learnable weights.

Receptive field: the patch of the original input that can affect one unit; it grows with depth, stride and pooling.

Modern note: many networks use strided convolutions and global average pooling instead.

Sample spoken answer:

"A pooling layer slides a small window over each feature map and replaces the window with one number, usually the maximum or the average. The common setting is a 2 by 2 window with stride 2, which halves the height and width. It has no weights to learn. It cuts computation for the layers after it, and max pooling gives a bit of tolerance to small shifts, because the strongest response in a window survives even if it moves a pixel. The receptive field of a unit is the area of the original image that can influence it. A unit after one 3 by 3 convolution sees a 3 by 3 patch; after two stacked 3 by 3 convolutions it sees 5 by 5. Pooling and strides make it grow much faster, which is how deep layers end up seeing whole objects. Many newer designs use strided convolutions instead of pooling, and global average pooling before the classifier."

Red flag to avoid:

Saying pooling layers learn features, or not knowing that stacking small kernels grows the receptive field.

They may ask next:
  • Why might you prefer a strided convolution over max pooling?
  • What is global average pooling, and why did it replace large dense layers at the end of many CNNs?
Say it in 60 seconds

Sequence Models 3 questions

Medium Technical round Fresher, Mid-level, Senior Practice question

23. Why do plain RNNs struggle with long sequences, and how do the gates in an LSTM help?

What the interviewer is really testing:
Whether you can explain the long-range dependency problem and the specific role of the cell state and each gate.
Answer frame:

RNN: the same weights update a hidden state at every step; backprop through time multiplies by them again and again.

Problem: gradients vanish or explode over long spans, so early inputs are effectively forgotten.

LSTM: a separate cell state updated by adding, with forget, input and output gates deciding what to keep, write and expose.

Limit: still step by step, so slow to train on long sequences; GRU is a lighter two-gate variant.

Sample spoken answer:

"A plain RNN reads one step at a time and updates a hidden state using the same weights at every step. When I train it, backprop through time pushes the gradient back through every step, multiplying by the same recurrent weights and activation derivatives each time. Over fifty or a hundred steps that product usually shrinks to almost nothing, or sometimes explodes, so the model can't learn that something early in the sequence matters later. An LSTM adds a cell state that runs alongside the hidden state and is updated mostly by addition. A forget gate decides how much of the old cell state to keep, an input gate decides how much new information to write, and an output gate decides what to expose as the hidden state. When the forget gate stays near one, information and gradient can pass along many steps without shrinking much. A GRU does something similar with two gates."

Red flag to avoid:

Saying LSTMs have long memory because they store the whole sequence, without explaining the additive cell state and gating.

They may ask next:
  • Why is the forget gate's bias sometimes initialised to a positive value?
  • What does a bidirectional LSTM add, and when can't you use one?
Say it in 60 seconds
Medium Technical round Fresher, Mid-level, Senior Practice question

24. Explain self-attention in plain words. What are the queries, keys and values, and why is there a scaling factor?

What the interviewer is really testing:
Whether you have a correct intuition for the attention computation itself, not just the vocabulary around it.
Answer frame:

Projections: each position makes a query, a key and a value using learned weight matrices.

Scores: a query's dot product with every key says how relevant each position is; softmax turns scores into weights.

Output: each position's new vector is the weighted sum of the values.

Scaling: divide by the square root of the key size so large dot products don't saturate the softmax.

Sample spoken answer:

"Self-attention lets each position in a sequence build its new representation by looking at every other position and deciding which ones matter. Each input vector is multiplied by three learned matrices to make a query, a key and a value. The query is roughly what this position is looking for, the key is what each position offers, and the value is the information it will pass on. For one position, I take the dot product of its query with every key, which gives a relevance score for each position. Softmax turns those scores into weights that add to one, and the output is the weighted sum of the values. The scores are divided by the square root of the key dimension, because dot products grow with dimension, and very large scores push softmax into a near one-hot shape with tiny gradients. Multi-head attention runs several of these in parallel so different heads can track different relationships."

Code:
import numpy as np

def self_attention(X, Wq, Wk, Wv):
    Q, K, V = X @ Wq, X @ Wk, X @ Wv            # (T, d) each
    scores = Q @ K.T / np.sqrt(K.shape[-1])     # (T, T)
    scores -= scores.max(axis=-1, keepdims=True)
    weights = np.exp(scores)
    weights /= weights.sum(axis=-1, keepdims=True)  # softmax per row
    return weights @ V                          # (T, d)
Red flag to avoid:

Describing attention only as the model focusing on important words, with no idea how the weights are computed.

They may ask next:
  • How would you stop a position from attending to positions that come after it?
  • Why does the cost of attention grow with the square of the sequence length?
Say it in 60 seconds
Hard Technical round Mid-level, Senior Practice question

25. A transformer looks at every position at once. How does it know the order of the inputs, and why is that design faster to train than an RNN?

What the interviewer is really testing:
Whether you understand that attention alone ignores order, how position is added back, and the real reason transformers displaced recurrence.
Answer frame:

Order-blind: attention treats inputs as a set; shuffle the inputs and the outputs shuffle the same way.

Positional information: added through fixed sinusoidal encodings, learned position embeddings, or relative schemes inside attention.

Parallel training: all positions are computed together with big matrix multiplies, unlike an RNN's step-by-step loop.

Trade-off: any two positions are one step apart, but attention cost grows with the square of the sequence length.

Sample spoken answer:

"Self-attention on its own has no idea about order. If I shuffle the inputs, each output is computed from the same set of keys and values, so the outputs just shuffle the same way. To fix that, position information is added. The original design added fixed sine and cosine patterns of different frequencies to each input embedding. Many models instead learn a position embedding, and others build relative position directly into the attention scores. On speed, an RNN has to finish step t before it can start step t plus one, so training can't be spread across the sequence. A transformer computes every position in one set of large matrix multiplications, which is exactly what GPUs are good at. It also helps learning: any two positions are connected in one attention step, so a dependency doesn't have to survive fifty recurrent steps. The price is that attention compares every pair of positions, so cost grows quadratically with sequence length."

Red flag to avoid:

Saying transformers are faster because they have fewer parameters, or not knowing that attention by itself ignores order.

They may ask next:
  • During generation, the model still produces one token at a time. Why is training parallel but generation sequential?
  • What would happen if you trained without any positional information?
Say it in 60 seconds

Transfer Learning 1 questions

Medium Technical round Fresher, Mid-level, Senior Practice question

26. You have about 2,000 labelled images for a new classification task. How would you use a pretrained model?

What the interviewer is really testing:
Whether you know the practical fine-tuning recipe and the choices that change with dataset size and how close the new domain is.
Answer frame:

Start: a backbone pretrained on a large, broad image dataset, with its old classifier head replaced by one for my classes.

Stage one: freeze the backbone and train only the new head.

Stage two: unfreeze the top blocks, or all of it, and fine-tune with a much smaller learning rate.

Details: match the original preprocessing, augment, keep a careful validation split, and adjust depth of fine-tuning to domain distance.

Sample spoken answer:

"Two thousand images is too few to train a good image model from scratch, so I'd start from a backbone pretrained on a large general image dataset. I'd replace its final classification layer with a new one sized for my classes. First I'd freeze the backbone and train just the new head, so the random head doesn't send big, noisy gradients into good pretrained features. Once that's working, I'd unfreeze the top few blocks, or the whole network, and fine-tune with a learning rate maybe ten times smaller than before. I'd use the same resizing and normalisation the backbone was trained with, add augmentation, and keep a stratified validation set, since with small data the numbers are noisy. If my images look very different from the pretraining data, like medical scans, the early layers still help but I'd expect to fine-tune more of the network."

Red flag to avoid:

Fine-tuning the whole pretrained network from the start with a high learning rate, which wipes out the features you came for.

They may ask next:
  • What is catastrophic forgetting, and how does a lower learning rate help avoid it?
  • When would you use the pretrained model only as a fixed feature extractor?
  • How would you handle the batch norm layers while the backbone is frozen?
Say it in 60 seconds

Real Work 4 questions

Hard Situational round Mid-level, Senior Practice question

27. Your model scores well in offline evaluation, but predictions from the serving code are noticeably worse on the same inputs. How do you track it down?

What the interviewer is really testing:
Whether you know the classic causes of a train and serve gap in deep models and how to narrow it down systematically.
Answer frame:

Same input test: push one raw input through both paths and compare outputs, then compare tensors step by step.

Mode: model left in training mode means dropout is on and batch norm uses batch statistics.

Preprocessing: resizing method, normalisation values, channel order, tokenisation or scaling differ.

Artefact: wrong checkpoint, a missing layer's weights, or precision changes during export.

Sample spoken answer:

"I'd take a handful of raw inputs and run each one through the offline evaluation code and through the serving path, then compare the outputs. If they differ, I'd compare step by step: the preprocessed tensor first, then outputs layer by layer, until I find where they split. In my experience it's usually one of a few things. The model is still in training mode in serving, so dropout is randomly zeroing units and batch norm is using the statistics of a tiny serving batch. Or preprocessing differs: a different resize method, normalisation constants that don't match training, colour channels in the wrong order, or different text tokenisation. Or it's the artefact: an older checkpoint was deployed, some weights failed to load and were silently left at their initial values, or an export to lower precision changed the numbers. Once fixed, I'd add a test that runs the same fixed inputs through both paths on every release."

Red flag to avoid:

Blaming data drift immediately without first checking that both paths give the same output on the same input.

They may ask next:
  • How would you design preprocessing so training and serving cannot drift apart again?
  • If the outputs match exactly but live accuracy is still lower, what would you suspect next?
Say it in 60 seconds
Medium Behavioral round Fresher, Mid-level, Senior Practice question

28. Tell me about a deep learning model you trained that would not learn or badly underperformed. How did you find the cause?

What the interviewer is really testing:
Whether you debug training with a method, starting with the data and simple sanity checks, and can say what you would do differently.
Answer frame:

Situation: the task, the model and what the curves looked like.

Sanity checks: loss at initialisation, overfit one small batch, look at inputs and labels by eye.

Cause and fix: what it actually was and the change that proved it.

Lesson: the check you now run at the start of every project.

Sample spoken answer:

"At my last company I was training an image classifier for product categories, and validation accuracy sat at roughly chance for several epochs while training loss barely moved. Rather than tune hyperparameters, I went back to basics. The loss at the first step matched what I'd expect from random guessing, so the setup looked sane. Then I tried to overfit a single batch of thirty-two images, and even that failed, which told me the problem was the pipeline, not capacity. When I displayed images next to their labels, they didn't match. A recent change to the data loader sorted the file list but not the label list, so every image had a random label. Once I fixed the pairing, the model trained normally within an epoch. Since then, the first thing I do on any project is plot a grid of inputs with labels and make sure the model can overfit one batch."

Red flag to avoid:

A story where you tried random hyperparameters until it worked and cannot say what the actual cause was.

They may ask next:
  • What loss would you expect at initialisation for a ten-class problem?
  • Which checks would you automate so a teammate cannot hit the same bug?
Say it in 60 seconds
Medium Behavioral round Mid-level, Senior Practice question

29. Walk me through a deep learning project where you had very little labelled data. What did you do to make it work?

What the interviewer is really testing:
Whether you have real experience getting results from small datasets and made deliberate choices about pretraining, augmentation, labelling and evaluation.
Answer frame:

Constraint: how little data, why labels were expensive, and what good enough meant.

Approach: pretrained backbone, augmentation, and staged fine-tuning.

Labels: how you chose what to label next, and checked label quality.

Evaluation: how you kept results trustworthy with a small validation set.

Sample spoken answer:

"In one project we needed to spot surface defects on parts from factory photos, and we started with only about four hundred labelled images, most of them defect-free. Labelling needed an inspector's time, so it was expensive. I started from a pretrained image backbone, trained only a new head first and then fine-tuned the top blocks with a low learning rate. I used augmentations that matched real variation, like lighting changes, small rotations and blur, but avoided anything that could hide or invent a defect. Instead of labelling at random, I ran the model over unlabelled photos and sent the inspector the ones it was least sure about, which gave us far more useful examples per hour. Because the validation set was small, I used cross-validation and reported recall on defects, not overall accuracy. We reached the inspection team's target after two labelling rounds, and I learned that choosing what to label mattered as much as the model."

Red flag to avoid:

Describing a small-data project where you trained a large network from scratch and judged it only on overall accuracy.

They may ask next:
  • How did you handle the imbalance between defect and non-defect images?
  • Would self-supervised pretraining on your unlabelled photos have helped, and how would you test that?
Say it in 60 seconds
Hard Behavioral round Mid-level, Senior Practice question

30. Tell me about a time a deep learning approach was not the right answer, or a simpler model beat your neural network. What did you do?

What the interviewer is really testing:
Whether you choose tools by evidence rather than preference, and can accept and communicate a result that goes against your own work.
Answer frame:

Context: the problem, the data type and why deep learning seemed attractive.

Comparison: a fair baseline, the same splits and the metric that mattered.

Decision: what you shipped and why, including cost, latency and maintainability.

Communication: how you explained it to the team or stakeholders.

Sample spoken answer:

"On a churn prediction project at my last company, the team was keen to use a neural network on our customer table, and I built one with embeddings for the categorical fields. To be fair to it, I also trained a gradient-boosted tree model on the same splits with the same features. After tuning both, the tree model matched or beat the network on our main metric, trained in minutes instead of hours, and was much easier to explain to the retention team through feature importance. I shared both results side by side with the training cost and the serving latency and recommended the tree model. There was some disappointment, so I made the point that for mostly tabular data with a few dozen columns, that result is common, and that deep learning earned its place in our image and text work. We kept the network code in case the data grew."

Red flag to avoid:

A story where the simpler model is dismissed without a fair comparison, or where the result is hidden because it undercut your own work.

They may ask next:
  • What kinds of data make you reach for deep learning first, and which make you start with something simpler?
  • How did you make sure the comparison between the two models was fair?
Say it in 60 seconds
Were you asked something else? Share it A person checks every question before it goes on the site. No name is shown.
For the call itself

The questions above are the prep. The call has ten more.

ClapAssist is an AI interview assistant for Mac and Windows. It listens to the interview on your computer and shows you what to say, in short lines you can read while you talk. Your resume and notes are never stored on our servers. It stays out of screen share on every plan; only you can see it.

Download ClapAssist with 10 free minutes
Mac and Windows · Stays out of screen share · No card