Convolutional networks build in locality and translation equivariance, so they learn well from smaller datasets and run efficiently on edge hardware with mature tooling. Vision transformers model global context and scale better with large pretraining, so pretrained transformer backbones are often the strongest starting point when you can afford them. Choose a CNN for tight latency, edge deployment or limited data, and a transformer or hybrid when you have compute and a strong pretrained backbone.
Why interviewers ask this
This tests whether you understand inductive bias and deployment constraints rather than following trends. Interviewers want the core difference, built-in assumptions against learned global attention, plus the practical side: data requirements, attention cost at high resolution and hardware support. They value candidates who have measured both on a real problem, because benchmark results rarely transfer cleanly to a specific dataset and device.
How to structure your answer
- Explain the inductive biases of convolutions.
- Explain what attention adds and what it costs.
- Cover data, resolution and hardware constraints.
- Say how you would decide empirically.
Example answer
The core difference is inductive bias. Convolutions assume that nearby pixels are related and that a pattern means the same thing wherever it appears, which is usually true for images, so CNNs learn efficiently from modest data. Transformers make fewer assumptions and learn relationships across the whole image through attention, which helps with global context and scales very well with large pretraining, but attention cost grows quickly with the number of tokens, so high resolution inputs get expensive. On the practical side, CNNs have mature support on edge accelerators and quantise predictably, while transformer support on small devices has improved but can still be patchy. So for a real time model on an embedded board, I would start with a CNN. For a cloud service where accuracy matters most and I can fine-tune a large pretrained backbone, I would try a transformer or a hybrid. In the end I measure. On a document layout task, a pretrained transformer backbone beat our CNN clearly because global context mattered, while on a factory camera task the CNN was just as accurate and far cheaper to run.
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
- Why do vision transformers need more data when trained from scratch?
- How do windowed or hierarchical transformers handle high resolution images?
- What makes a model hard to quantise for edge hardware?
Related computer vision 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