Paper commentary
An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling
Convolutional networks beat recurrent networks on a broad range of sequence tasks
- Problem Recurrent networks are the default for sequence modeling, but no broad test had compared them fairly with convolutional networks. Earlier comparisons stayed within the recurrent family or covered only a few tasks.
- Method The TCN is a generic temporal convolutional network that never lets an output see a later input. It uses causal convolutions, dilation that doubles with depth, and residual blocks, and it runs unchanged on every task.
- Results The TCN beat LSTM and GRU on most tasks, scoring 99.0 accuracy on Sequential MNIST compared to 96.2 for GRU. LSTM still won on word-level PennTreebank.
Why recurrent networks are the default
Most practitioners start sequence modeling with recurrent networks, and the standard textbook chapter and a popular online course follow the same pattern. The appeal of recurrence is that one hidden vector can summarize the whole past.
That leaves open whether these gains stay within specific domains or point to a wider case for revisiting recurrence.
Earlier comparisons mostly stayed inside the recurrent family. Chung et al. compared LSTM with GRU on polyphonic music, and Jozefowicz et al. searched over more than ten thousand RNN architectures. Yin et al. compared convolutional and recurrent networks, but only on sentence and document classification. No thorough study had put convolutional and recurrent designs side by side on sequence modeling tasks.
A causal, dilated and residual convolutional model
The key idea is a convolutional network that treats time as its only axis and never lets an output see a later input. The authors call this family temporal convolutional networks, or TCNs, and they use the name as a description rather than as a claim of a new architecture. Each prediction must rely only on the current and earlier inputs, and the authors enforce this with causal convolutions.
A one-dimensional fully convolutional network keeps every hidden layer as long as the input by padding with kernel size minus one zeros. Combining that with causal convolutions gives the TCN. The authors note this is close to the time delay neural network of Waibel et al. (1989), with zero padding as the main change. A basic design like this needs very deep networks or very large filters to look far back, and that is the gap the next components address.
A dilated causal convolution computes the output at time s from filter taps spaced d steps apart, as \( F(s) = (x *_d f)(s) = \sum_{i=0}^{k-1} f(i)\, x_{s-d\cdot i} \). One such layer reaches back (k - 1)d steps, so the authors grow d with depth, setting d to 2 to the power i at layer i. This lets a deep stack cover a long history without very large filters.
Each residual block applies two dilated causal convolutions, and each is followed by ReLU and spatial dropout, with weight normalization on the filters. The block output is \( o = \mathrm{Activation}(x + F(x)) \), so each block learns a change to its input rather than a whole new mapping. Spatial dropout zeroes a whole channel at each training step, which regularizes the filters.
When input and output widths differ, a 1x1 convolution on the residual path makes the addition possible.
Because the same filter serves every time step, the TCN can process all steps in parallel, unlike an RNN that waits for each predecessor. Its gradients follow the depth of the network rather than the time axis, which the authors say avoids the exploding and vanishing gradients that trouble RNNs.
Keeping the training comparison fair
All experiments used the same TCN design, with depth and sometimes the kernel size varied to cover each task's context. The TCN used Adam at learning rate 0.002, and the gradient clipping norm was picked from 0.3 to 1. The recurrent models got a grid search over optimizer, recurrent dropout between 0.05 and 0.5, learning rate, clipping and forget-gate bias, while keeping their size near the TCN's.
The authors added no gating or further architectural elaborations to either side. The LSTM and GRU baselines are not state-of-the-art on several tasks, so the comparison is against canonical models rather than the best known systems. Model sizes were matched roughly, around 70K parameters for the adding problem and the MNIST tasks.
Synthetic stress test results
In the adding problem with T=600, the TCN reached a loss of 5.8e-5. GRU reached 5.3e-5, slightly lower, while LSTM and RNN stayed near 0.164 and 0.177. A constant guess of the sum gives an MSE of about 0.1767, the level a model has to beat. The clearer difference is convergence speed, since the TCN reached a near-perfect solution quickly while GRU converged more slowly.
On Sequential MNIST the TCN scored 99.0 accuracy, compared to 96.2 for GRU and 87.2 for LSTM. On permuted MNIST, where the pixel order is shuffled at random, the TCN reached 97.2, compared to 87.3 for GRU and 85.7 for LSTM.
On copy memory with T=1000 the TCN reached a loss of 3.5e-5, while LSTM, GRU and RNN reached 0.0204, 0.0197 and 0.0202. The LSTM and GRU losses match simply predicting zeros, so those models had not learned to recall the digits. Both the TCN and EURNN performed well at T=500, and the TCN had a clear advantage at T=1000 and longer, in both loss and speed of convergence.
Music and language modeling results
Music and language are domains dominated by specialized recurrent designs, so the authors compare generic models before any domain tuning. On JSB Chorales the TCN reached a loss of 8.10, compared to 8.45 for LSTM and 8.43 for GRU. On Nottingham it reached 3.07, compared to 3.29 for LSTM and 3.46 for GRU. The authors note that a Deep Belief Net LSTM does better still, which they attribute to the datasets being small.
On word-level PennTreebank the order reverses: the LSTM reached a perplexity of 78.93, compared to 88.68 for the TCN. The TCN still beat GRU at 92.48 and RNN at 114.50 on the same corpus. The authors say an optimized LSTM, with recurrent and embedding dropout, wins on this small corpus. On Wikitext-103 the TCN reached 45.19 perplexity, compared to 48.4 for LSTM, and on LAMBADA it reached 1279, compared to 4186 for LSTM.
On character-level PennTreebank the TCN reached 1.31 bits per character, compared to 1.36 for LSTM and 1.37 for GRU, where lower is better. On text8 it reached 1.45, compared to 1.50 for LSTM. Specialized architectures do better on these character tasks, as the supplement lists.
How far the memory reaches
The copy memory study varies the sequence length T and measures accuracy on the last 10 output elements, using models of size 10K. The TCN stayed at 100% accuracy for every length in the study, while the LSTM fell below 20% for T below 50 and the GRU fell below 20% for T below 200. The authors read this as evidence that the TCN keeps a longer effective history than recurrent networks of the same size.
On LAMBADA, which needs broad context, a smaller TCN beat the LSTM and vanilla RNN by a wide margin in perplexity. The authors conclude that the unlimited memory of RNNs is largely absent in these experiments. The scope is narrower than that wording suggests, since the retention test is synthetic and the real-data evidence comes from one dataset.
Which TCN components carry the gains
The authors varied the filter size k in controlled runs that kept model size and depth fixed, on copy memory, P-MNIST and word-level PTB. On copy memory and P-MNIST larger filters converged faster and ended more accurate, and a TCN with k of 3 or less converged only to the level of random guessing on copy memory. On word-level PTB a kernel of 3 worked best, which the authors link to local context mattering more for language.
Removing residual connections slowed training and gave worse final results on all three tasks. The gain was largest for language modeling, which the authors highlight.
The authors tested gated linear units against the ReLU TCN, keeping parameter counts about equal. On word-level PTB the gated version reached 87.94 perplexity, compared to 88.68 for the ReLU TCN. On copy memory with T=1000 the gated version rose to a loss of 0.00508, compared to 3.5e-5 for the ReLU TCN, though it still sat below the recurrent baselines.
The authors chose not to use gating in the generic TCN.
Limits of the evidence
At evaluation the TCN must keep the raw sequence up to its effective history length, while an RNN carries only a hidden state. That can cost more memory at test time, and a model moved from a short-memory domain to a long-memory one may perform poorly until its kernel and dilation grow.
The recurrent baselines are canonical versions with grid-searched settings, not the strongest published models. The authors also note the TCN has not yet received the community's architectural refinements that LSTM variants have received. Word-level PTB is a clear case where the LSTM wins.
Each dataset used one TCN configuration varied only in depth and kernel size, so the results don't show how a fully tuned TCN compares with a fully tuned LSTM. The authors also say the datasets are relatively small, which may limit how far generic models can go.
Paper info
- Authors
- Shaojie Bai, J. Zico Kolter, Vladlen Koltun
- Venue
- arXiv · Preprint
- First published
- 2018-3-4
- Added
- 2026-11-11
- Updated
- 2018-4-19
- Version
- v2
- arXiv
- 1803.01271
- Category
- cs.LG · cs.AI · cs.CL
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Shaojie Bai, J. Zico Kolter, Vladlen Koltun (2018). An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling. arXiv:1803.01271v2. https://arxiv.org/abs/1803.01271v2
BibTeX
@misc{bai2018empirical,
title = {{An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling}},
author = {Shaojie Bai and J. Zico Kolter and Vladlen Koltun},
year = {2018},
eprint = {1803.01271},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1803.01271v2}
}