{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,12,5]],"date-time":"2025-12-05T12:28:48Z","timestamp":1764937728303,"version":"3.41.0"},"reference-count":55,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA1","license":[{"start":{"date-parts":[[2024,4,29]],"date-time":"2024-04-29T00:00:00Z","timestamp":1714348800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/"}],"funder":[{"name":"NSF","award":["2238839"],"award-info":[{"award-number":["2238839"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2024,4,29]]},"abstract":"<jats:p>\n            Computations in physical simulation, computer graphics, and probabilistic inference often require the differentiation of discontinuous processes due to contact, occlusion, and changes at a point in time. Popular differentiable programming languages, such as PyTorch and JAX, ignore discontinuities during differentiation. This is incorrect for\n            <jats:italic>parametric discontinuities<\/jats:italic>\n            \u2014conditionals containing at least one real-valued parameter and at least one variable of integration. We introduce Potto, the first differentiable first-order programming language to soundly differentiate parametric discontinuities. We present a denotational semantics for programs and program derivatives and show the two accord. We describe the implementation of Potto, which enables separate compilation of programs. Our prototype implementation overcomes previous compile-time bottlenecks achieving an 88.1x and 441.2x speed up in compile time and a 2.5x and 7.9x speed up in runtime, respectively, on two increasingly large image stylization benchmarks. We showcase Potto by implementing a prototype differentiable renderer with separately compiled shaders.\n          <\/jats:p>","DOI":"10.1145\/3649843","type":"journal-article","created":{"date-parts":[[2024,4,29]],"date-time":"2024-04-29T17:53:50Z","timestamp":1714413230000},"page":"893-922","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":6,"title":["Distributions for Compositionally Differentiating Parametric Discontinuities"],"prefix":"10.1145","volume":"8","author":[{"ORCID":"https:\/\/orcid.org\/0009-0007-8735-001X","authenticated-orcid":false,"given":"Jesse","family":"Michel","sequence":"first","affiliation":[{"name":"Massachusetts Institute of Technology, Cambridge, USA"}]},{"ORCID":"https:\/\/orcid.org\/0009-0008-5057-2222","authenticated-orcid":false,"given":"Kevin","family":"Mu","sequence":"additional","affiliation":[{"name":"University of Washington, Seattle, USA"}]},{"ORCID":"https:\/\/orcid.org\/0009-0008-8524-9505","authenticated-orcid":false,"given":"Xuanda","family":"Yang","sequence":"additional","affiliation":[{"name":"University of California, San Diego, USA"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6302-9327","authenticated-orcid":false,"given":"Sai Praveen","family":"Bangaru","sequence":"additional","affiliation":[{"name":"Massachusetts Institute of Technology, Cambridge, USA"}]},{"ORCID":"https:\/\/orcid.org\/0009-0003-3929-1386","authenticated-orcid":false,"given":"Elias Rojas","family":"Collins","sequence":"additional","affiliation":[{"name":"Massachusetts Institute of Technology, Cambridge, USA"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3016-1169","authenticated-orcid":false,"given":"Gilbert","family":"Bernstein","sequence":"additional","affiliation":[{"name":"University of Washington, Cambrdige, USA"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6243-9543","authenticated-orcid":false,"given":"Jonathan","family":"Ragan-Kelley","sequence":"additional","affiliation":[{"name":"Massachusetts Institute of Technology, Cambridge, USA"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-6928-0456","authenticated-orcid":false,"given":"Michael","family":"Carbin","sequence":"additional","affiliation":[{"name":"Massachusetts Institute of Technology, Cambridge, USA"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-5443-470X","authenticated-orcid":false,"given":"Tzu-Mao","family":"Li","sequence":"additional","affiliation":[{"name":"University of California, San Diego, USA"}]}],"member":"320","published-online":{"date-parts":[[2024,4,29]]},"reference":[{"key":"e_1_2_2_1_1","unstructured":"Mart\u00edn Abadi Ashish Agarwal Paul Barham Eugene Brevdo Zhifeng Chen Craig Citro Greg S. Corrado Andy Davis Jeffrey Dean Matthieu Devin Sanjay Ghemawat Ian Goodfellow Andrew Harp Geoffrey Irving Michael Isard Yangqing Jia Rafal Jozefowicz Lukasz Kaiser Manjunath Kudlur Josh Levenberg Dan Man\u00e9 Rajat Monga Sherry Moore Derek Murray Chris Olah Mike Schuster Jonathon Shlens Benoit Steiner Ilya Sutskever Kunal Talwar Paul Tucker Vincent Vanhoucke Vijay Vasudevan Fernanda Vi\u00e9gas Oriol Vinyals Pete Warden Martin Wattenberg Martin Wicke Yuan Yu and Xiaoqiang Zheng. 2015. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems."},{"key":"e_1_2_2_2_1","volume-title":"Plotkin","author":"Abadi Mart\u00edn","year":"2019","unstructured":"Mart\u00edn Abadi and Gordon D. Plotkin. 2019. A Simple Differentiable Programming Language."},{"key":"e_1_2_2_3_1","volume-title":"Aether: An Embedded Domain Specific Sampling Language for Monte Carlo Rendering.","author":"Anderson Luke","year":"2017","unstructured":"Luke Anderson, Tzu-Mao Li, Jaakko Lehtinen, and Fr\u00e9do Durand. 2017. Aether: An Embedded Domain Specific Sampling Language for Monte Carlo Rendering."},{"key":"e_1_2_2_4_1","volume-title":"Azevedo de Amorim and Christopher Lam","author":"Pedro","year":"2022","unstructured":"Pedro H. Azevedo de Amorim and Christopher Lam. 2022. Distribution Theoretic Semantics for Non-Smooth Differentiable Programming. arXiv e-prints."},{"key":"e_1_2_2_5_1","doi-asserted-by":"crossref","unstructured":"Sai Bangaru Jesse Michel Kevin Mu Gilbert Bernstein Tzu-Mao Li and Jonathan Ragan-Kelley. 2021. Systematically Differentiating Parametric Discontinuities.","DOI":"10.1145\/3450626.3459775"},{"volume-title":"Unbiased warped-area sampling for differentiable rendering","author":"Bangaru Sai Praveen","key":"e_1_2_2_6_1","unstructured":"Sai Praveen Bangaru, Tzu-Mao Li, and Fr\u00e9do Durand. 2020. Unbiased warped-area sampling for differentiable rendering. Special Interest Group on Computer Graphics and Interactive Techniques in Asia."},{"key":"e_1_2_2_7_1","article-title":"Pyro: Deep Universal Probabilistic Programming","author":"Bingham Eli","year":"2019","unstructured":"Eli Bingham, Jonathan P. Chen, Martin Jankowiak, Fritz Obermeyer, Neeraj Pradhan, Theofanis Karaletsos, Rohit Singh, Paul Szerlip, Paul Horsfall, and Noah D. Goodman. 2019. Pyro: Deep Universal Probabilistic Programming. Journal of Machine Learning Research.","journal-title":"Journal of Machine Learning Research."},{"key":"e_1_2_2_8_1","volume-title":"Chris Leary, Dougal Maclaurin, and Skye Wanderman-Milne.","author":"Bradbury James","year":"2018","unstructured":"James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, and Skye Wanderman-Milne. 2018. JAX: composable transformations of Python+NumPy programs. http:\/\/github.com\/google\/jax"},{"key":"e_1_2_2_9_1","doi-asserted-by":"crossref","unstructured":"Luca Cardelli. 1997. Program Fragments Linking and Modularization. Principles of Programming Languages.","DOI":"10.1145\/263699.263735"},{"key":"e_1_2_2_10_1","doi-asserted-by":"crossref","unstructured":"Swarat Chaudhuri and Armando Solar-Lezama. 2010. Smooth Interpretation. In Programming Language Design and Implementation.","DOI":"10.1145\/1806596.1806629"},{"key":"e_1_2_2_11_1","unstructured":"Brian Conrad. 2006. Math 396. Stokes\u2019 theorem with corners. https:\/\/math.stanford.edu\/ conrad\/diffgeomPage\/handouts\/stokescorners.pdf Accessed: 2022-11-10"},{"key":"e_1_2_2_12_1","volume-title":"Mansinghka","author":"Cusumano-Towner Marco F.","year":"2019","unstructured":"Marco F. Cusumano-Towner, Feras A. Saad, Alexander K. Lew, and Vikash K. Mansinghka. 2019. Gen: A General-Purpose Probabilistic Programming System with Programmable Inference. In Programming Language Design and Implementation."},{"key":"e_1_2_2_13_1","doi-asserted-by":"crossref","DOI":"10.1145\/2601097.2601169","article-title":"Vector Graphics Complexes. ACM","author":"Dalstein Boris","year":"2014","unstructured":"Boris Dalstein, R\u00e9mi Ronfard, and Michiel van de Panne. 2014. Vector Graphics Complexes. ACM Trans. Graph..","journal-title":"Trans. Graph.."},{"key":"e_1_2_2_14_1","doi-asserted-by":"crossref","DOI":"10.1109\/TPAMI.2011.33","article-title":"Model-based 3D hand pose estimation from monocular video","author":"de La Gorce Martin","year":"2011","unstructured":"Martin de La Gorce, David J Fleet, and Nikos Paragios. 2011. Model-based 3D hand pose estimation from monocular video. IEEE Trans. Pattern Anal. Mach. Intell..","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell.."},{"key":"e_1_2_2_15_1","volume-title":"The Free Encyclopedia. https:\/\/commons.wikimedia.org\/wiki\/File:Diffeomorphism_of_a_square.svg [Online","author":"del Toro Streb Erik","year":"2024","unstructured":"Erik del Toro Streb and Oleg Alexandrov. 2009. Diffeomorphism of a square \u2014 Wikipedia, The Free Encyclopedia. https:\/\/commons.wikimedia.org\/wiki\/File:Diffeomorphism_of_a_square.svg [Online; accessed 3-March-2024]"},{"volume-title":"Multidimensional Real Analysis II","author":"Duistermaat J.J.","key":"e_1_2_2_16_1","unstructured":"J.J. Duistermaat and J.A.C. Kolk. 2004. Multidimensional Real Analysis II. Cambridge University Press."},{"key":"e_1_2_2_17_1","volume-title":"The Simple Essence of Automatic Differentiation. International Conference on Functional Programming.","author":"Elliott Conal","year":"2018","unstructured":"Conal Elliott. 2018. The Simple Essence of Automatic Differentiation. International Conference on Functional Programming."},{"key":"e_1_2_2_18_1","doi-asserted-by":"crossref","unstructured":"Timon Gehr Samuel Steffen and Martin Vechev. 2020. \u03bb PSI: exact inference for higher-order probabilistic programs. In Programming Language Design and Implementation.","DOI":"10.1145\/3385412.3386006"},{"key":"e_1_2_2_19_1","volume-title":"DiffTaichi: Differentiable Programming for Physical Simulation. International Conference on Learning Representations.","author":"Hu Yuanming","year":"2020","unstructured":"Yuanming Hu, Luke Anderson, Tzu-Mao Li, Qi Sun, Nathan Carr, Jonathan Ragan-Kelley, and Fr\u00e9do Durand. 2020. DiffTaichi: Differentiable Programming for Physical Simulation. International Conference on Learning Representations."},{"key":"e_1_2_2_20_1","unstructured":"Jeevana Priya Inala Sicun Gao Soonho Kong and Armando Solar-Lezama. 2018. REAS: combining numerical optimization with SAT solving. arXiv."},{"key":"e_1_2_2_21_1","doi-asserted-by":"crossref","unstructured":"Dexter Kozen. 1981. Semantics of probabilistic programs. J. Comput. System Sci..","DOI":"10.1016\/0022-0000(81)90036-2"},{"volume-title":"Modular primitives for high-performance differentiable rendering","author":"Laine Samuli","key":"e_1_2_2_22_1","unstructured":"Samuli Laine, Janne Hellsten, Tero Karras, Yeongho Seol, Jaakko Lehtinen, and Timo Aila. 2020. Modular primitives for high-performance differentiable rendering. Special Interest Group on Computer Graphics and Interactive Techniques in Asia."},{"key":"e_1_2_2_23_1","volume-title":"International Symposium on Non-Photorealistic Animation and Rendering. 8 pages.","author":"Lake Adam","year":"2000","unstructured":"Adam Lake, Carl Marshall, Mark Harris, and Marc Blackstein. 2000. Stylized Rendering Techniques for Scalable Real-Time 3D Animation. In International Symposium on Non-Photorealistic Animation and Rendering. 8 pages."},{"key":"e_1_2_2_24_1","volume-title":"Introduction to Smooth Manifolds","author":"Lee John M.","unstructured":"John M. Lee. 2012. Introduction to Smooth Manifolds, 2nd Ed.. Springer-Verlag.","edition":"2"},{"key":"e_1_2_2_25_1","unstructured":"Wonyeol Lee Hangyeol Yu Xavier Rival and Hongseok Yang. 2020. On Correctness of Automatic Differentiation for Non-Differentiable Functions. In Neural Information Processing Systems."},{"key":"e_1_2_2_26_1","unstructured":"Wonyeol Lee Hangyeol Yu and Hongseok Yang. 2018. Reparameterization Gradient for Non-Differentiable Models. In Neural Information Processing Systems."},{"key":"e_1_2_2_27_1","unstructured":"Alexander K Lew Marco F Cusumano-Towner Benjamin Sherman Michael Carbin and Vikash K Mansinghka. 2019. Trace types and denotational semantics for sound programmable inference in probabilistic languages."},{"key":"e_1_2_2_28_1","volume-title":"Mansinghka","author":"Lew Alexander K.","year":"2023","unstructured":"Alexander K. Lew, Mathieu Huot, Sam Staton, and Vikash K. Mansinghka. 2023. ADEV: Sound Automatic Differentiation of Expected Values of Probabilistic Programs."},{"volume-title":"Differentiable Monte Carlo Ray Tracing through Edge Sampling","author":"Li Tzu-Mao","key":"e_1_2_2_29_1","unstructured":"Tzu-Mao Li, Miika Aittala, Fr\u00e9do Durand, and Jaakko Lehtinen. 2018. Differentiable Monte Carlo Ray Tracing through Edge Sampling. Special Interest Group on Computer Graphics and Interactive Techniques in Asia."},{"volume-title":"Differentiable Vector Graphics Rasterization for Editing and Learning","author":"Li Tzu-Mao","key":"e_1_2_2_30_1","unstructured":"Tzu-Mao Li, Michal Luk\u00e1\u010d, Gharbi Micha\u00ebl, and Jonathan Ragan-Kelley. 2020. Differentiable Vector Graphics Rasterization for Editing and Learning. Special Interest Group on Computer Graphics and Interactive Techniques in Asia."},{"key":"e_1_2_2_31_1","volume-title":"International Conference on Computer Vision.","author":"Liu Shichen","year":"2019","unstructured":"Shichen Liu, Tianye Li, Weikai Chen, and Hao Li. 2019. Soft Rasterizer: A Differentiable Renderer for Image-based 3D Reasoning. International Conference on Computer Vision."},{"volume-title":"OpenDR: An Approximate Differentiable Renderer. In European Conference on Computer Vision.","author":"Matthew","key":"e_1_2_2_32_1","unstructured":"Matthew M. Loper and Michael J. Black. 2014. OpenDR: An Approximate Differentiable Renderer. In European Conference on Computer Vision."},{"key":"e_1_2_2_33_1","unstructured":"Christopher Lutz. 1986. Janus: a time-reversible language."},{"key":"e_1_2_2_34_1","volume-title":"Sparcl: A Language for Partially-Invertible Computation.","author":"Matsuda Kazutaka","year":"2020","unstructured":"Kazutaka Matsuda and Meng Wang. 2020. Sparcl: A Language for Partially-Invertible Computation."},{"key":"e_1_2_2_35_1","doi-asserted-by":"crossref","unstructured":"Damiano Mazza and Michele Pagani. 2021. Automatic differentiation in PCF.","DOI":"10.1145\/3434309"},{"volume-title":"PyTorch: An Imperative Style","author":"Paszke Adam","key":"e_1_2_2_36_1","unstructured":"Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. PyTorch: An Imperative Style, High-Performance Deep Learning Library. In Neural Information Processing Systems."},{"key":"e_1_2_2_37_1","doi-asserted-by":"crossref","DOI":"10.1145\/1330017.1330018","article-title":"Reverse-mode AD in a Functional Framework: Lambda the Ultimate Backpropagator","author":"Pearlmutter Barak A.","year":"2008","unstructured":"Barak A. Pearlmutter and Jeffrey Mark Siskind. 2008. Reverse-mode AD in a Functional Framework: Lambda the Ultimate Backpropagator. Transactions on Programming Languages and Systems.","journal-title":"Transactions on Programming Languages and Systems."},{"key":"e_1_2_2_38_1","doi-asserted-by":"crossref","unstructured":"Ken Perlin. 1985. An image synthesizer. Comput. Graph. (Proc. SIGGRAPH).","DOI":"10.1145\/325334.325247"},{"key":"e_1_2_2_39_1","unstructured":"Walter Rudin. 1953. Principles of mathematical analysis."},{"key":"e_1_2_2_40_1","volume-title":"Mathematical Foundations of Computer Science","author":"Saheb-Djahromi N.","year":"1978","unstructured":"N. Saheb-Djahromi. 1978. Probabilistic LCF. In Mathematical Foundations of Computer Science 1978."},{"key":"e_1_2_2_41_1","unstructured":"Laurent Schwartz. 1950. Th\u00e9orie des distributions."},{"volume-title":"Sur l\u2019impossibilit\u00e9 de la multiplication des distributions. C. R. Acad","author":"Schwartz Laurent","key":"e_1_2_2_42_1","unstructured":"Laurent Schwartz. 1954. Sur l\u2019impossibilit\u00e9 de la multiplication des distributions. C. R. Acad. Sci. Paris."},{"key":"e_1_2_2_43_1","unstructured":"Chung-chieh Shan and Norman Ramsey. 2017. Exact Bayesian Inference by Symbolic Disintegration. In Priniciples of Programming Languages."},{"key":"e_1_2_2_44_1","doi-asserted-by":"crossref","unstructured":"Benjamin Sherman Jesse Michel and Michael Carbin. 2021. \u03bb _S: Computable Semantics for Differentiable Programming with Higher-Order Functions and Datatypes.","DOI":"10.1145\/3410266"},{"key":"e_1_2_2_45_1","unstructured":"Peter Shirley. 2020. Ray Tracing in One Weekend. https:\/\/raytracing.github.io\/books\/RayTracingInOneWeekend.html"},{"issue":"9","key":"e_1_2_2_46_1","first-page":"0","article-title":"Stan Modeling Language Users Guide and Reference Manual","volume":"2","author":"Team Stan Development","year":"2015","unstructured":"Stan Development Team. 2015. Stan Modeling Language Users Guide and Reference Manual, Version 2.9.0. http:\/\/mc-stan.org\/","journal-title":"Version"},{"key":"e_1_2_2_47_1","volume-title":"European Symposium on Programming.","author":"Staton Sam","year":"2017","unstructured":"Sam Staton. 2017. Commutative semantics for probabilistic programming. In European Symposium on Programming."},{"key":"e_1_2_2_48_1","doi-asserted-by":"publisher","DOI":"10.1002\/9783527653614"},{"volume-title":"Statistical Learning Theory","author":"Vapnik Vladimir N.","key":"e_1_2_2_49_1","unstructured":"Vladimir N. Vapnik. 1998. Statistical Learning Theory. Wiley-Interscience."},{"key":"e_1_2_2_50_1","doi-asserted-by":"crossref","unstructured":"R. E. Wengert. 1964. A Simple Automatic Derivative Evaluation Program. Commun. ACM.","DOI":"10.1145\/355586.364791"},{"key":"e_1_2_2_51_1","article-title":"Watertight Ray\/Triangle Intersection","author":"Woop Sven","year":"2013","unstructured":"Sven Woop, Carsten Benthin, and Ingo Wald. 2013. Watertight Ray\/Triangle Intersection. Journal of Computer Graphics Techniques (JCGT).","journal-title":"Journal of Computer Graphics Techniques (JCGT)."},{"key":"e_1_2_2_52_1","unstructured":"Yuting Yang Connelly Barnes Andrew Adams and Adam Finkelstein. 2022. A\u03b4 : Autodiff for Discontinuous Programs - Applied to Shaders."},{"key":"e_1_2_2_53_1","unstructured":"Dong Yu Adam Eversole Mike Seltzer Kaisheng Yao Oleksii Kuchaiev Yu Zhang Frank Seide Zhiheng Huang Brian Guenter Huaming Wang Jasha Droppo Geoffrey Zweig Chris Rossbach Jie Gao Andreas Stolcke Jon Currey Malcolm Slaney Guoguo Chen Amit Agarwal Chris Basoglu Marko Padmilac Alexey Kamenev Vladimir Ivanov Scott Cypher Hari Parthasarathi Bhaskar Mitra Baolin Peng and Xuedong Huang. 2014. An Introduction to Computational Networks and the Computational Network Toolkit. Microsoft Research."},{"key":"e_1_2_2_54_1","doi-asserted-by":"crossref","unstructured":"Shuang Zhao Wenzel Jakob and Tzu-Mao Li. 2020. Physics-Based Differentiable Rendering: From Theory to Implementation. In SIGGRAPH Courses.","DOI":"10.1145\/3388769.3407454"},{"key":"e_1_2_2_55_1","volume-title":"LF-PPL: A Low-Level First Order Probabilistic Programming Language for Non-Differentiable Models. In International Conference on Artificial Intelligence and Statistics.","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-Differentiable Models. In International Conference on Artificial Intelligence and Statistics."}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3649843","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3649843","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T22:54:06Z","timestamp":1750287246000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3649843"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,4,29]]},"references-count":55,"journal-issue":{"issue":"OOPSLA1","published-print":{"date-parts":[[2024,4,29]]}},"alternative-id":["10.1145\/3649843"],"URL":"https:\/\/doi.org\/10.1145\/3649843","relation":{},"ISSN":["2475-1421"],"issn-type":[{"type":"electronic","value":"2475-1421"}],"subject":[],"published":{"date-parts":[[2024,4,29]]},"assertion":[{"value":"2024-04-29","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}