TL;DR
This paper investigates the impact of depth on the expressive power of Recurrent Neural Networks (RNNs). The authors demonstrate that increasing depth in RNNs, even without nonlinearities, enhances their memory capacity and expressivity in a parameter-efficient way. They also show that multiplicative interactions in second-order RNNs (2RNNs) offer a distinct form of expressivity that cannot be replicated by simply stacking nonlinearities in standard RNNs.
What Problem Does This Paper Address?
While the benefits of depth in feedforward neural networks (FNNs) are well-established, its role in recurrent neural networks (RNNs) is less understood. RNNs process sequential data, and their expressive power depends not only on transforming inputs but also on effectively propagating and combining information over time. This paper aims to formally characterize how architectural depth interacts with recurrence and multiplicative interactions to shape the expressive capabilities of RNNs, particularly concerning memory capacity and the ability to perform complex computations like state-tracking.
Methods
The authors employ a theoretical approach, defining formal models of RNNs and second-order RNNs (2RNNs) and analyzing the sets of functions they can represent. They introduce theorems that establish strict inclusions between function classes of RNNs with increasing depth, demonstrating that depth enhances expressivity and memory capacity. They also analyze 2RNNs, showing how depth increases the degree of polynomial transformations they can perform. A key contribution is a theoretical separation between the expressivity gained from multiplicative interactions and that from layer-wise nonlinearities. Empirical validation is conducted using synthetic tasks (copy, sinus, parity) and real-world datasets (language modeling, Long Range Arena).
Datasets
- Tiny Shakespeare dataset: Used for language modeling experiments.
- Long Range Arena benchmark: Used to evaluate S4 models on a variety of tasks.
- Synthetic datasets: Generated for copy, copy-sinus, sinus, and parity tasks.
Key Insights and Ideas
- Depth enhances RNN memory capacity efficiently: Even linear RNNs become strictly more expressive with increased depth, primarily by improving their ability to retain information over time. This is a more parameter-efficient way to boost memory than simply increasing hidden size.
- Multiplicative interactions offer unique expressivity: In 2RNNs, depth allows for the computation of higher-degree polynomials, a capability distinct from what can be achieved by stacking nonlinearities in standard RNNs.
- State-tracking is a key differentiator: Certain state-tracking functions, easily computable by a single-layer 2RNN, cannot be replicated by deep RNNs with only depth-wise nonlinearities. This highlights a fundamental difference in inductive biases.
- Depth's benefit is task-dependent: While depth generally improves performance, its impact on parameter efficiency varies based on the task's memory requirements.
Key Results
- Theorem 1: For linear RNNs, increasing depth strictly increases expressivity (HRNN(n, L) ⊂ HRNN(n, L+1)).
- Theorem 2: For linear RNNs, increasing depth can be more parameter-efficient for certain memory-intensive tasks.
- Theorem 3: For linear 2RNNs, increasing depth strictly increases expressivity (HBIRNN(n, L) ⊂ HBIRNN(n, L+1)).
- Theorem 5: There exists a function computable by a single-layer 2RNN that cannot be computed by any RNN with arbitrary depth and width with only depth-wise nonlinearities.
- Empirical results on the copy task showed that deeper linear RNNs achieved zero loss with smaller hidden sizes, supporting Theorem 1.
- Experiments on the parity task demonstrated that recurrently applied nonlinearities were more effective than depth-wise ones for state-tracking, aligning with Theorem 5.
- Language modeling on Tiny Shakespeare showed consistent performance gains with depth across RNNs and CPRNNs.
Limitations and Future Work
- Parameter efficiency trade-offs: While depth can be parameter-efficient for memory tasks, the optimal balance between depth and hidden size is task-dependent.
- Focus on linear models: The theoretical analysis primarily uses linear RNNs and 2RNNs to isolate the effects of depth and multiplicative interactions, abstracting away from the complexities of nonlinear activations.
- Future directions: The authors suggest further exploration into how gating mechanisms, time-variant vs. time-invariant structures in State Space Models (SSMs), and optimization interact with architectural choices to affect expressivity. Understanding these interactions could lead to more principled model design.
Summary updated