{"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/the-elements-of-differentiable-programming","title":"The Elements of Differentiable Programming","arxiv_id":"2403.14606","date":"2024-03-21","proceeding":null,"authors":["Mathieu Blondel","Vincent Roulet"],"abstract":"Artificial intelligence has recently experienced remarkable advances, fueled by large models, vast datasets, accelerated hardware, and, last but not least, the transformative power of differentiable programming. This new programming paradigm enables end-to-end differentiation of complex computer programs (including those with control flows and data structures), making gradient-based optimization of program parameters possible. As an emerging paradigm, differentiable programming builds upon several areas of computer science and applied mathematics, including automatic differentiation, graphical models, optimization and statistics. This book presents a comprehensive review of the fundamental concepts useful for differentiable programming. We adopt two main perspectives, that of optimization and that of probability, with clear analogies between the two. Differentiable programming is not merely the differentiation of programs, but also the thoughtful design of programs intended for differentiation. By making programs differentiable, we inherently introduce probability distributions over their execution, providing a means to quantify the uncertainty associated with program outputs.","url_abs":"https://arxiv.org/abs/2403.14606v3","url_pdf":"https://arxiv.org/pdf/2403.14606v3.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":"the-elements-of-differentiable-programming","repo_url":"https://github.com/diffprog/code","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2403.14606","atlas_url":"https://app.syntology.ai/?focus=2403.14606","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.14606"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/diffprog/code","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":22,"unverified":1},"by_repo_kind":{"official":{"samples":23,"ran":22,"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":"587d28cddf001d22","entry":"and_op","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_logical_ops_3d.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_logical_ops_3d.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"587d28cddf001d22"}},{"code_sha256_prefix":"802c2203920ee74b","entry":"argmax","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_soft_thresholding.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_soft_thresholding.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"802c2203920ee74b"}},{"code_sha256_prefix":"f2d5d8a5fd1be3c9","entry":"chain_log_sum","repo":"diffprog/code","repo_kind":"official","path":"graphical_models/inference_chain.py","file_url":"https://github.com/diffprog/code/blob/HEAD/graphical_models/inference_chain.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f2d5d8a5fd1be3c9"}},{"code_sha256_prefix":"7aa9a0e7f0c35c60","entry":"chain_marginal","repo":"diffprog/code","repo_kind":"official","path":"graphical_models/inference_chain.py","file_url":"https://github.com/diffprog/code/blob/HEAD/graphical_models/inference_chain.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7aa9a0e7f0c35c60"}},{"code_sha256_prefix":"46817697c062b78f","entry":"chain_product","repo":"diffprog/code","repo_kind":"official","path":"graphical_models/inference_chain.py","file_url":"https://github.com/diffprog/code/blob/HEAD/graphical_models/inference_chain.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"46817697c062b78f"}},{"code_sha256_prefix":"ac4084b445f0372b","entry":"colorline","repo":"diffprog/code","repo_kind":"official","path":"differentiating_integration/plot_ode_regression.py","file_url":"https://github.com/diffprog/code/blob/HEAD/differentiating_integration/plot_ode_regression.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ac4084b445f0372b"}},{"code_sha256_prefix":"13c7a0f0304259eb","entry":"fun","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_global_vs_local_smoothing.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_global_vs_local_smoothing.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"13c7a0f0304259eb"}},{"code_sha256_prefix":"7a10f8d6f8e878d2","entry":"gaussian_cdf","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_soft_comparison.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_soft_comparison.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7a10f8d6f8e878d2"}},{"code_sha256_prefix":"b14f8c6c86585a4e","entry":"gaussian_pdf","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_stochastic_process_perspective.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_stochastic_process_perspective.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b14f8c6c86585a4e"}},{"code_sha256_prefix":"d2f49ba064bce628","entry":"get_compa_ops","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_compa_ops.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_compa_ops.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d2f49ba064bce628"}},{"code_sha256_prefix":"fbed1f8b664b20d4","entry":"get_mean_colormap","repo":"diffprog/code","repo_kind":"official","path":"differentiating_integration/plot_ode_regression.py","file_url":"https://github.com/diffprog/code/blob/HEAD/differentiating_integration/plot_ode_regression.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fbed1f8b664b20d4"}},{"code_sha256_prefix":"b8aba2e639831d0e","entry":"get_relaxation_logical_op","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_logical_ops.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_logical_ops.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b8aba2e639831d0e"}},{"code_sha256_prefix":"bbda47f128c79ae1","entry":"heaviside","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_soft_comparison.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_soft_comparison.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bbda47f128c79ae1"}},{"code_sha256_prefix":"a9bb014b256b8027","entry":"ifelse","repo":"diffprog/code","repo_kind":"official","path":"control_flows/bubble_sort.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/bubble_sort.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a9bb014b256b8027"}},{"code_sha256_prefix":"81dda7d4de68eb97","entry":"kernel","repo":"diffprog/code","repo_kind":"official","path":"data_struct/plot_dict_kernel_estim.py","file_url":"https://github.com/diffprog/code/blob/HEAD/data_struct/plot_dict_kernel_estim.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"81dda7d4de68eb97"}},{"code_sha256_prefix":"2399ee8f6e7c8a6d","entry":"kernel_smoother","repo":"diffprog/code","repo_kind":"official","path":"data_struct/plot_dict_kernel_estim.py","file_url":"https://github.com/diffprog/code/blob/HEAD/data_struct/plot_dict_kernel_estim.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2399ee8f6e7c8a6d"}},{"code_sha256_prefix":"efeea7d6cead0548","entry":"local_smooth_fun","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_global_vs_local_smoothing.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_global_vs_local_smoothing.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"efeea7d6cead0548"}},{"code_sha256_prefix":"8e99ad829bc70d6d","entry":"logistic","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_soft_comparison.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_soft_comparison.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8e99ad829bc70d6d"}},{"code_sha256_prefix":"0cf69f025a2232ed","entry":"or_op","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_logical_ops_3d.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_logical_ops_3d.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0cf69f025a2232ed"}},{"code_sha256_prefix":"1af82a1fc3f8bb07","entry":"sigmoid","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_global_vs_local_smoothing.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_global_vs_local_smoothing.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1af82a1fc3f8bb07"}},{"code_sha256_prefix":"91f293d92f3b9828","entry":"st","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_soft_thresholding.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_soft_thresholding.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"91f293d92f3b9828"}},{"code_sha256_prefix":"8bb9ef7b2dd1407c","entry":"step","repo":"diffprog/code","repo_kind":"official","path":"control_flows/plot_soft_thresholding.py","file_url":"https://github.com/diffprog/code/blob/HEAD/control_flows/plot_soft_thresholding.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8bb9ef7b2dd1407c"}},{"code_sha256_prefix":"252ab259ff2634ab","entry":"truncate_colormap","repo":"diffprog/code","repo_kind":"official","path":"differentiating_integration/plot_ode_regression.py","file_url":"https://github.com/diffprog/code/blob/HEAD/differentiating_integration/plot_ode_regression.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"252ab259ff2634ab"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}