Abstract
Unitary Recurrent Neural Networks (URNNs) are designed to mitigate the vanishing and exploding gradient problem by constraining the hidden-to-hidden transition matrix to be unitary. This paper investigates whether this constraint limits the expressiveness of the network. We demonstrate that for ReLU-based networks, URNNs are input-output equivalent to standard contractive RNNs, provided the hidden state dimension is doubled. However, this equivalence does not hold for smooth activations like sigmoids, where the unitary constraint fundamentally alters the network's dynamical fingerprint.
Introduction
Training Recurrent Neural Networks (RNNs) is notoriously difficult due to the vanishing and exploding gradient problem. When information is passed through many time steps, gradients can either shrink to zero or grow to infinity, preventing the capture of long-term dependencies. Unitary RNNs (URNNs) solve this by forcing the transition matrix to preserve the length of the state vector, ensuring stable gradients. A critical question remains: does this stability come at the cost of expressiveness? This work explores the "Input-Output Equivalence" between URNNs and standard contractive RNNs.
Methods
The authors analyze the relationship between URNNs and standard RNNs through theoretical construction and numerical verification.
- Theoretical Construction: For ReLU-based networks, the authors mathematically construct a URNN that mimics a standard contractive RNN. The construction utilizes a hidden state twice as large ($2n$) as the original ($n$), using the extra dimensions as a "buffer" to satisfy unitary requirements while preserving the original dynamics.
- Linearization Analysis: For smooth activations (e.g., sigmoids), linear system theory is used to show that the eigenvalues of the transition matrix are directly visible in the output. Since a unitary matrix has eigenvalues with magnitude 1, it cannot perfectly replicate a contractive matrix (eigenvalues $< 1$).
- Numerical Verification: Theories were tested on synthetic dynamical systems and the Pixel-Permuted MNIST benchmark. Singular Value Decomposition (SVD) projections were used to maintain the unitary constraint during training.
The "2n Rule" and ReLU Equivalence
The core finding of this work is that ReLU activations allow URNNs to "hide" the parts of the unitary matrix that do not match the target RNN. Because ReLUs can zero out states, a URNN can use its additional dimensions to satisfy the unitary constraint while only the relevant dynamics affect the output.
Theorem 3.1 proves that for any contractive RNN with $n$ states and ReLU activations, there exists an equivalent URNN with at most $2n$ states. Theorem 3.2 confirms this is a tight bound; some RNNs require at least $2n$ unitary states for representation. This provides a clear "price of stability": to maintain capacity when switching to a URNN, one should double the hidden units.
Empirical Performance
In simulations on synthetic contractive systems, URNNs with $2n$ hidden units achieved nearly identical $R^2$ scores to standard RNNs with $n$ units. The practical benefits of these constraints were further tested on the Pixel-Permuted MNIST task, which requires remembering information across 784 time steps.
On this benchmark, imposing contractivity or unitary constraints led to significantly higher accuracy and more stable training compared to vanilla RNNs. Vanilla models often failed to converge or required extremely low learning rates to avoid instability.
Conclusion
This work establishes that the unitary constraint in URNNs does not inherently limit expressiveness for ReLU networks, provided the state dimension is sufficiently large. The $2n$ rule offers a practical heuristic for architecture design. However, the choice of activation function is critical; smooth activations create a fundamental barrier to equivalence, highlighting a trade-off between mathematical smoothness and representational flexibility in stable recurrent architectures.
Summary updated