The Elements of Differentiable Programming

人工智能近来取得了显著进展,这得益于大型模型、海量数据集、加速硬件以及可微编程的变革性能力。这种新的编程范式使得复杂计算机程序(包括具有控制流和数据结构的程序)的端到端微分成为可能,从而实现了基于梯度的程序参数优化。作为一种新兴的编程范式,可微编程基于计算机科学和应用数学的多个领域,包括自动微分、图形模型、优化和统计学。本书全面回顾了可微编程的基本概念。我们采用了两个主要视角,即优化和概率,两者之间有明显的类比关系。可微编程不仅仅是程序的微分,还包括旨在进行微分的程序的深思熟虑的设计。通过使程序可微分,我们本质上引入了其执行的概率分布,提供了一种量化与程序输出相关的不确定性的手段。
Artificial intelligence has recently experienced remarkable advances, fueled by large models, vast datasets, accelerated hardware, and, last but not least, the transformative power of differentiable programming. This new programming paradigm enables end-to-end differentiation of complex computer programs (including those with control flows and data structures), making gradient-based optimization of program parameters possible. As an emerging paradigm, differentiable programming builds upon several areas of computer science and applied mathematics, including automatic differentiation, graphical models, optimization and statistics. This book presents a comprehensive review of the fundamental concepts useful for differentiable programming. We adopt two main perspectives, that of optimization and that of probability, with clear analogies between the two. Differentiable programming is not merely the differentiation of programs, but also the thoughtful design of programs intended for differentiation. By making programs differentiable, we inherently introduce probability distributions over their execution, providing a means to quantify the uncertainty associated with program outputs.
许愿