大规模机器学习中的动态控制流
Dynamic Control Flow in Large-Scale Machine Learning
摘要:
许多最近的机器学习模型依赖于细粒度的动态控制流进行训练和推理。特别是,基于递归神经网络和强化学习的模型依赖于递归关系、数据依赖的条件执行以及其他需要动态控制流的特征。这些应用程序受益于跨分布式系统中的一组计算设备做出快速控制流决策的能力。为了提高性能、可伸缩性和表现力,机器学习系统必须支持分布式和异构环境中的动态控制流。提出了一种支持动态控制流的分布式机器学习编程模型。我们描述了编程模型的设计,以及它在分布式机器学习系统TensorFlow中的实现。我们的方法扩展了使用图来表示机器学习模型,提供了几个独特的功能。首先,条件的分支和循环的主体可以在许多机器上划分,以便在一组异构设备上运行,包括CPU,GPU和自定义ASIC。其次,在我们的模型中编写的程序支持自动微分和分布式梯度计算,这对于训练使用控制流的机器学习模型是必要的。第三,我们对非严格语义的选择使多个循环迭代能够跨机器并行执行,并重叠计算和I/O操作。我们已经在TensorFlow的背景下完成了我们的工作,它已经广泛用于研究和生产。我们评估它使用几个现实世界的应用程序,并证明其性能和可扩展性。
英文摘要:
Many recent machine learning models rely on fine-grained dynamic control flow for training and inference. In particular, models based on recurrent neural networks and on reinforcement learning depend on recurrence relations, data-dependent conditional execution, and other features that call for dynamic control flow. These applications benefit from the ability to make rapid control-flow decisions across a set of computing devices in a distributed system. For performance, scalability, and expressiveness, a machine learning system must support dynamic control flow in distributed and heterogeneous environments. This paper presents a programming model for distributed machine learning that supports dynamic control flow. We describe the design of the programming model, and its implementation in TensorFlow, a distributed machine learning system. Our approach extends the use of dataflow graphs to represent machine learning models, offering several distinctive features. First, the branches of conditionals and bodies of loops can be partitioned across many machines to run on a set of heterogeneous devices, including CPUs, GPUs, and custom ASICs. Second, programs written in our model support automatic differentiation and distributed gradient computations, which are necessary for training machine learning models that use control flow. Third, our choice of non-strict semantics enables multiple loop iterations to execute in parallel across machines, and to overlap compute and I/O operations. We have done our work in the context of TensorFlow, and it has been used extensively in research and production. We evaluate it using several real-world applications, and demonstrate its performance and scalability.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。