Diagnose Vanishing Gradients in a Deep Transaction Fraud Network
Last updated: November 29, 2026
Quick Overview
A 12-layer fully connected fraud network with sigmoid activations trains for hours while its loss barely moves, and the first layers' weights hardly change. Explain what is happening and how ReLU, initialization, normalization and residual connections fix it.
Capital One
November 29, 20260
0
0 solved
A 12-layer fully connected fraud network with sigmoid activations trains for hours while its loss barely moves, and the first layers' weights hardly change. Explain what is happening and how ReLU, initialization, normalization and residual connections fix it.
Engineers on Capital One's fraud and ML platform teams are expected to debug training runs, not just call fit. This fundamentals question checks that you can reason about backpropagation and know the standard remedies.
What the Interviewer Expects
- Explains backpropagation as a product of layer derivatives
- Notes sigmoid's derivative is at most 0.25
- Explains how ReLU and He initialization keep gradient scale
- Describes batch or layer normalization and residual connections
- Proposes checking per-layer gradient norms to confirm
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- What is the opposite problem and how do you handle it?
- What is a dying ReLU and how do you avoid it?
- Would you even use a 12-layer MLP for this problem?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Symptom: loss nearly flat, gradients at the first layers tiny compared with the last layer. I would confirm by logging the gradient norm per layer for a few batches....
Approach
By the chain rule, the gradient reaching layer 1 is a product of terms, one per layer, each including the activation derivative and the weight matrix. For the sigmoid, $\sigma'(z) = \sigm...