REFTY: Refinement Types for Valid Deep Learning Models
Yanjie Gao, Zhengxian Li, Haoxiang Lin, Hongyu Zhang, Ming Wu, Mao Yang
Abstract
Deep learning has been increasingly adopted in many application areas. To construct valid deep learning models, developers must conform to certain computational constraints by carefully selecting appropriate neural architectures and hyperparameter values. For example, the kernel size hyperparameter of the 2D convolution operator cannot be overlarge to ensure that the height and width of the output tensor remain positive. Because model construction is largely manual and lacks necessary tooling support, it is possible to violate those constraints and raise type errors of deep learning models, causing either runtime exceptions or wrong output results. In this paper, we propose Refty, a refinement type-based tool for statically checking the validity of deep learning models ahead of job execution. Refty refines each type of deep learning operator with framework-independent logical formulae that describe the computational constraints on both tensors and hyperparameters. Given the neural architecture and hyperparameter domains of a model, Refty visits every operator, generates a set of constraints that the model should satisfy, and utilizes an SMT solver for solving the constraints. We have evaluated Refty on both individual operators and representative real-world models with various hyperparameter values under PyTorch and TensorFlow. We also compare it with an existing shape-checking tool. The experimental results show that Refty finds all the type errors and achieves 100% Precision and Recall, demonstrating its effectiveness.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Resource-Guided Configuration Space Reduction for Deep Learning Models cites An empirical study on program failures of deep learning jobs
- An Empirical Study on Low GPU Utilization of Deep Learning Jobs cites An empirical study on program failures of deep learning jobs
- An Empirical Study on Low GPU Utilization of Deep Learning Jobs cites Resource-Guided Configuration Space Reduction for Deep Learning Models
Cited by top-tier papers1
Builds on3
- An empirical study on program failures of deep learning jobsRu Zhang, Wencong Xiao, Hongyu Zhang, Yu Liu et al.ICSE 2020 · 96 citations
- STORM: Refinement Types for Secure Web ApplicationsNico Lehmann, Rose Kunkel, Jordan Brown, Jean Yang et al.OSDI 2021 · 21 citations
- Resource-Guided Configuration Space Reduction for Deep Learning ModelsYanjie Gao, Yonghao Zhu, Hongyu Zhang, Haoxiang Lin et al.ICSE 2021 · 17 citations
Related papers
- SMT-Based Translation Validation for Machine Learning CompilerSeongwon Bang, Seunghyeon Nam, Inwhan Chun, Ho Young Jhoo et al.CAV 2022 · 12 citations
- ACETest: Automated Constraint Extraction for Testing Deep Learning OperatorsJingyi Shi, Yang Xiao, Yuekang Li, Yeting Li et al.ISSTA 2023 · 24 citations
- Detecting TensorFlow Program Bugs in Real-World Industrial EnvironmentChen Liu, Jie Lu, Guangwei Li, Ting Yuan et al.ASE 2021 · 13 citations
- Towards More Complete Constraints for Deep Learning Library Testing via Complementary Set Guided RefinementGwihwan Go, Chijin Zhou, Quan Zhang, Xiazijian Zou et al.ISSTA 2024 · 2 citations
- TorchQL: A Programming Framework for Integrity Constraints in Machine LearningAaditya Naik, Adam Stein, Yinjun Wu, Mayur Naik et al.OOPSLA 2024
