[论文解读] What Do Developers Ask About ML Libraries? A Large-scale Study Using Stack Overflow
本研究分析了关于10种流行机器学习库的3,243个高赞Stack Overflow问题,以识别开发者在实践中面临的常见挑战。通过人工标注和统计分析,研究发现模型创建和数据准备是难度最高的阶段,且类型不匹配、参数选择和API误用在各库中持续存在,凸显了在机器学习软件工程中亟需更优的静态分析和改进的API设计。
Modern software systems are increasingly including machine learning (ML) as an integral component. However, we do not yet understand the difficulties faced by software developers when learning about ML libraries and using them within their systems. To that end, this work reports on a detailed (manual) examination of 3,243 highly-rated Q&A posts related to ten ML libraries, namely Tensorflow, Keras, scikit-learn, Weka, Caffe, Theano, MLlib, Torch, Mahout, and H2O, on Stack Overflow, a popular online technical Q&A forum. We classify these questions into seven typical stages of an ML pipeline to understand the correlation between the library and the stage. Then we study the questions and perform statistical analysis to explore the answer to four research objectives (finding the most difficult stage, understanding the nature of problems, nature of libraries and studying whether the difficulties stayed consistent over time). Our findings reveal the urgent need for software engineering (SE) research in this area. Both static and dynamic analyses are mostly absent and badly needed to help developers find errors earlier. While there has been some early research on debugging, much more work is needed. API misuses are prevalent and API design improvements are sorely needed. Last and somewhat surprisingly, a tug of war between providing higher levels of abstractions and the need to understand the behavior of the trained model is prevalent.
研究动机与目标
- 理解软件开发者在实际使用机器学习库时遇到的具体困难。
- 识别机器学习流水线中哪些阶段对开发者而言最易出错且耗时最长。
- 确定某些问题是否本质上源于机器学习本身,还是特定于某些库。
- 评估使用机器学习库的难度是否随时间变化,特别是随着深度学习的兴起。
提出的方法
- 收集了与10种流行机器学习库相关的3,243个高分Stack Overflow帖子:TensorFlow、Keras、scikit-learn、Weka、Caffe、Theano、MLlib、Torch、Mahout和H2O。
- 由三位具备机器学习专长的博士生进行人工标注,通过面对面会议解决分歧,实现了高一致性的标注结果。
- 将问题划分为机器学习流水线的七个阶段:数据准备、模型创建、训练、评估、预测、部署和超参数调优。
- 通过评分阈值筛选高质量帖子,并使用统计分析比较不同库和时间段的问题频率。
- 开展库内与库间分析,以比较各库的优势与劣势。
- 通过分析问题数量和主题分布随时间的变化,追踪2015至2018年的趋势。
实验结果
研究问题
- RQ1在机器学习流水线中,哪个阶段对开发者来说最具挑战性?
- RQ2开发者面临的问题是否特定于某些机器学习库,还是本质上源于机器学习本身?
- RQ3哪些机器学习库在不同阶段面临最大困难?其相对优势与劣势分别是什么?
- RQ4使用机器学习库的困难是否随时间保持一致,还是随着深度学习和新抽象的出现而演变?
主要发现
- 模型创建被确定为机器学习流水线中最困难的阶段,紧随其后的是数据准备,这两者问题数量最多且复杂度最高。
- 类型不匹配、数据清洗问题以及超参数选择是所有库中最常报告的问题,表明API可用性存在系统性挑战。
- H2O和Mahout在流水线初期阶段(数据准备和模型创建)表现出明显更高的困难程度,暗示其开发者支持较弱或API不够直观。
- scikit-learn在模型创建和超参数调优相关子类别中问题占比更高,表明即使是成熟的库也面临显著的可用性障碍。
- 自2017年以来,数据准备的困难程度上升,与深度学习的兴起以及Keras和TensorFlow等高级库的流行相吻合,表明深度学习工作流中的数据处理复杂性正在增加。
- 与训练相关的问题随时间呈缓慢但持续的增长趋势,可能源于深度学习模型复杂度和资源需求的提升;而评估相关问题在整个十年间保持稳定且未得到解决。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。