What Causes Exceptions in Machine Learning Applications? Mining Machine Learning-Related Stack Traces on Stack Overflow
Not on the map. Why?
Abstract (arXiv)
Machine learning (ML), including deep learning, has recently gained tremendous popularity in a wide range of applications. However, like traditional software, ML applications are not immune to the bugs that result from programming errors. Explicit programming errors usually manifest through error messages and stack traces. These stack traces describe the chain of function calls that lead to an anomalous situation, or exception. Indeed, these exceptions may cross the entire software stack (including applications and libraries). Thus, studying the patterns in stack traces can help practitioners and researchers understand the causes of exceptions in ML applications and the challenges faced by ML developers. To that end, we mine Stack Overflow (SO) and study 11,449 stack traces related to seven popular Python ML libraries. First, we observe that ML questions that contain stack traces gain more popularity than questions without stack traces; however, they are less likely to get accepted answers. Second, we observe that recurrent patterns exists in ML stack traces, even across different ML libraries, with a small portion of patterns covering many stack traces. Third, we derive five high-level categories and 25 low-level types from the stack trace patterns: most patterns are related to python basic syntax, model training, parallelization, data transformation, and subprocess invocation. Furthermore, the patterns related to subprocess invocation, external module execution, and remote API call are among the least likely to get accepted answers on SO. Our findings provide insights for researchers, ML library providers, and ML application developers to improve the quality of ML libraries and their applications.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 11 of its 64 references that are in the map. First posted on arXiv 25 Apr 2023.
Builds on
11 of 64 references.
References · 11
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,201
- 2019Taxonomy of Real Faults in Deep Learning Systemscited by 90
- 2020Machine Learning in Python: Main developments and technology trends in data science, machine learning, and artificial intelligencecited by 81
- 2019A Comprehensive Study on Deep Learning Bug Characteristicscited by 65
- 2015MLlib: Machine Learning in Apache Sparkcited by 55
- 2016Understanding the Factors that Impact the Popularity of GitHub Repositoriescited by 27
- 2019What Do Developers Ask About ML Libraries? A Large-scale Study Using Stack Overflowcited by 13
- 2018SOTorrent: Reconstructing and Analyzing the Evolution of Stack Overflow Postscited by 9
- 2016Predicting the Popularity of GitHub Repositoriescited by 6
- 2022An Empirical Study on the Usage of Automated Machine Learning Toolscited by 4
Built on by
Not cited yet.