{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,30]],"date-time":"2026-09-30T05:44:56Z","timestamp":1790747096599,"version":"4.1.0"},"reference-count":30,"publisher":"Association for Computing Machinery (ACM)","issue":"POPL","license":[{"start":{"date-parts":[[2021,1,4]],"date-time":"2021-01-04T00:00:00Z","timestamp":1609718400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"ANR","award":["ANR-19-CE48-0014"],"award-info":[{"award-number":["ANR-19-CE48-0014"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2021,1,4]]},"abstract":"<jats:p>\n                    We study the correctness of automatic differentiation (AD) in the context of a higher-order, Turing-complete language (PCF with real numbers), both in forward and reverse mode. Our main result is that, under mild hypotheses on the primitive functions included in the language, AD is almost everywhere correct, that is, it computes the derivative or gradient of the program under consideration\n                    <jats:italic toggle=\"yes\">except<\/jats:italic>\n                    for a set of Lebesgue measure zero. Stated otherwise, there are inputs on which AD is incorrect, but the probability of randomly choosing one such input is zero. Our result is in fact more precise, in that the set of failure points admits a more explicit description: for example, in case the primitive functions are just constants, addition and multiplication, the set of points where AD fails is contained in a countable union of zero sets of polynomials.\n                  <\/jats:p>","DOI":"10.1145\/3434309","type":"journal-article","created":{"date-parts":[[2021,1,4]],"date-time":"2021-01-04T12:34:24Z","timestamp":1609763664000},"page":"1-27","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":44,"title":["Automatic differentiation in PCF"],"prefix":"10.1145","volume":"5","author":[{"given":"Damiano","family":"Mazza","sequence":"first","affiliation":[{"name":"CNRS, France"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Michele","family":"Pagani","sequence":"additional","affiliation":[{"name":"University of Paris, France"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2021,1,4]]},"reference":[{"key":"e_1_2_1_1_1","volume-title":"Benoit Steiner, Paul A. Tucker, Vijay Vasudevan, Pete Warden, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng.","author":"Abadi Mart\u00edn","year":"2016","unstructured":"Mart\u00edn Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jefrey Dean, Matthieu Devin, Sanjay Ghemawat, Geofrey Irving, Michael Isard, Manjunath Kudlur, Josh Levenberg, Rajat Monga, Sherry Moore, Derek Gordon Murray, Benoit Steiner, Paul A. Tucker, Vijay Vasudevan, Pete Warden, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. 2016. TensorFlow: A System for Large-Scale Machine Learning. In Proceedings of OSDI. USENIX Association, 265-283."},{"key":"e_1_2_1_2_1","volume-title":"Proc. ACM Program. Lang. 4, POPL ( 2020 ), 38 : 1-38 : 28","author":"Abadi Mart\u00edn","unstructured":"Mart\u00edn Abadi and Gordon D. Plotkin. 2020. A simple diferentiable programming language. Proc. ACM Program. Lang. 4, POPL ( 2020 ), 38 : 1-38 : 28."},{"key":"e_1_2_1_3_1","doi-asserted-by":"crossref","unstructured":"Roberto Amadio and Pierre-Louis Curien. 1998. Domains and Lambda-Calculi. Vol. 46. Cambridge University Press.","DOI":"10.1017\/CBO9780511983504"},{"key":"e_1_2_1_4_1","unstructured":"Henk P. Barendregt. 1985. The Lambda Calculus Its Syntax and Semantics. North Holland."},{"key":"e_1_2_1_5_1","first-page":"56","article-title":"On the Versatility of Open Logical Relations-Continuity, Automatic Diferentiation, and a Containment Theorem","author":"Barthe Gilles","year":"2020","unstructured":"Gilles Barthe, Rapha\u00eblle Crubill\u00e9, Ugo Dal Lago, and Francesco Gavazzo. 2020. On the Versatility of Open Logical Relations-Continuity, Automatic Diferentiation, and a Containment Theorem. In Proceedings of ESOP. 56-83.","journal-title":"Proceedings of ESOP."},{"key":"e_1_2_1_6_1","unstructured":"Atilim Baydin Barak Pearlmutter Alexey Radul and Jefrey Siskind. 2018. Automatic diferentiation in machine learning: A survey. Journal of Machine Learning Research 18 ( 2018 ) 1-43."},{"key":"e_1_2_1_7_1","article-title":"The if-problem in automatic diferentiation","volume":"50","author":"Beck Thomas","year":"1994","unstructured":"Thomas Beck and Herbert Fischer. 1994. The if-problem in automatic diferentiation. J. Comput. Appl. Math. 50, 1 ( 1994 ), 119-131.","journal-title":"J. Comput. Appl. Math."},{"key":"e_1_2_1_8_1","doi-asserted-by":"crossref","unstructured":"Alo\u00efs Brunel Damiano Mazza and Michele Pagani. 2020. Backpropagation in the simply typed lambda-calculus with linear negation. PACMPL 4 POPL ( 2020 ) 64 : 1-64 : 27.","DOI":"10.1145\/3371132"},{"key":"e_1_2_1_9_1","first-page":"337","article-title":"A Language for Diferentiable Functions","author":"Gianantonio Pietro Di","year":"2013","unstructured":"Pietro Di Gianantonio and Abbas Edalat. 2013. A Language for Diferentiable Functions. In Proceedings of FOSSACS. 337-352.","journal-title":"Proceedings of FOSSACS."},{"key":"e_1_2_1_10_1","first-page":"186","article-title":"B\u00f6hm Trees","author":"Ehrhard Thomas","year":"2006","unstructured":"Thomas Ehrhard and Laurent Regnier. 2006. B\u00f6hm Trees, Krivine's Machine and the Taylor Expansion of Lambda-Terms. In Proceedings of CiE. 186-197.","journal-title":"Krivine's Machine and the Taylor Expansion of Lambda-Terms. In Proceedings of CiE."},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.tcs.2008.06.001"},{"key":"e_1_2_1_12_1","doi-asserted-by":"crossref","unstructured":"Conal Elliott. 2018. The simple essence of automatic diferentiation. PACMPL 2 ICFP ( 2018 ) 70 : 1-70 : 29.","DOI":"10.1145\/3236765"},{"key":"e_1_2_1_13_1","doi-asserted-by":"crossref","unstructured":"Mart\u00edn H\u00f6tzel Escard\u00f3. 1996. PCF Extended with Real Numbers. Theor. Comput. Sci. 162 1 ( 1996 ) 79-115.","DOI":"10.1016\/0304-3975(95)00250-2"},{"key":"e_1_2_1_14_1","volume-title":"Deep Learning","author":"Goodfellow Ian","unstructured":"Ian Goodfellow, Yoshua Bengio, and Aaron Courville. 2016. Deep Learning. MIT Press. http:\/\/www.deeplearningbook. org Andreas Griewank and Andrea Walther. 2008. Evaluating derivatives-principles and techniques of algorithmic diferentiation, Second Edition. SIAM."},{"key":"e_1_2_1_15_1","first-page":"319","article-title":"Correctness of Automatic Diferentiation via Difeologies and Categorical Gluing","author":"Huot Mathieu","year":"2020","unstructured":"Mathieu Huot, Sam Staton, and Matthijs V\u00e1k\u00e1r. 2020. Correctness of Automatic Diferentiation via Difeologies and Categorical Gluing. In Proceedings of FOSSACS. 319-338.","journal-title":"Proceedings of FOSSACS."},{"key":"e_1_2_1_16_1","unstructured":"Johan Joss. 1976. Algorthmisches Diferenzieren. Ph.D. Dissertation. ETH Zurich."},{"key":"e_1_2_1_17_1","unstructured":"Yann LeCun. 2018. Deep Learning est mort. Vive Diferentiable Programming! ( 2018 ). https:\/\/www.facebook.com\/yann. lecun\/posts\/10155003011462143"},{"key":"e_1_2_1_18_1","volume-title":"On Correctness of Automatic Diferentiation for Non-Diferentiable Functions. CoRR abs\/","author":"Lee Wonyeol","year":"2006","unstructured":"Wonyeol Lee, Hangyeol Yu, Xavier Rival, and Hongseok Yang. 2020. On Correctness of Automatic Diferentiation for Non-Diferentiable Functions. CoRR abs\/ 2006.06903 ( 2020 )."},{"key":"e_1_2_1_19_1","volume-title":"Densities of almost-surely terminating probabilistic programs are diferentiable almost everywhere. CoRR abs\/","author":"Mak Carol","year":"2004","unstructured":"Carol Mak, C.-H. Luke Ong, Hugo Paquet, and Dominik Wagner. 2020. Densities of almost-surely terminating probabilistic programs are diferentiable almost everywhere. CoRR abs\/ 2004.03924 ( 2020 )."},{"key":"e_1_2_1_20_1","unstructured":"Damiano Mazza. 2017. Polyadic Approximations in Logic and Computation. Habilitation thesis. Universit\u00e9 Paris 13."},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/3158094"},{"key":"e_1_2_1_22_1","unstructured":"Boris Mityagin. 2015. The Zero Set of a Real Analytic Function. arXiv: 1512.07276 [math.CA] ( 2015 )."},{"key":"e_1_2_1_23_1","unstructured":"Adam Paszke Sam Gross Soumith Chintala Gregory Chanan Edward Yang Zachary DeVito Zeming Lin Alban Desmaison Luca Antiga and Adam Lerer. 2017. Automatic diferentiation in PyTorch. ( 2017 )."},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/1330017.1330018"},{"key":"e_1_2_1_25_1","doi-asserted-by":"crossref","unstructured":"Gordon Plotkin. 1977. LCF Considered as a Programming Language. Theoretical Computer Science 5 3 ( 1977 ) 223-255.","DOI":"10.1016\/0304-3975(77)90044-5"},{"key":"e_1_2_1_26_1","doi-asserted-by":"crossref","unstructured":"Amir Shaikhha Andrew Fitzgibbon Dimitrios Vytiniotis and Simon Peyton Jones. 2019. Eficient diferentiable programming in a functional array-processing language. PACMPL 3 ICFP ( 2019 ) 97 : 1-97 : 30.","DOI":"10.1145\/3341701"},{"key":"e_1_2_1_27_1","doi-asserted-by":"crossref","unstructured":"Bert Speelpenning. 1980. Compiling Fast Partial Derivatives of Functions Given by Algorithms. Ph.D. Dissertation. University of Illinois at Urbana-Champaign.","DOI":"10.2172\/5254402"},{"key":"e_1_2_1_28_1","unstructured":"\u00c1gnes Szendrei. 1986. Clones in Universal Algebra. Presses de l'Universit\u00e9 de Montr\u00e9al."},{"key":"e_1_2_1_29_1","doi-asserted-by":"crossref","unstructured":"Fei Wang Daniel Zheng James M. Decker Xilun Wu Gr\u00e9gory M. Essertel and Tiark Rompf. 2019. Demystifying diferentiable programming: shift\/reset the penultimate backpropagator. PACMPL 3 ICFP ( 2019 ) 96 : 1-96 : 31.","DOI":"10.1145\/3341700"},{"key":"e_1_2_1_30_1","first-page":"148","article-title":"LF-PPL","author":"Zhou Yuan","year":"2019","unstructured":"Yuan Zhou, Bradley J. Gram-Hansen, Tobias Kohn, Tom Rainforth, Hongseok Yang, and Frank Wood. 2019. LF-PPL: A Low-Level First Order Probabilistic Programming Language for Non-Diferentiable Models. In Proceedings of AISTATS. 148-157.","journal-title":"In Proceedings of AISTATS."}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3434309","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3434309","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,6,19]],"date-time":"2026-06-19T07:29:34Z","timestamp":1781854174000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3434309"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021,1,4]]},"references-count":30,"journal-issue":{"issue":"POPL","published-print":{"date-parts":[[2021,1,4]]}},"alternative-id":["10.1145\/3434309"],"URL":"https:\/\/doi.org\/10.1145\/3434309","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2021,1,4]]},"assertion":[{"value":"2021-01-04","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}