Dilated CNN

Machine Learning
Introduced by
van den Oord, A. et al.; Bai, S., Kolter, J.Z. & Koltun, V.
Year
2016
Type
Deep learning (dilated 1D convolutional network)

What does it do?

A Dilated CNN is a one-dimensional convolutional network whose receptive field grows exponentially with depth when the dilation doubles from layer to layer, which lets it model long-range structure in time series and audio signals.

WaveNet (van den Oord et al., 2016) and the Temporal Convolutional Network of Bai, Kolter and Koltun (2018) are the prominent members of this family.

The intuition behind the method

Ordinary convolutions only look a few steps back, so reaching far into the past would need a very deep stack. A dilated convolution skips over inputs with a gap that doubles from layer to layer, so each added layer roughly doubles how far back the network can see rather than adding a fixed number of steps. The number of layers needed therefore grows only with the logarithm of the look-back length, and a moderately deep stack can cover a long history while keeping the parameter count modest.

History

Dilated convolutions for sequences were popularised by WaveNet (van den Oord et al., 2016), which used a stack of causal dilated convolutions to generate raw audio. Bai, Kolter and Koltun (2018) generalised the idea into the Temporal Convolutional Network and showed empirically that such convolutional architectures often match or outperform recurrent networks on a broad range of sequence-modelling tasks.

When to use it

Use a Dilated CNN for prediction on ordered data such as a continuous time series or a raw audio signal, particularly when the dependence extends far back and the training set is large enough to fit the network. No validated minimum sample size exists for this method. The data needed depend on series length, signal complexity and model size, and small samples carry a high risk of overfitting, so a simpler model should be compared first. Choose it when the receptive field can be set to cover the task's horizon and GPU acceleration is available for training. Do not use it when the data have no meaningful order, when the series is short, or when a simpler model such as a tree ensemble performs adequately, because the network has far more parameters to fit than a small sample can support. If future values must not influence a prediction, the architecture has to be causal, which constrains the design.

Limitations and considerations

  • Training needs a fairly large amount of sequential data. No validated minimum sample size exists for this method, and with small samples the network is likely to overfit.
  • Training on long sequences is substantially faster with a GPU; CPU training is possible but slower, especially for large models.
  • The receptive field is fixed by the kernel size and dilation schedule, so history beyond it is invisible to the model and the schedule must be tuned to the task horizon.
  • Very short series do not support training a deep convolutional model, and a simpler model is usually more reliable there.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Each added layer doubles the gap between inputs, so the receptive field grows exponentially with depth and a few layers can reach far back into a sequence.
  • Every output depends on a fixed window set by the kernel size and dilation schedule, so all time steps can be computed in parallel, which is why training is faster than for recurrent networks on long sequences.
  • The model imposes no parametric distributional assumption on the input data, and WaveNet was developed as a generative model for raw audio.
  • Bai, Kolter and Koltun (2018) reported that the TCN often matches or outperforms recurrent networks on sequence tasks, and WaveNet demonstrated the approach on raw-audio generation.

Applications

  • Time-series forecasting where long-range dependencies matter.
  • Raw-audio generation and modelling, as in WaveNet.
  • General sequence modelling as an alternative to recurrent networks (TCN).
  • Signal prediction tasks on long continuous sequences.
  • Unsupervised anomaly detection in time series, for example temporal convolutional network autoencoders based on dilated convolution for detecting anomalies in electrocardiograms (Thill et al., 2021).

How it works

How it works

1

Convolutional filters are applied with a dilation rate that typically grows from one layer to the next (for example 1, 2, 4, 8). Each filter still has only a few weights, but the gaps between the inputs it touches widen with depth, so the model can represent short-term detail and long-term dependence without a matching increase in weights.

2

The receptive field follows r = 1 + (k-1) Σ d_l, where k is the kernel size and d_l is the dilation of layer l. This expression assumes stride 1 at every layer; with other strides or pooling the receptive field must be computed differently. When the dilation doubles at each layer, the sum is dominated by the last layer, so r grows roughly exponentially with depth. The field must be matched to the horizon the task requires, because a field much shorter than that horizon cannot see the dependency at all.

Formula
r = 1 + (k-1)\sum_{l} d_l
3

Stacked dilated convolutions feed a final layer that produces the prediction at each position, such as the next value in a forecast or a label for a sequence step. WaveNet uses this structure for raw-audio generation, and the TCN uses it for general sequence modelling.

Common pitfalls

  • Choosing a dilation schedule whose receptive field falls short of the dependence length, so long-range structure is never seen by the model.
  • Using non-causal convolutions in forecasting, which lets the model see future values and produces optimistic validation results.
  • Training on a short series, where the fitted model may largely memorise the sample. No validated minimum series length exists, so performance should be checked on held-out data.
  • Choosing this model for a small dataset when a tree ensemble would be the safer choice.

Frequently asked questions

Why dilation instead of just a deeper network?

With ordinary convolutions the receptive field grows linearly with depth, by the kernel size minus one per layer. With dilations that double, it grows roughly exponentially, so far fewer layers reach the same look-back while keeping the parameter count and computation modest.

How does it compare to recurrent networks?

Bai, Kolter and Koltun (2018) reported that convolutional architectures like the TCN often match or beat recurrent networks on sequence tasks. They also tend to train faster, because convolutions can be computed in parallel across time steps.

How much data do I need?

No validated minimum sample size exists for this method. The amount needed depends on series length, signal complexity and model size. With small samples overfitting is the main risk, so a tree-based model is often a safer baseline to compare against first.

Do I need a GPU?

A GPU substantially speeds up training on long sequences. CPU training is possible but slower, especially for large models.

Related methods

Sources

  1. van den Oord, A. et al. (2016). WaveNet: A Generative Model for Raw Audio. arXiv.

    Open publication reference
  2. Bai, S., Kolter, J.Z. & Koltun, V. (2018). An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling. arXiv:1803.01271.

    Open publication reference
  3. 01_4d13a0db433973cabaeba1e140b1b5466ade48cf, p. 2