Skip to main content
QUICK REVIEW

[Paper Review] An Empirical Study of Self-Admitted Technical Debt in Machine Learning Software

Aaditya Bhatia, Foutse Khomh|arXiv (Cornell University)|Nov 20, 2023
Software Engineering ResearchComputer Science6 citations
TL;DR

This study investigates self-admitted technical debt (SATD) in machine learning (ML) software by analyzing 318 ML and non-ML open-source projects. It finds ML projects have twice the median SATD rate, introduce debt earlier, and exhibit distinct debt patterns tied to data preprocessing and model generation, with long-lasting debts often emerging in low-complexity, multi-file changes.

ABSTRACT

The emergence of open-source ML libraries such as TensorFlow and Google Auto ML has enabled developers to harness state-of-the-art ML algorithms with minimal overhead. However, during this accelerated ML development process, said developers may often make sub-optimal design and implementation decisions, leading to the introduction of technical debt that, if not addressed promptly, can have a significant impact on the quality of the ML-based software. Developers frequently acknowledge these sub-optimal design and development choices through code comments during software development. These comments, which often highlight areas requiring additional work or refinement in the future, are known as self-admitted technical debt (SATD). This paper aims to investigate SATD in ML code by analyzing 318 open-source ML projects across five domains, along with 318 non-ML projects. We detected SATD in source code comments throughout the different project snapshots, conducted a manual analysis of the identified SATD sample to comprehend the nature of technical debt in the ML code, and performed a survival analysis of the SATD to understand the evolution of such debts. We observed: i) Machine learning projects have a median percentage of SATD that is twice the median percentage of SATD in non-machine learning projects. ii) ML pipeline components for data preprocessing and model generation logic are more susceptible to debt than model validation and deployment components. iii) SATDs appear in ML projects earlier in the development process compared to non-ML projects. iv) Long-lasting SATDs are typically introduced during extensive code changes that span multiple files exhibiting low complexity.

Motivation & Objective

  • To investigate the prevalence and characteristics of self-admitted technical debt (SATD) in machine learning (ML) software compared to non-ML software.
  • To understand the nature and distribution of SATD across different components of ML pipelines, such as data preprocessing, model training, and deployment.
  • To analyze the temporal dynamics of SATD in ML projects, including introduction and resolution rates, and identify factors influencing long-lasting debt.
  • To extend existing SATD taxonomies by identifying ML-specific debt categories, such as 'inadequate testing' and 'configuration' debts.
  • To explore the relationship between software metrics and SATD longevity in ML code using survival analysis and machine learning interpretation.

Proposed method

  • Collected and analyzed 318 open-source ML and non-ML projects, focusing on source code comments to detect SATD using keyword-based heuristics.
  • Conducted manual analysis on a representative sample of SATD comments to develop and refine a taxonomy of ML-specific technical debt categories.
  • Applied survival analysis with the Kaplan-Meier estimator to model SATD resolution times, accounting for censored data to estimate debt lifespan.
  • Used statistical modeling and feature importance analysis (e.g., SHAP) to identify code-level characteristics associated with long-lasting SATD in ML projects.
  • Measured software metrics (e.g., code complexity, file size, change frequency) across files containing SATD to correlate with debt persistence.
  • Compared SATD introduction and removal rates between ML and non-ML projects using time-series analysis of version control history.

Experimental results

Research questions

  • RQ1RQ1: What is the prevalence of SATD in ML code compared to non-ML code?
  • RQ2RQ2: What are the dominant types and categories of SATD in ML code, and how do they differ from traditional software?
  • RQ3RQ3: In which components of the ML pipeline (e.g., data preprocessing, model training) is SATD most prevalent?
  • RQ4RQ4: How quickly are SATD introduced and resolved in ML projects compared to non-ML projects?
  • RQ5RQ5: What code-level characteristics are associated with long-lasting SATD in ML projects?

Key findings

  • ML projects have a median SATD percentage that is twice that of non-ML projects, with 2% of non-ML code containing SATD.
  • SATD is most prevalent in data preprocessing and model generation components, while validation and deployment components show lower debt rates.
  • SATD in ML projects is introduced 140 times faster than in non-ML projects, indicating a rapid accumulation of technical debt during development.
  • SATD in ML projects is resolved 3.7 times faster than in non-ML projects, suggesting a high turnover of debt items.
  • Long-lasting SATD in ML code is typically introduced during large-scale changes spanning multiple files with low code complexity.
  • Files with lower cyclomatic complexity are more likely to harbor SATD that persists over extended periods, indicating overlooked small files as high-risk areas.

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.