λS : Computable Semantics for Differentiable Programming with Higher-Order Functions and Datatypes

被引:11
作者
Sherman, Benjamin [1 ]
Michel, Jesse [1 ]
Carbin, Michael [1 ]
机构
[1] MIT, Cambridge, MA 02139 USA
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2021年 / 5卷 / POPL期
关键词
Constructive Analysis; Diffeological Spaces; Automatic Differentiation;
D O I
10.1145/3434284
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Deep learning is moving towards increasingly sophisticated optimization objectives that employ higher-order functions, such as integration, continuous optimization, and root-finding. Since differentiable programming frameworks such as PyTorch and TensorFlow do not have first-class representations of these functions, developers must reason about the semantics of such objectives and manually translate them to differentiable code. We present a differentiable programming language, lambda(S), that is the first to deliver a semantics for higher-order functions, higher-order derivatives, and Lipschitz but nondifferentiable functions. Together, these features enable lambda(S) to expose differentiable, higher-order functions for integration, optimization, and root-finding as first-class functions with automatically computed derivatives. lambda(S) 's semantics is computable, meaning that values can be computed to arbitrary precision, and we implement lambda(S) as an embedded language in Haskell. We use lambda(S) to construct novel differentiable libraries for representing probability distributions, implicit surfaces, and generalized parametric surfaces - all as instances of higher-order datatypes - and present case studies that rely on computing the derivatives of these higher-order functions and datatypes. In addition to modeling existing differentiable algorithms, such as a differentiable ray tracer for implicit surfaces, without requiring any user-level differentiation code, we demonstrate new differentiable algorithms, such as the Hausdorff distance of generalized parametric surfaces.
引用
收藏
页数:31
相关论文
共 28 条
  • [1] Abadi Martin, 2019, NEURAL INFORM PROCES
  • [2] Atzmon M, 2019, ADV NEUR IN, V32
  • [3] Bai Shaojie, 2019, Advances in Neural Information Processing Systems.
  • [4] Carbin, 2019, INT C FUNCT PROGR
  • [5] Clarke FH, 1990, Society for industrial and applied mathematics, DOI 10.1137/1.9781611971309
  • [6] Conal Elliott, 2008, HIGHER DIMENSIONAL H
  • [7] Edalat, 2008, NEW COMPUTATIONAL PA
  • [8] Edalat Abbas, 2013, FDN SOFTWARE SCI COM
  • [9] The differential lambda-calculus
    Ehrhard, T
    Regnier, L
    [J]. THEORETICAL COMPUTER SCIENCE, 2003, 309 (1-3) : 1 - 41
  • [10] The Simple Essence of Automatic Differentiation
    Elliott, Conal
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES, 2018,