Recurrent neural networks (RNNs) provide state-of-the-art performance in processing sequential data but are memory intensive to train, limiting the flexibility of RNN models which can be trained. Reversible RNNs---RNNs for which the hidden-to-hidden transition can be reversed---offer a path to reduce the memory requirements of training, as hidden states need not be stored and instead can be recomputed during backpropagation. We first show that perfectly reversible RNNs, which require no storage of the hidden activations, are fundamentally limited because they cannot forget information from their hidden state. We then provide a scheme for storing a small number of bits in order to allow perfect reversal with forgetting. Our method achieves comparable performance to traditional models while reducing the activation memory cost by a factor of 10--15. We extend our technique to attention-based sequence-to-sequence models, where it maintains performance while reducing activation memory cost by a factor of 5--10 in the encoder, and a factor of 10--15 in the decoder.
翻译:经常性神经网络(RNNs)提供处理连续数据的最先进的性能,但记忆密集以培训为目的,限制了可以培训的RNN模型的灵活性。可翻转的RNNs-RNNs-RNNs-RNNs(隐藏到隐藏的过渡可以倒转-提供一条减少培训记忆要求的途径,因为隐藏状态不需要存储,而是可以在后向转换过程中进行重新计算。我们首先显示,完全可逆的RNS(不需要存储隐藏的激活)根本有限,因为它们不能忘记其隐藏状态的信息。我们然后提供一种计划,储存少量的比特数,以便完全扭转遗忘。我们的方法取得了与传统模型相似的性能,同时将激活记忆成本降低10-15系数。我们的技术推广到基于注意的序列到序列模型,在这种模型中保持性能,同时将激活的记忆成本降低在编码器中的系数为5-10和解密器中的系数为10-15。