English

Cavs: A Vertex-centric Programming Interface for Dynamic Neural Networks

Machine Learning 2017-12-13 v1 Computation and Language Distributed, Parallel, and Cluster Computing

Abstract

Recent deep learning (DL) models have moved beyond static network architectures to dynamic ones, handling data where the network structure changes every example, such as sequences of variable lengths, trees, and graphs. Existing dataflow-based programming models for DL---both static and dynamic declaration---either cannot readily express these dynamic models, or are inefficient due to repeated dataflow graph construction and processing, and difficulties in batched execution. We present Cavs, a vertex-centric programming interface and optimized system implementation for dynamic DL models. Cavs represents dynamic network structure as a static vertex function F\mathcal{F} and a dynamic instance-specific graph G\mathcal{G}, and performs backpropagation by scheduling the execution of F\mathcal{F} following the dependencies in G\mathcal{G}. Cavs bypasses expensive graph construction and preprocessing overhead, allows for the use of static graph optimization techniques on pre-defined operations in F\mathcal{F}, and naturally exposes batched execution opportunities over different graphs. Experiments comparing Cavs to two state-of-the-art frameworks for dynamic NNs (TensorFlow Fold and DyNet) demonstrate the efficacy of this approach: Cavs achieves a near one order of magnitude speedup on training of various dynamic NN architectures, and ablations demonstrate the contribution of our proposed batching and memory management strategies.

Keywords

Cite

@article{arxiv.1712.04048,
  title  = {Cavs: A Vertex-centric Programming Interface for Dynamic Neural Networks},
  author = {Hao Zhang and Shizhen Xu and Graham Neubig and Wei Dai and Qirong Ho and Guangwen Yang and Eric P. Xing},
  journal= {arXiv preprint arXiv:1712.04048},
  year   = {2017}
}

Comments

Short versions of this paper were presented at AISys workshop@SOSP 2017 and MLSys workshop@NIPS 2017

R2 v1 2026-06-22T23:14:55.212Z