A Static Analyzer for Detecting Tensor Shape Errors in Deep Neural Network Training Code
Not on the map. Why?
Abstract (arXiv)
We present an automatic static analyzer PyTea that detects tensor-shape errors in PyTorch code. The tensor-shape error is critical in the deep neural net code; much of the training cost and intermediate results are to be lost once a tensor shape mismatch occurs in the midst of the training phase. Given the input PyTorch source, PyTea statically traces every possible execution path, collects tensor shape constraints required by the tensor operation sequence of the path, and decides if the constraints are unsatisfiable (hence a shape error can occur). PyTea's scalability and precision hinges on the characteristics of real-world PyTorch applications: the number of execution paths after PyTea's conservative pruning rarely explodes and loops are simple enough to be circumscribed by our symbolic abstraction. We tested PyTea against the projects in the official PyTorch repository and some tensor-error code questioned in the StackOverflow. PyTea successfully detects tensor shape errors in these codes, each within a few seconds.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 7 of its 25 references that are in the map. First posted on arXiv 16 Dec 2021.
Builds on
7 of 25 references.
References · 7
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
- 2015Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networkscited by 2,054
- 2016Deep Networks with Stochastic Depthcited by 979
- 2018Ariadne: Analysis for Machine Learning Programcited by 4
- 2020ShapeFlow: Dynamic Shape Interpreter for TensorFlowcited by 2
Built on by
Citing papers per year: 2023: 1; 2024: 0; 2025: 1.
2 papers.