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

Benjamin Sherman, Jesse Michel, Michael Carbin
7/15/2020
cs.PLcs.LO

Official code: psg-mit/smooth (35 stars, Haskell, BSD-3-Clause, last commit 2023-07-07).

Abstract

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.

Show full abstract

We present a differentiable programming language, $λ_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 $λ_S$ to expose differentiable, higher-order functions for integration, optimization, and root-finding as first-class functions with automatically computed derivatives. $λ_S$'s semantics is computable, meaning that values can be computed to arbitrary precision, and we implement $λ_S$ as an embedded language in Haskell. We use $λ_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.

View on arXivView PDF

Code Implementations(1)

psg-mit/smoothOfficial100%
BSD-3-Clause

An arbitrary-precision differentiable programming language.

356Haskell, DockerfileJun 23, 20183 years agoBSD-3-Clause

Similar Papers

Cite this paper

@article{sherman2020s,
  title  = {$λ_S$: Computable Semantics for Differentiable Programming with Higher-Order Functions and Datatypes},
  author = {Benjamin Sherman and Jesse Michel and Michael Carbin},
  year   = {2020},
  eprint = {2007.08017},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2007.08017}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2007.08017.svg)](https://codeofpaper.com/paper/2007.08017)

Discussion