This paper provides a rigorous theoretical foundation for a popular architectural choice in deep learning: Unitary Recurrent Neural Networks (URNNs). The authors prove that for ReLU-based networks, Unitary RNNs are just as expressive as standard contractive RNNs, provided you double the number of hidden states. However, this equivalence breaks down for smooth activations like Sigmoid, where the "rigidity" of unitary matrices prevents them from perfectly mimicking standard RNN dynamics.
What Problem Does This Paper Address?
Recurrent Neural Networks (RNNs) are notoriously difficult to train on long sequences because of the vanishing and exploding gradient problem. If the transition matrix that updates the hidden state has a norm greater than one, gradients explode; if it's less than one, they vanish into insignificance over time.
Unitary RNNs (URNNs) were proposed as a solution. By forcing the transition matrix to be unitary (meaning it preserves the "length" or norm of the state vector), gradients stay stable. But this stability comes with a nagging question: Does the unitary constraint make the network too "stiff" to learn complex patterns? Researchers worried that by restricting the math of the transitions, we might be limiting the functions the network can actually represent.
Methods
The authors tackle this by analyzing Input-Output Equivalence. They ask: Can a URNN produce the exact same output sequence as a standard RNN for any given input sequence?
- The ReLU Construction: For RNNs using Rectified Linear Units (ReLU), the authors provide a mathematical construction to turn any contractive RNN (where the transition matrix norm is $< 1$) into a URNN.
- State Doubling: The key technique involves doubling the hidden state dimension from $n$ to $2n$. The first $n$ states mirror the original RNN, while the additional $n$ states are used to "soak up" the extra energy required to satisfy the unitary constraint without affecting the final output.
- Linearization Analysis: For smooth activations (like Sigmoid), they use linearization techniques to show that the eigenvalues of the transition matrix are "trapped" in the output mapping, making exact equivalence impossible.
Datasets
The authors validated their theory using two primary setups:
- Synthetic Dynamical Systems: Data generated from a known contractive RNN with long-term dependencies (time constants of ~100 steps).
- Pixel-Permuted MNIST: A classic benchmark for RNNs where the 784 pixels of an MNIST digit are fed into the network one by one in a fixed random order. This forces the network to remember dependencies across very long sequences.
Key Insights and Ideas
- ReLU is the Great Equalizer: The most surprising finding is that the "non-smoothness" of ReLU is actually a feature here. Because ReLU can "zero out" certain states, it allows a URNN to hide the parts of its unitary matrix that don't match the target RNN's dynamics.
- The "Price" of Stability is $2\times$: To get the stability of a URNN without losing the expressiveness of a standard RNN, you need exactly twice as many hidden states. The authors proved this bound is "tight," meaning you cannot achieve equivalence with fewer states.
- Smoothness Limits Expressivity: In a Sigmoid-based RNN, every state change is "visible" to the next layer because the activation never perfectly zeros out. This means the unitary constraint remains "rigid" and cannot perfectly emulate a non-unitary contractive system.
Key Results
- Theoretical Equivalence: The paper successfully proves that for any contractive RNN with $n$ states and ReLU activations, there exists an equivalent URNN with at most $2n$ states.
- Empirical Match: In simulations modeling nonlinear dynamical systems, URNNs with $2n$ states performed almost identically to standard RNNs with $n$ states, confirming the "double the states" rule of thumb.
- MNIST Performance: On the Permuted MNIST task, the authors showed that imposing contractivity or unitary constraints is essential for performance. Without these constraints, standard RNNs often become unstable or fail to converge on long-sequence tasks.
Limitations and Future Work
- Contractive Assumption: The proof specifically applies to contractive RNNs (those that naturally decay over time). While most stable RNNs are contractive, the paper doesn't strictly cover the edge case of non-contractive but stable systems.
- Parameter Count: While URNNs are expressive, doubling the state dimension increases the number of parameters. The authors note that a $2n$-state URNN actually has slightly fewer degrees of freedom than an $n$-state standard RNN, but the computational cost of the larger state vector remains.
- Approximate Equivalence: The paper proves that exact equivalence is impossible for Sigmoid activations, but it leaves open the question of approximate equivalence—how close can a URNN get to a Sigmoid RNN if we give it enough states?
Summary updated