Resurrecting Recurrent Neural Networks for Long Sequences

Antonio Orvieto, Samuel L Smith, Albert Gu, Anushan Fernando, Caglar Gulcehre +2 more
3/11/2023
cs.LG

No official code found. Best implementation: TingdiRen/LRU_pytorch (12 stars, last commit 2023-05-22). 1 more below.

Abstract

Recurrent Neural Networks (RNNs) offer fast inference on long sequences but are hard to optimize and slow to train. Deep state-space models (SSMs) have recently been shown to perform remarkably well on long sequence modeling tasks, and have the added benefits of fast parallelizable training and RNN-like fast inference. However, while SSMs are superficially similar to RNNs, there are important differences that make it unclear where their performance boost over RNNs comes from. In this paper, we show that careful design of deep RNNs using standard signal propagation arguments can recover the impressive performance of deep SSMs on long-range reasoning tasks, while also matching their training speed. To achieve this, we analyze and ablate a series of changes to standard RNNs including linearizing and diagonalizing the recurrence, using better parameterizations and initializations, and ensuring proper normalization of the forward pass. Our results provide new insights on the origins of the impressive performance of deep SSMs, while also introducing an RNN block called the Linear Recurrent Unit that matches both their performance on the Long Range Arena benchmark and their computational efficiency.

View on arXivView PDF

Code Implementations(2)

This repository is pytorch version implement of LRU from the paper "Resurrecting Recurrent Neural Networks for Long Sequences" (https://arxiv.org/abs/2303.06349), which is based on tf version by @bojon

123PythonMay 16, 20233 years ago

Workspace for experimenting with the architecture described in https://arxiv.org/abs/2303.06349

00Python, DockerfileJul 17, 20251 years ago

Similar Papers

Cite this paper

@article{orvieto2023resurrecting,
  title  = {Resurrecting Recurrent Neural Networks for Long Sequences},
  author = {Antonio Orvieto and Samuel L Smith and Albert Gu and Anushan Fernando and Caglar Gulcehre and Razvan Pascanu and Soham De},
  year   = {2023},
  eprint = {2303.06349},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2303.06349v1},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.06349.svg)](https://codeofpaper.com/paper/2303.06349)

Discussion