Introduction
In biological systems, learning is remarkably robust to changes in temporal scale. If an animal learns to associate a stimulus with a reward after five seconds, it can easily adapt if that interval is stretched to ten seconds—a property known as scale invariance. In contrast, modern Reinforcement Learning (RL) agents, typically built on Long Short-Term Memory (LSTM) or standard Recurrent Neural Network (RNN) architectures, are often "scale-dependent." These agents represent time through internal state dynamics that are brittle; a model trained on a 5-second task often fails or requires significant retraining and hyperparameter tuning if the task duration is extended.
Presented at AAAI-25, this research introduces CogRNN, a cognitively inspired recurrent memory module designed to bridge this gap. By mimicking the "time cells" found in the mammalian hippocampus, CogRNN enables agents to learn and generalize across vastly different temporal scales without additional training.
The CogRNN Architecture
The core innovation of CogRNN lies in its ability to build a scale-invariant representation of history. Unlike LSTMs, which learn recurrent weights through backpropagation, CogRNN uses analytically determined weights to perform a two-stage transformation of the input signal:
- Modified Laplace Transform: The input is first processed by a layer of neurons with a spectrum of fixed, log-spaced decay constants. This layer computes a discrete approximation of a real-domain Laplace transform of the input history.
- Inverse Laplace Transform: The system then approximates the inverse transform using Post’s inversion formula. This result is a set of "time cells"—neurons that activate sequentially as time passes.
The use of log-spaced time constants is critical. On a logarithmic scale, stretching or shrinking a signal in time (a multiplicative operation) becomes a simple shift along the neural axis (an additive operation). By applying convolution and pooling over this representation, the agent achieves temporal translation invariance, allowing it to recognize temporal patterns regardless of the speed at which they occur.
Experimental Evaluation
The researchers evaluated CogRNN against standard LSTMs across five distinct temporal environments designed to test memory and timing:
- Interval Timing (1D & 3D): Agents classify intervals as "short" or "long." The 3D version utilizes the PyBullet physics engine to provide realistic visual observations in a T-maze.
- Interval Discrimination: The agent must determine which of two sequential stimuli lasted longer.
- Delayed-Match-to-Sample: A classic task requiring the agent to remember a sample stimulus across a variable delay.
- Interval Reproduction: The agent must perform an action to replicate the duration of a previously observed interval.
Key Results and Insights
The experiments yielded several significant findings regarding the efficiency and robustness of the CogRNN architecture:
- Scale-Invariant Learning: In 1D Interval Timing, CogRNN agents learned at nearly identical speeds across scales ranging from 30 to 480 steps. LSTMs, by comparison, showed highly variable learning rates and struggled significantly as the temporal scale increased.
- Zero-Shot Generalization: When paired with a convolutional layer, CogRNN agents trained on a single time scale achieved perfect performance when tested on 2x and 4x scales without any further training. Standard RNN-based agents failed this generalization test entirely.
- Biological Realism: CogRNN neurons naturally exhibit properties of biological "time cells." The width of a neuron's temporal "firing field" increases linearly with its peak time, maintaining a constant coefficient of variation—a hallmark of mammalian temporal perception.
- Efficiency: CogRNN achieved superior performance with fewer trainable parameters than LSTMs, as its recurrent dynamics are fixed by the Laplace transform logic rather than learned from scratch.
Discussion and Future Work
While CogRNN represents a major step toward scale-invariant AI, some challenges remain. The numerical approximation of the inverse Laplace transform is sensitive to "edge effects" at the boundaries of its represented time range. Furthermore, while the memory module itself is scale-invariant, other components of the RL pipeline—such as the discount factor ($\gamma$)—remain scale-dependent. The authors suggest that future work could integrate power-law temporal discounting to create a fully scale-invariant RL framework.
Expanding these tests to broader, non-timing-centric benchmarks like Atari or MuJoCo will be essential to determine the general applicability of CogRNN in complex, high-dimensional environments.
Summary updated