arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1706.00231cs.MScs.PLcs.SC
收藏

利用Prolog中的约束处理规则实现自动微分

Automatic Differentiation using Constraint Handling Rules in Prolog

Samer Abdallah

摘要:

自动微分是一种技术,它允许程序员通过组合大范围的数值和计算原语来定义数值计算,并使底层系统支持计算结果相对于其任何输入的偏导数,而不进行任何有限差分近似,也不操纵表示计算的大型符号表达式。本文介绍了一种新的方法,反向模式自动微分使用约束逻辑编程,具体地说,约束处理规则(约束处理规则)库的SWI Prolog,在一个非常小的(50行代码)的实现。当应用于概率语法中参数学习的内部-外部算法的基于微分的实现时,基于TensorFlow的实现大大优于两个著名的优化可微函数的框架Theano和TensorFlow。

英文摘要:

Automatic differentiation is a technique which allows a programmer to define a numerical computation via compositions of a broad range of numeric and computational primitives and have the underlying system support the computation of partial derivatives of the result with respect to any of its inputs, without making any finite difference approximations, and without manipulating large symbolic expressions representing the computation. This note describes a novel approach to reverse mode automatic differentiation using constraint logic programmming, specifically, the constraint handling rules (CHR) library of SWI Prolog, resulting in a very small (50 lines of code) implementation. When applied to a differentiation-based implementation of the inside-outside algorithm for parameter learning in probabilistic grammars, the CHR based implementations outperformed two well-known frameworks for optimising differentiable functions, Theano and TensorFlow, by a large margin.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑