Signal
Issue 18 · November 10, 2026 · 6 min read
Convolutional Neural Networks Explained for Chip Inspection
What a convolutional neural network is, why weight sharing wins, CNN vs vision transformer, and a from-scratch wafer defect classifier.
"A ConvNet for the 2020s" - Liu et al. (CVPR 2022, paper title)
Every chip in your phone was imaged and checked for defects many times before it shipped. More and more of that looking is done by a convolutional neural network.
This week we're talking about the convolutional neural network, the architecture that made computer vision work and still runs most of it in production, and yes, this can get you a very comfortable job.
Here's the idea: a convolutional neural network (CNN) is a neural network that looks at an image through small filters that slide across it. Each filter learns to detect one local pattern, such as an edge, a scratch or a dot, and the same filter is reused at every position. Stacking these layers lets the network build complex shapes out of simple ones.
A convolution at one position is just a small weighted sum over a patch of the image: The filter weights w are the same for every position (i, j). That single fact, weight sharing, is the whole argument for CNNs. A 3x3 convolution with 64 input and 64 output channels has 36,864 weights no matter how big the image is. A plain dense layer from a 224x224 color image to just 1,000 units needs over 150 million.
Semiconductor fabs are one of the places this matters most. Wafers are imaged at many steps of production, defect patterns such as scratches, particles and edge rings point to specific tools or process steps that are going wrong, and CNN-based classifiers now sit inside that inspection loop. Some published studies on wafer defect datasets report accuracy above 99%. The hard part in a real fab is everything around the model: rare defect classes, new defect types, and an inspection line that cannot wait for a slow model.
What is a convolutional neural network, compared with a regular neural network?
A regular fully connected network gives every input pixel its own weight into every neuron, so it has to learn "a scratch at the top left" and "a scratch at the bottom right" as separate facts. A CNN learns "scratch" once and slides that detector everywhere. That makes it far smaller, much more data-efficient on images, and naturally tolerant of where in the frame an object appears.
Convolutional neural network vs transformer: which one should you use?
Vision transformers split an image into patches and let every patch attend to every other one. They build in fewer assumptions about images, so they shine with huge pretraining datasets and struggle without them. CNNs build in locality and weight sharing, so they learn faster from less data and run cheaply on edge hardware. The 2022 paper quoted at the top, ConvNeXt, showed a modernized pure CNN matching comparable transformers on ImageNet.
| Convolutional neural network | Vision transformer | |
|---|---|---|
| How it sees | Small filters sliding over the image | Image patches attending to each other |
| Built-in assumptions | Locality and weight sharing | Very few |
| Data needed | Moderate, works well on small datasets | Large, or a strong pretrained model |
| Cost at high resolution | Grows linearly with pixels | Attention grows with the square of the patch count |
| Where it wins | Edge devices, inspection, real-time detection | Large-scale pretraining, multimodal models |
Now I'm going to explain what this means for you:
The Skill Employers EXPECT
Learn convolution as arithmetic, not magic. Convolutional neural network interview questions assume you can:
- Compute a 2D convolution by hand and in NumPy, with padding and stride
- Work out output shapes and parameter counts for a stack of conv and pooling layers
- Explain what max pooling buys you and what it throws away
- Build and train a small CNN in PyTorch and read its training curves
- Say when a CNN is the right call over a vision transformer, and why
If you cannot compute a conv layer's parameter count on a whiteboard, you do not yet know what you are training.
The Skill That Separates You
Learn to prove the architecture earns its place.
In inspection work, a model that is right for the wrong reason ships and then fails on the next product. You should know how to:
- Show that simpler features, such as overall brightness, cannot do the job before reaching for convolutions
- Implement convolution as a matrix multiply (im2col), which is how most libraries actually run it
- Evaluate with macro F1 when the rare defect classes matter more than the common clean one
- Hit an inspection latency budget on CPU without giving back the accuracy
- Explain weight sharing and translation invariance well enough to defend the design to a skeptical engineer
The Project To Learn These Skills This Week
Build a wafer defect classifier from hand-written convolutions and prove a flat view of the same pixels cannot match it. This is a graded Pro project on GRADuateML: Wafer Defect Classification From Scratch. You get 16x16 wafer images labeled clean, scratch, particle or edge ring, normalized so brightness tells you nothing, with defects at random positions and orientations. Every milestone is graded against a hidden set. Not on Pro? The free challenge below is convolution as a matrix multiply, by hand.
Requirements (each one is a graded milestone):
- Confirm that brightness summaries alone cannot tell the classes apart.
- Beat a predict-clean-every-time baseline, then show a linear model on raw pixels stalls between 0.50 and 0.80 macro F1.
- Write 2D convolution and ReLU from scratch in NumPy.
- Implement max pooling and verify the output shape arithmetic.
- Build a bank of convolutional features and reach macro F1 of at least 0.92 and accuracy of at least 0.94.
- Score a full inspection batch inside the latency budget, then explain why weight sharing, not depth, won.
This project teaches a practical lesson for production ML:
The right inductive bias beats a bigger model. Build in what you know about the data.
If you want to sharpen your machine learning skills even more, I also selected a free challenge problem for you this week. It is convolution rewritten as a single matrix multiply:
If you learned something from this newsletter, make sure to forward it to a friend.
GRADuateML
The full wafer defect classification build, graded against a hidden set, is part of GRADuateML Pro.