面向具表达力的全函数式语言的CHAD
CHAD for Expressive Total Languages
AI总结:
本研究将前向与反向模式CHAD应用于含多类丰富类型的全函数式语言,通过范畴语义分析与新型范畴逻辑关系技术证明其正确性,提出了一种纯函数式、可证正确的自动微分方法。
摘要:
我们展示了如何将前向与反向模式的组合同态自动微分(Combinatory Homomorphic Automatic Differentiation,CHAD)应用于具备丰富类型系统的全函数式编程语言,这类类型系统组合了元组类型、和类型、归纳类型、共归纳类型与函数类型。我们通过分析合适范畴的Σ类型(格罗滕迪克构造)中此类类型的范畴语义来实现这一点。借助针对这类高表达力类型系统的新型范畴逻辑关系技术,我们证明了该场景下CHAD计算的结果与原程序实现函数的常规数学导数一致,给出了其正确性证明。该成果提供了一种系统、纯函数式且可证正确的方法,可在具表达力类型系统的全函数式语言上执行前向与反向模式自动微分(AD)。
英文摘要:
We show how to apply forward and reverse mode Combinatory Homomorphic Automatic Differentiation (CHAD) to total functional programming languages with expressive type systems featuring the combination of - tuple types; - sum types; - inductive types; - coinductive types; - function types. We achieve this by analysing the categorical semantics of such types in $Σ$-types (Grothendieck constructions) of suitable categories. Using a novel categorical logical relations technique for such expressive type systems, we give a correctness proof of CHAD in this setting by showing that it computes the usual mathematical derivative of the function that the original program implements. The result is a principled, purely functional and provably correct method for performing forward and reverse mode automatic differentiation (AD) on total functional programming languages with expressive type systems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。