Introduction
Recurrent Neural Networks (RNNs) are theoretically capable of representing complex sequential dependencies that exceed the capacity of simpler models like Hidden Markov Models (HMMs). However, practical training remains difficult due to two primary hurdles: the vanishing gradient problem, which prevents the propagation of error signals across long sequences, and parameter sensitivity, where performance is dictated by arbitrary design choices like activation function scaling. This paper introduces Gated Leaky Neural Networks (GLNNs) and a training procedure based on Riemannian metrics to address these challenges, creating a framework that is invariant to design choices and highly effective at capturing long-distance symbolic dependencies.
Methods
Gated Leaky Neural Networks (GLNNs)
The GLNN architecture integrates two core concepts to handle symbolic sequences:
- Gated Units: Inspired by finite automata, network weights are dynamically adjusted based on the last produced symbol. This allows the network to explicitly switch between internal "modes" or "states."
- Leaky Dynamics: Drawing from continuous-time networks, weights control the derivative (variation) of activation levels rather than setting them directly. This creates an integrating effect, enabling units to maintain state over long periods and act as natural accumulators.
Riemannian Metric Training
Rather than standard Euclidean gradient descent, the author proposes gradient ascent within a Riemannian metric. Standard gradients assume a flat parameter space, whereas Riemannian metrics acknowledge that parameter shifts have non-uniform effects on output distributions. The paper derives two efficient metrics: the Recurrent Backpropagated Metric (RBPM) and the Recurrent Unitwise Outer Product (RUOP). These methods ensure "invariance," meaning the training trajectory remains identical even if the network is mathematically reformulated (e.g., swapping sigmoid for tanh).
Experimental Results
The models were evaluated on four synthetic symbolic tasks designed to challenge standard RNN architectures:
- Alphabet with Insertions: A context-free grammar task requiring the network to resume the Latin alphabet after interruptions by sub-sequences. GLNNs came 10 times closer to true model entropy than standard RNNs.
- Distant XOR: A task requiring the memory of two distant bits to compute an XOR output. GLNNs achieved error rates below 1% significantly faster than previous "Hessian-free" methods.
- Synthetic Music: Modeling LilyPond format notation involving complex harmonic and rhythmic constraints.
- $a^n b^n$ Task: A classic non-regular language task where the network must count the number of 'a's to produce an equal number of 'b's.
In the $a^n b^n$ task, GLNNs learned to solve for block lengths in the thousands within minutes using as few as 10 training examples. The best GLNN reached a log-likelihood of -129.7 bits, vastly outperforming the best standard RNN at -222.4 bits.
Discussion
The results demonstrate that invariant training algorithms consistently outperform non-invariant ones, regardless of the specific architecture. The "leaky" integration mechanism allows GLNNs to function as counters without explicit programming. While the computational complexity of the Riemannian metrics is quadratic relative to connections per unit, the use of sparse networks (as few as 3 connections per unit) keeps the approach manageable. Future work will focus on scaling the gating mechanism for larger alphabets and developing fully online learning versions of the algorithm.
Summary updated