Memory Capacity of Nonlinear Recurrent Networks: Is It Informative?

Giovanni Ballarin, Lyudmila Grigoryeva, Juan-Pablo Ortega

Abstract

The total memory capacity (MC) of linear recurrent neural networks (RNNs) is known to be equal to the rank of the corresponding Kalman controllability matrix, typically reaching its maximum for standard weight distributions. This raises questions about the metric's utility in distinguishing RNN performance. This work demonstrates that the MC of nonlinear RNNs is not an inherent architectural property but a variable value determined by the scale of the input process. Consequently, the current definition of MC lacks practical value for model evaluation.

Introduction

In Reservoir Computing and Echo State Networks (ESNs), Memory Capacity (MC) is a long-standing metric used to quantify a network's ability to retain past inputs. A robust metric should ideally reflect the intrinsic "quality" of a network's design. However, while linear RNNs almost always exhibit maximal MC, this study investigates whether nonlinear RNNs suffer from a similar lack of discriminative power.

The Scaling Ambiguity of Memory Capacity

The core finding of this research is that for nonlinear RNNs with sigmoidal activation functions (such as tanh), MC is a "moving target." It is not a fixed property of the network but rather a value that fluctuates between its theoretical minimum and maximum based entirely on the variance of the input data.

Linear vs. Saturation Regimes

The authors identify two distinct operational states for these networks:

  1. The Linear Regime: When the input variance ($\sigma$) is very small, the activation function operates in its linear region near zero. In this state, the nonlinear network mimics a linear one and achieves maximal memory capacity ($MC \approx N$, where $N$ is the number of neurons).
  2. The Saturation Regime: As input variance increases, neurons are pushed into extreme, saturated states. The network's state space collapses, losing the ability to distinguish between past input sequences, and MC drops toward its minimum value of 1.
Figure 4: Memory Capacity (MC) as a function of input scale ($\sigma$) for networks with tanh activation across different connectivity matrices (Orthogonal, Sparse, and Gaussian).

Experimental Validation

Monte Carlo simulations confirm these theoretical boundaries. In a network with $N=30$ neurons, Figure 4 illustrates how the estimated MC starts near 30 for small $\sigma$ and steadily declines toward 1 as the input scale increases, regardless of the reservoir's connectivity matrix.

Impact of Activation Functions

The study also compared standard sigmoids with ReLU and a custom LogSig activation. While LogSig follows a similar scaling-dependent trend to tanh, ReLU activations were found to significantly cap memory capacity across the board, showing a constant but lower capacity that is less sensitive to input scaling.

Figure 5: Comparison of MC scaling for ReLU (top) and LogSig (bottom) activations. ReLU shows a consistently low capacity, while LogSig exhibits the same scaling sensitivity as tanh.

Conclusion

The results demonstrate that Total Memory Capacity is a "task-specific" rather than a "model-specific" measure. Because a network can appear to be either a "memory genius" or "forgetful" simply by adjusting input scaling, MC is practically useless for comparing different RNN architectures.

The authors advocate for the development of new, scale-invariant metrics. They suggest that tools from Differential Geometry and Topological Data Analysis may provide more robust invariants to describe a network's true computational capacity.

Summary updated

BibTeX
@inproceedings{ballarin2025memory,
  author = {Giovanni Ballarin and Lyudmila Grigoryeva and Juan-Pablo Ortega},
  title = {{Memory Capacity of Nonlinear Recurrent Networks: Is It Informative?}},
  booktitle = {Gsi},
  year = {2025},
  doi = {10.1007/978-3-032-03924-8\_6},
}
Figure