Convolutional networks interview questions
8 questions across 5 sections, in the order you would learn them. Every answer here is one that works — but an answer you have read is not an answer you can give, so use Test yourself and say it out loud first.
Convolutional networks
Read the section that teaches thisIf this comes up in an interview
Why are convolutions suited to images?
They exploit locality, since nearby pixels are related, and translation invariance, since a feature means the same thing wherever it appears. Sharing the same filter weights across the image also means far fewer parameters than a fully connected layer.
Would you train a vision model from scratch?
Almost never. Start from a pretrained backbone, replace the head for your classes, and fine-tune. It needs far less data and compute and usually outperforms training from nothing unless your domain is very unlike the pretraining data.
Have vision transformers replaced convolutional networks?
At large scale with large datasets they match or beat them. Convolutional networks remain cheaper, faster and better with limited data, so for most production problems they are still a reasonable default.
Beyond classification
Read the section that teaches thisIf this comes up in an interview
What is the difference between detection and segmentation?
Detection locates objects with bounding boxes and labels. Segmentation labels every pixel, either by class in semantic segmentation or separating individual objects in instance segmentation.
How do you choose data augmentations?
Only transformations that preserve the label. Flips suit natural photographs but change a 6 into a 9 and make text unreadable, so the choice depends on the domain.
Convolution arithmetic and a CNN in PyTorch
Read the section that teaches thisIf this comes up in an interview
What is the output shape of a 3x3 convolution with stride 2 and padding 1 on a 64x64x32 input with 64 filters, and how many parameters does it have?
Spatially floor((64 - 3 + 2) / 2) + 1 = 32, so 32x32x64. Parameters: 3 x 3 x 32 x 64 = 18,432 weights plus 64 biases, 18,496.
Then they push further
Why do residual connections help very deep networks train?
Each block learns a correction added to its input, so an unhelpful block can stay close to the identity, and gradients flow directly through the additions to early layers without shrinking at every layer.
What gets marked up. Marked up for getting the arithmetic right out loud. Interviews for vision roles often include exactly this.
Vision transformers and image-text models
Read the section that teaches thisIf this comes up in an interview
How does CLIP enable zero-shot classification?
It learns a shared embedding space for images and text by training on image and caption pairs with a contrastive objective. To classify, embed the image and a text prompt for each class, and pick the class whose text embedding is most similar to the image.
Then they push further
When would a linear probe beat zero-shot?
When you have even a modest labelled set, or when your classes are described poorly by short text, such as internal product codes. The probe learns directly from your examples.
Detection and segmentation in practice
Read the section that teaches thisIf this comes up in an interview
Explain mean average precision for object detection.
For each class, rank predictions by confidence, match them to ground truth boxes by IoU above a threshold, and compute the area under the precision-recall curve: that is average precision. Mean over classes gives mAP. COCO-style mAP also averages over IoU thresholds from 0.5 to 0.95.
Then they push further
Your detector has good mAP but misses small objects the business cares about. What do you do?
Measure mAP by object size to confirm, then try higher input resolution, tiling large images, anchor or architecture settings suited to small objects, and more labelled small examples.
What gets marked up. Marked up for IoU matching, the precision-recall curve, and breaking the metric down by slice.
These are the questions for one topic. The whole question bank covers every topic on the site.