Skip to content
tezvyn:

Top 30 Deep learning Interview Questions and Answers

30 multiple-choice questions on Deep learning, drawn from 30 bites out of the 64 tagged Deep learning on Tezvyn. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.

30 questions. Pick an answer, or open “Show the answer” to read it.

Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.

  1. Question 1 of 30

    What fundamental capability do activation functions primarily provide to neural networks?

    Show the answer

    Answer: c · They introduce non-linear transformations, allowing the network to model complex, non-linear relationships.

    The card emphasizes that activation functions introduce non-linearity, which is crucial for neural networks to learn complex patterns beyond simple linear relationships. Without non-linearity, a multi-layered network would collapse into a single linear model. Other options describe secondary effects or unrelated concepts.

    Read the full bite: Activation Functions: Making Neural Networks Nonlinear

  2. Question 2 of 30

    What is the most significant consequence of the vanishing gradient problem in deep neural networks?

    Show the answer

    Answer: b · Early layers of the network fail to learn effective features from the input data.

    The card states that vanishing gradients cause 'the gradients for the earliest layers become so small they effectively vanish, and those layers stop learning,' meaning they cannot learn effective features. Option D is incorrect because vanishing gradients lead to a failure to learn, not typically overfitting. Options C and D are general problems but not the specific, direct consequence on the learning of early layers.

    Read the full bite: The Vanishing Gradient Problem

  3. Question 3 of 30

    For which scenario would an LSTM be preferred over a traditional RNN?

    Show the answer

    Answer: c · Tasks requiring memory of context from distant points in a long sequence.

    LSTMs are specifically designed to overcome the vanishing gradient problem in traditional RNNs, enabling them to maintain and utilize information from far back in a sequence. For short-term dependencies, a simpler RNN might be more efficient, and for large-scale parallel tasks, Transformers are often preferred.

    Read the full bite: LSTMs: Giving Neural Networks a Longer Memory

  4. Question 4 of 30

    When applying a 3x3 convolution to the top border of a bright photo, which padding mode preserves spatial dimensions while avoiding dark vignettes and flat streaking?

    Show the answer

    Answer: c · Reflect-padding, because it mirrors edge pixels to assume continuity across the boundary

    Reflect-padding mirrors edge pixels to maintain continuity across the boundary, avoiding both the dark vignettes caused by zero-padding and the flat streaking caused by replicate-padding. Replicate-padding is tempting because it avoids darkening, but it creates frozen-edge artifacts by repeating the same pixel value outward.

    Read the full bite: Zero-padding vs reflect vs replicate padding and their visual artifacts

  5. Question 5 of 30

    What problem does loss scaling primarily address in mixed-precision training?

    Show the answer

    Answer: d · The potential for small gradient values to become zero in FP16.

    Loss scaling's primary purpose is to inflate small gradient values before converting them to FP16, preventing them from becoming zero (underflow), which would otherwise cause training to fail. While a master copy of weights is kept in FP32 for stability, loss scaling directly ensures the gradients themselves are numerically viable.

    Read the full bite: Mixed-Precision Training: Faster Training with Less Memory

  6. Question 6 of 30

    What is the core mechanism by which AdamW ensures L2 regularization is consistently applied, unlike the original Adam?

    Show the answer

    Answer: c · It applies the weight decay as a direct subtraction from the weights, independent of the gradient's adaptive scaling.

    The card states AdamW applies weight decay by directly subtracting a fraction of the weight's value in a separate step, decoupling it from the adaptive learning rate mechanism. Option A is incorrect because AdamW doesn't just reorder the application within the gradient calculation; it completely separates it and applies it directly to the weights.

    Read the full bite: AdamW: Decoupling Weight Decay for Better Generalization

  7. Question 7 of 30

    Which scenario best illustrates a core benefit of using a parameter server architecture?

    Show the answer

    Answer: d · Training a deep learning model with billions of parameters that cannot fit into a single machine's memory.

    The card states that parameter servers are used to "train models too large for one machine's memory," making option D a direct application of its core benefit. Option C is incorrect because the card warns that for smaller models, the communication overhead can make training slower.

    Read the full bite: Parameter Servers for Distributed ML Training

  8. Question 8 of 30

    In a Convolutional Neural Network, what does a single feature map primarily represent?

    Show the answer

    Answer: b · The presence and location of a specific learned pattern, such as an edge or a texture.

    A feature map highlights where a specific pattern (like an edge or curve) appears, showing 'activations' where its specific pattern was found. It does not represent an entire object, which is a common misconception.

    Read the full bite: Feature Maps: What a Neural Network 'Sees'

  9. Question 9 of 30

    What is the primary scenario where Horovod provides significant value for deep learning training?

    Show the answer

    Answer: d · When a large deep learning model's training is compute-bound on a single machine.

    Horovod is specifically designed for situations where training large deep learning models is bottlenecked by compute time on a single GPU. It is not recommended for I/O-bound problems or small datasets due to added overhead, and it primarily facilitates data parallelism rather than model parallelism.

    Read the full bite: Horovod: Scale ML Training Across Many GPUs

  10. Question 10 of 30

    Which statement accurately distinguishes the forward and reverse processes in a denoising diffusion model?

    Show the answer

    Answer: b · The forward process is a fixed Markov chain that gradually adds Gaussian noise, while the reverse process uses a learned network to iteratively denoise samples.

    The forward process is fixed and gradually adds Gaussian noise over many steps, whereas the reverse process is learned and iteratively denoises random noise back into data. Option D is wrong because the forward process is not learned and generation is not single-step, and Option C incorrectly swaps the fixed and learned roles while wrongly assuming a deterministic reverse path.

    Read the full bite: Explain Denoising Diffusion models and forward/reverse processes.

  11. Question 11 of 30

    What is the primary benefit of ReLU over sigmoid and tanh, particularly in deep neural networks?

    Show the answer

    Answer: c · It prevents gradients from diminishing to zero for positive inputs during backpropagation.

    The card explicitly states that older functions suffered from the "vanishing gradient" problem and that ReLU's constant '1' derivative for positive values "prevents the gradient from vanishing". While ReLU is faster (option B), the primary problem it solves for deep networks, as explained in the "WHY IT EXISTS" section, is the vanishing gradient problem, which directly hinders learning.

    Read the full bite: ReLU: The 'On/Off' Switch for Neural Networks

  12. Question 12 of 30

    What mathematical principle is fundamental to backpropagation's ability to efficiently adjust neural network weights?

    Show the answer

    Answer: c · The chain rule of calculus for gradient computation.

    The card states that backpropagation "Using the chain rule from calculus, it calculates the gradient of the loss with respect to every single weight in the network." This mathematical principle is crucial for efficiently determining how each weight contributes to the overall error. While other mathematical concepts are used in neural networks, the chain rule is central to the backward pass of backpropagation. Matrix inversion is not used for weight updates in gradient-based optimization.

    Read the full bite: Backpropagation: How Neural Networks Learn from Mistakes

  13. Question 13 of 30

    How does Dropout primarily enable a neural network to generalize better?

    Show the answer

    Answer: a · By forcing individual neurons to learn more robust features independently.

    The card explains that Dropout "forces the network to learn more robust features instead of relying on specific neurons" and uses the analogy of "forcing every expert to become more capable on their own." This mechanism of encouraging independent feature learning is how it primarily improves generalization. Option D describes a common interpretation of Dropout's effect, but the direct mechanism is the forced independence of neurons, not the explicit creation of multiple voting networks.

    Read the full bite: Dropout: Forcing a Network to Generalize

  14. Question 14 of 30

    What was the primary factor enabling AlexNet's breakthrough in image recognition?

    Show the answer

    Answer: c · The synergistic combination of deep convolutions with ReLU, dropout, and GPU training.

    AlexNet's success was not due to a single innovation but rather the effective combination of several techniques, including deep convolutional layers, ReLU activation, dropout, and GPU parallelization. The card explicitly states its novelty was 'combining new techniques' and describes it as a 'brilliant recipe' of ingredients.

    Read the full bite: AlexNet: The CNN That Sparked the Deep Learning Boom

  15. Question 15 of 30

    What is the primary purpose of the learned scaling factor (gamma) and shifting factor (beta) in Batch Normalization?

    Show the answer

    Answer: c · To enable the network to learn and apply an optimal mean and variance for each layer's inputs.

    After the initial normalization to mean zero and variance one, gamma and beta allow the network to learn and apply an optimal scale and mean for the activations, potentially deviating from zero and one if it aids training. Option B describes the initial normalization step, which occurs before gamma and beta are applied.

    Read the full bite: Batch Normalization: Stabilizing Neural Network Training

  16. Question 16 of 30

    What is the primary mechanism by which Residual Networks (ResNets) overcome the accuracy degradation problem in very deep neural networks?

    Show the answer

    Answer: c · They enable layers to learn a residual function F(x) that adjusts the input x, rather than learning a complete mapping H(x).

    ResNets address the degradation problem by having layers learn a small correction (residual) F(x) to the input x, rather than the entire output H(x). This makes it easier for the network to learn the identity function or small adjustments. Distractor C is incorrect because the card explicitly states that degradation was not overfitting, and ResNets enable deeper networks, which typically means more parameters.

    Read the full bite: Residual Networks (ResNets): Go Deeper, Not Worse

  17. Question 17 of 30

    What is the primary function of the 1x1 convolution used as a "bottleneck" before the 3x3 and 5x5 convolutions in an Inception module?

    Show the answer

    Answer: d · To reduce the channel depth of the input, making subsequent operations more computationally efficient.

    The 1x1 bottleneck convolution's main purpose is to reduce the input's channel depth, which drastically cuts down the computational expense of the following larger convolutions. While 1x1 convolutions can capture local features, their specific role as a bottleneck is not to expand the receptive field, but to manage computational load.

    Read the full bite: GoogLeNet's Inception Module: Wider, Not Just Deeper

  18. Question 18 of 30

    What is the primary advantage of using transfer learning for computer vision tasks when your specific dataset is small?

    Show the answer

    Answer: d · It leverages general features learned from a large, diverse dataset, reducing the need for extensive specific data.

    Transfer learning's main advantage is reusing foundational knowledge (general features like edges and textures) learned from a massive dataset, meaning the model needs less new data to adapt to specific patterns. Option C is incorrect because transfer learning explicitly avoids training from scratch.

    Read the full bite: Transfer Learning: Don't Train Vision Models from Scratch

  19. Question 19 of 30

    What primary bottleneck in early object detection did the Region Proposal Network (RPN) aim to solve?

    Show the answer

    Answer: b · The slow and separate process of generating potential object regions.

    The card explicitly states that the 'initial region proposal step became the major performance bottleneck' and the RPN was created to solve this by integrating proposal generation directly. Option C describes the classification stage, which is a subsequent step, not the RPN's primary concern.

    Read the full bite: Region Proposal Network (RPN): The 'Where to Look' Engine

  20. Question 20 of 30

    Which task is generally least appropriate for a multimodal model?

    Show the answer

    Answer: b · Condensing a lengthy written article into a brief summary

    The card states that for tasks confined to a single data type, like text summarization, a specialized single-modality model is more efficient and a multimodal approach is overkill. The other options (text-to-image, visual question answering, cross-modal retrieval) are all examples explicitly given where multimodal models excel due to their ability to connect different data types.

    Read the full bite: Multimodal Models: Beyond Just Text

  21. Question 21 of 30

    Why does SSD suffer degraded small-object accuracy when predictions from shallow feature maps are omitted?

    Show the answer

    Answer: c · Early layers retain fine spatial resolution necessary for detecting small objects, so omitting them degrades localization accuracy.

    The card explains that early layers carry fine detail and that combining multiple feature map resolutions handles size variation, so discarding shallow maps removes high-resolution predictions needed for small objects. Option D is tempting because detection systems often use proposals, but SSD explicitly eliminates all proposal generation to remain a single network.

    Read the full bite: SSD: Real-Time Detection Without Region Proposals

  22. Question 22 of 30

    Which statement best describes how Focal Loss addresses class imbalance during model training?

    Show the answer

    Answer: a · It dynamically scales down the loss contribution from easily classified examples.

    Focal Loss works by dynamically reducing the loss for well-classified (easy) examples, allowing the model to focus its training capacity on hard examples. While oversampling or fixed weighting (options A and B) are common strategies for class imbalance, they are not the mechanism of Focal Loss, which modifies the loss function itself based on classification difficulty.

    Read the full bite: Focal Loss: Forcing Models to Learn from Hard Examples

  23. Question 23 of 30

    In which scenario would instance segmentation be the most appropriate computer vision technique?

    Show the answer

    Answer: b · Precisely outlining and counting each individual tumor cell in a medical image for analysis.

    Instance segmentation is ideal for tasks requiring the precise outlining and counting of individual objects, such as distinct tumor cells. Option C describes semantic segmentation, while options B and D are better suited for object detection, which does not provide pixel-level masks for individual instances.

    Read the full bite: Instance Segmentation: Counting and Outlining Objects

  24. Question 24 of 30

    How do Fully Convolutional Networks (FCNs) primarily achieve pixel-level labeling for semantic segmentation?

    Show the answer

    Answer: b · By replacing fully-connected layers with convolutions and employing upsampling with skip connections.

    FCNs achieve pixel-level labeling by replacing traditional fully-connected layers with convolutions to preserve spatial data and then using upsampling layers, often with skip connections, to restore the original image dimensions. Option A describes the inefficient method FCNs were designed to replace.

    Read the full bite: Fully Convolutional Networks: From Image to Segmentation Map

  25. Question 25 of 30

    What is the primary advantage of using dilated convolutions over traditional pooling layers in tasks like semantic segmentation?

    Show the answer

    Answer: a · It allows the network to process a wider context while maintaining high spatial resolution.

    Dilated convolution expands the receptive field by skipping pixels, allowing the model to see a broader context without downsampling, which preserves the high spatial resolution crucial for pixel-level tasks. Option B is incorrect because dilated convolution explicitly skips pixels, leading to less dense local sampling, not denser.

    Read the full bite: Dilated Convolution: A Wider View Without More Parameters

  26. Question 26 of 30

    What is the primary advancement DeepLab offers over traditional object detection methods?

    Show the answer

    Answer: c · It assigns a precise class label to every individual pixel in an image.

    DeepLab's fundamental contribution is pixel-level semantic segmentation, meaning it classifies every pixel, creating a precise mask for objects, unlike object detection which only provides bounding boxes. While DeepLab does incorporate techniques for multi-scale understanding and efficiency, its defining advancement over object detection is this granular, pixel-accurate output.

    Read the full bite: DeepLab: Pixel-Level Semantic Image Segmentation

  27. Question 27 of 30

    Why do early layers in a very deep tanh network typically receive negligible gradients?

    Show the answer

    Answer: b · Because backpropagation repeatedly multiplies tanh derivatives in [0,1] across layers

    The root cause is the chain rule's repeated multiplication of bounded derivatives across depth, collapsing the gradient magnitude. Blaming tanh's squashing alone misses the critical role of depth in the multiplicative effect.

    Read the full bite: Explain vanishing and exploding gradients and common mitigation techniques.

  28. Question 28 of 30

    During training, what does dropout do to hidden unit activations to prevent overfitting?

    Show the answer

    Answer: a · It randomly sets a fraction of them to zero on each forward pass to stop co-adaptation.

    Dropout randomly zeros hidden activations during training to prevent neurons from co-adapting to specific partners, which improves generalization. Option B is tempting but wrong because dropout does not permanently remove neurons; the full network is retained and used at test time.

    Read the full bite: What is overfitting and how does Dropout prevent it?

  29. Question 29 of 30

    Which scenario presents the highest risk of unrecoverable accuracy loss when applying model pruning?

    Show the answer

    Answer: b · Aggressively reducing parameters in a small, already efficient model for an embedded system.

    The card explicitly warns against "aggressive pruning on small models where most parameters are likely critical; the risk of unrecoverable accuracy loss is much higher." While pruning is not recommended as the first step in training (option D), the primary concern there is misapplication and added complexity, not necessarily the highest risk of unrecoverable accuracy loss on the model itself.

    Read the full bite: Model Pruning: Making ML Models Smaller and Faster

  30. Question 30 of 30

    What is the primary advantage of employing model compilation in machine learning workflows?

    Show the answer

    Answer: d · It enables a single model definition to be efficiently deployed across various hardware platforms.

    Model compilation's core purpose is to translate a high-level model into an optimized, hardware-specific artifact, solving the 'write once, run anywhere' problem for efficient inference across diverse devices. While compilation involves optimization, it is explicitly for inference performance, not training acceleration or facilitating early-stage architectural changes.

    Read the full bite: Model Compilation: Bridging Models and Hardware

Could you explain these out loud?

That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon