Approximating Stacked and Bidirectional Recurrent Architectures with the Delayed Recurrent Neural Network

Javier Turek, Shailee Jain, Vy A. Vo, Mihai Capota, Alexander Huth, Theodore L. WillkeICML 2020

This paper, presented at ICML 2020 by researchers from Intel Labs and UT Austin, offers a surprisingly simple architectural tweak that challenges the need for complex, multi-layer recurrent neural network (RNN) topologies.

The Problem: The "Complexity Tax" of Deep and Bidirectional RNNs

To handle complex sequences, researchers usually reach for two tools: stacking (layering RNNs to increase non-linear depth) and bidirectionality (processing sequences forward and backward to capture "future" context).

However, these enhancements come with a significant "complexity tax." Stacked RNNs are harder to train and optimize. Bidirectional RNNs (Bi-RNNs) are even more problematic: they are inherently slow because the "backward" pass cannot start until the entire sequence is received, and they are notoriously difficult to parallelize on modern hardware like GPUs. The authors ask a fundamental question: Can we get the benefits of depth and look-ahead context without the architectural overhead?

Methods: The Delayed-Recurrent Neural Network (d-RNN)

The authors introduce the Delayed-Recurrent Neural Network (d-RNN). In a standard RNN, the input at time $t$ ($x_t$) produces an output ($\hat{y}_t$) immediately. In a d-RNN, the network processes $x_t$ but waits $d$ timesteps before producing the corresponding output ($\hat{y}_{t+d}$).

Architecture of a d-RNN with a delay of d=3.

The paper provides two major theoretical contributions to explain why this simple delay is so effective:

  1. Depth via Time: They prove that a d-RNN with a delay of $d$ is mathematically equivalent to a stacked RNN with $k = d+1$ layers, provided the weights are constrained to a specific sparse structure. Essentially, you can trade "depth in layers" for "depth in time."
  2. Partial Acausality: Because the network has processed $x_{t+1}, \dots, x_{t+d}$ by the time it outputs the result for $x_t$, it effectively "peeks" into the future. This allows a unidirectional model to mimic the behavior of a bidirectional one without requiring a full backward pass.

Key Insights and Ideas

  • The "One Layer" Theorem: The most striking insight is that we don't necessarily need multiple physical layers to achieve deep non-linear transformations. By allowing the hidden state to "buffer" information over several timesteps, a single layer can perform the same computations as a deep stack.
  • Interpolation Power: The d-RNN acts as a bridge between a standard causal RNN (delay $d=0$) and a Sequence-to-Sequence model (delay $d=$ sequence length). You can tune the delay to find the "sweet spot" of context needed for a specific task.
  • Hardware Efficiency: Unlike Bi-RNNs, which require a sequential backward pass, the d-RNN is a single forward pass. This makes it much more friendly to GPU acceleration and real-time streaming applications where waiting for the "end" of a sequence is unfeasible.

Key Results

The researchers evaluated the d-RNN (specifically using LSTM cells, or d-LSTM) across several benchmarks, including synthetic tasks, masked character-level language modeling (text8), and Part-of-Speech tagging (Universal Dependencies).

  • Speed: On the text8 language modeling task, the d-LSTM was 4x faster than a Bi-LSTM while maintaining performance within 5% of the more complex model.
  • Accuracy: In Part-of-Speech tagging, the d-LSTM matched or slightly outperformed Bi-LSTMs in English and German, proving that "partial" future context is often just as good as seeing the entire future.
Accuracy of d-LSTM scaling with delay d, bridging the gap between standard LSTM and BiLSTM.
  • Non-linearity: In synthetic tests, the d-LSTM actually outperformed Bi-LSTMs when the task required highly non-linear processing of future inputs. This suggests that the "temporal depth" of the d-RNN is a powerful tool for complex feature extraction.

Limitations and Future Work

While the d-RNN is efficient, it has a few trade-offs:

  • Hyperparameter Tuning: The "delay" $d$ is a new hyperparameter that must be tuned. If $d$ is too small, you lose context; if it's too large, the network might "forget" early inputs before it's time to output them.
  • Memory vs. Depth: While it reduces the number of layers, a d-RNN might require more hidden units (wider layers) to match the representational capacity of a very deep stacked network.
  • Partial vs. Full Context: For tasks that require seeing the very end of a long sentence to understand the very beginning, a Bi-RNN might still have an edge, as the d-RNN only looks ahead by $d$ steps.

The authors suggest that future work could explore adaptive delays, where the network learns how much "future" it needs to see for each specific input, further optimizing the balance between context and efficiency.

Summary updated

BibTeX
@inproceedings{turek2020approximating,
  author = {Javier Turek and Shailee Jain and Vy A. Vo and Mihai Capota and Alexander Huth and Theodore L. Willke},
  title = {{Approximating Stacked and Bidirectional Recurrent Architectures with the Delayed Recurrent Neural Network}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=OgOxLsLTfVP},
}
Figure