Systematically differentiating parametric discontinuities
Sai Praveen Bangaru, Jesse Michel, Kevin Mu, Gilbert Bernstein, Tzu-Mao Li, Jonathan Ragan-Kelley
Abstract
Emerging research in computer graphics, inverse problems, and machine learning requires us to differentiate and optimize parametric discontinuities. These discontinuities appear in object boundaries, occlusion, contact, and sudden change over time. In many domains, such as rendering and physics simulation, we differentiate the parameters of models that are expressed as integrals over discontinuous functions. Ignoring the discontinuities during differentiation often has a significant impact on the optimization process. Previous approaches either apply specialized hand-derived solutions, smooth out the discontinuities, or rely on incorrect automatic differentiation. We propose a systematic approach to differentiating integrals with discontinuous integrands, by developing a new differentiable programming language. We introduce integration as a language primitive and account for the Dirac delta contribution from differentiating parametric discontinuities in the integrand. We formally define the language semantics and prove the correctness and closure under the differentiation, allowing the generation of gradients and higher-order derivatives. We also build a system, Teg, implementing these semantics. Our approach is widely applicable to a variety of tasks, including image stylization, fitting shader parameters, trajectory optimization, and optimizing physical designs.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d01ce7d2-75b9-451c-a729-a60474601b52Cited by top-tier papers15
- Do Differentiable Simulators Give Better Policy Gradients?Hyung Ju Terry Suh, Max Simchowitz, Kaiqing Zhang, Russ TedrakeICML 2022 · 129 citations
- Designing Perceptual Puzzles by Differentiating Probabilistic ProgramsKartik Chandra, Tzu-Mao Li, Joshua B. Tenenbaum, Jonathan Ragan-KelleySIGGRAPH 2022 · 17 citations
- Aδ: autodiff for discontinuous programs - applied to shadersYuting Yang, Connelly Barnes, Andrew Adams, Adam FinkelsteinSIGGRAPH 2022 · 17 citations
- ADEV: Sound Automatic Differentiation of Expected Values of Probabilistic ProgramsAlexander K. Lew, Mathieu Huot, Sam Staton, Vikash K. MansinghkaPOPL 2023 · 16 citations
- Probabilistic Programming with Programmable Variational InferenceMcCoy R. Becker, Alexander K. Lew, Xiaoyan Wang, Matin Ghavami et al.PLDI 2024 · 8 citations
Builds on11
- DiffTaichi: Differentiable Programming for Physical SimulationYuanming Hu, Luke Anderson, Tzu-Mao Li, Qi Sun et al.ICLR 2020 · 479 citations
- Solver-in-the-Loop: Learning from Differentiable Physics to Interact with Iterative PDE-SolversKiwon Um, Robert Brand, Yun (Raymond) Fei, Philipp Holl et al.NeurIPS 2020 · 398 citations
- Incremental potential contact: intersection-and inversion-free, large-deformation dynamicsMinchen Li, Zachary Ferguson, Teseo Schneider, Timothy R. Langlois et al.SIGGRAPH 2020 · 320 citations
- Learning to Control PDEs with Differentiable PhysicsPhilipp Holl, Nils Thuerey, Vladlen KoltunICLR 2020 · 221 citations
- Path-space differentiable renderingCheng Zhang, Bailey Miller, Kai Yan, Ioannis Gkioulekas et al.SIGGRAPH 2020 · 155 citations
Related papers
- Distributions for Compositionally Differentiating Parametric DiscontinuitiesJesse Michel, Kevin Mu, Xuanda Yang, Sai Praveen Bangaru et al.OOPSLA 2024 · 7 citations
- 𝜆ₛ: computable semantics for differentiable programming with higher-order functions and datatypesBenjamin Sherman, Jesse Michel, Michael CarbinPOPL 2021 · 11 citations
- Fiber Monte CarloNick Richardson, Deniz Oktay, Yaniv Ovadia, James C. Bowden et al.ICLR 2024
- Path-space differentiable rendering of participating mediaCheng Zhang, Zihan Yu, Shuang ZhaoSIGGRAPH 2021 · 50 citations
- BG-Triangle: Bezier Gaussian Triangle for 3D Vectorization and RenderingMinye Wu, Haizhao Dai, Kaixin Yao, Tinne Tuytelaars et al.CVPR 2025
