Recurrent neural networks (RNNs) in the brain and in silico excel at solving tasks with intricate temporal dependencies. Long timescales required for solving such tasks can arise from properties of individual neurons (single-neuron timescale, $\tau$, e.g., membrane time constant in biological neurons) or recurrent interactions among them (network-mediated timescale). However, the contribution of each mechanism for optimally solving memory-dependent tasks remains poorly understood. Here, we train RNNs to solve $N$-parity and $N$-delayed match-to-sample tasks with increasing memory requirements controlled by $N$ by simultaneously optimizing recurrent weights and $\tau$s. We find that for both tasks RNNs develop longer timescales with increasing $N$, but depending on the learning objective, they use different mechanisms. Two distinct curricula define learning objectives: sequential learning of a single-$N$ (single-head) or simultaneous learning of multiple $N$s (multi-head). Single-head networks increase their $\tau$ with $N$ and are able to solve tasks for large $N$, but they suffer from catastrophic forgetting. However, multi-head networks, which are explicitly required to hold multiple concurrent memories, keep $\tau$ constant and develop longer timescales through recurrent connectivity. Moreover, we show that the multi-head curriculum increases training speed and network stability to ablations and perturbations, and allows RNNs to generalize better to tasks beyond their training regime. This curriculum also significantly improves training GRUs and LSTMs for large-$N$ tasks. Our results suggest that adapting timescales to task requirements via recurrent interactions allows learning more complex objectives and improves the RNN's performance.
翻译:大脑中的循环神经网络(RNN)和计算机模拟的RNN在解决具有复杂时间依赖性的任务方面表现出色。解决此类任务所需的长时间尺度可以源于单个神经元的特性(单神经元时间尺度,τ,例如生物神经元的膜时间常数)或神经元之间的循环相互作用(网络介导的时间尺度)。然而,每种机制在最优解决记忆依赖任务中的贡献仍不清楚。本文通过同时优化循环权重和τ,训练RNN解决由N控制记忆需求递增的N-奇偶校验和N-延迟匹配样本任务。我们发现,对于这两个任务,RNN随着N的增加发展出更长的时程,但根据学习目标的不同,它们使用不同的机制。两种不同的训练策略定义了学习目标:单N序列学习(单头)或多N同步学习(多头)。单头网络随N增加其τ值,并能解决大N任务,但会遭受灾难性遗忘。然而,多头网络明确要求同时维持多个并发记忆,其τ保持恒定,并通过循环连接发展出更长的时程。此外,我们证明多头策略提高了训练速度和对消融及扰动的网络稳定性,并允许RNN更好地推广到超出其训练范围的任务。该策略还显著提升了GRU和LSTM在大型N任务中的训练效果。我们的结果表明,通过循环相互作用使时程适应任务需求,有助于学习更复杂的目标并提升RNN的性能。