{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/resurrecting-recurrent-neural-networks-for","title":"Resurrecting Recurrent Neural Networks for Long Sequences","arxiv_id":"2303.06349","date":"2023-03-11","proceeding":null,"authors":["Antonio Orvieto","Samuel L Smith","Albert Gu","Anushan Fernando","Caglar Gulcehre","Razvan Pascanu","Soham De"],"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.","url_abs":"https://arxiv.org/abs/2303.06349v1","url_pdf":"https://arxiv.org/pdf/2303.06349v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"resurrecting-recurrent-neural-networks-for","repo_url":"https://github.com/DecodEPFL/SSM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok"}},{"paper_slug":"resurrecting-recurrent-neural-networks-for","repo_url":"https://github.com/Gothos/LRU-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"resurrecting-recurrent-neural-networks-for","repo_url":"https://github.com/bojone/rnn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"resurrecting-recurrent-neural-networks-for","repo_url":"https://github.com/esraaelelimy/LRU","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"GPL-3.0"}},{"paper_slug":"resurrecting-recurrent-neural-networks-for","repo_url":"https://github.com/forgi86/lru-reduction","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":null},{"paper_slug":"resurrecting-recurrent-neural-networks-for","repo_url":"https://github.com/nicolaszucchet/minimal-lru","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":null},{"paper_slug":"resurrecting-recurrent-neural-networks-for","repo_url":"https://github.com/sustcsonglin/pytorch_linear_rnn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"resurrecting-recurrent-neural-networks-for","repo_url":"https://github.com/LuCeHe/lru_unofficial","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"resurrecting-recurrent-neural-networks-for","repo_url":"https://github.com/MindCode-4/code-12/tree/main/lru","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"resurrecting-recurrent-neural-networks-for","repo_url":"https://github.com/fabianwinter93/JAX","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"jax","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"paper_slug":"resurrecting-recurrent-neural-networks-for","repo_url":"https://github.com/reeered/LRU-MindSpore","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":{"status":"ok"}}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"sequential-image-classification","task_name":"Sequential Image Classification"},{"task_slug":"state-space-models","task_name":"State Space Models"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/sequential-image-classification-on-sequential-1","task":"Sequential Image Classification","dataset":"Sequential CIFAR-10","model":"LRU","rank_in_archive_order":3,"of":13,"metrics":{"Unpermuted Accuracy":"89.0"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2303.06349","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.06349"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bojone/rnn","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/DecodEPFL/SSM","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MindCode-4/code-12/tree/main/lru","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Gothos/LRU-pytorch","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/forgi86/lru-reduction","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/esraaelelimy/LRU","reach":{"status":"ok","spdx":"GPL-3.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/reeered/LRU-MindSpore","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/fabianwinter93/JAX","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sustcsonglin/pytorch_linear_rnn","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nicolaszucchet/minimal-lru","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/LuCeHe/lru_unofficial","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":1},"by_repo_kind":{"listed":{"samples":1,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"016b28379d1ddb1c","entry":"binary_operator_diag","repo":"LuCeHe/lru_unofficial","repo_kind":"listed","path":"src/lruun/tf/linear_recurrent_unit.py","file_url":"https://github.com/LuCeHe/lru_unofficial/blob/HEAD/src/lruun/tf/linear_recurrent_unit.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"016b28379d1ddb1c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}