arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.16020cs.LG
收藏

自动微分实现的分步入门指南

A Step-by-step Introduction to the Implementation of Automatic Differentiation

National Taiwan University(台湾大学);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学)

Yu-Hsueh Fang, He-Zhe Lin, Jie-Jyun Liu, Chih-Jen Lin

AI总结:

针对自动微分教学难点,本文提供逐步实现简单自动微分系统的指南,梳理数学概念与实现细节并阐明动机,填补概念与实现之间的教学空白。

摘要:

自动微分是深度学习中的关键组成部分。这一主题已被深入研究,诸如Baydin等人(2018)的优秀综述已清晰描述其基本概念。此外,自动微分的高级实现现已成为主流深度学习框架的重要组成部分。然而,由于现有系统的复杂性,直接向学生教授其实现即使并非不可能,也是困难的。另一方面,如果教学止步于基本概念,学生则无法感知实现的具体方式。例如,在自动微分教学中我们常提及计算图,但学生疑惑如何实现并使用它。本文档通过逐步介绍实现一个简单自动微分系统的过程,部分填补了这一空白。我们梳理了数学概念与实现之间的联系。此外,我们给出了每个实现细节背后的动机,使整个设置变得非常自然。

英文摘要:

Automatic differentiation is a key component in deep learning. This topic is well studied and excellent surveys such as Baydin et al. (2018) have been available to clearly describe the basic concepts. Further, sophisticated implementations of automatic differentiation are now an important part of popular deep learning frameworks. However, it is difficult, if not impossible, to directly teach students the implementation of existing systems due to the complexity. On the other hand, if the teaching stops at the basic concept, students fail to sense the realization of an implementation. For example, we often mention the computational graph in teaching automatic differentiation, but students wonder how to implement and use it. In this document, we partially fill the gap by giving a step by step introduction of implementing a simple automatic differentiation system. We streamline the mathematical concepts and the implementation. Further, we give the motivation behind each implementation detail, so the whole setting becomes very natural.

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

↑