LGSENov 26, 2020

ShapeFlow: Dynamic Shape Interpreter for TensorFlow

arXiv:2011.13452v113 citationsHas Code
AI Analysis

ShapeFlow addresses the common problem of tensor shape incompatibility errors for machine learning developers, offering a practical and efficient solution.

This paper introduces ShapeFlow, a dynamic abstract interpreter for TensorFlow designed to detect tensor shape incompatibility errors. It achieves high accuracy with no false positives and one false negative, and significantly improves efficiency, showing average speed-ups of 499X and 24X compared to TensorFlow for different dataset sizes.

We present ShapeFlow, a dynamic abstract interpreter for TensorFlow which quickly catches tensor shape incompatibility errors, one of the most common bugs in deep learning code. ShapeFlow shares the same APIs as TensorFlow but only captures and emits tensor shapes, its abstract domain. ShapeFlow constructs a custom shape computational graph, similar to the computational graph used by TensorFlow. ShapeFlow requires no code annotation or code modification by the programmer, and therefore is convenient to use. We evaluate ShapeFlow on 52 programs collected by prior empirical studies to show how fast and accurately it can catch shape incompatibility errors compared to TensorFlow. We use two baselines: a worst-case training dataset size and a more realistic dataset size. ShapeFlow detects shape incompatibility errors highly accurately -- with no false positives and a single false negative -- and highly efficiently -- with an average speed-up of 499X and 24X for the first and second baseline, respectively. We believe ShapeFlow is a practical tool that benefits machine learning developers. We will open-source ShapeFlow on GitHub to make it publicly available to both the developer and research communities.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes