lenatriestounderstand

Chapter 1 of 25

What is a TCN?

Created May 27, 2026 Updated May 27, 2026

TCN stands for Temporal Convolutional Network — a CNN adapted for sequence data, designed for cases when you want temporal memory without the sequential bottleneck of an RNN.

Where it's used. Time-series forecasting, sequence-to-sequence prediction, audio modeling (WaveNet used the same core idea: stacks of causal dilated convolutions), anomaly detection on continuous streams — anywhere there are structured temporal patterns and a need for long but bounded context. It sits in the gap between RNN-family models (sequential training, vanishing gradients) and Transformers (quadratic cost, more flexibility per token at higher compute).

The architecture has two constraints that make convolution work for time data: it has to be causal and dilated.

Causal. Each output position can only see inputs at the current timestep or earlier. No leakage from the future into the past. That's enforced by padding the input on the left only, so the convolution can't reach into positions that haven't happened yet.

Dilated. Each successive layer skips an exponentially growing gap between the inputs it reads — dilation 1, 2, 4, 8, 16, … This is the trick. A normal stack of L convolutional layers with kernel size k has a receptive field of roughly 1 + L × (k-1) positions. With dilation doubling at each layer, the receptive field becomes 1 + (k-1) × (2^L - 1) positions — exponential in depth. A 10-layer TCN with kernel size 3 sees 2046 timesteps back. That's what made CNNs viable for long-range sequence modeling without recurrence.

The pay-off over RNN-family models: training parallelizes (no time-step recurrence), gradient flow stays clean (no vanishing through long sequences), and the receptive field is fixed and tunable rather than emergent.

Full breakdown — causal convolutions, dilation math, residual blocks, output heads, and how TCN compares to LSTM and Transformer for forecasting: see TCN: Causal and Dilated Convolutions for Time Series Forecasting.