Convolutional Neural Networks

1x1 convolution

A 1x1 convolution uses kernels that are one pixel wide and one pixel tall. With no spatial neighbourhood to look at, it does only one thing: at each position independently, it takes the vector of channel values there and produces a new vector by a learned linear combination. In other words it is a tiny fully-connected layer applied identically to every pixel, mixing and re-projecting channels while leaving height and width untouched. Think of it as 'recoloring' each pixel's feature vector.

Precisely, a 1x1 conv with C_in input and C_out output channels holds a weight matrix of shape (C_out, C_in) (plus biases) and computes, at every spatial location, y = W x where x is the C_in-vector of input features at that location. Its cost is H*W*C_in*C_out multiply-adds and its parameters number C_in*C_out — far cheaper than a 3x3, which is 9 times as many parameters and FLOPs. Crucially it can change the channel count: shrink it (a bottleneck) or grow it (an expansion).

This makes 1x1 convolution a workhorse of efficient architectures. Network in Network introduced it; GoogLeNet/Inception use it to cut channels before expensive 3x3 and 5x5 branches; ResNet's bottleneck block sandwiches a 3x3 between a 1x1 that reduces channels and a 1x1 that restores them, cutting compute dramatically; and depthwise separable convolutions pair a depthwise spatial step with a 1x1 pointwise step that does all the cross-channel mixing. Whenever you need to adjust depth, fuse channel information, or insert a cheap nonlinearity-bearing layer, the 1x1 conv is the tool.

A 1x1 conv from 256 to 64 channels on a 56x56 map costs 256*64 = 16,384 parameters and projects each of the 56*56 pixels' 256-vector down to 64 — a 4x channel bottleneck with no change to spatial size.

Why it matters: a 1x1 conv is mathematically identical to applying the same dense layer at every pixel. This equivalence is why fully-convolutional networks can turn a classification head into a per-pixel head for segmentation simply by reading dense layers as 1x1 convolutions.

Also called
pointwise convolution1x1 convchannel mixing