Automatic Differentiation in Prolog

05/13/2023
by   Tom Schrijvers, et al.
0

Automatic differentiation (AD) is a range of algorithms to compute the numeric value of a function's (partial) derivative, where the function is typically given as a computer program or abstract syntax tree. AD has become immensely popular as part of many learning algorithms, notably for neural networks. This paper uses Prolog to systematically derive gradient-based forward- and reverse-mode AD variants from a simple executable specification: evaluation of the symbolic derivative. Along the way we demonstrate that several Prolog features (DCGs, co-routines) contribute to the succinct formulation of the algorithm. We also discuss two applications in probabilistic programming that are enabled by our Prolog algorithms. The first is parameter learning for the Sum-Product Loop Language and the second consists of both parameter learning and variational inference for probabilistic logic programming.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/20/2022

Efficient and Sound Differentiable Programming in a Functional Array-Processing Language

Automatic differentiation (AD) is a technique for computing the derivati...
research
11/09/2022

TreeFlow: probabilistic programming and automatic differentiation for phylogenetics

Probabilistic programming frameworks are powerful tools for statistical ...
research
08/05/2022

Fixed-Point Automatic Differentiation of Forward–Backward Splitting Algorithms for Partly Smooth Functions

A large class of non-smooth practical optimization problems can be writt...
research
12/21/2022

Forward- or Reverse-Mode Automatic Differentiation: What's the Difference?

Automatic differentiation (AD) has been a topic of interest for research...
research
06/08/2018

Learning in Integer Latent Variable Models with Nested Automatic Differentiation

We develop nested automatic differentiation (AD) algorithms for exact in...
research
12/13/2022

ADEV: Sound Automatic Differentiation of Expected Values of Probabilistic Programs

Optimizing the expected values of probabilistic processes is a central p...
research
04/02/2018

The simple essence of automatic differentiation (Differentiable functional programming made easy)

Automatic differentiation (AD) in reverse mode (RAD) is a central compon...

Please sign up or login with your details

Forgot password? Click here to reset