What is a transposed convolution (sometimes called deconvolution), and when is it used?
Answer
A transposed convolution is a learnable linear operator whose matrix is the transpose of the matrix representing a corresponding forward convolution. Operationally, each input value scatters a scaled kernel into an output grid, with stride controlling the spacing and overlapping contributions summed. It can increase spatial resolution, but it is not a mathematical inverse and does not recover information destroyed by downsampling. It is commonly used in semantic-segmentation decoders, generative models, learned reconstruction, and other architectures that map low-resolution features to higher-resolution outputs.

Figure 1: A stride-2 transposed convolution decomposed into sparse expansion and learned filtering, including output-shape arithmetic.
(1) Learned Upsampling: Unlike fixed nearest-neighbor or bilinear interpolation, the layer learns how feature values contribute to surrounding output positions.
(2) Output Geometry: Kernel size, stride, padding, dilation, and output padding jointly determine the output shape; output padding resolves shape ambiguity but does not add zero-valued borders.
(3) Artifact Risk: Uneven overlap occurs when the kernel size is not divisible by stride and can produce checkerboard artifacts, especially in image generators.

Figure 2: Selection guide based on learned reconstruction, artifact sensitivity, pooling indices, and deployment constraints.
Mathematical Formulation:
Where:
and
are the input and output sizes along one spatial axis.
is stride,
is padding,
is dilation, and
is kernel size.
is output padding used to choose among otherwise ambiguous valid output sizes; it does not append learned pixels.
- The formula applies independently to width and, for 3D layers, depth by replacing
with the corresponding axis size.
Leave a Reply