A Clockwork RNN

Jan Koutník, Klaus Greff, Faustino J. Gomez, Jürgen Schmidhuber

TL;DR

This paper introduces the Clockwork RNN (CW-RNN), a novel architecture that partitions the hidden layer into modules operating at different temporal granularities. This design allows CW-RNNs to efficiently capture long-term dependencies, outperforming standard RNNs and LSTMs in sequence generation and speech classification tasks, while also being faster and more parameter-efficient.

What Problem Does This Paper Address?

Recurrent Neural Networks (RNNs) are theoretically well-suited for processing sequential data due to their internal memory. However, standard RNNs struggle to learn "long-term dependencies" – patterns that span many time steps – primarily due to the vanishing gradient problem during training. This limitation hinders their effectiveness in tasks requiring understanding of extended temporal contexts. While Long Short-Term Memory (LSTM) networks have been a successful solution, this paper proposes a simpler architectural modification to address the same challenge.

Methods

The core innovation is the Clockwork RNN (CW-RNN). Instead of a single, monolithic hidden layer, the CW-RNN's hidden layer is divided into g modules. Each module operates at its own distinct clock rate, meaning it only updates its state and contributes to computations at specific, periodic time intervals. The key idea is that modules with slower clock rates are responsible for capturing longer-term information, while faster modules handle more immediate details. Crucially, connections between modules are restricted: a faster module i can connect to a slower module j only if the period of module i ($T_i$) is smaller than the period of module j ($T_j$). This "right-to-left" flow of information from slower to faster modules is a defining characteristic. The paper uses an exponential series for module periods ($T_i = 2^{i-1}$) for experimental purposes.

Datasets

The paper evaluates CW-RNNs on two tasks:

  • Audio Signal Generation: A task where the network generates a target audio signal without any explicit input. The dataset consists of five different target sequences, each sampled at 44.1 kHz for 7 ms, resulting in sequences of 320 data points.
  • TIMIT Spoken Word Classification: A standard benchmark for speech recognition. The dataset contains audio signals of single spoken words, with sequences partitioned into training and testing sets.

Key Insights and Ideas

  • Temporal Granularity as a Solution: The paper demonstrates that explicitly assigning different temporal processing speeds to different parts of the hidden layer is a powerful mechanism for handling long-term dependencies.
  • Efficiency through Asynchronous Updates: By having modules update only at their designated clock times, CW-RNNs reduce the number of computations per time step compared to standard RNNs of equivalent size.
  • Parameter Reduction: The restricted connectivity (slower modules not connecting to faster ones) leads to fewer parameters than a standard RNN with the same number of neurons, contributing to both efficiency and potentially better generalization.
  • Intuitive Interpretation: The architecture offers a more interpretable way to think about how RNNs process information over different time scales, with slower modules acting as long-term memory stores and faster modules as short-term feature extractors.

Key Results

  • Superior Performance: CW-RNNs significantly outperformed both standard RNNs and LSTMs on both the sequence generation and spoken word classification tasks, even when compared with networks having a similar number of parameters.
  • Sequence Generation: CW-RNNs achieved substantially lower mean squared errors, with the best performing CW-RNNs being roughly on par with the second-largest LSTM networks. Figure 5 visually shows CW-RNN outputs closely approximating the target sequences, unlike RNNs which generated the mean of the sequence, or LSTMs which produced a smoothed average.
  • Spoken Word Classification: CW-RNNs achieved an 8-20% lower classification error compared to LSTMs, and a much larger margin over standard RNNs.
  • Speed and Efficiency: CW-RNNs run faster than standard RNNs due to fewer computations per time step. They also have fewer parameters.

Limitations and Future Work

  • Arbitrary Period Selection: The choice of module periods is currently arbitrary, though an exponential series proved effective. The paper suggests exploring other period selection strategies (linear, Fibonacci, logarithmic, or even learned periods).
  • Learning Periods: The authors note that learning the periods themselves would be a valuable extension, potentially requiring differentiable modulo functions or evolutionary algorithms.
  • Detailed Dynamics Analysis: Future work will involve a detailed analysis of the internal dynamics of CW-RNNs to understand how resources are allocated for different input sequence types.
  • Broader Applications: Further testing on other problem classes, such as reinforcement learning, and comparison with a wider range of connectionist models are planned.
  • Module Size Flexibility: While the paper uses equally sized modules, it acknowledges that adjusting module sizes based on expected information in input sequences could be beneficial.

Summary updated

BibTeX
@inproceedings{koutnik2014clockwork,
  author = {Jan Koutník and Klaus Greff and Faustino J. Gomez and Jürgen Schmidhuber},
  title = {{A Clockwork RNN}},
  booktitle = {International Conference on Machine Learning},
  year = {2014},
  url = {https://openreview.net/forum?id=HyWqZ3b_ZB},
}
Figure