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

单子深度学习

Monadic Deep Learning

University of Washington(华盛顿大学)

Bo Yang, Zhihao Zhang Kirisame Marisa, Kai Shi

AI总结:

针对静态类型语言深度学习框架表达能力不足、自定义算法需编写大量反向传播样板代码的问题,提出基于单子的反向自动微分方案,设计单子与应用函子,在DeepLearning.scala 2中实现兼具表达力与类型安全的深度学习建模。

摘要:

Java和Scala社区已构建起一套极为成功的大数据生态系统。然而,运行在该生态系统上的大多数神经网络,都是用动态类型编程语言建模的。这类动态类型深度学习框架将神经网络视为包含大量可训练变量的可微表达式,并在训练时对这些表达式执行自动微分。\n 截至2019年,静态类型语言中的学习框架均不具备传统框架的表达能力。用户若要使用自定义算法,必须为硬编码反向传播编写大量样板代码。\n 我们在DeepLearning.scala 2中解决了这一问题。我们的贡献如下:\n 1. 我们提出了一种新方法,可对包含多个可训练变量、且能与元语言自由互操作的静态类型函数执行反向模式自动微分。\n 2. 我们设计了一组单子(monad)和单子变换器,支持用户创建用于表示动态神经网络的单子表达式。\n 3. 配合这些单子,我们提供了若干应用函子(applicative functor),用于并行执行多项计算。\n 凭借这些特性,DeepLearning.scala的用户能够以直观简洁的方式创建复杂神经网络,同时仍保持类型安全。

英文摘要:

The Java and Scala community has built a very successful big data ecosystem. However, most of neural networks running on it are modeled in dynamically typed programming languages. These dynamically typed deep learning frameworks treat neural networks as differentiable expressions that contain many trainable variable, and perform automatic differentiation on those expressions when training them. Until 2019, none of the learning frameworks in statically typed languages provided the expressive power of traditional frameworks. Their users are not able to use custom algorithms unless creating plenty of boilerplate code for hard-coded back-propagation. We solved this problem in DeepLearning.scala 2. Our contributions are: 1. We discovered a novel approach to perform automatic differentiation in reverse mode for statically typed functions that contain multiple trainable variable, and can interoperate freely with the metalanguage. 2. We designed a set of monads and monad transformers, which allow users to create monadic expressions that represent dynamic neural networks. 3. Along with these monads, we provide some applicative functors, to perform multiple calculations in parallel. With these features, users of DeepLearning.scala were able to create complex neural networks in an intuitive and concise way, and still maintain type safety.

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

↑