Green's Function Method for Fast On-Line Learning Algorithm of Recurrent Neural Networks

Guo-Zheng Sun, Hsing-Hen Chen, Yee-Chun LeeNeurIPS 1991

Introduction

Training Recurrent Neural Networks (RNNs) in real-time (on-line) is a notoriously difficult computational challenge. Standard Back-Propagation Through Time (BPTT) is an off-line method, requiring a sequence to finish before rolling backward to calculate errors—making it unsuitable for systems that must learn continuously.

The primary on-line alternative, the Real-Time Recurrent Learning (RTRL) algorithm introduced by Williams and Zipser, suffers from a massive computational bottleneck: it requires $O(N^4)$ operations per time step, where $N$ is the number of neurons. For a network of even modest size, this prevents practical application.

This paper introduces a novel on-line learning algorithm that leverages the Green’s function method to slash this computational complexity. By exploiting redundancies in how sensitivity matrices are calculated, the authors reduce the per-time-step cost from $O(N^4)$ to $O(N^3)$, making real-time training of larger recurrent networks significantly more viable.

Overcoming RTRL Redundancies

The authors identify two major inefficiencies in the standard RTRL approach:

  1. Operator Redundancy: The differential equation tracking how network states change with respect to weights (the sensitivity matrix) uses a linear operator that does not actually depend on the weights themselves. RTRL essentially solves this same equation repeatedly for every single weight.
  2. Structural Redundancy: In typical neural computations, the derivative of the activation function is shared across many components, leading to numerous zero-valued terms in high-dimensional tensors.

To address this, the authors apply the Green’s Function method. Instead of integrating the high-dimensional sensitivity equation directly, they solve for the Green’s function of the system's linear operator. They introduce a tensor $V(t)$ and its inverse $U(t)$ to represent the system's fundamental response, alongside an auxiliary third-order tensor $\Pi_{ijk}$ to accumulate weight updates. By decoupling the state dynamics from specific weight updates, the total operations per step are compressed to $4N^3$.

Experimental Setup: Phase Space Trajectory Classification

To evaluate the algorithm, the authors designed a Phase Space Trajectory Classification task. The network was tasked with learning synthetic 2D trajectories representing three distinct classes of "clover-like" shapes in phase space.

Phase space trajectories for the three classes

To ensure the network learned general shapes rather than memorizing specific paths, the trajectories were distorted by a random parameter $\beta$. The network received a time series of coordinate pairs along with their squares and products (a total of 6 input neurons) to classify the evolving trajectory.

Key Results and Speedup

The core advantage of this method is its computational efficiency. Even though RNNs are non-linear systems, the equation governing how a small change in weights affects the state (the sensitivity) is linear. This allows the use of powerful tools from mathematical physics, like Green’s functions, avoiding the need to track how every weight affects every neuron individually at every micro-step.

The authors benchmarked their "Fast Algorithm" against the standard Williams & Zipser (RTRL) algorithm on a DEC3100 Workstation. As the number of neurons ($N$) increased, the speed advantage of the Green’s function method became increasingly pronounced.

Performance comparison between the Fast Algorithm and RTRL
  • For $N=4$, the fast algorithm was 3x faster.
  • For $N=8$, it was 5x faster.
  • For $N=12$, it achieved approximately a 7.6x speedup (represented as a 1:8 ratio in the benchmarks).

Crucially, both algorithms achieved perfect recognition (zero misclassifications) on the trajectory task, demonstrating that the computational speedup does not compromise the final model's accuracy.

Limitations and Trade-offs

While highly effective, the approach comes with specific trade-offs:

  • Memory Ceiling: The algorithm requires $O(N^3)$ memory to store the auxiliary tensors. While the $O(N)$ speedup is a favorable trade-off for modern hardware, there is a physical limit to how large $N$ can be before these tensors exceed available RAM.
  • Convergence Rates: The authors noted that while their algorithm is faster per iteration, it occasionally required more total iterations to converge than RTRL for very small networks. However, for larger networks, it remained faster both per-step and in total time to convergence.
  • Numerical Stability: The Green’s function approach requires careful handling of numerical instabilities—a common issue in RNNs—particularly regarding matrix inversion and long-term integration.

Summary updated

BibTeX
@inproceedings{sun1991green,
  author = {Guo-Zheng Sun and Hsing-Hen Chen and Yee-Chun Lee},
  title = {{Green's Function Method for Fast On-Line Learning Algorithm of Recurrent Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {1991},
}
Figure