Introduction
While it is well established that both animals and artificial intelligence (AI) agents can successfully navigate tasks involving time, the exact mechanisms by which artificial agents represent the passage of time remain largely a black box. In neuroscience, "interval timing"—the ability to perceive and reproduce durations of seconds—is a deeply studied phenomenon. This research bridges the gap by investigating how deep reinforcement learning (RL) agents measure and reproduce time intervals, asking which architectural components are necessary, how timing is represented internally, and whether these artificial solutions resemble biological ones.
The Interval Reproduction Task
To evaluate the agents, researchers utilized an Interval Reproduction Task inspired by primate behavioral studies. The agents were trained in PsychLab, a simulated 3D environment built on DeepMind Lab, where they interact with a screen by moving their "eyes" (gaze).
In this procedural task, the agent fixates on a target and sees a "Ready" flash. It then waits for a specific "Sample Interval" before a "Set" flash appears. The agent must then wait for that exact same duration—the "Production Interval"—before shifting its gaze to a target to receive a reward.
The study compared two primary agent architectures based on the Asynchronous Actor-Critic (A3C) framework:
- Recurrent Agents: These agents are equipped with a Long Short-Term Memory (LSTM) module, providing an explicit mechanism for temporal memory.
- Feedforward Agents: These agents lack any recurrent connections, meaning they possess no internal state that persists across time steps.
Emergent Strategies: Internal Clocks vs. Autostigmergy
The agents developed two distinct, fascinating strategies to solve the timing task depending on their underlying architecture.
The "Counter" Mechanism (Recurrent Agents) Recurrent agents developed internal "timers." By analyzing the first principal component of the LSTM's hidden states, researchers discovered that the network's activations rose linearly during the sample interval and fell during the reproduction phase. Remarkably, this ramping activity closely mirrors neural activity observed in the parietal cortex of monkeys performing similar tasks. Furthermore, even an LSTM with frozen, random weights could solve the task, suggesting that the inherent structure of a recurrent network provides a sufficient temporal basis for RL to exploit.
The Behavioral Clock (Feedforward Agents) Most surprisingly, feedforward agents—which theoretically lack the memory to track an interval—successfully learned the task by inventing a behavioral clock. They achieved this through autostigmergy: using their own movement and the environment as an external memory. The agents would traverse a specific, stereotyped path in gaze-space, using the physical distance traveled as a proxy for elapsed time.
Key Results and Biological Parallels
When comparing the performance of the two architectures, recurrent agents proved vastly superior in accuracy, training speed, and generalization. Recurrent agents achieved near-perfect accuracy and generalized flawlessly to novel intervals they had never seen during training.
Conversely, feedforward agents were less accurate and struggled to generalize, likely because their physical "behavioral paths" were overfit to the specific training durations. When the researchers truncated the RL algorithm's "lookback" window (using 10-step RL), feedforward agents failed completely, whereas recurrent agents remained successful, highlighting the robustness of internal memory when reward signals are temporally distant.
Interestingly, the feedforward agents exhibited hallmark features of human and animal timing behavior:
- Mean-directed bias: A tendency to over-reproduce short intervals and under-reproduce long ones.
- Scalar variability: The magnitude of timing errors grew proportionally with the length of the interval.
These findings suggest that certain biological "limitations" in timing might actually be emergent properties of specific computational constraints.
Limitations and Future Directions
While these findings are compelling, the "stigmergic" solution relies heavily on the agent having a spatial environment to move within. Future work should explore how different environmental constraints—such as static versus dynamic backgrounds—alter the strategies these agents develop. Additionally, because this was a "pure" timing task, it remains to be seen how these mechanisms integrate into more complex, multi-modal environments. Finally, while the recurrent agents' internal activity resembles primate neural data, multiple different internal mechanisms could potentially produce the same outward behavior, presenting an ongoing challenge for model identifiability.
Summary updated