[Paper Review] Gating creates slow modes and controls phase-space complexity in GRUs and LSTMs
This paper uses random matrix theory and mean-field theory to analyze how gating mechanisms in GRUs and LSTMs shape the dynamics of recurrent neural networks. It shows that the GRU update gate creates slow modes near unity eigenvalues, enabling long-term memory, while the reset gate controls spectral radius and phase-space complexity; the LSTM forget gate similarly promotes slow modes, and all gates modulate spectral properties critical for training stability and performance.
Recurrent neural networks (RNNs) are powerful dynamical models for data with complex temporal structure. However, training RNNs has traditionally proved challenging due to exploding or vanishing of gradients. RNN models such as LSTMs and GRUs (and their variants) significantly mitigate these issues associated with training by introducing various types of gating units into the architecture. While these gates empirically improve performance, how the addition of gates influences the dynamics and trainability of GRUs and LSTMs is not well understood. Here, we take the perspective of studying randomly initialized LSTMs and GRUs as dynamical systems, and ask how the salient dynamical properties are shaped by the gates. We leverage tools from random matrix theory and mean-field theory to study the state-to-state Jacobians of GRUs and LSTMs. We show that the update gate in the GRU and the forget gate in the LSTM can lead to an accumulation of slow modes in the dynamics. Moreover, the GRU update gate can poise the system at a marginally stable point. The reset gate in the GRU and the output and input gates in the LSTM control the spectral radius of the Jacobian, and the GRU reset gate also modulates the complexity of the landscape of fixed-points. Furthermore, for the GRU we obtain a phase diagram describing the statistical properties of fixed-points. We also provide a preliminary comparison of training performance to the various dynamical regimes realized by varying hyperparameters. Looking to the future, we have introduced a powerful set of techniques which can be adapted to a broad class of RNNs, to study the influence of various architectural choices on dynamics, and potentially motivate the principled discovery of novel architectures.
Motivation & Objective
- To understand how architectural gates in GRUs and LSTMs influence the dynamical properties of randomly initialized RNNs.
- To address the lack of theoretical understanding behind why gating improves training and performance in RNNs.
- To characterize the spectral properties of state-to-state Jacobians in GRUs and LSTMs using statistical mechanics tools.
- To map how hyperparameters like gate weights affect dynamical regimes and fixed-point complexity.
- To provide a theoretical foundation for designing better RNN architectures by linking gate design to dynamical behavior.
Proposed method
- Applies random matrix theory (RMT) to analyze the spectrum of the state-to-state Jacobian in GRUs and LSTMs at initialization.
- Uses mean-field theory (MFT) to compute the statistical properties of Jacobian eigenvalues under random weight initialization.
- Derives analytical expressions for the spectral radius and eigenvalue density, particularly near unity, to identify slow modes.
- Models the Jacobian as a random matrix with correlated entries due to recurrent connections, distinguishing it from feedforward networks.
- Constructs a phase diagram for GRUs by varying the update gate and reset gate weights ($a_z$, $a_r$), identifying transitions between dynamical regimes.
- Compares training performance on sequential MNIST across different dynamical regimes to validate theoretical predictions.
Experimental results
Research questions
- RQ1How do the GRU update and reset gates shape the spectrum of the state-to-state Jacobian?
- RQ2What is the role of the LSTM forget gate in creating slow modes in the dynamics?
- RQ3How do the various gates in GRUs and LSTMs control the spectral radius and phase-space complexity?
- RQ4Can a phase diagram be derived for GRUs that maps hyperparameter choices to dynamical behaviors?
- RQ5How do the theoretical dynamical regimes correlate with actual training performance on sequential tasks?
Key findings
- The GRU update gate induces a clumping of Jacobian eigenvalues near unity, creating slow modes and enabling long-term memory and marginal stability.
- The GRU reset gate controls the spectral radius and modulates the topological complexity of fixed points in phase space.
- The LSTM forget gate is primarily responsible for the accumulation of eigenvalues near unity, contributing to persistent memory.
- All gates in both GRUs and LSTMs influence the spectral radius, but with differing magnitudes and functional roles.
- For the GRU, the spectral radius scales as $\rho({\bf J}_t) = \Theta(\sqrt{a_i})$ for the input gate, and $\rho({\bf J}_t) = \Theta(\sqrt{a_o})$ for the output gate.
- Empirical training on sequential MNIST shows that optimal training speed and accuracy occur near $a_h = 2.0$, where the zero fixed point becomes unstable—indicating a transition near the edge of chaos.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.