Atrous (Dilated) Convolution Explained: How It Works and When to Use It

Atrous convolution spaces kernel taps to widen the receptive field with no extra weights or lost resolution.

Atrous (Dilated) Convolution Explained: How It Works and When to Use It
Written by TechnoLynx Published on 11 Jul 2026

Atrous convolution (also called dilated convolution) is an ordinary convolution whose kernel taps are spread apart: at rate r, the layer inserts r − 1 zeros between consecutive filter values, so the filter covers a wider patch of the input while keeping the same number of weights. A k×k kernel dilated by a factor d has an effective size of k + (k − 1)(d − 1), which means a 3×3 kernel at rate 2 sees the same 5×5 area as a 5×5 kernel but uses only 9 parameters. DeepLab uses it this way, to enlarge the field of view without shrinking the feature map.

How Atrous Convolution Spaces Out the Kernel

For each output location i, atrous convolution computes y[i] = Σ x[i + r·k] w[k], so the rate r is simply the stride with which the filter samples its input. Standard convolution in a 2D convolutional neural network is the special case r = 1. The names are all the same operation: “atrous convolution”, “hole convolution” and “dilated convolution” appear interchangeably in the segmentation literature. The word atrous comes from the French trous (holes), and the technique predates deep learning: it was developed in signal processing for computing the undecimated wavelet transform, a scheme known as the “algorithme à trous”. PyTorch’s documentation describes its dilation argument as controlling the spacing between kernel points, “also known as the à trous algorithm”.

Worked Example: Effective Kernel Size and Output Size

The table reads the effective-size formula k + (k − 1)(d − 1) for a 3×3 kernel at increasing rates.

Kernel Dilation rate d Effective size Weights
3×3 1 3×3 9
3×3 2 5×5 9
3×3 4 9×9 9
3×3 8 17×17 9

The effective size grows linearly with the rate while the parameter count stays fixed at 9.

Output size follows from the same substitution. Dumoulin and Visin’s convolution arithmetic guide (2016) gives the dilated output size by replacing k with the effective size in the usual formula, o = ⌊(i + 2p − k − (k − 1)(d − 1)) / s⌋ + 1. Their illustrative case is a 3×3 kernel at dilation 2 over a 7×7 input with no padding and unit stride. Working it through: the effective size is 3 + 2×1 = 5, so the output is 7 − 5 + 1 = 3 per side. Padding by d·(k − 1)/2 keeps the input’s spatial size; with k = 3 that is padding equal to the rate, which is the arithmetic consequence of the same formula.

How Does the Dilation Rate Widen the Receptive Field Without Adding Parameters or Reducing Resolution?

The receptive field widens because the filter is upsampled by inserting zeros, but those zeros are never multiplied: only the non-zero taps take part, so both the number of filter parameters and the number of operations per output position stay constant. Resolution is preserved because nothing is subsampled; DeepLab’s authors (Chen et al., 2016) describe convolving the full-resolution feature map with a filter “with holes” and computing responses at every position, which gives explicit control over the spatial resolution of feature responses.

Compare the two ways of widening context. A larger dense kernel (say 7×7) widens the field but adds weights and compute. Pooling or striding widens the field cheaply but reduces resolution. Dilation is the third route: wide field, same weights, same map size.

Stacking is where the effect compounds. A single dilated layer extends reach linearly, but stacking layers with rates 1, 2, 4, 8 grows the receptive field exponentially. Yu and Koltun’s context module (2016) was built on exactly this property: dilated convolutions support exponential expansion of the receptive field without loss of resolution or coverage.

In the DeepLab paper (Chen et al., 2016), a 3×3 kernel at rate 12 in VGG-16’s fc6 layer (DeepLab-LargeFOV), with fc6 and fc7 thinned to 1,024 of 4,096 filters, matched the direct VGG-16 adaptation (7×7 kernel, rate 4) while being 3.36 times faster with 20.5M instead of 134.3M parameters.

When Should You Use Dilated Convolution Instead of Pooling or Strided Convolution?

Use dilated convolution when the task needs a dense, per-pixel output that the backbone’s downsampling would otherwise decimate. Classification convolutional neural networks combine max-pooling and striding layer after layer, and the result is feature maps with sharply reduced spatial resolution. TensorFlow’s own documentation positions atrous convolution with bilinear interpolation as an alternative to transposed convolution in dense prediction tasks such as segmentation, optical flow and depth estimation.

Output Stride: The Dial Dilation Gives You

The trade is measured in output stride, the ratio of input image resolution to final output resolution. Classification backbones end at output stride 32. To halve that to 16, DeepLabv3 (Chen et al., 2017) sets the stride of the last resolution-reducing layer to 1 and replaces every subsequent convolution with an atrous convolution at rate 2, which yields denser feature responses without learning any extra parameters. Going to output stride 8 repeats the move on another block; DeepLabv3+ applies rate 2 and rate 4 to the last two blocks.

Simply deleting the stride does not work. Dilated Residual Networks (Yu, Koltun and Funkhouser, 2017) point out that removing subsampling to raise output resolution by a factor of 4 also shrinks each output unit’s receptive field by a factor of 4, which starves the prediction of context. Dilation in the following layers compensates, so the dilated units keep the receptive field of the original model. On a 224×224 input, that takes the final ResNet feature map from 7×7 to 28×28.

What Keeping Resolution Costs

Dilation removes the downsampling, but computing atrous features at full resolution is still costly. DeepLab’s authors note that pushing atrous convolution all the way to the original image resolution “ends up being too costly”, so they increased density by a factor of 4 with atrous convolution and recovered the rest with bilinear interpolation. DeepLabv3 reports a training-side cost as well: at training output stride 8 they could fit a batch of only 6, against 16 at stride 16 and 24 at stride 32, and the small batch hurt batch-normalisation fine-tuning enough that output stride 16 gave the best trade-off. DeepLabv3+ found that training at output stride 32 (no atrous convolution) scored about 1% to 1.5% below training at 16, so its authors prefer 16 or 8 “depending on the complexity budget”.

Gao (2023) puts the comparison fairly: downsampling is usually cheaper per layer because it runs at coarser resolution, but downsampling methods then spend compute upsampling and recovering detail, so they are not necessarily cheaper overall. The same paper shows a qualitative difference too: on a synthetic dataset of thin, long rectangles, RegSeg excelled while DDRNet23 and PSPNet failed completely.

Situation Lean towards Reason
Per-pixel output, thin or small structures matter Dilation in the last blocks (output stride 16 or 8) Keeps detail that striding decimates
Tight memory or batch-size limits during training Output stride 16 rather than 8 Stride 8 forced small batches and lower accuracy in DeepLabv3
Need full-resolution masks cheaply Dilation to a moderate stride, then interpolation or a decoder Full-resolution atrous computation was judged too costly

Output stride determines the output feature-map resolution and, in turn, the largest batch size that fits during training. For the wider landscape of encoder-decoder and pyramid approaches, see our overview of image segmentation methods in modern computer vision.

Setting the Dilation Rate in Keras, PyTorch and TensorFlow

Keras, PyTorch and TensorFlow each expose dilation as a single argument. In Keras, Conv2D takes dilation_rate, an integer or a pair of integers, and the documentation states that strides > 1 is incompatible with dilation_rate > 1. PyTorch’s torch.nn.Conv2d uses dilation for the spacing between kernel points. The lower-level tf.nn.atrous_conv2d takes a rate: at 1 it performs a regular convolution, above 1 it samples the input every rate pixels in height and width.

# PyTorch: 3x3 at rate 2, padding = rate keeps H and W unchanged
conv = torch.nn.Conv2d(256, 256, kernel_size=3, dilation=2, padding=2)

# Keras: same layer; strides must stay 1 when dilation_rate > 1
conv = tf.keras.layers.Conv2D(256, 3, dilation_rate=2, padding="same")

Under the hood there are two common implementations: sparsely sampling the input inside an im2col-style patch extraction, or subsampling the input by the rate into r² shifted low-resolution maps, convolving each normally and reinterlacing the results.

What Are the Drawbacks of Dilated Convolution, and How Do You Avoid Gridding Artefacts?

The main drawback is gridding: because only the non-zero taps sample the input, a dilated kernel covers a checkerboard of locations and skips the pixels in between, and the problem worsens as rates rise in higher layers until the kernel is too sparse to capture local information. Wang et al., who named the problem, point out that neighbouring output units can draw on entirely different sets of input grids, which may impair the consistency of local information. DRN’s authors describe the same effect from the frequency side: gridding appears when a feature map has higher-frequency content than the dilated convolution’s sampling rate, and a single active pixel passed through a 2-dilated convolution produces a visible grid pattern in the output. DRN-A-50’s predictions were “marred by gridding artifacts” even with dense pixel-level supervision.

A second failure is quieter. With a very large rate on a small feature map, most taps land in zero padding, and a 3×3 filter degenerates to a 1×1 filter because only the centre weight touches valid data. DeepLabv3 therefore notes that large rates are effective only with large crop sizes, and Gao (2023) warns that a backbone with large rates may not suit 224×224 training crops for the same reason. Gao also gives a simple bound: the field-of-view is only valid without gaps between weights when r ≤ k/s, where s is the stride.

The third is small objects. Hamaguchi et al. (2018) found that aggressively increasing dilation factors fails to aggregate local features of small objects, a side effect of the sparser kernel. That matters wherever the object is a handful of pixels, which is a reason to treat a big rate as a choice to test, not a default.

Gridding Prevention Checklist

  • Avoid rates with a common factor in one group. Hybrid dilated convolution (HDC) gives consecutive layers different rates, for example 1, 2, 3 in place of 2, 2, 2, and the rates in a group must not share a common factor (as 2, 4, 8 do) or gridding remains at the top layer. The abhik.ai explainer summarises this as keeping the greatest common divisor of consecutive rates at 1, with 1, 2, 5 as a typical choice.
  • Taper the dilation at the end. DRN adds layers with progressively lower dilation (a 2-dilated block, then a 1-dilated block) after the last 4-dilated stage, and removes the residual connections in those layers because they would otherwise carry the artefacts through. Hamaguchi’s Local Feature Extraction module applies the same idea, decreasing dilation after increasing it.
  • Smooth the dilated convolution itself. Wang and Ji’s smoothed dilated convolutions add degridding at the level of the single layer, with consistent gains on dense prediction and negligible extra parameters.
  • Fuse branches hierarchically. ESPNet adds the outputs of different-rate kernels step by step before concatenating them, which removes gridding without extra complexity.
  • Check the rate against the feature-map size. If most taps hit padding, the layer is effectively 1×1 and a smaller rate or larger crop is needed.

Gao (2023) treats dilated convolution as a special case of deformable convolution: the deformable form is more expressive but significantly slower, and its field-of-view gain is bounded by the same r ≤ k/s limit.

Atrous Spatial Pyramid Pooling and the DeepLab Lineage

Atrous spatial pyramid pooling (ASPP) runs several atrous convolutions with different rates in parallel on the same feature map, so the network probes the image with filters of complementary fields of view and captures objects and context at multiple scales. In DeepLab, each rate’s features are processed in a separate branch and fused into the final result, generalising the single-rate LargeFOV variant. The abhik.ai explainer gives rates of 6, 12 and 18 as typical. DeepLabv3 added image-level features to ASPP plus a 1×1 convolution and batch normalisation, concatenating all branch outputs and passing them through another 1×1 convolution to produce per-pixel logits. DeepLabv3+ then used DeepLabv3 as the encoder of an encoder-decoder model with atrous separable convolution, a depthwise convolution followed by a pointwise one, and a simple decoder to recover object boundaries.

ASPP and HDC differ in how they choose rates. HDC stacks rates without a common factor in series; ASPP runs rates that share common factors in parallel to cover several scales, a difference Wang et al. call out explicitly. ESPNet’s factorised ESP module, built on a spatial pyramid of dilated convolutions, drastically reduces the module’s parameters and memory.

Dilation widens context at fixed resolution, and its price is paid in compute at high resolution, in smaller training batches and in sparse sampling. The decision worth settling on any new model is therefore which output stride your budget allows, followed by rates that cover your object sizes without leaving holes between taps. For related computer vision work, see TechnoLynx’s Computer Vision R&D practice.