Abstract
This paper introduces the Long Short-Term Memory with Working Memory (LSTWM), an architectural evolution of the standard LSTM designed to overcome structural bottlenecks in sequential modeling. By replacing the rigid forget gate with a functional "working memory" layer and swapping the standard saturating tanh activation for a non-saturating logarithmic function, the LSTWM achieves faster convergence and higher accuracy. Evaluations on complex tasks, including character-level text prediction and a novel algorithmic digit addition benchmark, demonstrate the superiority of this approach over traditional LSTM architectures.
Introduction
While Long Short-Term Memory (LSTM) networks revolutionized recurrent neural networks (RNNs) by addressing the vanishing gradient problem, several structural limitations persist in the standard implementation. The authors identify three primary bottlenecks:
- Exponential Decay: The forget gate mechanism imposes an exponential decay on stored information, which may not optimally manage long-term dependencies.
- Cell Isolation: Memory cells are typically "siloed," unable to exchange information or perform internal computations without opening input/output gates, which exposes internal states to the broader network.
- The Tanh Trap: The hyperbolic tangent (tanh) activation function saturates for large input values, leading to vanishing gradients as memory values grow and hindering effective long-term learning.
LSTWM addresses these issues by transforming the memory unit into a dynamic workspace capable of internal data manipulation.
Methods and Architecture
The LSTWM architecture introduces two fundamental modifications to the standard recurrent unit:
Working Memory Layer
Instead of a simple multiplicative forget gate, the LSTWM incorporates an "inner layer" situated between the input and output gates. The network updates its state using a convex combination of the current memory cell and the output of this new functional layer. This allows the model to treat its state as a true working memory where data can be processed internally.
Sparse Internal Communication
To facilitate information exchange without a quadratic explosion in parameters, the inner layer utilizes sparse, local connections. This is implemented via element-wise "rolls" of the vector, allowing neighboring memory cells to communicate efficiently.
Non-Saturating Logarithmic Activation
To prevent gradient saturation, the authors replace tanh with a logarithmic activation function: $$f(x) = \text{sgn}(x) \ln(|x| + 1)$$ Unlike tanh, this function maintains a healthy gradient even as memory values increase. To prevent uncontrolled growth, a custom regularization term based on the squared mean of the absolute values of the memory cells is applied.
Experimental Evaluation
The model was evaluated across three distinct benchmarks:
- Hutter Challenge (Wikipedia): A standard character-level text prediction task.
- MNIST Digit Recognition: A baseline image classification test.
- Digit Recognition and Addition Combined Task: A novel benchmark requiring the network to process a sequence of four MNIST digits and output their sum. This task tests simultaneous visual recognition, algorithmic reasoning, and long-term memory robustness.
Key Results and Discussion
Experimental results consistently favored the LSTWM architecture. On the Wikipedia dataset, the LSTWM with log activation achieved a Bits-Per-Character (BPC) of 1.725, significantly better than the standard LSTM-tanh at 1.742.
In the algorithmic "Digit Combo" task, the LSTWM-log correctly summed 90.15% of sequences, outperforming the standard LSTM's 88.64%. Notably, the log-based activation also improved the performance of standard LSTMs, suggesting its broad utility as a tanh alternative in recurrent settings. The use of "rolls" for internal communication demonstrated that significant performance gains can be achieved with minimal parameter overhead through smart, sparse connectivity.
Conclusion
The LSTWM demonstrates that treating recurrent state as a "working" space for internal data manipulation significantly enhances performance on algorithmic and long-sequence tasks. While the model requires careful regularization due to its non-saturating activation, its faster convergence and superior accuracy make it a compelling successor to the standard LSTM. Future work may explore more complex internal functional layers or application to even longer-sequence domains where traditional forgetting mechanisms fail.
Summary updated