{"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/demystifying-differentiable-programming","title":"Demystifying Differentiable Programming: Shift/Reset the Penultimate Backpropagator","arxiv_id":"1803.10228","date":"2018-03-27","proceeding":null,"authors":["Fei Wang","Daniel Zheng","James Decker","Xilun Wu","Grégory M. Essertel","Tiark Rompf"],"abstract":"Deep learning has seen tremendous success over the past decade in computer vision, machine translation, and gameplay. This success rests in crucial ways on gradient-descent optimization and the ability to learn parameters of a neural network by backpropagating observed errors. However, neural network architectures are growing increasingly sophisticated and diverse, which motivates an emerging quest for even more general forms of differentiable programming, where arbitrary parameterized computations can be trained by gradient descent. In this paper, we take a fresh look at automatic differentiation (AD) techniques, and especially aim to demystify the reverse-mode form of AD that generalizes backpropagation in neural networks. We uncover a tight connection between reverse-mode AD and delimited continuations, which permits implementing reverse-mode AD purely via operator overloading and without any auxiliary data structures. We further show how this formulation of AD can be fruitfully combined with multi-stage programming (staging), leading to a highly efficient implementation that combines the performance benefits of deep learning frameworks based on explicit reified computation graphs (e.g., TensorFlow) with the expressiveness of pure library approaches (e.g., PyTorch).","url_abs":"https://arxiv.org/abs/1803.10228v3","url_pdf":"https://arxiv.org/pdf/1803.10228v3.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":"demystifying-differentiable-programming","repo_url":"https://github.com/feiwang3311/Lantern","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1803.10228","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1803.10228"}},"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/feiwang3311/Lantern","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"unverified":14},"by_repo_kind":{"official":{"samples":14,"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":"ea65f139d640ffed","entry":"filter_small_glove","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/ICFP18evaluation/evaluationTreeLSTM/Lantern/preprocess_data.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/ICFP18evaluation/evaluationTreeLSTM/Lantern/preprocess_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"ea65f139d640ffed"}},{"code_sha256_prefix":"babfc77723831db5","entry":"getAllwordsFromOneData","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/ICFP18evaluation/evaluationTreeLSTM/Lantern/preprocess_data.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/ICFP18evaluation/evaluationTreeLSTM/Lantern/preprocess_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"babfc77723831db5"}},{"code_sha256_prefix":"52ac662e317d65b8","entry":"getColor","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/ICFP18evaluation/plot.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/ICFP18evaluation/plot.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"52ac662e317d65b8"}},{"code_sha256_prefix":"be9c87b24a9182f3","entry":"getColor","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/NIPS18evaluation/plot.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/NIPS18evaluation/plot.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"be9c87b24a9182f3"}},{"code_sha256_prefix":"0c1be32e92254749","entry":"getColor","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/PLDI19evaluation/plot.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/PLDI19evaluation/plot.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"0c1be32e92254749"}},{"code_sha256_prefix":"92bc0ed9e17fef8c","entry":"getColor","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/PLDI19evaluation/plot_stats.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/PLDI19evaluation/plot_stats.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"92bc0ed9e17fef8c"}},{"code_sha256_prefix":"21eaf8f6a9acd245","entry":"getLabelFromFileName","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/ICFP18evaluation/plot.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/ICFP18evaluation/plot.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"21eaf8f6a9acd245"}},{"code_sha256_prefix":"62511a53a1185d79","entry":"get_data","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/ICFP18evaluation/plot.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/ICFP18evaluation/plot.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"62511a53a1185d79"}},{"code_sha256_prefix":"eb68e8019c421bbe","entry":"maybe_download","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/PLDI19evaluation/generate_cifar10_data.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/PLDI19evaluation/generate_cifar10_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"eb68e8019c421bbe"}},{"code_sha256_prefix":"95b48c195f605686","entry":"parseOneSample","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/ICFP18evaluation/evaluationTreeLSTM/Lantern/preprocess_data.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/ICFP18evaluation/evaluationTreeLSTM/Lantern/preprocess_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"95b48c195f605686"}},{"code_sha256_prefix":"7137e8ae47a966ce","entry":"read_pickle_from_file","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/PLDI19evaluation/generate_cifar10_data.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/PLDI19evaluation/generate_cifar10_data.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"7137e8ae47a966ce"}},{"code_sha256_prefix":"682d40949a8522c7","entry":"run","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/ICFP18evaluation/evaluationLSTM/min-char-lstm-pytorch.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/ICFP18evaluation/evaluationLSTM/min-char-lstm-pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"682d40949a8522c7"}},{"code_sha256_prefix":"4b1b4b1c0f2129b2","entry":"run","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/ICFP18evaluation/evaluationRNN/min-char-rnn-pytorch.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/ICFP18evaluation/evaluationRNN/min-char-rnn-pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"4b1b4b1c0f2129b2"}},{"code_sha256_prefix":"b16f24abf700b5c4","entry":"run","repo":"feiwang3311/Lantern","repo_kind":"official","path":"src/out/ICFP18evaluation/evaluationRNN/min-char-rnn.py","file_url":"https://github.com/feiwang3311/Lantern/blob/HEAD/src/out/ICFP18evaluation/evaluationRNN/min-char-rnn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"b16f24abf700b5c4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}