Dilated convolution

Also known as: atrous convolution

On this page 7

Dilated convolution, also called atrous convolution, is a convolution in which the kernel elements are spaced apart by a dilation rate, so the filter samples the input at gaps instead of at adjacent positions. In neural networks, this lets a layer cover a much larger receptive field with the same number of weights and without pooling or striding, which preserves the spatial or temporal resolution of the feature map.

The idea originated in signal processing as the “algorithme à trous” for wavelet transforms, and it entered deep learning through semantic segmentation models such as DeepLab and the context modules of Yu and Koltun, and through audio models such as WaveNet. It is now a standard tool in dense prediction, speech synthesis and sequence modeling with convolutional layers.

How dilated convolution spaces the kernel

A standard convolution with dilation rate r = 1 multiplies each kernel weight with adjacent input values. With dilation rate r, the kernel skips r – 1 positions between taps, which is equivalent to inserting zeros between kernel elements. A one-dimensional output is computed as y[i] = sum over k of x[i + r·k] · w[k], so the weights are unchanged and only the sampling pattern grows.

The effective kernel size of a kernel of size k at rate r is k + (k – 1)(r – 1). A 3×3 kernel at rate 2 spans 5×5 pixels, and at rate 4 it spans 9×9 pixels, while still using only nine weights per channel pair. The table shows how the span grows for a 3×3 kernel.

Dilation rateEffective spanWeights per filter slice
13×39
25×59
49×99
817×179
1633×339
Effective span of a 3×3 kernel at different rates

In practice, frameworks expose dilation as a layer parameter next to kernel size, stride and padding. To keep the output the same size as the input with stride 1, padding must equal r·(k – 1)/2 for odd kernel sizes.

Receptive field growth in stacked layers

The main benefit appears when dilated layers are stacked with exponentially increasing rates such as 1, 2, 4, 8. Each layer adds (k – 1)·r to the receptive field, so with kernel size 2 or 3 the receptive field grows exponentially with depth while the parameter count grows only linearly. WaveNet used this pattern with causal one-dimensional convolutions to cover thousands of audio samples.

The comparison below shows the receptive field of four stacked 3×3 layers under different designs.

DesignReceptive fieldOutput resolution
Standard convolutions9×9Full
Dilation rates 1, 2, 4, 831×31Full
Stride 2 in each layer31×31One sixteenth per side
Pooling after each layerLargeReduced, needs upsampling
Receptive field after four 3×3 layers

Dilation therefore offers context without downsampling, which matters wherever the network must produce an output for every pixel or time step.

Dilated convolution is one of several ways to manage resolution and context in a convolutional neural network. It differs from striding and pooling, which reduce resolution, and from transposed convolution, which increases it.

OperationEffect on resolutionEffect on receptive field
Dilated convolutionPreserved with stride 1Enlarged at no extra weight cost
Strided convolutionReducedEnlarged through downsampling
Pooling layerReducedEnlarged, no learned weights
Transposed convolutionIncreasedUsed for upsampling
Depthwise separable convolutionUnchangedSame as kernel, fewer weights
Large dense kernelPreservedEnlarged, many more weights
Dilated convolution and neighboring operations

These operations combine well. DeepLab pairs dilation with depthwise separable convolution, and many encoder-decoder models such as U-Net variants insert dilated blocks at the bottleneck to add context before the decoder restores resolution.

Where dilated convolution is used

Dilated convolution is most valuable in tasks that need dense, high-resolution output together with wide context. Typical applications include:

  • Semantic segmentation, where atrous spatial pyramid pooling runs parallel branches with rates such as 6, 12 and 18 to capture objects at multiple scales.
  • Audio generation and speech, where causal dilated stacks model long waveforms sample by sample.
  • Temporal convolutional networks for time series, as an alternative to recurrent neural networks with parallel training.
  • Medical image analysis and remote sensing, where small structures and wide context matter at once.
  • Keyword spotting and sequence labeling on edge devices with tight parameter budgets.

Gridding artifacts and other limitations

The best-known weakness is the gridding effect. When several layers share the same large rate, each output depends on a sparse checkerboard of inputs, and neighboring outputs see disjoint sets of pixels. This produces grid-like artifacts and loses local detail, especially for thin structures.

Dilation also brings hardware and design trade-offs. Strided memory access can be slower than dense convolution on some accelerators, and very large rates on small feature maps waste computation on padding. The table summarizes common problems and remedies.

IssueCauseTypical fix
Gridding artifactsRepeated identical large ratesUse rates without common factor, such as 1, 2, 5
Loss of fine detailSparse sampling of local neighborhoodAdd standard convolutions or skip connections
Wasted computationRate larger than feature mapCap rate relative to map size
Slow inferenceIrregular memory accessBenchmark against strided alternatives
Common issues and fixes

The “hybrid dilated convolution” design addresses gridding by choosing rates so that the combined sampling pattern covers every input position. A rule of thumb is to avoid rate sequences that share a common divisor greater than one.

Understanding it simply

A normal filter looks at a small patch of neighboring pixels. A dilated filter looks at pixels with gaps between them. It uses the same number of checkpoints but spreads them out.

Think of nine friends standing in a square to watch a field. If they stand close together, they see a small area. If they spread out, the same nine people cover a much larger area. The picture keeps its full size, and the network still learns from wide surroundings.

Applied in practice

A team segmenting roads in 1,024×1,024 aerial images finds that its model breaks long roads into fragments. The network downsamples by a factor of 32, so thin roads only a few pixels wide disappear before the decoder can recover them.

The engineers replace the last two downsampling stages with dilated convolutions at rates 2 and 4, so the encoder output stays at one eighth of the input size instead of one thirty-second. They add a pyramid module with rates 1, 6, 12 and 18 and avoid repeating a single large rate to prevent gridding. Road continuity on their validation set improves noticeably, at the cost of about 40 percent more memory during training, which they accept for the gain in thin-structure accuracy.