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

Victor Campos, Brendan Jou, Xavier Giro-i-Nieto, Jordi Torres, Shih-Fu Chang

TL;DR

Skip RNN is a novel modification for recurrent neural networks (RNNs) that allows them to adaptively skip state updates for uninformative time steps. By learning to "jump" over redundant data, the model significantly reduces computational cost and improves gradient flow, often matching or exceeding the performance of standard LSTMs and GRUs with a fraction of the operations.

What Problem Does This Paper Address?

Recurrent Neural Networks (RNNs) are the workhorse of sequence modeling, but they have a fundamental flaw: they are inherently sequential. To process a sequence of length $T$, an RNN must perform $T$ sequential operations. For long sequences—like high-frame-rate video or long documents—this leads to three major headaches:

  1. Slow Inference: Every single input element must be processed, even if it contains no new information.
  2. Vanishing Gradients: During training, gradients must flow back through the entire sequence, making it difficult to learn long-term dependencies.
  3. Redundancy: Many real-world signals are oversampled. A static scene in a video or padding at the end of a text string doesn't require a full state update.

While practitioners often use heuristics like fixed-rate subsampling or cropping, these are "dumb" solutions that might throw away critical information. The authors ask: Can an RNN learn which parts of a sequence are worth processing?

Methods

The authors introduce the Skip RNN, which augments standard RNN architectures (like LSTM or GRU) with a binary state update gate $u_t \in \{0, 1\}$.

  • Update vs. Copy: At each time step $t$, the model decides whether to update its hidden state ($u_t=1$) or simply copy the previous state ($s_t = s_{t-1}$) and skip the current input ($u_t=0$).
  • The Accumulator: The decision is based on a "pre-activation" value $\tilde{u}_t$ that accumulates over time. When this value crosses a threshold (0.5), an update is triggered, and the accumulator is reset. This allows the model to learn how many steps to "wait" before the next update.
  • Differentiability: Because the update gate is binary, it is not naturally differentiable. The authors use the straight-through estimator, which treats the binary step as an identity function during the backward pass, allowing the entire system to be trained via standard backpropagation.
  • Budget Constraint: To force the model to be efficient, the authors add a cost per sample ($\lambda$) to the loss function. This encourages the network to solve the task using as few updates as possible.

The architecture's flexibility is illustrated in Figure 1, showing how it handles updates versus skips:

Skip RNN Architecture

Datasets

The model was evaluated on a diverse set of benchmarks:

  • Synthetic Tasks: The "Adding Task" (summing two marked numbers in a long sequence) and Sine Wave Frequency Discrimination.
  • Image/Text: Sequential MNIST (processing pixels one by one) and IMDB Sentiment Analysis.
  • Video: Charades (temporal action localization) and UCF-101 (action classification).

Key Insights and Ideas

  • Learned Temporal Attention: Skip RNN acts as a hard temporal attention mechanism. For example, in sequential MNIST, the model learns to skip the "empty" padding pixels at the top and bottom of the image, focusing only on the discriminative center (see Figure 3).
  • Gradient Preservation: By skipping updates, the effective length of the computational graph is shortened. This acts as a natural bridge for gradients, helping the model converge faster on long-sequence tasks like UCF-101 (see Figure 4).
  • Robustness to Sampling Rate: In the sine wave task, the model converged to a similar number of updates even when the input sampling frequency was doubled. This suggests the model learns the underlying semantics of the signal rather than just counting steps.
  • Efficiency vs. Accuracy: The budget parameter $\lambda$ provides a "knob" for engineers to trade off accuracy for speed, making it highly practical for deployment on low-power devices.

Key Results

  • Sequential MNIST: Skip LSTM achieved 97.3% accuracy using only ~379 updates, compared to the baseline LSTM's 91.0% accuracy using all 784 updates. It was both more accurate and twice as fast.
  • UCF-101 Video: The Skip LSTM achieved 79.0% accuracy using only 7.6 updates out of 250 frames. The baseline LSTM, processing every frame, only reached 67.1%. This massive improvement highlights how skipping redundant frames can actually make the learning task easier.
  • Faster Convergence: As shown in Figure 2, the Skip GRU exhibits much lower variance and faster convergence during training compared to a standard GRU.
MNIST Accuracy Evolution

Limitations and Future Work

  • Cumulative Lag: The authors noted that the model sometimes struggles to skip a very large number of updates at once because the accumulator $\tilde{u}_t$ needs time to build up.
  • Bias: The straight-through estimator is a biased estimator. While it works well here, other methods like REINFORCE or Gumbel-Softmax might be explored, though they often come with their own stability issues.
  • Multi-layer skipping: Currently, the skipping decision is often shared across layers. Exploring independent skipping per layer could allow for even more granular computation.

Summary updated

BibTeX
@inproceedings{campos2018skip,
  author = {Victor Campos and Brendan Jou and Xavier Giro-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