{"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/correctness-of-automatic-differentiation-via","title":"Correctness of Automatic Differentiation via Diffeologies and Categorical Gluing","arxiv_id":"2001.02209","date":"2020-01-07","proceeding":null,"authors":["Mathieu Huot","Sam Staton","Matthijs Vákár"],"abstract":"We present semantic correctness proofs of Automatic Differentiation (AD). We consider a forward-mode AD method on a higher order language with algebraic data types, and we characterise it as the unique structure preserving macro given a choice of derivatives for basic operations. We describe a rich semantics for differentiable programming, based on diffeological spaces. We show that it interprets our language, and we phrase what it means for the AD method to be correct with respect to this semantics. We show that our characterisation of AD gives rise to an elegant semantic proof of its correctness based on a gluing construction on diffeological spaces. We explain how this is, in essence, a logical relations argument. Finally, we sketch how the analysis extends to other AD methods by considering a continuation-based method.","url_abs":"https://arxiv.org/abs/2001.02209v3","url_pdf":"https://arxiv.org/pdf/2001.02209v3.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":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"correctness-of-automatic-differentiation-via","repo_url":"https://github.com/tomsmeding/ad-dualrev-th","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2001.02209","atlas_url":"https://app.syntology.ai/?focus=2001.02209","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2001.02209"}},"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/tomsmeding/ad-dualrev-th","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"unverified":1},"by_repo_kind":{"listed":{"samples":6,"ran":5,"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":"757ce7b71be98c1e","entry":"impl_sort_order","repo":"tomsmeding/ad-dualrev-th","repo_kind":"listed","path":"generate_table_1.py","file_url":"https://github.com/tomsmeding/ad-dualrev-th/blob/HEAD/generate_table_1.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"757ce7b71be98c1e"}},{"code_sha256_prefix":"73fb6df8be4f9ce9","entry":"normal_cdf","repo":"tomsmeding/ad-dualrev-th","repo_kind":"listed","path":"compare_csv.py","file_url":"https://github.com/tomsmeding/ad-dualrev-th/blob/HEAD/compare_csv.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"73fb6df8be4f9ce9"}},{"code_sha256_prefix":"35466609478510af","entry":"normal_cdf_compl","repo":"tomsmeding/ad-dualrev-th","repo_kind":"listed","path":"compare_csv.py","file_url":"https://github.com/tomsmeding/ad-dualrev-th/blob/HEAD/compare_csv.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35466609478510af"}},{"code_sha256_prefix":"f8ca5d0cc9acdbad","entry":"read_csv","repo":"tomsmeding/ad-dualrev-th","repo_kind":"listed","path":"compare_csv.py","file_url":"https://github.com/tomsmeding/ad-dualrev-th/blob/HEAD/compare_csv.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f8ca5d0cc9acdbad"}},{"code_sha256_prefix":"7fea08d45de241dc","entry":"uniq","repo":"tomsmeding/ad-dualrev-th","repo_kind":"listed","path":"generate_table_1.py","file_url":"https://github.com/tomsmeding/ad-dualrev-th/blob/HEAD/generate_table_1.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7fea08d45de241dc"}},{"code_sha256_prefix":"82d92bec1fea7b9c","entry":"run_benchmarks","repo":"tomsmeding/ad-dualrev-th","repo_kind":"listed","path":"generate_table_1.py","file_url":"https://github.com/tomsmeding/ad-dualrev-th/blob/HEAD/generate_table_1.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":"82d92bec1fea7b9c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}