[Paper Review] Analysis of Failures and Risks in Deep Learning Model Converters: A Case Study in the ONNX Ecosystem
This paper presents the first failure analysis of deep learning model converters in the ONNX ecosystem, examining crashes and incorrect behaviors in PyTorch and TensorFlow converters. It identifies node conversion as the primary failure source (75% of defects), reveals that individual operators are poor predictors of failure, and exposes weaknesses in current testing strategies, advocating for synthetic model testing and stable operator sets to improve robustness and maintainability.
Software engineers develop, fine-tune, and deploy deep learning (DL) models using a variety of development frameworks and runtime environments. DL model converters move models between frameworks and to runtime environments. Conversion errors compromise model quality and disrupt deployment. However, the failure characteristics of DL model converters are unknown, adding risk when using DL interoperability technologies. This paper analyzes failures in DL model converters. We survey software engineers about DL interoperability tools, use cases, and pain points (N=92). Then, we characterize failures in model converters associated with the main interoperability tool, ONNX (N=200 issues in PyTorch and TensorFlow). Finally, we formulate and test two hypotheses about structural causes for the failures we studied. We find that the node conversion stage of a model converter accounts for ~75% of the defects and 33% of reported failure are related to semantically incorrect models. The cause of semantically incorrect models is elusive, but models with behaviour inconsistencies share operator sequences. Our results motivate future research on making DL interoperability software simpler to maintain, extend, and validate. Research into behavioural tolerances and architectural coverage metrics could be fruitful.
Motivation & Objective
- To understand the failure symptoms, causes, and locations in ONNX model converters for PyTorch and TensorFlow.
- To evaluate why model converters fail by testing 5,149 real and synthetic models.
- To assess the effectiveness of current testing strategies for model converters and identify gaps.
- To investigate whether operator types or sequences correlate with converter failures.
- To propose improvements for robustness, maintainability, and validation of deep learning interoperability tools.
Proposed method
- Conducted a failure analysis on 200 closed GitHub issues from PyTorch and TensorFlow ONNX converters to classify symptoms, causes, and locations.
- Evaluated 5,149 models—both real-world and synthetically generated using NNSmith—to measure converter reliability and detect defects.
- Applied a joint distribution analysis of failure causes and symptoms to identify patterns across converters.
- Tested two hypotheses: (1) operator types predict failure, and (2) operator sequences correlate with failure, using frequency analysis of mismatched model sequences.
- Reviewed existing test suites and found they rely heavily on real models and lack synthetic model coverage, exposing a critical testing gap.
- Proposed a small stable operator set as a potential alternative to reduce conversion errors, inspired by RISC and JVM design principles.
Experimental results
Research questions
- RQ1What are the most common failure symptoms, causes, and locations in ONNX model converters for PyTorch and TensorFlow?
- RQ2Why do model converters fail? Are certain operators or operator sequences more prone to failure?
- RQ3How effective are current test suites in detecting converter defects, and what are their key limitations?
- RQ4Can a small, stable operator set reduce conversion errors and improve maintainability in model converters?
Key findings
- Node conversion was responsible for approximately 75% of all defects identified in the converters, making it the most error-prone stage.
- The most common failure symptoms were crashes (28%) and incorrect model behaviors (36%), with type problems and incompatibility being the leading causes.
- Crashes were primarily caused by incompatibility and type issues, while incorrect behaviors stemmed from type problems, algorithmic errors, and shape mismatches.
- The study found no strong correlation between individual operators and failure likelihood, but observed potential correlations in operator sequences, suggesting complex interaction effects.
- Of the 11 defects discovered, five were previously unknown, highlighting the limitations of existing test suites that rely on real models and lack synthetic model coverage.
- Current end-to-end testing strategies are insufficient, as they examine few real models and no synthetic models, missing critical failure patterns that synthetic generation can expose.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.