{"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/learning-to-execute","title":"Learning to Execute","arxiv_id":"1410.4615","date":"2014-10-17","proceeding":null,"authors":["Wojciech Zaremba","Ilya Sutskever"],"abstract":"Recurrent Neural Networks (RNNs) with Long Short-Term Memory units (LSTM) are\nwidely used because they are expressive and are easy to train. Our interest\nlies in empirically evaluating the expressiveness and the learnability of LSTMs\nin the sequence-to-sequence regime by training them to evaluate short computer\nprograms, a domain that has traditionally been seen as too complex for neural\nnetworks. We consider a simple class of programs that can be evaluated with a\nsingle left-to-right pass using constant memory. Our main result is that LSTMs\ncan learn to map the character-level representations of such programs to their\ncorrect outputs. Notably, it was necessary to use curriculum learning, and\nwhile conventional curriculum learning proved ineffective, we developed a new\nvariant of curriculum learning that improved our networks' performance in all\nexperimental conditions. The improved curriculum had a dramatic impact on an\naddition problem, making it possible to train an LSTM to add two 9-digit\nnumbers with 99% accuracy.","url_abs":"http://arxiv.org/abs/1410.4615v3","url_pdf":"http://arxiv.org/pdf/1410.4615v3.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":"learning-to-execute","repo_url":"https://github.com/wojciechz/learning_to_execute","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"torch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"learning-to-execute","repo_url":"https://github.com/btc-room101/bitcoin-rnn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"learning-to-execute","repo_url":"https://github.com/dsmic/LearnMultiplyByHand","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"learning-to-execute","repo_url":"https://github.com/lcary/keras-program-induction","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"learning-to-execute","repo_url":"https://github.com/manyunya/bitcoin-rnn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"gone","observed_at":"2026-09-18","how":"tree_404+repo_404"}},{"paper_slug":"learning-to-execute","repo_url":"https://github.com/mdjunior/coc891","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"learning-to-execute","task_name":"Learning to Execute"}],"methods":[{"method_slug":"lstm","method_name":"LSTM"},{"method_slug":"sigmoid-activation","method_name":"Sigmoid Activation"},{"method_slug":"tanh-activation","method_name":"Tanh Activation"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1410.4615","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1410.4615"}},"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/mdjunior/coc891","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dsmic/LearnMultiplyByHand","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wojciechz/learning_to_execute","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/manyunya/bitcoin-rnn","reach":{"status":"gone","observed_at":"2026-09-18","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lcary/keras-program-induction","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/btc-room101/bitcoin-rnn","reach":{"status":"ok"}}],"summary":{"ran_violates":1,"unverified":2},"by_repo_kind":{"listed":{"samples":3,"ran":1,"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":3,"samples":[{"code_sha256_prefix":"ff3d1423e42f8bc5","entry":"check_all_chars_in","repo":"dsmic/LearnMultiplyByHand","repo_kind":"listed","path":"learnmultiply_schriftlich.py","file_url":"https://github.com/dsmic/LearnMultiplyByHand/blob/HEAD/learnmultiply_schriftlich.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"ff3d1423e42f8bc5"}},{"code_sha256_prefix":"2c4191db0343d0c3","entry":"attentions_layer","repo":"dsmic/LearnMultiplyByHand","repo_kind":"listed","path":"learnmultiply_schriftlich.py","file_url":"https://github.com/dsmic/LearnMultiplyByHand/blob/HEAD/learnmultiply_schriftlich.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"2c4191db0343d0c3"}},{"code_sha256_prefix":"5f413f4a04beda2d","entry":"str_to_int_list","repo":"dsmic/LearnMultiplyByHand","repo_kind":"listed","path":"learnmultiply_schriftlich.py","file_url":"https://github.com/dsmic/LearnMultiplyByHand/blob/HEAD/learnmultiply_schriftlich.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"5f413f4a04beda2d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}