Stochastic Gradient Descent Learns State Equations with Nonlinear Activations

Samet OymakCOLT 2019

Abstract

Recurrent Neural Networks (RNNs) are fundamental to sequential learning, yet their theoretical properties remain less understood than those of feedforward architectures due to nonlinear dynamics and temporal dependencies. This paper, originally presented at COLT 2019, establishes a theoretical foundation for the efficiency of Stochastic Gradient Descent (SGD) in learning RNN state equations. The authors demonstrate that for a class of stable systems with strictly increasing activation functions, SGD converges linearly to ground-truth parameters with near-optimal sample complexity.

1. Introduction

While Recurrent Neural Networks (RNNs) are the standard for processing sequential data, they present significant challenges for theoretical analysis. Unlike standard regression tasks where data points are independent and identically distributed (i.i.d.), RNNs involve states that evolve over time, creating complex temporal correlations. Furthermore, the presence of nonlinear activation functions results in an optimization landscape that is typically non-convex.

Previous theoretical work has largely focused on Linear Dynamical Systems (LDS). This research bridges the gap between linear theory and practical RNNs by analyzing the nonlinear state equation: $$h_{t+1} = \phi(Ah_t + Bu_t)$$ where $h_t$ is the state, $u_t$ is the input, and $\phi$ is a nonlinear activation function. The goal is to recover the weight matrices $A$ and $B$ using SGD.

2. Theoretical Challenges

Learning the parameters of an RNN state equation involves overcoming two primary hurdles:

  1. Nonlinearity: The activation function $\phi$ can obscure the relationship between weights and outputs, potentially leading to vanishing gradients or poor local minima.
  2. Temporal Dependency: The state $h_{t+1}$ depends directly on $h_t$. In a single trajectory, samples are highly correlated. Standard statistical learning proofs often rely on the independence of samples, which is violated here.

3. Methodology and Innovations

The authors employ a least-squares regression approach to minimize the prediction error of the next state. To make the analysis tractable, they introduce several key concepts:

3.1 $\beta$-increasing Activations

The study focuses on a class of "well-behaved" activations termed $\beta$-increasing. These are functions where the derivative is bounded away from zero (e.g., Leaky ReLU). This property ensures that the gradient retains sufficient information about the weight matrices throughout the optimization process, allowing the loss function to "inherit" strong convexity from the underlying linear structure.

3.2 Subsampling and Mixing

To address temporal correlation, the authors utilize a mixing argument. In stable systems ($||A|| < 1$), the influence of the distant past decays exponentially. By subsampling the trajectory—specifically, taking every $T$-th sample—the data points become approximately independent, allowing for the application of standard concentration inequalities.

3.3 Convergence Analysis

The core contribution is a deterministic convergence result for SGD. The authors prove that for stable systems with $\beta$-increasing activations, the expected squared Frobenius norm of the error between the estimated parameters and the ground truth decays geometrically: $$E[||\Theta_\tau - C||^2_F] \leq (1 - \rho)^\tau ||\Theta_0 - C||^2_F$$ where $\rho$ represents the convergence rate and $\tau$ is the iteration count.

4. Key Insights

  • Linear Convergence in Nonlinear Systems: The research demonstrates that geometric (linear) convergence is achievable even in nonlinear settings, provided the activation function does not "flatline."
  • Sample Complexity: The required number of samples $N$ is shown to be $O(n+p)$, where $n$ is the state dimension and $p$ is the input dimension. Since the total number of parameters is $n(n+p)$, this complexity is near-optimal, requiring only a constant number of observations per parameter.
  • The Role of Stability: System stability is crucial for learning from a single trajectory. If the spectral norm of $A$ exceeds 1, the state covariance can become ill-conditioned. However, the authors note that unstable systems can still be learned if the learner has access to multiple short, independent trajectories.

5. Experimental Verification

The theoretical bounds were verified using synthetic datasets with state dimensions of $n=50$ and input dimensions of $p=100$. Key findings from these experiments include:

  • Slope Sensitivity: As the slope $\beta$ of the Leaky ReLU increases, the convergence rate improves significantly, confirming the theoretical importance of the $\beta$-increasing property.
  • The ReLU Gap: While the theory strictly requires $\beta > 0$, numerical experiments show that standard ReLU ($\beta=0$) often works in practice, though it is less efficient and requires more data to avoid getting stuck in regions with zero gradients.

6. Conclusion and Future Work

This work provides a rigorous justification for the success of SGD in training RNN components. However, it assumes the state $h_t$ is fully observable. In practical applications, RNNs typically involve "hidden" states where only a filtered output $y_t$ is visible. Extending these guarantees to hidden state models and closing the theoretical gap for standard ReLU activations remain important directions for future research.

Summary updated

BibTeX
@inproceedings{oymak2019stochastic,
  author = {Samet Oymak},
  title = {{Stochastic Gradient Descent Learns State Equations with Nonlinear Activations}},
  booktitle = {Conference on Learning Theory},
  year = {2019},
}
Figure