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

神经网络的折叠

Folding over Neural Networks

University of Bristol(布里斯托大学);Imperial College London(帝国理工学院)

Minh Nguyen, Nicolas Wu

摘要:

神经网络通常表示为通过迭代或通过方法调用的手动链接遍历的数据结构。然而,更深入的分析表明,可以使用结构化递归来代替,这样遍历就由网络本身的结构来指导。本文展示了如何在Haskell中实现这种方法,通过将神经网络编码为递归数据类型,然后将其训练为递归模式。反过来,我们促进神经网络的一致实现,在它们的结构和语义之间进行划分,允许它们如何构建和如何训练的组合性。

英文摘要:

Neural networks are typically represented as data structures that are traversed either through iteration or by manual chaining of method calls. However, a deeper analysis reveals that structured recursion can be used instead, so that traversal is directed by the structure of the network itself. This paper shows how such an approach can be realised in Haskell, by encoding neural networks as recursive data types, and then their training as recursion scheme patterns. In turn, we promote a coherent implementation of neural networks that delineates between their structure and semantics, allowing for compositionality in both how they are built and how they are trained.

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

↑