Skip to main content
QUICK REVIEW

[Paper Review] What Do Developers Ask About ML Libraries? A Large-scale Study Using Stack Overflow

Md Johirul Islam, Hoan Anh Nguyen|arXiv (Cornell University)|Jun 27, 2019
Software Engineering ResearchComputer Science11 citations
TL;DR

This study analyzes 3,243 highly upvoted Stack Overflow questions about 10 popular machine learning libraries to identify common challenges developers face. Using manual labeling and statistical analysis, it finds that model creation and data preparation are the most difficult stages, with type mismatches, parameter selection, and API misuse being persistent issues across libraries, highlighting a critical need for better static analysis and improved API design in ML software engineering.

ABSTRACT

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.

Motivation & Objective

  • To understand the specific difficulties software developers encounter when using machine learning libraries in practice.
  • To identify which stages of the machine learning pipeline are most error-prone and time-consuming for developers.
  • To determine whether certain problems are inherent to machine learning or specific to particular libraries.
  • To assess whether the difficulty of using ML libraries has changed over time, particularly with the rise of deep learning.

Proposed method

  • Collected 3,243 highly-rated Stack Overflow posts related to 10 popular ML libraries: TensorFlow, Keras, scikit-learn, Weka, Caffe, Theano, MLlib, Torch, Mahout, and H2O.
  • Employed a manual labeling process by three PhD students with ML expertise, achieving high inter-annotator agreement with conflict resolution via face-to-face meetings.
  • Classified questions into seven stages of the ML pipeline: data preparation, model creation, training, evaluation, prediction, deployment, and hyperparameter tuning.
  • Performed statistical analysis to compare problem frequency across libraries and time periods, using score thresholds to select high-quality posts.
  • Conducted both intra-library and inter-library analyses to compare strengths and weaknesses of individual libraries.
  • Tracked temporal trends from 2015 to 2018 by analyzing question volume and topic distribution over time.

Experimental results

Research questions

  • RQ1Which stage in the machine learning pipeline is the most difficult for developers?
  • RQ2Are the problems faced by developers specific to certain ML libraries or inherent to machine learning itself?
  • RQ3Which ML libraries face the most difficulties across different stages, and what are their relative strengths and weaknesses?
  • RQ4Have the difficulties in using ML libraries remained consistent over time, or have they evolved with the rise of deep learning and new abstractions?

Key findings

  • Model creation was identified as the most difficult stage in the ML pipeline, followed closely by data preparation, with the highest number of questions and highest complexity.
  • Type mismatches, data cleaning issues, and hyperparameter selection were the most frequently reported problems across all libraries, indicating systemic challenges in API usability.
  • H2O and Mahout showed disproportionately high difficulties in initial pipeline stages (data preparation and model creation), suggesting weaker developer support or less intuitive APIs.
  • scikit-learn had a higher proportion of questions in subcategories related to model creation and hyperparameter tuning, indicating that even mature libraries face significant usability hurdles.
  • Data preparation difficulties increased after 2017, coinciding with the rise of deep learning and the popularity of high-level libraries like Keras and TensorFlow, suggesting growing complexity in data handling for deep learning workflows.
  • Training-related problems showed a slow but steady increase over time, likely due to the growing complexity and resource demands of deep learning models, while evaluation-related issues remained stable and unresolved across the decade.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.