What is a pointwise convolution?
A pointwise convolution is a `1×1` convolution that combines information across the input channels at each spatial location. Unlike a 3×3 convolution, it does not look at neighboring pixels.
How does it work?
- At one pixel location, the input feature map contains one value from each input channel.
- A
1×1filter computes a weighted combination of those values to produce one output channel. - Using multiple
1×1filters produces multiple output channels. The same filters are applied at every spatial location.
Example: Suppose a feature map has 16 input channels and we want 32 output channels.
- Each
1×1filter has 16 weights, one per input channel. - With 32 filters, the layer has
16 × 32 = 512weights (excluding biases). - The output has 32 channels, while its height and width stay unchanged when stride is
1.
PyTorch example:
nn.Conv2d(16, 32, kernel_size=1)
Why is it useful?
- Channel mixing: Combines features from different channels at the same image position.
- Channel projection: Increases or reduces channel count—for example, from 64 channels to 16 in a bottleneck block.
- Efficient CNN design: Often follows a depthwise convolution, which processes each channel separately.
Pointwise vs. depthwise convolution
- Depthwise `3×3`: Learns spatial patterns *within* each channel, without mixing channels.
- Pointwise `1×1`: Mixes *across* channels at each location, without directly expanding spatial context.
Together, they form a depthwise separable convolution. Its computational savings compared with a standard spatial convolution are explored in the next question.
Related concepts: “What is a depthwise convolution?” and “What is a grouped convolution in a CNN?”
Research: MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. Documentation: PyTorch Conv2d.
Sources & Research References
Learning Sequence
Deep Learning Curriculum
How does depthwise separable convolution reduce computation?
Explore Related Questions
Deepen your understanding across related Deep Learning topics.