Skip RNN: Learning to Skip State Updates in Recurrent Neural Networks

Víctor Campos, Brendan Jou, Xavier Giró-i-Nieto, Jordi Torres, Shih-Fu Chang

Overview

Recurrent Neural Networks (RNNs) are foundational for sequence modeling tasks, but training them on long sequences introduces significant challenges. Standard RNNs suffer from slow inference, vanishing gradients, and difficulty capturing long-term dependencies. These issues stem from the large, sequential computational graph created when unfolding the RNN over time.

The Skip RNN is a novel modification for recurrent architectures (like LSTMs and GRUs) that allows them to skip processing certain steps in a sequence. By learning to "copy" the previous state instead of performing a full update, the model reduces computational overhead and shortens the effective size of the computational graph. This often leads to better performance than standard RNNs while requiring significantly fewer operations.

The Bottleneck of Sequential Processing

RNNs are inherently sequential: to process the 1,000th element in a sequence, the network must first process the previous 999. This strict sequentiality leads to three major issues:

  1. Slow Inference: Every time step requires computationally expensive matrix multiplications.
  2. Vanishing Gradients: In very long sequences, the signal from the beginning of the sequence "washes out" by the time it reaches the end during backpropagation.
  3. Redundancy: Not every data point in a sequence is important. For example, in a video of a person sitting still, most frames are entirely redundant.

While practitioners often use heuristics like downsampling or cropping to shorten sequences, these static fixes risk throwing away critical information. The Skip RNN addresses this by learning which parts of the sequence to ignore dynamically.

The Skip RNN Architecture

The core innovation of the Skip RNN is augmenting a standard RNN cell with a binary state update gate, $u_t \in \{0, 1\}$.

The Skip RNN cell architecture and its operational states.
  • Update vs. Copy: If $u_t = 1$, the RNN performs a standard state update using the current input $x_t$. If $u_t = 0$, the RNN simply copies the previous state ($s_t = s_{t-1}$) and skips the current input entirely.
  • Learning to Skip: The model outputs a probability of updating at the next step. If it skips a step, it accumulates this probability until it crosses a threshold (0.5), at which point it triggers an update.
  • Differentiability: Because the "skip" decision is discrete, it is not naturally differentiable. The authors employ the straight-through estimator, which treats the threshold function as an identity function during the backward pass, allowing the model to be trained via standard backpropagation.
  • Computation Budget: To prevent the model from simply updating at every step, a penalty term ($L_{budget}$) is added to the loss function. By adjusting a hyperparameter $\lambda$, researchers can force the model to be more conservative with its updates, effectively choosing a point on the speed-versus-accuracy trade-off curve.

Key Insights and Performance

The Skip RNN acts as a form of "hard attention" in time—it doesn't just weight inputs; it decides whether to look at them at all. Surprisingly, skipping updates often makes training faster and more stable. By shortening the effective length of the computational graph, gradients have a shorter path to travel, helping the model learn long-term dependencies more easily.

The model was evaluated across a diverse set of benchmarks, including the Adding Task, Sequential MNIST, Charades, Frequency Discrimination, IMDB sentiment analysis, and UCF-101 action classification.

Notable Results: * Efficiency: In the synthetic Adding Task, Skip RNNs solved the problem using only ~50% of the updates required by a standard LSTM. * Accuracy Boost: On Sequential MNIST, the Skip LSTM achieved 97.3% accuracy, significantly outperforming the baseline LSTM's 91.0%, while using fewer than half the updates. Visualizations showed the model learned to skip the "empty" padding pixels at the top and bottom of the images. * Video Processing: On the UCF-101 action classification task, the Skip LSTM improved accuracy from 67.1% to 79.0% while reducing the number of state updates from 250 down to just 7.6 on average—a massive reduction in computational cost. Furthermore, in frequency discrimination tasks, the model proved robust to sampling rates; if the input signal's sampling rate doubled, the Skip RNN simply skipped twice as many samples.

Limitations and Future Directions

While highly effective, the Skip RNN has a few limitations. The cumulative nature of the update probability means the model sometimes struggles to skip a very large number of updates at once. Additionally, while the model reduces theoretical operations, current deep learning libraries are optimized for dense, fixed-size computations. Realizing the full wall-clock speedup of Skip RNNs requires specialized hardware or software implementations that can efficiently handle dynamic skipping.

Looking forward, the skipping mechanism is orthogonal to other RNN improvements (like Batch Normalization) and can be seamlessly combined with them to push the boundaries of efficient sequence modeling even further.

Summary updated

BibTeX
@inproceedings{campos2018skip,
  author = {Víctor Campos and Brendan Jou and Xavier Giró-i-Nieto and Jordi Torres and Shih-Fu Chang},
  title = {{Skip RNN: Learning to Skip State Updates in Recurrent Neural Networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2018},
  url = {https://openreview.net/forum?id=HkwVAXyCW},
}
Figure