Tech & MLOps Research Briefing •

An Empirical Study of Self-Admitted Technical Debt in Machine Learning Software

An empirical analysis of Self-Admitted Technical Debt (SATD) in ML software reveals debt rates twice as high as general software and ML-specific debt types.

컴퓨터 모니터를 마주 보고 있는 사람
Photo by charlesdeluvio on Unsplash
Executive Summary & Core Takeaway (Direct Answer for AI & Decision Makers)

Analyzing 318 open-source ML projects, this study proves that SATD in ML software occurs roughly twice as often as in general software. Debt is concentrated in data preprocessing and model generation, with the discovery of ML-specific 'configuration debt' and 'inadequate testing debt'.

Introduction

Many enterprises are preoccupied with the benchmark performance of AI models, overlooking the ‘hidden costs’ they will encounter in production environments. The countless experiments and hyperparameter tuning required to improve model accuracy inevitably increase code complexity, which eventually returns as technical debt in the form of skyrocketing maintenance costs.

An example of Machine Learning-specific Self-Admitted Technical Debt (SATD) through the Mead-ML NLP application case study.
Figure 1. An example of Machine Learning-specific Self-Admitted Technical Debt (SATD) through the Mead-ML NLP application case study. — Source: Bhatia et al. (2026), Figure 1 of the source paper, CC BY 4.0

ML systems, in particular, make it difficult to establish strict abstraction boundaries due to data dependencies, often leaving experimental code paths intact. For leaders aiming to build sustainable AI services, it is essential to understand how these engineering flaws manifest in the open-source ecosystem and at which stages they accumulate most dangerously.

Research Findings

While the proliferation of open-source ML libraries has accelerated development speed, this study analyzes how the resulting sub-optimal design decisions lead to Technical Debt. The researchers analyzed Self-Admitted Technical Debt (SATD)—debt explicitly acknowledged by developers via source code comments—across 318 ML projects across five domains and a control group of 318 non-ML projects.

The analysis revealed that the median SATD ratio for ML projects (1.87%) was approximately twice as high as that for non-ML projects (0.92%). Within the ML pipeline, debt occurred most frequently during model building (29%) and data preprocessing (24.7%), and was lowest during the model validation stage. Furthermore, Survival Analysis confirmed the dynamical characteristic that ML debt is introduced much faster (median 10 days) and removed more quickly (median 1.1 years) than non-ML debt.

#

Executive Key Takeaways

  • 1 1. [Concentration of ML Debt] The iterative and experimental nature of ML development, combined with high code churn, serves as the primary driver for technical debt occurrence rates twice as high as those in general software.
  • 2 2. [Practical Response Direction] Enterprise ML leaders should systematically track configuration debt in model generation and preprocessing stages and schedule strategic refactoring immediately following high-churn intervals.
  • 3 3. [Analytical Limitations] Further verification is required to determine whether the cycle of rapid debt introduction and removal leads to stable software maintenance or is simply a signal of instability.

How Does Technical Debt in ML Software Differ from General Software and Where Is It Concentrated?

First, ML projects exhibit a significantly higher density of technical debt than general software. Analysis of 318 projects showed that the SATD occurrence rate in ML code (1.87%) was nearly double that of non-ML code (0.92%). This suggests that debt is not merely a result of code complexity, but is fostered by the high-churn development process unique to ML, where hyperparameters are iteratively modified and datasets are updated to find the optimal model.

Second, debt occurrence is extremely skewed toward specific stages of the pipeline. The results showed that most debt is concentrated in the Model Building (29%) and Data Preprocessing (24.7%) stages, whereas debt in the model validation stage was very low. This indicates that while many engineers employ frequent workarounds during the implementation phase to boost model performance, they apply relatively stricter standards during the validation phase.

Third, new ML-specific debt types—‘Configuration Debt’ and ‘Inadequate Testing Debt’—were identified. These include hard-coded search strategies or uncertain hyperparameter settings. Notably, the tendency for developers to neglect debt introduced in small files of low complexity, judging them to be ‘harmless,’ reveals a blind spot in enterprise code review processes.

[CAUTION] The Risk of 'Harmless' Debt Hidden in Small Files

SHAP analysis from this study confirmed that technical debt introduced in small files with low complexity tends to survive longer. Developers tend to urgently address debt in complex core logic, but push debt in seemingly simple auxiliary files down the priority list or ignore it entirely.

However, in ML systems, a single small configuration file can destroy the reproducibility of the entire model or trigger unexpected behavior in production. The judgment that ‘it is simple code, so it can be fixed later’ generates the most dangerous technical debt.

Analysis of the Taxonomy of ML-Specific Technical Debt

In traditional software engineering, the criteria for classifying technical debt have primarily focused on code quality or design flaws. Based on the existing taxonomy proposed by Bavota and Russo, the researchers proposed a new taxonomy extended to reflect the specificities of machine learning (ML) software (Figure 9 of the source paper). Analysis showed that Functional Requirement Debt accounted for the largest share at 34%, followed by Code Debt at 30%. Of particular note is the definition of ‘Configuration Debt’ and ‘Inadequate Testing Debt,’ ML-specific debt types not found in general software taxonomies.

Configuration Debt refers to debt arising from sub-optimal settings of key parameters that determine the behavior of an ML system or a lack of related documentation (Table 6 of the source paper). This primarily appears in algorithm hyperparameters, model settings, and data pipeline configurations. Real-world examples include comments such as “300 iterations seem sufficient, but it could be trained longer,” or TODO comments stating “batch_size and other extraction settings must be added to the file.” Such debt hinders model reproducibility and makes the process of finding optimal performance opaque, increasing long-term maintenance costs.

Inadequate Testing Debt refers to a state where tests for specific functions are completely missing or postponed to the future. Unlike ‘Test Debt’ in existing taxonomies, which focused on the degradation of test case quality, this concept focuses on the ‘existence’ of the tests themselves. The source paper (Table 6 of the source paper) presents comments such as “test fully_connected and conv2d functions” as representative cases. In ML systems, such missing tests can lead to performance degradation or unstable training; given the non-deterministic nature of ML, this increases the risk of critical errors leaking into production.

Consequently, while ML software showed a relatively lower proportion of Defect Debt or Design Debt compared to traditional software, the proportions of Requirement Debt and Configuration Debt were significantly higher (Figure 10 of the source paper). This phenomenon occurs because the ML development process relies on data-driven experimental iteration rather than strict specifications. Hyperparameters temporarily set or test cases omitted by developers during experimentation remain as comments in the code, eventually solidifying into ‘Self-Admitted Technical Debt (SATD)’ that erodes the reliability of the entire system.

Debt Distribution and Characteristics by ML Pipeline Stage

Technical debt in ML software appears across the entire pipeline but tends to be heavily concentrated in specific stages. According to the researchers’ analysis (Figure 11 of the source paper), Model Building accounted for the highest share of total Self-Admitted Technical Debt (SATD) at 29%, followed by Data Preprocessing at 24.7%. This suggests that debt in ML projects is primarily concentrated in the core implementation stages that determine model performance.

The primary reason for debt concentration in the model building stage is that iterative experimental processes, such as frequent retraining and hyperparameter tuning to address Concept Drift, are essential. The resulting high code churn becomes a breeding ground for makeshift implementations. For instance, examples in the source paper (Table 7 of the source paper) show unfinished implementation plans such as “train to classify the optimal number using Negative Log Likelihood” or deficiencies in optimization logic remaining as debt.

The data preprocessing stage also exhibits a very high debt occurrence rate. This is due to the complexity involved in handling the uncertainty of external data. A representative example provided by the researchers (Table 7 of the source paper) identified an “ugly hack to handle newline characters regardless of the input data encoding method.” This reflects the reality of ML development where temporary measures to make the model run are prioritized over sophisticated data pipeline design.

Conversely, the share of debt in the Model Validation stage was measured at the lowest level, at 4%. This is interpreted as developers allowing experimental attempts and temporary implementations during the implementation phase to boost performance, while applying relatively stricter standards to suppress the introduction of debt during the validation phase, where final deliverables are finalized.

As a result, the debt distribution of the ML pipeline shows a stark contrast between ‘flexibility of implementation’ and ‘rigor of validation.’ Specifically, debt accumulated in the model generation and data preprocessing stages goes beyond simple code quality degradation to become a core risk factor that undermines model reproducibility and causes unexpected behavior in production.

Dynamical Characteristics of ML Software via Debt Survival Analysis

Technical debt in machine learning (ML) software exhibits a very steep dynamical characteristic in both introduction and removal compared to general software. Survival Analysis conducted by the researchers (Figure 12 of the source paper) shows that the median time for debt to be first introduced in ML projects is only 10 days after file creation. This is approximately 140 times faster than the median debt introduction of 1,405 days in non-ML projects. This extreme difference stems from the iterative experimentation and rapid prototyping inherent to ML development, suggesting a strong tendency for developers to quickly introduce makeshift code to find the optimal model.

Conversely, the speed at which introduced debt is removed is also significantly faster than in non-ML projects. Analysis from the source paper (Figure 13 of the source paper) shows the median removal time for debt in ML projects is 1.1 years, which is approximately 3.7 times faster than the 4.1 years for non-ML projects. This is analyzed as being due to ML developers recognizing the rapid accumulation of debt and putting more effort into mitigating it, or the fact that code containing debt is often deleted entirely during model retraining and pipeline reconfiguration. In fact, 52% of debt removal cases in ML projects occurred when the source code file itself was completely deleted.

Consequently, ML software possesses a ‘high turnover’ structure where debt accumulates and vanishes very quickly. The researchers analyze that this phenomenon is not simply due to developer diligence but is closely linked to the high churn characteristic of ML development. As iterative tasks such as hyperparameter tuning and dataset updates occur frequently, a dynamical flow is formed where obsolete experimental code paths are naturally discarded or cleaned up during large-scale refactoring.

However, this rapid turnover does not necessarily guarantee a healthy software state. The researchers warn that the risk of exposure to debt is extremely high from the early stages of a project, citing the steep decline in the survival curve of ML projects (Figure 12 of the source paper). Specifically, the probability of an ML project remaining debt-free within the first year of development is only 0.36, in stark contrast to 0.9 for non-ML projects. Therefore, rather than becoming complacent with the fast removal rate, ML engineering teams must establish systematic management strategies from the introduction stage to ensure long-term system stability.

Characteristics of Long-lasting Debt

As important as the rate of accumulation is the question of which debt persists in the system long-term as a potential risk. Using Random Forest classifiers and SHAP (SHapley Additive exPlanations), the researchers compared the characteristics of quickly removed debt versus long-lasting SATD. The results revealed that long-lasting debt surprisingly tends to occur in files with low code complexity.

Analysis from the source paper (Figure 15 of the source paper) shows that while the median cyclomatic complexity of files containing quickly removed debt was 40, the median for files containing long-lasting debt was only 25. This suggests that developers perceive debt in high-complexity files as more dangerous and prioritize its resolution, while debt scattered in low-complexity files is relatively ignored or neglected.

The researchers interpret this phenomenon from the perspective of developer risk perception and resource allocation. Debt in low-complexity files is often misjudged as having a small impact on the overall system due to its perceived functional simplicity, or its repayment priority is delayed under the assumption that it will be easy to fix later. Specifically, it was found that even in low-complexity files, if the debt was introduced during a commit involving large-scale code churn or modifications across multiple files, the likelihood of it persisting long-term increases.

Consequently, managers of ML projects must move beyond the traditional approach of targeting only ‘complex code’ for refactoring. This is because ‘low-priority debt’ hidden within simple structures accumulates and eventually degrades overall system maintainability. Therefore, when refactoring high-churn sections, a strategy is needed to establish debt repayment plans based on the time of introduction and the scope of diffusion, regardless of file complexity.

Engineering Checklist for Preventing ML Technical Debt Accumulation

  • Externalization of Configuration: Are hyperparameters or data pipeline settings separated into version-controlled external files (e.g., YAML/JSON) rather than hard-coded in the source?
  • Refactoring High-Churn Sections: Is there a dedicated refactoring sprint planned to remove workarounds immediately after a surge in changes to model tuning and data preprocessing logic?
  • Strengthening Model Build Tests: Does the test code include invariants that verify input shape consistency and reproducibility under fixed seeds, beyond simple performance metrics?
  • Debt Visualization and Tracking: Are TODO comments and SATD metrics regularly scanned to visualize and manage the location and volume of debt via heatmaps?

Trade-off Between Experimental Development Culture and Engineering Discipline

This study is highly valuable as it numerically demonstrates how the ‘experimental nature’ of ML development translates into technical debt. The finding that both the introduction and removal speeds of debt are fast means that ML engineers are in an environment with a very high ‘debt turnover rate,’ where they recognize and strive to fix debt but simultaneously create new debt at an equally rapid pace.

However, since this study targeted open-source projects, it remains uncertain whether the same patterns appear in closed enterprise environments with strict governance. Yet, considering that most corporate AI teams transplant lab-level experimental approaches directly into production, the ‘configuration debt’ and ‘inadequate testing debt’ identified in this study are likely practical risks already faced by many companies.

Principles for Sustainable ML Software Management

While the occurrence of technical debt cannot be completely prevented, we propose three principles to systematically manage it and prevent system collapse.

  1. Principle of Configuration Visibility: Manage all model settings and experimental parameters separately from code to ensure traceability, and treat hard-coded constants as a core indicator of technical debt.
  2. Principle of Refactoring Synchronization: Always schedule a refactoring period for debt repayment immediately following high-churn development stages aimed at model performance improvement to prevent long-term debt residency.
  3. Principle of Expanding Validation Scope: Minimize ‘inadequate testing debt’ by mandating unit tests and property-based tests for data preprocessing and model build logic, rather than focusing solely on final model accuracy.

Further reading

References and Source Analysis Materials

Analyzed Paper 2026

An Empirical Study of Self-Admitted Technical Debt in Machine Learning Software

Authors: Aaditya Bhatia, Foutse Khomh, Bram Adams, Ahmed Hassan

This research briefing was written from the source paper with the help of AI tools (AI Research Agent · MLOps, AI Research Agent · Strategy). Reviewed by Jay PARK, who is responsible for it.

Related Tags: #Self-AdmittedTechnicalDebt #MLPipeline #CodeChurn #ConfigurationDebt

Read more

J

Jay PARK

Editor & Author

Reads papers, reports and incident records on how AI is used in practice and where it fails, and writes about them. AI agents help with the drafts; every article is checked against its source and published by Jay.