On-the-fly operation batching in dynamic computation graphs

Graham Neubig, Yoav Goldberg, Chris Dyer

Research output: Contribution to journalConference articlepeer-review

31 Scopus citations

Abstract

Dynamic neural network toolkits such as PyTorch, DyNet, and Chainer offer more flexibility for implementing models that cope with data of varying dimensions and structure, relative to toolkits that operate on statically declared computations (e.g., TensorFlow, CNTK, and Theano). However, existing toolkits - both static and dynamic - require that the developer organize the computations into the batches necessary for exploiting high-performance algorithms and hardware. This batching task is generally difficult, but it becomes a major hurdle as architectures become complex. In this paper, we present an algorithm, and its implementation in the DyNet toolkit, for automatically batching operations. Developers simply write minibatch computations as aggregations of single instance computations, and the batching algorithm seamlessly executes them, on the fly, using computationally efficient batched operations. On a variety of tasks, we obtain throughput similar to that obtained with manual batches, as well as comparable speedups over singleinstance learning on architectures that are impractical to batch manually.

Original languageEnglish
Pages (from-to)3972-3982
Number of pages11
JournalAdvances in Neural Information Processing Systems
Volume2017-December
StatePublished - 2017
Event31st Annual Conference on Neural Information Processing Systems, NIPS 2017 - Long Beach, United States
Duration: 4 Dec 20179 Dec 2017

Bibliographical note

Publisher Copyright:
© 2017 Neural information processing systems foundation. All rights reserved.

Funding

Acknowledgements: The work of YG is supported by the Israeli Science Foundation (grant number 1555/15) and by the Intel Collaborative Research Institute for Computational Intelligence (ICRI-CI).

FundersFunder number
Israeli Science Foundation1555/15
Intel Collaboration Research Institute for Computational Intelligence

    Fingerprint

    Dive into the research topics of 'On-the-fly operation batching in dynamic computation graphs'. Together they form a unique fingerprint.

    Cite this