{"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/visualizing-and-understanding-recurrent","title":"Visualizing and Understanding Recurrent Networks","arxiv_id":"1506.02078","date":"2015-06-05","proceeding":null,"authors":["Andrej Karpathy","Justin Johnson","Li Fei-Fei"],"abstract":"Recurrent Neural Networks (RNNs), and specifically a variant with Long\nShort-Term Memory (LSTM), are enjoying renewed interest as a result of\nsuccessful applications in a wide range of machine learning problems that\ninvolve sequential data. However, while LSTMs provide exceptional results in\npractice, the source of their performance and their limitations remain rather\npoorly understood. Using character-level language models as an interpretable\ntestbed, we aim to bridge this gap by providing an analysis of their\nrepresentations, predictions and error types. In particular, our experiments\nreveal the existence of interpretable cells that keep track of long-range\ndependencies such as line lengths, quotes and brackets. Moreover, our\ncomparative analysis with finite horizon n-gram models traces the source of the\nLSTM improvements to long-range structural dependencies. Finally, we provide\nanalysis of the remaining errors and suggests areas for further study.","url_abs":"http://arxiv.org/abs/1506.02078v2","url_pdf":"http://arxiv.org/pdf/1506.02078v2.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":"visualizing-and-understanding-recurrent","repo_url":"https://github.com/Chatha-Sphere/script-monkey","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"visualizing-and-understanding-recurrent","repo_url":"https://github.com/ambujalpha/Stock_Predictor_LS-TM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"visualizing-and-understanding-recurrent","repo_url":"https://github.com/suyash/char-rnn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1506.02078","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1506.02078"}},"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/Chatha-Sphere/script-monkey","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ambujalpha/Stock_Predictor_LS-TM","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/suyash/char-rnn","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":11},"by_repo_kind":{"listed":{"samples":11,"ran":0,"repositories":2}},"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":6,"samples":[{"code_sha256_prefix":"4128a4e274ae454e","entry":"create_iterator","repo":"suyash/char-rnn","repo_kind":"listed","path":"trainer/input.py","file_url":"https://github.com/suyash/char-rnn/blob/HEAD/trainer/input.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":"4128a4e274ae454e"}},{"code_sha256_prefix":"713dd9651f20ddb3","entry":"create_model","repo":"suyash/char-rnn","repo_kind":"listed","path":"trainer/model.py","file_url":"https://github.com/suyash/char-rnn/blob/HEAD/trainer/model.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":"713dd9651f20ddb3"}},{"code_sha256_prefix":"acac44063c79b2c6","entry":"decode","repo":"suyash/char-rnn","repo_kind":"listed","path":"trainer/utils.py","file_url":"https://github.com/suyash/char-rnn/blob/HEAD/trainer/utils.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":"acac44063c79b2c6"}},{"code_sha256_prefix":"2ac0924038c4e901","entry":"decode_one_hot","repo":"Chatha-Sphere/script-monkey","repo_kind":"listed","path":"helpers.py","file_url":"https://github.com/Chatha-Sphere/script-monkey/blob/HEAD/helpers.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":false,"mcp_get_code":{"code_sha256":"2ac0924038c4e901"}},{"code_sha256_prefix":"6139f410cb6039fd","entry":"encode","repo":"suyash/char-rnn","repo_kind":"listed","path":"trainer/utils.py","file_url":"https://github.com/suyash/char-rnn/blob/HEAD/trainer/utils.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":"6139f410cb6039fd"}},{"code_sha256_prefix":"eaa271edb79d430e","entry":"extract_kjv_data","repo":"Chatha-Sphere/script-monkey","repo_kind":"listed","path":"corpora.py","file_url":"https://github.com/Chatha-Sphere/script-monkey/blob/HEAD/corpora.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":false,"mcp_get_code":{"code_sha256":"eaa271edb79d430e"}},{"code_sha256_prefix":"24bb612d7a4d86c8","entry":"extract_shakespeare_data","repo":"Chatha-Sphere/script-monkey","repo_kind":"listed","path":"corpora.py","file_url":"https://github.com/Chatha-Sphere/script-monkey/blob/HEAD/corpora.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":false,"mcp_get_code":{"code_sha256":"24bb612d7a4d86c8"}},{"code_sha256_prefix":"dd8e25cb9ad839e4","entry":"get_target_tensor","repo":"Chatha-Sphere/script-monkey","repo_kind":"listed","path":"helpers.py","file_url":"https://github.com/Chatha-Sphere/script-monkey/blob/HEAD/helpers.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":false,"mcp_get_code":{"code_sha256":"dd8e25cb9ad839e4"}},{"code_sha256_prefix":"3d62a16026ebc304","entry":"make_sequences","repo":"Chatha-Sphere/script-monkey","repo_kind":"listed","path":"corpora.py","file_url":"https://github.com/Chatha-Sphere/script-monkey/blob/HEAD/corpora.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":false,"mcp_get_code":{"code_sha256":"3d62a16026ebc304"}},{"code_sha256_prefix":"cf92679c97ec2eaf","entry":"one_hot","repo":"Chatha-Sphere/script-monkey","repo_kind":"listed","path":"helpers.py","file_url":"https://github.com/Chatha-Sphere/script-monkey/blob/HEAD/helpers.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":false,"mcp_get_code":{"code_sha256":"cf92679c97ec2eaf"}},{"code_sha256_prefix":"5728f8170d8a1824","entry":"sample","repo":"suyash/char-rnn","repo_kind":"listed","path":"trainer/utils.py","file_url":"https://github.com/suyash/char-rnn/blob/HEAD/trainer/utils.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":"5728f8170d8a1824"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}