Seq-U-Net: A One-Dimensional Causal U-Net for Efficient Sequence Modelling

Daniel Stoller, Mi Tian, Sebastian Ewert, Simon Dixon

TL;DR

Seq-U-Net is a novel causal 1D U-Net architecture designed for efficient auto-regressive sequence modelling. By leveraging the "slow feature" hypothesis to process data at multiple time-scales, it achieves performance comparable to state-of-the-art models like WaveNet and TCN while reducing memory usage and accelerating training and inference by up to 4x.

What Problem Does This Paper Address?

Modeling long-term dependencies in sequences—such as high-fidelity audio or long documents—is a major challenge in deep learning. While Recurrent Neural Networks (RNNs) can theoretically remember long histories, they are notoriously slow and difficult to train. Convolutional Neural Networks (CNNs) with dilated filters, like WaveNet or Temporal Convolutional Networks (TCNs), offer a parallelizable alternative with massive receptive fields.

However, these CNNs have a major efficiency bottleneck: every layer operates at the same high resolution as the input. For a sequence of 100,000 audio samples, every single layer must process 100,000 feature vectors. This leads to massive memory consumption and slow inference, often making long-term modeling impractical even on high-end hardware.

Methods

The authors introduce Seq-U-Net, which adapts the popular U-Net architecture (commonly used in image segmentation) for 1D sequence generation.

The core idea is based on the "slow feature" hypothesis: many important features in a signal change slowly over time. Instead of processing everything at full resolution, Seq-U-Net uses:

  1. Downsampling (DS) Blocks: These reduce the temporal resolution using strided convolutions, allowing deeper layers to capture broader context with fewer computations.
  2. Upsampling (US) Blocks: These restore resolution using transposed convolutions, combined with high-resolution information from earlier layers via skip connections.
  3. Causality: To work in an auto-regressive setting (predicting the next step based on the past), all convolutions are made causal. This is achieved by carefully cropping the front of feature sequences in skip connections to ensure no "future" information leaks into the prediction.
  4. Time-Variant Inference: During generation, lower-resolution layers don't need to be updated at every single time step. This "amortized" approach means that on average, only a constant number of layers are updated per step, regardless of the total depth.
Architecture diagram of Seq-U-Net

Datasets

The model was evaluated across three distinct domains:

  • Language Modelling: Character-level and word-level tasks using the Penn Treebank (PTB) dataset.
  • Symbolic Music Modelling: Predicting piano rolls using the Muse, Nottingham (Nott), and JSB Chorales datasets.
  • Raw Audio Generation: Generating classical piano music directly in the time domain, using a large dataset of classical recordings (~607 hours).

Key Insights and Ideas

  • Efficiency through Sparsity: By downsampling, the total number of feature activations is drastically reduced. While a standard TCN computes $L \times I$ activations (where $L$ is layers and $I$ is input length), Seq-U-Net's total activations are bounded by a constant factor (at most $8I$), making it much more scalable.
  • The Power of Multi-Scale: The results suggest that many high-level features (like the general "mood" of a song or the "topic" of a sentence) don't need to be re-evaluated for every single character or audio sample.
  • Stability in Generation: Interestingly, the authors found that Seq-U-Net was more stable than their WaveNet baseline for long-form audio generation. While WaveNet tended to accumulate noise over time, Seq-U-Net remained coherent for 10 seconds or longer.
Comparison between TCN and Seq-U-Net computational paths

Key Results

Seq-U-Net matches the predictive performance of TCN and WaveNet while being significantly leaner:

  • Speed-ups: In raw audio generation, Seq-U-Net achieved a 4x speed-up in both training and inference compared to WaveNet.
  • Memory Savings: Memory usage was reduced by 32% to 70% across various tasks.
  • Performance: On PTB and symbolic music datasets, the perplexity/bits-per-character scores were nearly identical to the much heavier TCN models.
  • Listening Tests: In a blinded test, Seq-U-Net was rated as having better timbre (sounding more like a real piano) than WaveNet in 75% of cases, though it slightly lagged behind in musical coherence.
Performance metrics across different tasks

Limitations and Future Work

The authors identify a few areas for improvement:

  • Manual Tuning: The levels of resolution and the number of filters at each level currently have to be pre-defined manually. Future work could involve making the model adapt its resolution levels dynamically (e.g., using ideas from Phased LSTMs).
  • Musical Coherence: While timbrally excellent, the model sometimes struggled with smooth transitions from real audio to generated continuations.
  • Attention Mechanisms: Integrating attention (like in Transformers) into the U-Net blocks could further boost performance for extremely long-range dependencies.

Overall, Seq-U-Net proves that we don't always need to process sequences at full resolution to get state-of-the-art results—sometimes, slowing down is the fastest way forward.

Summary updated

BibTeX
@inproceedings{stoller2020seq,
  author = {Daniel Stoller and Mi Tian and Sebastian Ewert and Simon Dixon},
  title = {{Seq-U-Net: A One-Dimensional Causal U-Net for Efficient Sequence Modelling}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.24963/ijcai.2020/400},
}
Figure