Reactive languages are dedicated to the programming of systems which interact continuously and concurrently with their environment. Values take the form of unbounded streams modeling the (discrete) passing of time or the sequence of concurrent interactions. While conventional reactivity models recurrences forward in time, we introduce a symmetric reactive construct enabling backward recurrences. Constraints on the latter allow to make the implementation practical. Machine Learning (ML) systems provide numerous motivations for all of this: we demonstrate that reverse-mode automatic differentiation, backpropagation, batch normalization, bidirectional recurrent neural networks, training and reinforcement learning algorithms, are all naturally captured as bidirectional reactive programs.
翻译:反应式语言专用于连续且并发地与外部环境交互的系统编程。其数值形式表现为无界流,用于对(离散的)时间流逝或并发交互序列进行建模。传统反应式模型仅支持沿时间正向的递归运算,而我们引入了一种对称的反应式构造,能够实现反向递归。通过对后者施加约束条件,使其实用化成为可能。机器学习系统为此提供了丰富的应用场景:我们证明反向模式自动微分、反向传播算法、批归一化、双向循环神经网络、训练过程及强化学习算法,均可自然地建模为双向反应式程序。