arrow
返回

What causes exceptions in machine learning applications? Mining machine learning-related stack traces on Stack Overflow

delete2024-07-03
delete0
PRE
AI
A
Amin Ghadesi *
M
Maxime Lamothe
H
Heng Li
DOI:10.1007/s10664-024-10499-9delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
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 ML-related 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 18, 538 ML-related stack traces related to seven popular Python ML libraries. First, we observe that ML questions that contain stack traces are less likely to get accepted answers than questions that don't, even though they gain more attention (i.e., more views and comments). Second, we observe that recurrent patterns exist 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 26 low-level types from the stack trace patterns: most patterns are related to model training, python basic syntax, parallelization, subprocess invocation, and external module execution. Furthermore, the patterns related to external dependencies (e.g., file operations) or manipulations of artifacts (e.g., model conversion) are among the least likely to get accepted answers on SO. Our findings provide insights for researchers, ML library developers, and technical forum moderators to better support ML developers in writing error-free ML code. For example, future research can leverage the common patterns of stack traces to help ML developers locate solutions to problems similar to theirs or to identify experts who have experience solving similar patterns of problems. Researchers and ML library developers could prioritize efforts to help ML developers identify misuses of ML APIs, mismatches in data formats, and potential data/resource contentions so that ML developers can better avoid/fix model-related exception patterns, data-related exception patterns, and multi-process-related exception patterns, respectively.
Keyword:
Machine learning applications
Stack traces
Stack Overflow
Empirical software engineering

期刊

Empirical Software Engineering 封面图
Empirical Software Engineering
IF:
3.6
论文数:
2.0K
被引数:
5.3K

机构

U
universite de montreal
学者数:
4.6W
论文数: 3.8W
被引数: 46
引用论文

引用论文

err
IF0
err
err0
PREAI
err
err分享
err收藏
Determination of the optimal combination chemotherapy regimen for treatment of platinum-resistant ovarian cancer in nude mouse model
err2007-03-01
err0
PREAI
errJenifer M. Saucier; Jiang Yu; Anjali Gaikwad; Robert L. Coleman; Judith K. Wolf; Judith A. Smith
err分享
err收藏
Neural representation of goal direction in the monarch butterfly brain
err
IF0
err2022-10-18
err0
errOAAI
errM. Jerome Beetz; Christian Kraus; Basil el Jundi
err分享
err收藏
IDO as a drug target for cancer immunotherapy: recent developments in IDO inhibitors discovery
err2016-01-01
err0
PREAI
errShan Qian; Man Zhang; Quanlong Chen; Yanying He; Wei Wang; Zhouyu Wang
err分享
err收藏
Molecular cloning of theEscherichia coliK-12entACGBEgenes
err1984-09-01
err0
errOAAI
errCarol L. Pickett; LaDonna Hayes; Charles F. Earhart
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
学者 查看更多内容